summaryrefslogtreecommitdiff
path: root/mnv/runtime/ftplugin/sshconfig.mnv
blob: e9b295eac62298724b8392c89b56bc1c1d2113ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
" MNV filetype plugin file
" Language:	OpenSSH client configuration file
" Maintainer:	This runtime file is looking for a new maintainer.
" Previous Maintainer:	Nikolai Weibull <now@bitwi.se>
" Latest Revision:	2026-03-11 (`less -I`)

if exists("b:did_ftplugin")
  finish
endif
let b:did_ftplugin = 1

let s:cpo_save = &cpo
set cpo&mnv

setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
let b:undo_ftplugin = 'setlocal com< cms< fo<'

if has('unix') && executable('less') && exists(':terminal') == 2
  command -buffer -nargs=1 SshconfigKeywordPrg
        \ silent exe 'hor term ' . 'env LESS= MANPAGER="less -I --pattern=''' . escape('^\s+' . <q-args> . '$', '\') . ''' --hilite-search" man ' . 'ssh_config'
  setlocal iskeyword+=-
  setlocal keywordprg=:SshconfigKeywordPrg
  let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer SshconfigKeywordPrg'
endif

let &cpo = s:cpo_save
unlet s:cpo_save