]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - vimrc
vimrc: Only enable some items in securemodelines.
[config/dotfiles.git] / vimrc
diff --git a/vimrc b/vimrc
index 6c3e292145226b121326a392c6103c7d3be84944..f482daf98259c2809c12375af34d0313c39383c5 100644 (file)
--- a/vimrc
+++ b/vimrc
@@ -235,6 +235,14 @@ if v:version >= 700
     set listchars+=nbsp:!
 endif
 
+" Don't draw the vertical split separator by using space as character. Thanks
+" to scp1 in #vim on Freenode (2012-06-16 16:12 CEST) for the idea to use a
+" non-breakable space. But a simple space works as well, as long as the
+" current color scheme is not reset.
+if has('windows') && has('folding')
+    set fillchars+=vert:\  " comment to prevent trailing whitespace
+endif
+
 if has('statusline')
     " Always display the status line even if there is only one window.
     set laststatus=2
@@ -593,6 +601,8 @@ if has('syntax')
 
 " Settings for specific filetypes.
 
+    " C
+    let g:c_no_if0_fold = 1 " fix weird double fold in #if0 in recent versions
     " Haskell.
     let g:hs_highlight_delimiters = 1
     let g:hs_highlight_boolean = 1
@@ -627,11 +637,17 @@ if has('eval')
         silent! execute 'call pathogen#runtime_append_all_bundles()'
     endif
 
+" Settings for securemodelines.
+    " Only allow items I need (also includes spl which is not enabled by
+    " default).
+    let g:secure_modelines_allowed_items = ['ft', 'spl', 'fdm',
+                                          \ 'sw', 'sts', 'noet']
+
 " Settings for the NERD commenter.
     " Don't create any mappings I don't want to use.
     let g:NERDCreateDefaultMappings = 0
     " Map toggle comment.
-    map <Leader><Leader> <Plug>NERDCommenterToggle
+    nmap <Leader><Leader> <Plug>NERDCommenterToggle
 
 " XPTemplate settings.
     " Try to maintain snippet rendering even after editing outside of a