]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - vimrc
Use setup.sh instead of Makefile for setup process.
[config/dotfiles.git] / vimrc
diff --git a/vimrc b/vimrc
index e44b0217d50d37d2431069f16286d27d3532b8b7..a3163f81e1275616f5174ee3096aac05c37ffb8d 100644 (file)
--- a/vimrc
+++ b/vimrc
@@ -89,9 +89,6 @@ set listchars=trail:-
 
 " EDITOR SETTINGS
 
-" Don't use any modelines.
-set nomodeline
-
 " When completing paths first use the longest path then display a list of all
 " possible files.
 set wildmode=longest,list
@@ -151,14 +148,16 @@ endif
 " SYNTAX SETTINGS
 
 " Activate syntax coloring.
-syntax enable
+if has("syntax")
+    syntax enable
 
 " Highlight text longer then 78 characters. Thanks to Tony Mechelynck
 " <antoine.mechelynck@gmail.com> from the Vim mailing list.
-if v:version >= 700
-    2match Todo /\%>78v./
-else
-    match Todo /\%>78v./
+    if v:version >= 700
+        2match Todo /\%>78v./
+    else
+        match Todo /\%>78v./
+    endif
 endif
 
 
@@ -171,6 +170,16 @@ let NERDCreateDefaultMappings = 0
 map <Leader><Leader> <plug>NERDCommenterToggle
 
 
-" Automatically save and the load the file state (stored in ~/.vim/view).
-autocmd BufWrite * mkview
-autocmd BufRead  * loadview
+" AUTO COMMANDS
+
+" Use a custom auto group to prevent problems when the vimrc files is sourced
+" twice.
+if has("autocmd")
+    augroup vimrc
+    autocmd!
+
+" Use diff filetype for mercurial patches in patch queue.
+        autocmd BufReadPost */.hg/patches/* set filetype=diff
+
+    augroup END
+endif