aboutsummaryrefslogtreecommitdiff
path: root/vim/indent
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-08 13:39:30 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-08 13:39:30 +1300
commit02a368550446f9d2ee959905e0d633dc0f4edc98 (patch)
tree64f63d44ae28e4f29d1a6c98ba40068a76e429fb /vim/indent
parentAdd clustering for POSIX shell syntax groups (diff)
downloaddotfiles-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.vim2
-rw-r--r--vim/indent/tsv.vim2
-rw-r--r--vim/indent/vim.vim10
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<'