From bc823fab3c7fdbb742fa0e2fb0e4cb19de1cf079 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 29 Nov 2018 21:13:16 +1300 Subject: Simplify ft=sh subtype flag clearing These flags are also set and examined by the stock syntax for the "sh" filetype, so checking for whether they're set at runtime for the ftplugin just confuses things. Just clear them unconditionally instead. --- vim/after/ftplugin/sh.vim | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'vim') diff --git a/vim/after/ftplugin/sh.vim b/vim/after/ftplugin/sh.vim index fdc42ccc..431e5037 100644 --- a/vim/after/ftplugin/sh.vim +++ b/vim/after/ftplugin/sh.vim @@ -34,14 +34,9 @@ if exists('b:is_posix') endif " Queue up undo commands to clear the shell language flags that we set for -" this buffer during filetype detection in filetype.vim -if exists('b:is_bash') - let b:undo_ftplugin .= '|unlet b:is_bash' -elseif exists('b:is_kornshell') - let b:undo_ftplugin .= '|unlet b:is_kornshell' -elseif exists('b:is_posix') - let b:undo_ftplugin .= '|unlet b:is_posix' -endif +" this buffer during filetype detection in filetype.vim, or that the stock +" syntax highlighting chose for us +let b:undo_ftplugin .= '|unlet! b:is_bash b:is_kornshell b:is_posix' " Stop here if the user doesn't want ftplugin mappings if exists('g:no_plugin_maps') || exists('g:no_sh_maps') -- cgit v1.2.3