diff options
Diffstat (limited to 'vim/after')
-rw-r--r-- | vim/after/ftplugin/gitcommit.vim | 2 | ||||
-rw-r--r-- | vim/after/indent/vim.vim | 17 |
2 files changed, 10 insertions, 9 deletions
diff --git a/vim/after/ftplugin/gitcommit.vim b/vim/after/ftplugin/gitcommit.vim index b7538c9c..d903e84e 100644 --- a/vim/after/ftplugin/gitcommit.vim +++ b/vim/after/ftplugin/gitcommit.vim @@ -14,6 +14,6 @@ let b:undo_ftplugin = b:undo_ftplugin " Make angle brackets behave like mail quotes setlocal comments+=n:> -setlocal formatoptions+=cor +setlocal formatoptions+=coqr let b:undo_ftplugin = b:undo_ftplugin \ . '|setlocal comments< formatoptions<' diff --git a/vim/after/indent/vim.vim b/vim/after/indent/vim.vim index 4f2f42f8..73b4e430 100644 --- a/vim/after/indent/vim.vim +++ b/vim/after/indent/vim.vim @@ -1,13 +1,14 @@ " Observe VimL conventions for two-space indents setlocal shiftwidth=2 -if exists('b:undo_indent') - let b:undo_indent = b:undo_indent . '|setlocal shiftwidth<' +if v:version > 703 || v:version == 703 && has('patch693') + setlocal softtabstop=-1 +else + setlocal softtabstop=2 endif -" If we need to set 'softtabstop' too, do it -if &softtabstop == -1 - setlocal softtabstop=2 - if exists('b:undo_indent') - let b:undo_indent = b:undo_indent . '|setlocal softtabstop<' - endif +" Commands to undo the above +if exists('b:undo_indent') + let b:undo_indent = b:undo_indent + \ . '|setlocal shiftwidth<' + \ . '|setlocal softtabstop<' endif |