runtime(zsh,sh): set and unset compiler in ftplugin
closes: #15699
Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/runtime/ftplugin/zsh.vim b/runtime/ftplugin/zsh.vim
index aee8900..5e69336 100644
--- a/runtime/ftplugin/zsh.vim
+++ b/runtime/ftplugin/zsh.vim
@@ -2,7 +2,7 @@
" Language: Zsh shell script
" Maintainer: Christian Brabandt <cb@256bit.org>
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
-" Latest Revision: 2024 May 06 by Vim Project (MANPAGER=)
+" Latest Revision: 2024 Sep 19
" License: Vim (see :h license)
" Repository: https://github.com/chrisbra/vim-zsh
@@ -26,11 +26,13 @@
else
command! -buffer -nargs=1 ZshKeywordPrg echo system('MANPAGER= zsh -c "autoload -Uz run-help; run-help <args> 2>/dev/null"')
endif
+ setlocal keywordprg=:ZshKeywordPrg
+ let b:undo_ftplugin .= '| setl keywordprg< | sil! delc -buffer ZshKeywordPrg'
+
if !exists('current_compiler')
compiler zsh
endif
- setlocal keywordprg=:ZshKeywordPrg
- let b:undo_ftplugin .= 'keywordprg< | sil! delc -buffer ZshKeywordPrg'
+ let b:undo_ftplugin .= ' | compiler make'
endif
let b:match_words = '\<if\>:\<elif\>:\<else\>:\<fi\>'