blob: d5eda5af218c5914942805e2dc53645404f8a399 [file] [log] [blame]
Bram Moolenaar42eeac32005-06-29 22:40:58 +00001" Vim filetype plugin file
Bram Moolenaar214641f2017-03-05 17:04:09 +01002" Language: modules.conf(5) 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 +000014let b:undo_ftplugin = "setl com< cms< inc< fo<"
Bram Moolenaar42eeac32005-06-29 22:40:58 +000015
16setlocal comments=:# commentstring=#\ %s include=^\\s*include
Bram Moolenaar0dc065e2005-07-04 22:49:24 +000017setlocal formatoptions-=t formatoptions+=croql
Bram Moolenaare37d50a2008-08-06 17:06:04 +000018
Enno2f25e402023-08-23 21:27:50 +020019if has('unix') && executable('less')
20 if !has('gui_running')
21 command -buffer -nargs=1 Sman
22 \ silent exe '!' . 'LESS= MANPAGER="less --pattern=''^\s{,8}' . <q-args> . '\b'' --hilite-search" man ' . 'modprobe.d' |
23 \ redraw!
24 elseif has('terminal')
25 command -buffer -nargs=1 Sman
26 \ silent exe ':term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s{,8}' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'modprobe.d'
27 endif
28 if exists(':Sman') == 2
29 setlocal iskeyword+=-
30 setlocal keywordprg=:Sman
Enno9d8ef7c2023-08-30 16:37:05 +020031 let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer Sman'
Enno2f25e402023-08-23 21:27:50 +020032 endif
33endif
34
Bram Moolenaare37d50a2008-08-06 17:06:04 +000035let &cpo = s:cpo_save
36unlet s:cpo_save