muttrc.vim 925 B

12345678910111213141516171819202122232425262728293031
  1. " Vim filetype plugin file
  2. " Language: mutt RC File
  3. " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
  4. " Latest Revision: 2024-09-19 (simplify keywordprg #15696)
  5. if exists("b:did_ftplugin")
  6. finish
  7. endif
  8. let b:did_ftplugin = 1
  9. let s:cpo_save = &cpo
  10. set cpo&vim
  11. let b:undo_ftplugin = "setl com< cms< inc< fo<"
  12. setlocal comments=:# commentstring=#\ %s
  13. setlocal formatoptions-=t formatoptions+=croql
  14. let &l:include = '^\s*source\>'
  15. if has('unix') && executable('less') && exists(':terminal') == 2
  16. command -buffer -nargs=1 MuttrcKeywordPrg
  17. \ silent exe 'term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'muttrc'
  18. setlocal iskeyword+=-
  19. setlocal keywordprg=:MuttrcKeywordPrg
  20. let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer MuttrcKeywordPrg'
  21. endif
  22. let &cpo = s:cpo_save
  23. unlet s:cpo_save