From 832c2a2fe8a769c0fe7d8d441148fbf82e762a4c Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Tue, 4 Aug 2009 11:41:03 +0100 Subject: [PATCH] Vim 5 compatibility. Vim 5 doesn't have printf() or v:servername. --- .vimrc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.vimrc b/.vimrc index eb9715f..500794f 100644 --- a/.vimrc +++ b/.vimrc @@ -230,9 +230,18 @@ fun! Show_TitleString() if bufname("") == "" let l:ts1='Vim' else - let l:ts1=printf("%2d: %s", bufnr(""), expand('%t')) + " Vim 5 doesn't have printf. + let l:ts1=bufnr("") + if l:ts1 < 10 + let l:ts1=" " . l:ts1 + endif + let l:ts1=l:ts1 . ": " . expand('%t') + endif + let l:ts1=l:ts1 . " (" . getcwd() . ")" + if has("clientserver") + let l:ts1=l:ts1 . " " . v:servername endif - return printf("%s (%s) %s", l:ts1, getcwd(), v:servername) + return l:ts1 endfun " Show the status line. -- 2.7.4