aboutsummaryrefslogtreecommitdiff
path: root/vim/after/indent/vim.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-12 16:38:09 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-12 20:45:38 +1300
commita2281bd121949f2215ee9257e28e2c0966f3f003 (patch)
treec0643cd7c649245c3f355629f5c9a94e464bf68e /vim/after/indent/vim.vim
parentExclude SC1090 (failed source) shellcheck error (diff)
downloaddotfiles-a2281bd121949f2215ee9257e28e2c0966f3f003.tar.gz
dotfiles-a2281bd121949f2215ee9257e28e2c0966f3f003.zip
Add guards for presence of b:undo_* var
This variable is not set in older Vims (early 6.x), and I think it's worth guarding for.
Diffstat (limited to 'vim/after/indent/vim.vim')
-rw-r--r--vim/after/indent/vim.vim6
1 files changed, 4 insertions, 2 deletions
diff --git a/vim/after/indent/vim.vim b/vim/after/indent/vim.vim
index b87964a4..0cb1d397 100644
--- a/vim/after/indent/vim.vim
+++ b/vim/after/indent/vim.vim
@@ -1,5 +1,7 @@
" Observe VimL conventions for two-space indents
setlocal shiftwidth=2
setlocal softtabstop=2
-let b:undo_indent = b:undo_indent
- \ . '|setlocal shiftwidth< softtabstop<'
+if exists('b:undo_indent')
+ let b:undo_indent = b:undo_indent
+ \ . '|setlocal shiftwidth< softtabstop<'
+endif