diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2023-08-24 09:08:24 +0900 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2023-08-24 11:33:06 +0900 |
| commit | e2c10dea19a329f7913eb1d6110f10ec4bc525f9 (patch) | |
| tree | 584f2a580ab4d0e280e45de88e8fc1011535aeaf /runtime/ftplugin/sshconfig.vim | |
| parent | 327e3fab9e66701334a55dd7893283acb85899a2 (diff) | |
| download | rneovim-e2c10dea19a329f7913eb1d6110f10ec4bc525f9.tar.gz rneovim-e2c10dea19a329f7913eb1d6110f10ec4bc525f9.tar.bz2 rneovim-e2c10dea19a329f7913eb1d6110f10ec4bc525f9.zip | |
vim-patch:2f25e40b1f54
runtime: configure keywordpg for some file types (vim/vim#5566)
https://github.com/vim/vim/commit/2f25e40b1f545f4aa38377f0c25effb112b5d1ef
Co-authored-by: Enno <Konfekt@users.noreply.github.com>
Diffstat (limited to 'runtime/ftplugin/sshconfig.vim')
| -rw-r--r-- | runtime/ftplugin/sshconfig.vim | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/runtime/ftplugin/sshconfig.vim b/runtime/ftplugin/sshconfig.vim index d933ce0527..214e4928a0 100644 --- a/runtime/ftplugin/sshconfig.vim +++ b/runtime/ftplugin/sshconfig.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file -" Language: OpenSSH client configuration file -" Previous Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2008-07-09 +" Language: OpenSSH client configuration file +" Previous Maintainer: Nikolai Weibull <now@bitwi.se> +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish @@ -11,9 +11,24 @@ let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim -let b:undo_ftplugin = "setl com< cms< fo<" - setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql +let b:undo_ftplugin = 'setlocal com< cms< fo<' + +if has('unix') && executable('less') + if !has('gui_running') + command -buffer -nargs=1 Sman + \ silent exe '!' . 'LESS= MANPAGER="less --pattern=''^\s+' . <q-args> . '$'' --hilite-search" man ' . 'ssh_config' | + \ redraw! + elseif has('terminal') + command -buffer -nargs=1 Sman + \ silent exe 'term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+' . <q-args> . '$', '\') . ''' --hilite-search" man ' . 'ssh_config' + endif + if exists(':Sman') == 2 + setlocal iskeyword+=- + setlocal keywordprg=:Sman + let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword<' + endif +endif let &cpo = s:cpo_save unlet s:cpo_save |