]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - vimrc
vim/bundle/gundo: Add as submodule.
[config/dotfiles.git] / vimrc
diff --git a/vimrc b/vimrc
index 8f78345060260b36c373e10efcfa37e80c6b4f99..39cadf0cc03a383c4b3d650d2ec4e113263005c4 100644 (file)
--- a/vimrc
+++ b/vimrc
@@ -388,7 +388,7 @@ if has('statusline')
         endif
     endfunction
 
-    " Display unexpected 'fileformat' and 'fileencoding' settings.
+    " Display unexpected 'fileformat', 'fileencoding' and 'bomb' settings.
     function! s:StatuslineFileFormat()
         if &fileformat != 'unix'
             return '[' . &fileformat . ']'
@@ -404,6 +404,13 @@ if has('statusline')
             return ''
         endif
     endfunction
+    function! s:StatuslineFileBOMB()
+        if exists('+bomb') && &bomb
+            return '[BOM]'
+        else
+            return ''
+        endif
+    endfunction
 
     " Return current syntax group in brackets or nothing if there's none.
     function! s:StatuslineSyntaxGroup()
@@ -428,6 +435,9 @@ if has('statusline')
     function! SFE()
         return s:StatuslineFileEncoding()
     endfunction
+    function! SFB()
+        return s:StatuslineFileBOMB()
+    endfunction
     function! SSG()
         return s:StatuslineSyntaxGroup()
     endfunction
@@ -452,6 +462,7 @@ if has('statusline')
         set statusline+=%#Error#      " display warnings
         set statusline+=%{SFF()}      "   - unexpected file format
         set statusline+=%{SFE()}      "   - unexpected file encoding
+        set statusline+=%{SFB()}      "   - unexpected file byte order mask
         set statusline+=%##           " continue with normal colors
     endif
 
@@ -912,6 +923,10 @@ if has('eval')
 
     " Switch to corresponding header/source file.
     nnoremap <silent> <Leader>h :FSHere<CR>
+
+" netrw settings.
+    " Don't create ~/.vim/.netrwhist history file.
+    let g:netrw_dirhistmax = 0
 endif
 
 
@@ -995,6 +1010,10 @@ if has('autocmd')
 " the recommendation for git commit messages (http://tpope.net/node/106).
         autocmd FileType gitcommit let g:secure_modelines_allowed_items = [] |
                                  \ setlocal textwidth=72
+" Fix 'include' setting for shell files to recognize '.' and 'source'
+" commands. Use &l:include instead of setlocal which requires excessive
+" escaping of \.
+        autocmd FileType sh let &l:include = '^\s*\(\.\|source\)\s\+'
 " Use the same comment string as for Vim files in Vimperator files.
         autocmd FileType vimperator setlocal commentstring=\"%s
 " Use TeX compiler for (La)TeX files.