aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2014-05-23 20:18:39 -0400
committerTeddy Wing2014-05-23 20:18:39 -0400
commit472c9d93701f9993e6451c3c29d26266581fb275 (patch)
treed9db85df3fa9ae0e9d92f96a0642e98366e368dd
parent8317474a55b055832a877c1c142a30cdf51b8314 (diff)
downloaddotvim-472c9d93701f9993e6451c3c29d26266581fb275.tar.bz2
vimrc: move gitcommit settings to ftplugin
Move gitcommit indentation settings from vimrc to an ftplugin file. Keeps things more organised and makes for a cleaner vimrc.
-rw-r--r--ftplugin/gitcommit.vim6
-rw-r--r--vimrc10
2 files changed, 7 insertions, 9 deletions
diff --git a/ftplugin/gitcommit.vim b/ftplugin/gitcommit.vim
new file mode 100644
index 0000000..fdffb20
--- /dev/null
+++ b/ftplugin/gitcommit.vim
@@ -0,0 +1,6 @@
+" Git commit message settings
+
+setlocal expandtab
+setlocal tabstop=2
+setlocal softtabstop=2
+setlocal shiftwidth=2
diff --git a/vimrc b/vimrc
index be42bb7..5f66e1d 100644
--- a/vimrc
+++ b/vimrc
@@ -147,6 +147,7 @@
" http://vim.wikia.com/wiki/Default_filetype#Setting_a_default_filetype
" and http://marc.info/?l=vim&m=100254210012793&w=2. Instead the
" variable needed to be set directly.
+" * Move gitcommit indentation settings from vimrc to ftplugin/gitcommit
"
@@ -482,15 +483,6 @@ command! CopyModeToggle call CopyModeToggle()
" endif
-" Indentation rules by file type
-augroup filetype_indentation
- autocmd!
-
- " git commit messages
- autocmd FileType gitcommit setlocal expandtab tabstop=2 softtabstop=2 shiftwidth=2
-augroup END
-
-
" Project Settings
" ================