gpg.vim 883 B

1234567891011121314151617181920212223242526272829
  1. " Vim filetype plugin file
  2. " Language: gpg(1) configuration 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< fo<"
  12. setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
  13. if has('unix') && executable('less') && exists(':terminal') == 2
  14. command -buffer -nargs=1 GpgKeywordPrg
  15. \ silent exe ':term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+--' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'gpg'
  16. setlocal iskeyword+=-
  17. setlocal keywordprg=:GpgKeywordPrg
  18. let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer GpgKeywordPrg'
  19. endif
  20. let &cpo = s:cpo_save
  21. unlet s:cpo_save