diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2023-10-08 19:17:19 +0200 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2023-10-08 23:31:49 +0200 |
| commit | e5855697e90e379128a018a8d88cf5ec008b0623 (patch) | |
| tree | 1b14d5bdcc6ca3022f3de284966d8b5a70d7fb2d /runtime/ftplugin/systemd.vim | |
| parent | 30d311ebcf9433f84bd4d98f9e049b36c9d352ac (diff) | |
| download | rneovim-e5855697e90e379128a018a8d88cf5ec008b0623.tar.gz rneovim-e5855697e90e379128a018a8d88cf5ec008b0623.tar.bz2 rneovim-e5855697e90e379128a018a8d88cf5ec008b0623.zip | |
vim-patch:1e33cd72b60a
runtime: make command name for &iskeywordprg more unique (vim/vim#13297)
See https://github.com/vim/vim/pull/13213/commits by @dkearns:
Rename 'keywordprg' user command to ShKeywordPrg as this is just a
leaking implementation detail.
https://github.com/vim/vim/commit/1e33cd72b60a119a038952bb658862d038602f76
Co-authored-by: Enno <Konfekt@users.noreply.github.com>
Diffstat (limited to 'runtime/ftplugin/systemd.vim')
| -rw-r--r-- | runtime/ftplugin/systemd.vim | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/runtime/ftplugin/systemd.vim b/runtime/ftplugin/systemd.vim index e60a5e4960..8bcacdd381 100644 --- a/runtime/ftplugin/systemd.vim +++ b/runtime/ftplugin/systemd.vim @@ -1,6 +1,7 @@ " Vim filetype plugin file " Language: systemd.unit(5) " Keyword Lookup Support: Enno Nagel <enno.nagel+vim@gmail.com> +" Latest Revision: 2023-10-07 if !exists('b:did_ftplugin') " Looks a lot like dosini files. @@ -9,11 +10,11 @@ endif if has('unix') && executable('less') if !has('gui_running') - command -buffer -nargs=1 Sman silent exe '!' . KeywordLookup_systemd(<q-args>) | redraw! + command -buffer -nargs=1 SystemdKeywordPrg silent exe '!' . KeywordLookup_systemd(<q-args>) | redraw! elseif has('terminal') - command -buffer -nargs=1 Sman silent exe 'term ' . KeywordLookup_systemd(<q-args>) + command -buffer -nargs=1 SystemdKeywordPrg silent exe 'term ' . KeywordLookup_systemd(<q-args>) endif - if exists(':Sman') == 2 + if exists(':SystemdKeywordPrg') == 2 if !exists('*KeywordLookup_systemd') function KeywordLookup_systemd(keyword) abort let matches = matchlist(getline(search('\v^\s*\[\s*.+\s*\]\s*$', 'nbWz')), '\v^\s*\[\s*(\k+).*\]\s*$') @@ -26,11 +27,11 @@ if has('unix') && executable('less') endfunction endif setlocal iskeyword+=- - setlocal keywordprg=:Sman + setlocal keywordprg=:SystemdKeywordPrg if !exists('b:undo_ftplugin') || empty(b:undo_ftplugin) let b:undo_ftplugin = 'setlocal keywordprg< iskeyword<' else - let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer Sman' + let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer SystemdKeywordPrg' endif endif endif |