aboutsummaryrefslogtreecommitdiff
path: root/vim/after/indent
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-07-06 09:22:52 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-07-06 09:22:52 +1200
commitfb2b8f82bb3fc999191b0a225cccc2c15c8284ea (patch)
tree081d11db6215fda364a16a9d8fb67f9f1e418745 /vim/after/indent
parentAdd \k, \q, and \y .vimrc mappings (diff)
downloaddotfiles-fb2b8f82bb3fc999191b0a225cccc2c15c8284ea.tar.gz
dotfiles-fb2b8f82bb3fc999191b0a225cccc2c15c8284ea.zip
Rearrange Vim's VimL indent file
Diffstat (limited to 'vim/after/indent')
-rw-r--r--vim/after/indent/vim.vim17
1 files changed, 9 insertions, 8 deletions
diff --git a/vim/after/indent/vim.vim b/vim/after/indent/vim.vim
index dd5f4f32..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