path: root/vim
diff options
authorTom Ryder <tom@sanctum.geek.nz>2018-11-29 21:13:16 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-11-29 23:20:30 +1300
commitbc823fab3c7fdbb742fa0e2fb0e4cb19de1cf079 (patch)
treedb166ddfff957801652229ff14f1b68dc45d2cd2 /vim
parentAdd dummy function for HTML omnicompletion (diff)
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.
Diffstat (limited to 'vim')
1 files changed, 3 insertions, 8 deletions
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')
" 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'
+" 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')