From: Simon Ruderich Date: Tue, 4 Aug 2009 12:36:59 +0000 (+0200) Subject: vimrc: Move some settings from after/ftplugin to vimrc. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=ce6d7e13fe1c3723fca171e0ab6781faea1344cf;p=config%2Fdotfiles.git vimrc: Move some settings from after/ftplugin to vimrc. This was done to reduce the number of small after/ftplugin files with only a few settings. Files with more or complex settings are still used. --- diff --git a/vim/after/ftplugin/crontab.vim b/vim/after/ftplugin/crontab.vim deleted file mode 100644 index 252f3fa..0000000 --- a/vim/after/ftplugin/crontab.vim +++ /dev/null @@ -1,9 +0,0 @@ -" Vim filetype plugin file -" Language: Crontab -" Maintainer: Simon Ruderich -" Last Change: 2008-05-20 - - -" Fix to allow Vim edit crontab files as crontab doesn't work with -" backupcopy=auto. -setlocal backupcopy=yes diff --git a/vim/after/ftplugin/deb.vim b/vim/after/ftplugin/deb.vim deleted file mode 100644 index f863206..0000000 --- a/vim/after/ftplugin/deb.vim +++ /dev/null @@ -1,8 +0,0 @@ -" Vim filetype plugin file -" Language: deb files -" Maintainer: Simon Ruderich -" Last Change: 2009-08-01 - - -" Make sure no spell checking is used in deb files. -setlocal nospell diff --git a/vim/after/ftplugin/diff.vim b/vim/after/ftplugin/diff.vim deleted file mode 100644 index 6c06567..0000000 --- a/vim/after/ftplugin/diff.vim +++ /dev/null @@ -1,8 +0,0 @@ -" Vim filetype plugin file -" Language: Diff -" Maintainer: Simon Ruderich -" Last Change: 2008-05-22 - - -" Make sure no spell checking is used in diff files. -setlocal nospell diff --git a/vim/after/ftplugin/gitcommit.vim b/vim/after/ftplugin/gitcommit.vim deleted file mode 100644 index 1c439f3..0000000 --- a/vim/after/ftplugin/gitcommit.vim +++ /dev/null @@ -1,10 +0,0 @@ -" Vim filetype plugin file -" Language: Git commit -" Maintainer: Simon Ruderich -" Last Change: 2009-03-14 - - -" Don't use the modeline as the diff created by `git commit -v` may contain -" one which could change the filetype or other settings of the commit window. -setlocal nomodeline -let g:secure_modelines_allowed_items = [] diff --git a/vim/after/ftplugin/perl.vim b/vim/after/ftplugin/perl.vim deleted file mode 100644 index 9f116a7..0000000 --- a/vim/after/ftplugin/perl.vim +++ /dev/null @@ -1,9 +0,0 @@ -" Vim filetype plugin file -" Language: Perl -" Maintainer: Simon Ruderich -" Last Change: 2008-10-28 - - -" Allow folding. -let perl_fold = 1 -let perl_fold_blocks = 1 diff --git a/vim/after/ftplugin/tar.vim b/vim/after/ftplugin/tar.vim deleted file mode 100644 index 457a319..0000000 --- a/vim/after/ftplugin/tar.vim +++ /dev/null @@ -1,8 +0,0 @@ -" Vim filetype plugin file -" Language: tar files -" Maintainer: Simon Ruderich -" Last Change: 2009-08-01 - - -" Make sure no spell checking is used in tar files. -setlocal nospell diff --git a/vim/after/ftplugin/vimperator.vim b/vim/after/ftplugin/vimperator.vim deleted file mode 100644 index 2a57bd5..0000000 --- a/vim/after/ftplugin/vimperator.vim +++ /dev/null @@ -1,8 +0,0 @@ -" Vim filetype plugin file -" Language: Vimperator -" Maintainer: Simon Ruderich -" Last Change: 2008-06-08 - - -" Use the same comment string as for Vim files. -setlocal commentstring=\"%s diff --git a/vimrc b/vimrc index 5be58ef..d744a9d 100644 --- a/vimrc +++ b/vimrc @@ -234,6 +234,31 @@ if has('autocmd') \ execute "normal! g'\"" | \ endif +" Fix to allow Vim edit crontab files as crontab doesn't work with +" backupcopy=auto. + autocmd FileType crontab setlocal backupcopy=yes + +" Make sure no spell checking is used in deb files. + autocmd FileType deb setlocal nospell + +" Make sure no spell checking is used in diff files. + autocmd FileType diff setlocal nospell + +" Don't use the modeline as the diff created by `git commit -v` may contain +" one which could change the filetype or other settings of the commit window. + autocmd FileType gitcommit setlocal nomodeline | + \ let g:secure_modelines_allowed_items = [] + +" Allow folding. + autocmd FileType perl let perl_fold = 1 | + \ let perl_fold_blocks = 1 + +" Make sure no spell checking is used in tar files. + autocmd FileType tar setlocal nospell + +" Use the same comment string as for Vim files. + autocmd FileType vimperator setlocal commentstring=\"%s + " Use diff filetype for mercurial patches in patch queue. autocmd BufReadPost */.hg/patches/* set filetype=diff