diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-08 13:39:30 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-08 13:39:30 +1300 |
commit | 02a368550446f9d2ee959905e0d633dc0f4edc98 (patch) | |
tree | 64f63d44ae28e4f29d1a6c98ba40068a76e429fb /vim/indent | |
parent | Add clustering for POSIX shell syntax groups (diff) | |
download | dotfiles-02a368550446f9d2ee959905e0d633dc0f4edc98.tar.gz dotfiles-02a368550446f9d2ee959905e0d633dc0f4edc98.zip |
Use consistent/thorough ftplugin/indent unloading
Unload all maps too, with silent! in case they don't exist.
Diffstat (limited to 'vim/indent')
-rw-r--r-- | vim/indent/csv.vim | 2 | ||||
-rw-r--r-- | vim/indent/tsv.vim | 2 | ||||
-rw-r--r-- | vim/indent/vim.vim | 10 |
3 files changed, 8 insertions, 6 deletions
diff --git a/vim/indent/csv.vim b/vim/indent/csv.vim index 682bc3a8..ae2b6f6c 100644 --- a/vim/indent/csv.vim +++ b/vim/indent/csv.vim @@ -1,5 +1,7 @@ " Manual indenting and literal tabs for CSVs setlocal noautoindent setlocal noexpandtab + +" Unload this indent plugin let b:undo_user_indent \ = 'setlocal autoindent< expandtab<' diff --git a/vim/indent/tsv.vim b/vim/indent/tsv.vim index 951b3e60..759602ed 100644 --- a/vim/indent/tsv.vim +++ b/vim/indent/tsv.vim @@ -1,5 +1,7 @@ " Manual indenting and literal tabs for TSVs setlocal noautoindent setlocal noexpandtab + +" Unload this indent plugin let b:undo_user_indent \ = 'setlocal autoindent< expandtab<' diff --git a/vim/indent/vim.vim b/vim/indent/vim.vim index 047a353d..138b9205 100644 --- a/vim/indent/vim.vim +++ b/vim/indent/vim.vim @@ -3,9 +3,7 @@ setlocal shiftwidth=2 setlocal softtabstop=2 setlocal tabstop=2 -" Ancient Vim can't use the '<' suffix syntax for resetting local integer -" options -if v:version > 700 - let b:undo_user_indent - \ = 'setlocal shiftwidth< softtabstop< tabstop<' -endif +" Unload this indent plugin; suppress errors because ancient Vim can't use the +" '<' suffix syntax for resetting local integer +let b:undo_user_indent + \ = 'silent! setlocal shiftwidth< softtabstop< tabstop<' |