comparison runtime/ftplugin/muttrc.vim @ 33508:c252fbfde41d

runtime: make command name for &iskeywordprg more unique (#13297) Commit: https://github.com/vim/vim/commit/1e33cd72b60a119a038952bb658862d038602f76 Author: Enno <Konfekt@users.noreply.github.com> Date: Sun Oct 8 19:14:07 2023 +0200 runtime: make command name for &iskeywordprg more unique (https://github.com/vim/vim/issues/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. Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sun, 08 Oct 2023 19:15:08 +0200
parents 5510af40c77b
children
comparison
equal deleted inserted replaced
33507:acf5a30c2eac 33508:c252fbfde41d
1 " Vim filetype plugin file 1 " Vim filetype plugin file
2 " Language: mutt RC File 2 " Language: mutt RC File
3 " Previous Maintainer: Nikolai Weibull <now@bitwi.se> 3 " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
4 " Latest Revision: 2006-04-19 4 " Latest Revision: 2023-10-07
5 5
6 if exists("b:did_ftplugin") 6 if exists("b:did_ftplugin")
7 finish 7 finish
8 endif 8 endif
9 let b:did_ftplugin = 1 9 let b:did_ftplugin = 1
18 18
19 let &l:include = '^\s*source\>' 19 let &l:include = '^\s*source\>'
20 20
21 if has('unix') && executable('less') 21 if has('unix') && executable('less')
22 if !has('gui_running') 22 if !has('gui_running')
23 command -buffer -nargs=1 Sman 23 command -buffer -nargs=1 MuttrcKeywordPrg
24 \ silent exe '!' . 'LESS= MANPAGER="less --pattern=''^\s+' . <q-args> . '\b'' --hilite-search" man ' . 'muttrc' | 24 \ silent exe '!' . 'LESS= MANPAGER="less --pattern=''^\s+' . <q-args> . '\b'' --hilite-search" man ' . 'muttrc' |
25 \ redraw! 25 \ redraw!
26 elseif has('terminal') 26 elseif has('terminal')
27 command -buffer -nargs=1 Sman 27 command -buffer -nargs=1 MuttrcKeywordPrg
28 \ silent exe 'term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'muttrc' 28 \ silent exe 'term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'muttrc'
29 endif 29 endif
30 if exists(':Sman') == 2 30 if exists(':MuttrcKeywordPrg') == 2
31 setlocal iskeyword+=- 31 setlocal iskeyword+=-
32 setlocal keywordprg=:Sman 32 setlocal keywordprg=:MuttrcKeywordPrg
33 let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer Sman' 33 let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer MuttrcKeywordPrg'
34 endif 34 endif
35 endif 35 endif
36 36
37 let &cpo = s:cpo_save 37 let &cpo = s:cpo_save
38 unlet s:cpo_save 38 unlet s:cpo_save