blob: e6c7f113c2dd45420db378c9b91ec3b2251cefbc [file] [log] [blame]
Bram Moolenaar0dc065e2005-07-04 22:49:24 +00001" Vim filetype plugin file
Konfektf86568f2024-09-19 19:34:40 +02002" Language: udev(8) rules file
3" Maintainer: This runtime file is looking for a new maintainer.
4" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
5" Latest Revision: 2024-09-19 (simplify keywordprg #15696)
Bram Moolenaar0dc065e2005-07-04 22:49:24 +00006
7if exists("b:did_ftplugin")
8 finish
9endif
10let b:did_ftplugin = 1
11
Bram Moolenaare37d50a2008-08-06 17:06:04 +000012let s:cpo_save = &cpo
13set cpo&vim
14
Bram Moolenaar0dc065e2005-07-04 22:49:24 +000015let b:undo_ftplugin = "setl com< cms< fo<"
16
17setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
Bram Moolenaare37d50a2008-08-06 17:06:04 +000018
Konfektf86568f2024-09-19 19:34:40 +020019if has('unix') && executable('less') && exists(':terminal') == 2
20 command -buffer -nargs=1 UdevrulesKeywordPrg
21 \ silent exe ':term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s{,8}' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'udev'
22 setlocal iskeyword+=-
23 setlocal keywordprg=:UdevrulesKeywordPrg
24 let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer UdevrulesKeywordPrg'
Enno2f25e402023-08-23 21:27:50 +020025endif
26
Bram Moolenaare37d50a2008-08-06 17:06:04 +000027let &cpo = s:cpo_save
28unlet s:cpo_save