]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
vimrc: Only use 'foldcolumn' if there's enough space.
authorSimon Ruderich <simon@ruderich.org>
Thu, 7 Jun 2012 14:11:52 +0000 (16:11 +0200)
committerSimon Ruderich <simon@ruderich.org>
Thu, 7 Jun 2012 14:11:52 +0000 (16:11 +0200)
vimrc

diff --git a/vimrc b/vimrc
index bc126c8e63726739a3a235acf91c3810f4da7f76..cfd10d4099f86fa8488d3548225429cf5ae9d227 100644 (file)
--- a/vimrc
+++ b/vimrc
@@ -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