1" Vim filetype plugin file
2" Language: OpenSSH client configuration file
3" Maintainer: This runtime file is looking for a new maintainer.
4" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
5" Latest Revision: 2025-07-22 (use :hor term #17822)
6
7if exists("b:did_ftplugin")
8 finish
9endif
10let b:did_ftplugin = 1
11
12let s:cpo_save = &cpo
13set cpo&vim
14
15setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
16let b:undo_ftplugin = 'setlocal com< cms< fo<'
17
18if has('unix') && executable('less') && exists(':terminal') == 2
19 command -buffer -nargs=1 SshconfigKeywordPrg
20 \ silent exe 'hor term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+' . <q-args> . '$', '\') . ''' --hilite-search" man ' . 'ssh_config'
21 setlocal iskeyword+=-
22 setlocal keywordprg=:SshconfigKeywordPrg
23 let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer SshconfigKeywordPrg'
24endif
25
26let &cpo = s:cpo_save
27unlet s:cpo_save
28