runtime(zsh,sh): set and unset compiler in ftplugin Commit: https://github.com/vim/vim/commit/41c7bbaf8f567d3a19ab2a6191ec9937fb890220 Author: Konfekt <konf...@users.noreply.github.com> Date: Thu Sep 19 18:19:43 2024 +0200
runtime(zsh,sh): set and unset compiler in ftplugin closes: https://github.com/vim/vim/issues/15699 Signed-off-by: Konfekt <konf...@users.noreply.github.com> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/runtime/ftplugin/sh.vim b/runtime/ftplugin/sh.vim index c47aa520e..d2faf1a28 100644 --- a/runtime/ftplugin/sh.vim +++ b/runtime/ftplugin/sh.vim @@ -4,7 +4,7 @@ " Previous Maintainer: Dan Sharp " Contributor: Enno Nagel <ennonagel+...@gmail.com> " Eisuke Kawashima -" Last Change: 2024 May 06 by Vim Project (MANPAGER=) +" Last Change: 2024 Sep 19 by Vim Project (compiler shellcheck) if exists("b:did_ftplugin") finish @@ -54,6 +54,11 @@ if get(b:, "is_bash", 0) endif setlocal keywordprg=:ShKeywordPrg let b:undo_ftplugin ..= " | setl kp< | sil! delc -buffer ShKeywordPrg" + + if !exists('current_compiler') + compiler shellcheck + endif + let b:undo_ftplugin .= ' | compiler make' endif let &cpo = s:save_cpo diff --git a/runtime/ftplugin/zsh.vim b/runtime/ftplugin/zsh.vim index aee890024..5e69336aa 100644 --- a/runtime/ftplugin/zsh.vim +++ b/runtime/ftplugin/zsh.vim @@ -2,7 +2,7 @@ " Language: Zsh shell script " Maintainer: Christian Brabandt <c...@256bit.org> " Previous Maintainer: Nikolai Weibull <n...@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 @@ if executable('zsh') && &shell !~# '/\%(nologin\|false\)$' 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\>' -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/E1srK2g-009tdD-Gk%40256bit.org.