aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-09-19 18:55:55 +0200
committerChristian Clason <c.clason@uni-graz.at>2024-09-21 11:25:41 +0200
commit674c1aac11f4a4dd02945a1cc7061b5fc59d048c (patch)
treee10c3da750aff02f864b0d6e4027b56b0fad16dd
parent82f329a41d0de3bf66a2d91dbcc8769e8549491e (diff)
downloadrneovim-674c1aac11f4a4dd02945a1cc7061b5fc59d048c.tar.gz
rneovim-674c1aac11f4a4dd02945a1cc7061b5fc59d048c.tar.bz2
rneovim-674c1aac11f4a4dd02945a1cc7061b5fc59d048c.zip
vim-patch:41c7bba: runtime(zsh,sh): set and unset compiler in ftplugin
closes: vim/vim#15699 https://github.com/vim/vim/commit/41c7bbaf8f567d3a19ab2a6191ec9937fb890220 Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
-rw-r--r--runtime/ftplugin/sh.vim7
-rw-r--r--runtime/ftplugin/zsh.vim8
2 files changed, 11 insertions, 4 deletions
diff --git a/runtime/ftplugin/sh.vim b/runtime/ftplugin/sh.vim
index c47aa520e9..d2faf1a280 100644
--- a/runtime/ftplugin/sh.vim
+++ b/runtime/ftplugin/sh.vim
@@ -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
diff --git a/runtime/ftplugin/zsh.vim b/runtime/ftplugin/zsh.vim
index aee890024f..5e69336aad 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 @@ 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\>'