From 674c1aac11f4a4dd02945a1cc7061b5fc59d048c Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Thu, 19 Sep 2024 18:55:55 +0200 Subject: 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 --- runtime/ftplugin/sh.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'runtime/ftplugin/sh.vim') 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 " 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 -- cgit From b40b22f426899d58c32bd7cb788464dc535b1eb9 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Thu, 19 Sep 2024 19:46:50 +0200 Subject: vim-patch:f86568f: runtime(misc): simplify keywordprg in various ftplugins closes: vim/vim#15696 https://github.com/vim/vim/commit/f86568f91848ece0c5da2178881b3ed858dae799 Co-authored-by: Konfekt --- runtime/ftplugin/sh.vim | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'runtime/ftplugin/sh.vim') diff --git a/runtime/ftplugin/sh.vim b/runtime/ftplugin/sh.vim index d2faf1a280..4c7695dcc6 100644 --- a/runtime/ftplugin/sh.vim +++ b/runtime/ftplugin/sh.vim @@ -45,9 +45,7 @@ if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") endif if get(b:, "is_bash", 0) - if !has("gui_running") && executable("less") - command! -buffer -nargs=1 ShKeywordPrg silent exe '!bash -c "{ help "" 2>/dev/null || MANPAGER= man ""; } | LESS= less"' | redraw! - elseif has("terminal") + if exists(':terminal') == 2 command! -buffer -nargs=1 ShKeywordPrg silent exe ':term bash -c "help "" 2>/dev/null || man """' else command! -buffer -nargs=1 ShKeywordPrg echo system('bash -c "help " 2>/dev/null || MANPAGER= man ""') -- cgit