readline.vim (1607B)
1 " Vim filetype plugin file 2 " Language: readline(3) configuration file 3 " Maintainer: Doug Kearns <dougkearns@gmail.com> 4 " Previous Maintainer: Nikolai Weibull <now@bitwi.se> 5 " Last Change: 2024 Sep 19 (simplify keywordprg #15696) 6 " 2024 Jul 22 by Vim project (use :hor term #17822) 7 8 if exists("b:did_ftplugin") 9 finish 10 endif 11 let b:did_ftplugin = 1 12 13 let s:cpo_save = &cpo 14 set cpo&vim 15 16 setlocal comments=:# 17 setlocal commentstring=#\ %s 18 setlocal formatoptions-=t formatoptions+=croql 19 20 let b:undo_ftplugin = "setl com< cms< fo<" 21 22 if exists("loaded_matchit") && !exists("b:match_words") 23 let b:match_ignorecase = 0 24 let b:match_words = '$if:$else:$endif' 25 let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words" 26 endif 27 28 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") 29 let b:browsefilter = "Readline Intialization Files (inputrc, .inputrc)\tinputrc;*.inputrc\n" 30 if has("win32") 31 let b:browsefilter ..= "All Files (*.*)\t*\n" 32 else 33 let b:browsefilter ..= "All Files (*)\t*\n" 34 endif 35 let b:undo_ftplugin ..= " | unlet! b:browsefilter" 36 endif 37 38 if has('unix') && executable('less') && exists(':terminal') == 2 39 command -buffer -nargs=1 ReadlineKeywordPrg 40 \ silent exe 'hor term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . '3 readline' 41 setlocal iskeyword+=- 42 setlocal keywordprg=:ReadlineKeywordPrg 43 let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer ReadlineKeywordPrg' 44 endif 45 46 let &cpo = s:cpo_save 47 unlet s:cpo_save 48 49 " vim: nowrap sw=2 sts=2 ts=8 noet: