diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-30 15:31:32 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-30 15:31:32 +1200 |
commit | 639189ff3142181cd4f73395cd21108f42206396 (patch) | |
tree | cd0ad7e7bd82f241809af24062e3cd9266029ecc /vim | |
parent | Correct .vimrc incorrect option name (diff) | |
download | dotfiles-639189ff3142181cd4f73395cd21108f42206396.tar.gz dotfiles-639189ff3142181cd4f73395cd21108f42206396.zip |
Add variable existence guard to after/indent/vim
Diffstat (limited to 'vim')
-rw-r--r-- | vim/after/indent/vim.vim | 4 |
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 |