aboutsummaryrefslogtreecommitdiff
path: root/vim/after/indent/vim.vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim/after/indent/vim.vim')
-rw-r--r--vim/after/indent/vim.vim11
1 files changed, 7 insertions, 4 deletions
diff --git a/vim/after/indent/vim.vim b/vim/after/indent/vim.vim
index 548d3e5c..3d439458 100644
--- a/vim/after/indent/vim.vim
+++ b/vim/after/indent/vim.vim
@@ -1,8 +1,11 @@
+" Remove inapplicable defaults from 'indentkeys'
+" Should only need to undo this if the stock plugin didn't
+setlocal indentkeys-=0#,0{,0},0),:
+if !exists('b:undo_indent')
+ let b:undo_indent = '|setlocal indentkeys<'
+endif
+
" Observe VimL conventions for two-space indents
setlocal shiftwidth=2
setlocal softtabstop=2
let b:undo_indent .= '|setlocal shiftwidth< softtabstop<'
-
-" Remove inapplicable defaults from 'indentkeys'
-setlocal indentkeys-=0#,0{,0},0),:
-let b:undo_indent .= '|setlocal indentkeys<'