aboutsummaryrefslogtreecommitdiff
path: root/vim/after/indent
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-06-30 15:31:32 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-06-30 15:31:32 +1200
commit639189ff3142181cd4f73395cd21108f42206396 (patch)
treecd0ad7e7bd82f241809af24062e3cd9266029ecc /vim/after/indent
parentCorrect .vimrc incorrect option name (diff)
downloaddotfiles-639189ff3142181cd4f73395cd21108f42206396.tar.gz
dotfiles-639189ff3142181cd4f73395cd21108f42206396.zip
Add variable existence guard to after/indent/vim
Diffstat (limited to 'vim/after/indent')
-rw-r--r--vim/after/indent/vim.vim4
1 files changed, 3 insertions, 1 deletions
diff --git a/vim/after/indent/vim.vim b/vim/after/indent/vim.vim
index e46aae54..4f2f42f8 100644
--- a/vim/after/indent/vim.vim
+++ b/vim/after/indent/vim.vim
@@ -1,6 +1,8 @@
" Observe VimL conventions for two-space indents
setlocal shiftwidth=2
-let b:undo_indent = b:undo_indent . '|setlocal shiftwidth<'
+if exists('b:undo_indent')
+ let b:undo_indent = b:undo_indent . '|setlocal shiftwidth<'
+endif
" If we need to set 'softtabstop' too, do it
if &softtabstop == -1