blob: c9a5cfaa689a72e496dc6b86156d87bb9c773088 [file] [log] [blame]
Bram Moolenaar42eeac32005-06-29 22:40:58 +00001" Vim filetype plugin file
Enno2f25e402023-08-23 21:27:50 +02002" Language: OpenSSH client configuration file
3" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
4" Latest Revision: 2008-07-09
Bram Moolenaar42eeac32005-06-29 22:40:58 +00005
6if exists("b:did_ftplugin")
7 finish
8endif
9let b:did_ftplugin = 1
10
Bram Moolenaare37d50a2008-08-06 17:06:04 +000011let s:cpo_save = &cpo
12set cpo&vim
13
Bram Moolenaar0dc065e2005-07-04 22:49:24 +000014setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
Enno2f25e402023-08-23 21:27:50 +020015let b:undo_ftplugin = 'setlocal com< cms< fo<'
16
17if has('unix') && executable('less')
18 if !has('gui_running')
19 command -buffer -nargs=1 Sman
20 \ silent exe '!' . 'LESS= MANPAGER="less --pattern=''^\s+' . <q-args> . '$'' --hilite-search" man ' . 'ssh_config' |
21 \ redraw!
22 elseif has('terminal')
23 command -buffer -nargs=1 Sman
24 \ silent exe 'term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+' . <q-args> . '$', '\') . ''' --hilite-search" man ' . 'ssh_config'
25 endif
26 if exists(':Sman') == 2
27 setlocal iskeyword+=-
28 setlocal keywordprg=:Sman
Enno9d8ef7c2023-08-30 16:37:05 +020029 let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer Sman'
Enno2f25e402023-08-23 21:27:50 +020030 endif
31endif
Bram Moolenaare37d50a2008-08-06 17:06:04 +000032
33let &cpo = s:cpo_save
34unlet s:cpo_save