From 02a368550446f9d2ee959905e0d633dc0f4edc98 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 8 Nov 2017 13:39:30 +1300 Subject: Use consistent/thorough ftplugin/indent unloading Unload all maps too, with silent! in case they don't exist. --- vim/indent/csv.vim | 2 ++ vim/indent/tsv.vim | 2 ++ vim/indent/vim.vim | 10 ++++------ 3 files changed, 8 insertions(+), 6 deletions(-) (limited to 'vim/indent') 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<' -- cgit v1.2.3