diff options
Diffstat (limited to 'vim/after/indent/vim.vim')
-rw-r--r-- | vim/after/indent/vim.vim | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/vim/after/indent/vim.vim b/vim/after/indent/vim.vim index 6e2eb7f3..0767bca0 100644 --- a/vim/after/indent/vim.vim +++ b/vim/after/indent/vim.vim @@ -1,5 +1,5 @@ -" Remove inapplicable defaults from 'indentkeys' -" Should only need to undo this if the stock plugin didn't +" Remove inapplicable defaults from 'indentkeys'; we should only need to undo +" this if the stock plugin didn't already arrange that (before v7.3.539) setlocal indentkeys-=0#,0{,0},0),: if !exists('b:undo_indent') let b:undo_indent = 'setlocal indentkeys<' @@ -7,5 +7,8 @@ endif " Observe VimL conventions for two-space indents setlocal shiftwidth=2 -setlocal softtabstop=2 -let b:undo_indent .= '|setlocal shiftwidth< softtabstop<' +let b:undo_indent .= '|setlocal shiftwidth<' +if &softtabstop != -1 + let &l:softtabstop = &l:shiftwidth + let b:undo_indent .= '|setlocal softtabstop<' +endif |