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/modconf.vim | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'runtime/ftplugin/modconf.vim') diff --git a/runtime/ftplugin/modconf.vim b/runtime/ftplugin/modconf.vim index 22d18a9aad..df1c787e70 100644 --- a/runtime/ftplugin/modconf.vim +++ b/runtime/ftplugin/modconf.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: modules.conf(5) configuration file " Previous Maintainer: Nikolai Weibull -" Latest Revision: 2023-10-07 +" Latest Revision: 2024-09-19 (simplify keywordprg #15696) if exists("b:did_ftplugin") finish @@ -16,20 +16,13 @@ let b:undo_ftplugin = "setl com< cms< inc< fo<" setlocal comments=:# commentstring=#\ %s include=^\\s*include setlocal formatoptions-=t formatoptions+=croql -if has('unix') && executable('less') - if !has('gui_running') - command -buffer -nargs=1 ModconfKeywordPrg - \ silent exe '!' . 'LESS= MANPAGER="less --pattern=''^\s{,8}' . . '\b'' --hilite-search" man ' . 'modprobe.d' | - \ redraw! - elseif has('terminal') - command -buffer -nargs=1 ModconfKeywordPrg - \ silent exe ':term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s{,8}' . . '\b', '\') . ''' --hilite-search" man ' . 'modprobe.d' - endif - if exists(':ModconfKeywordPrg') == 2 - setlocal iskeyword+=- - setlocal keywordprg=:ModconfKeywordPrg - let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer ModconfKeywordPrg' - endif +if has('unix') && executable('less') && exists(':terminal') == 2 + command -buffer -nargs=1 ModconfKeywordPrg + \ silent exe ':term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s{,8}' . . '\b', '\') . ''' --hilite-search" man ' . 'modprobe.d' + setlocal iskeyword+=- + setlocal keywordprg=:ModconfKeywordPrg + let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer ModconfKeywordPrg' +endif endif let &cpo = s:cpo_save -- cgit From 91b7a421eacefa795d7a60b9d1332d02a3a87504 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sat, 21 Sep 2024 10:26:12 +0200 Subject: vim-patch:87b6565: runtime(modconf): remove erroneous :endif in ftplugin regression introduced in f86568f91848ece0c5da closes: vim/vim#15704 https://github.com/vim/vim/commit/87b65652e806ed5ae999f8b1f46b9306d48c9326 Co-authored-by: zeertzjq --- runtime/ftplugin/modconf.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/ftplugin/modconf.vim') diff --git a/runtime/ftplugin/modconf.vim b/runtime/ftplugin/modconf.vim index df1c787e70..68ce69a446 100644 --- a/runtime/ftplugin/modconf.vim +++ b/runtime/ftplugin/modconf.vim @@ -1,7 +1,8 @@ " Vim filetype plugin file " Language: modules.conf(5) configuration file +" Maintainer: This runtime file is looking for a new maintainer. " Previous Maintainer: Nikolai Weibull -" Latest Revision: 2024-09-19 (simplify keywordprg #15696) +" Latest Revision: 2024-09-20 (remove erroneous endif) if exists("b:did_ftplugin") finish @@ -23,7 +24,6 @@ if has('unix') && executable('less') && exists(':terminal') == 2 setlocal keywordprg=:ModconfKeywordPrg let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer ModconfKeywordPrg' endif -endif let &cpo = s:cpo_save unlet s:cpo_save -- cgit