X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=vimrc;h=1c64c8efd2b1fe429786a58d42592eab804e0422;hb=1c0839eb69ff09c6af460191a85d534a71ec4e7b;hp=bc126c8e63726739a3a235acf91c3810f4da7f76;hpb=4f34459eb6428f842c2fb1c546f571fa6911fd2c;p=config%2Fdotfiles.git diff --git a/vimrc b/vimrc index bc126c8..1c64c8e 100644 --- a/vimrc +++ b/vimrc @@ -1,6 +1,6 @@ " Vim main configuration file. -" Copyright (C) 2011-2012 Simon Ruderich +" Copyright (C) 2008-2012 Simon Ruderich " " This file is free software: you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by @@ -139,7 +139,11 @@ set incsearch " Activate syntax folding. if has('folding') set foldmethod=syntax - set foldcolumn=2 + " Only use fold column if we have enough space (for example in a (virtual) + " terminals). + if &columns > 80 + set foldcolumn=2 + endif set foldlevel=99 " no closed folds at default, 'foldenable' would disable " folding which is not what I want endif @@ -530,9 +534,10 @@ if has('syntax') \ '2003', '2004', '2005', '2006', '2007', '2008', \ '2009', '200a', '200b', '200c', '200d', '202f', \ '205f', '2060', '3000', 'feff'] - " Compatibility fix for Vim 6.4. + " Compatibility fix for Vim 6.4. Escape \ inside the " string or + " it won't work! execute ' for l:x in l:spaces' - \ '| call matchadd("Error", "\%u" . l:x)' + \ '| call matchadd("Error", "\\%u" . l:x)' \ '| endfor' endif endfunction