Vim 5 compatibility.
[profile.git] / .vimrc
diff --git a/.vimrc b/.vimrc
index 4e1c4b8..500794f 100644 (file)
--- a/.vimrc
+++ b/.vimrc
@@ -74,6 +74,10 @@ inoremap <C-b> <C-p>
 " Use ^L to show matching completions but don't select one.
 inoremap <C-l> <C-n><C-p>
 
+" Swap jump keys.
+noremap ' `
+noremap ` '
+
 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
 " Handle options only available in Vim 5 and above.
 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@@ -226,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.