From d115ba06a04b0772246da35af8e9dad87933a0d1 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 30 Jun 2018 00:51:23 +1200 Subject: Review vim/ftplugin and vim/indent files --- vim/after/indent/vim.vim | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'vim/after/indent/vim.vim') diff --git a/vim/after/indent/vim.vim b/vim/after/indent/vim.vim index bfd92aeb..e46aae54 100644 --- a/vim/after/indent/vim.vim +++ b/vim/after/indent/vim.vim @@ -1,7 +1,11 @@ " Observe VimL conventions for two-space indents setlocal shiftwidth=2 -setlocal softtabstop=2 -if exists('b:undo_indent') - let s:ui = '|setlocal shiftwidth< softtabstop<' - let b:undo_indent = b:undo_indent . s:ui +let b:undo_indent = b:undo_indent . '|setlocal shiftwidth<' + +" 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 endif -- cgit v1.2.3