]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
vimrc: Move some settings from after/ftplugin to vimrc.
authorSimon Ruderich <simon@ruderich.org>
Tue, 4 Aug 2009 12:36:59 +0000 (14:36 +0200)
committerSimon Ruderich <simon@ruderich.org>
Tue, 4 Aug 2009 12:42:06 +0000 (14:42 +0200)
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.

vim/after/ftplugin/crontab.vim [deleted file]
vim/after/ftplugin/deb.vim [deleted file]
vim/after/ftplugin/diff.vim [deleted file]
vim/after/ftplugin/gitcommit.vim [deleted file]
vim/after/ftplugin/perl.vim [deleted file]
vim/after/ftplugin/tar.vim [deleted file]
vim/after/ftplugin/vimperator.vim [deleted file]
vimrc

diff --git a/vim/after/ftplugin/crontab.vim b/vim/after/ftplugin/crontab.vim
deleted file mode 100644 (file)
index 252f3fa..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-" Vim filetype plugin file
-" Language:     Crontab
-" Maintainer:   Simon Ruderich <simon@ruderich.org>
-" 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 (file)
index f863206..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-" Vim filetype plugin file
-" Language:     deb files
-" Maintainer:   Simon Ruderich <simon@ruderich.org>
-" 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 (file)
index 6c06567..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-" Vim filetype plugin file
-" Language:     Diff
-" Maintainer:   Simon Ruderich <simon@ruderich.org>
-" 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 (file)
index 1c439f3..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-" Vim filetype plugin file
-" Language:     Git commit
-" Maintainer:   Simon Ruderich <simon@ruderich.org>
-" 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 (file)
index 9f116a7..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-" Vim filetype plugin file
-" Language:     Perl
-" Maintainer:   Simon Ruderich <simon@ruderich.org>
-" 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 (file)
index 457a319..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-" Vim filetype plugin file
-" Language:     tar files
-" Maintainer:   Simon Ruderich <simon@ruderich.org>
-" 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 (file)
index 2a57bd5..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-" Vim filetype plugin file
-" Language:     Vimperator
-" Maintainer:   Simon Ruderich <simon@ruderich.org>
-" Last Change:  2008-06-08
-
-
-" Use the same comment string as for Vim files.
-setlocal commentstring=\"%s
diff --git a/vimrc b/vimrc
index 5be58ef57276222c21321af5f49db9cec62fe157..d744a9df193de65c3939cba41cb6505dc178555e 100644 (file)
--- 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