modconf.vim 1017 B

123456789101112131415161718192021222324252627282930
  1. " Vim filetype plugin file
  2. " Language: modules.conf(5) configuration 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-20 (remove erroneous endif)
  6. if exists("b:did_ftplugin")
  7. finish
  8. endif
  9. let b:did_ftplugin = 1
  10. let s:cpo_save = &cpo
  11. set cpo&vim
  12. let b:undo_ftplugin = "setl com< cms< inc< fo<"
  13. setlocal comments=:# commentstring=#\ %s include=^\\s*include
  14. setlocal formatoptions-=t formatoptions+=croql
  15. if has('unix') && executable('less') && exists(':terminal') == 2
  16. command -buffer -nargs=1 ModconfKeywordPrg
  17. \ silent exe ':term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s{,8}' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'modprobe.d'
  18. setlocal iskeyword+=-
  19. setlocal keywordprg=:ModconfKeywordPrg
  20. let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer ModconfKeywordPrg'
  21. endif
  22. let &cpo = s:cpo_save
  23. unlet s:cpo_save