forked from aniani/vim
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>
This commit is contained in:
committed by
Christian Brabandt
parent
c18a9d5835
commit
41c7bbaf8f
@@ -4,7 +4,7 @@
|
|||||||
" Previous Maintainer: Dan Sharp
|
" Previous Maintainer: Dan Sharp
|
||||||
" Contributor: Enno Nagel <ennonagel+vim@gmail.com>
|
" Contributor: Enno Nagel <ennonagel+vim@gmail.com>
|
||||||
" Eisuke Kawashima
|
" 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")
|
if exists("b:did_ftplugin")
|
||||||
finish
|
finish
|
||||||
@@ -54,6 +54,11 @@ if get(b:, "is_bash", 0)
|
|||||||
endif
|
endif
|
||||||
setlocal keywordprg=:ShKeywordPrg
|
setlocal keywordprg=:ShKeywordPrg
|
||||||
let b:undo_ftplugin ..= " | setl kp< | sil! delc -buffer 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
|
endif
|
||||||
|
|
||||||
let &cpo = s:save_cpo
|
let &cpo = s:save_cpo
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
" Language: Zsh shell script
|
" Language: Zsh shell script
|
||||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
" 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)
|
" License: Vim (see :h license)
|
||||||
" Repository: https://github.com/chrisbra/vim-zsh
|
" Repository: https://github.com/chrisbra/vim-zsh
|
||||||
|
|
||||||
@@ -26,11 +26,13 @@ if executable('zsh') && &shell !~# '/\%(nologin\|false\)$'
|
|||||||
else
|
else
|
||||||
command! -buffer -nargs=1 ZshKeywordPrg echo system('MANPAGER= zsh -c "autoload -Uz run-help; run-help <args> 2>/dev/null"')
|
command! -buffer -nargs=1 ZshKeywordPrg echo system('MANPAGER= zsh -c "autoload -Uz run-help; run-help <args> 2>/dev/null"')
|
||||||
endif
|
endif
|
||||||
|
setlocal keywordprg=:ZshKeywordPrg
|
||||||
|
let b:undo_ftplugin .= '| setl keywordprg< | sil! delc -buffer ZshKeywordPrg'
|
||||||
|
|
||||||
if !exists('current_compiler')
|
if !exists('current_compiler')
|
||||||
compiler zsh
|
compiler zsh
|
||||||
endif
|
endif
|
||||||
setlocal keywordprg=:ZshKeywordPrg
|
let b:undo_ftplugin .= ' | compiler make'
|
||||||
let b:undo_ftplugin .= 'keywordprg< | sil! delc -buffer ZshKeywordPrg'
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let b:match_words = '\<if\>:\<elif\>:\<else\>:\<fi\>'
|
let b:match_words = '\<if\>:\<elif\>:\<else\>:\<fi\>'
|
||||||
|
Reference in New Issue
Block a user