]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
vimrc: Fix 'include' for sh files.
authorSimon Ruderich <simon@ruderich.org>
Thu, 11 Apr 2013 14:02:34 +0000 (16:02 +0200)
committerSimon Ruderich <simon@ruderich.org>
Thu, 11 Apr 2013 14:02:34 +0000 (16:02 +0200)
vimrc

diff --git a/vimrc b/vimrc
index d0c490c2f187fc4cda6220a30161fdce94203599..39cadf0cc03a383c4b3d650d2ec4e113263005c4 100644 (file)
--- a/vimrc
+++ b/vimrc
@@ -1010,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.