]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(zsh,sh): set and unset compiler in ftplugin
authorKonfekt <Konfekt@users.noreply.github.com>
Thu, 19 Sep 2024 16:19:43 +0000 (18:19 +0200)
committerChristian Brabandt <cb@256bit.org>
Thu, 19 Sep 2024 16:19:43 +0000 (18:19 +0200)
closes: #15699

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/ftplugin/sh.vim
runtime/ftplugin/zsh.vim

index c47aa520e9970e5c0643bfb3687c0874952664bb..d2faf1a2801f5bb70af452f9f3e40a04ef41ec04 100644 (file)
@@ -4,7 +4,7 @@
 " Previous Maintainer: Dan Sharp
 " Contributor:         Enno Nagel <ennonagel+vim@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
index aee890024f1eefc03d8f8e403d244443596751d2..5e69336aad9039e5dc36dea4ad06056b2f3c65a6 100644 (file)
@@ -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 @@ 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\>'