Vim 5 fixes.
authorIain Patterson <me@iain.cx>
Mon, 10 Feb 2014 16:48:10 +0000 (16:48 +0000)
committerIain Patterson <me@iain.cx>
Mon, 10 Feb 2014 17:07:04 +0000 (17:07 +0000)
Trying to set viminfo+=! fails on Vim 5 if viminfo doesn't already
contain a '{N} chunk.  Set it to the Vim 6+ default.

.vimrc

diff --git a/.vimrc b/.vimrc
index 14401a6..31012c7 100644 (file)
--- a/.vimrc
+++ b/.vimrc
@@ -638,6 +638,11 @@ version 5.4
 " Reuse windows when using sbuffer.
 se switchbuf=useopen
 
+" Vim 5 requires a 'n setting for viminfo.
+if ! &viminfo
+  se viminfo='100
+endif
+
 " Allow persistent variable saving for localvimrc.
 se viminfo+=!