blob: bb4e0c9a19ed7e3b1215cfbd3cde62dc484a8dc2 [file] [log] [blame]
Bram Moolenaar42eeac32005-06-29 22:40:58 +00001" Vim filetype plugin file
Bram Moolenaar214641f2017-03-05 17:04:09 +01002" Language: gpg(1) configuration file
3" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
Konfektf86568f2024-09-19 19:34:40 +02004" Latest Revision: 2024-09-19 (simplify keywordprg #15696)
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< fo<"
Bram Moolenaar42eeac32005-06-29 22:40:58 +000015
Bram Moolenaar0dc065e2005-07-04 22:49:24 +000016setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
Bram Moolenaare37d50a2008-08-06 17:06:04 +000017
Konfektf86568f2024-09-19 19:34:40 +020018if has('unix') && executable('less') && exists(':terminal') == 2
19 command -buffer -nargs=1 GpgKeywordPrg
20 \ silent exe ':term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+--' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'gpg'
21 setlocal iskeyword+=-
22 setlocal keywordprg=:GpgKeywordPrg
23 let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer GpgKeywordPrg'
Enno2f25e402023-08-23 21:27:50 +020024endif
25
Bram Moolenaare37d50a2008-08-06 17:06:04 +000026let &cpo = s:cpo_save
27unlet s:cpo_save
Enno2f25e402023-08-23 21:27:50 +020028