vim

Fork of vim, an acceptable text editor
git clone git://git.laack.co/vim.git
Log | Files | Refs | README | LICENSE

readline.vim (1702B)


      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 " 2026 May 04 by Vim Project: fix typo
      8 " 2026 Sep 01 by Vim Project: use correct terminal feature test
      9 
     10 if exists("b:did_ftplugin")
     11   finish
     12 endif
     13 let b:did_ftplugin = 1
     14 
     15 let s:cpo_save = &cpo
     16 set cpo&vim
     17 
     18 setlocal comments=:#
     19 setlocal commentstring=#\ %s
     20 setlocal formatoptions-=t formatoptions+=croql
     21 
     22 let b:undo_ftplugin = "setl com< cms< fo<"
     23 
     24 if exists("loaded_matchit") && !exists("b:match_words")
     25   let b:match_ignorecase = 0
     26   let b:match_words = '$if:$else:$endif'
     27   let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words"
     28 endif
     29 
     30 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
     31   let b:browsefilter = "Readline Initialization Files (inputrc, .inputrc)\tinputrc;*.inputrc\n"
     32   if has("win32")
     33     let b:browsefilter ..= "All Files (*.*)\t*\n"
     34   else
     35     let b:browsefilter ..= "All Files (*)\t*\n"
     36   endif
     37   let b:undo_ftplugin ..= " | unlet! b:browsefilter"
     38 endif
     39 
     40 if has('unix') && executable('less') && has('terminal')
     41   command -buffer -nargs=1 ReadlineKeywordPrg
     42         \ silent exe 'hor term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . '3 readline'
     43   setlocal iskeyword+=-
     44   setlocal keywordprg=:ReadlineKeywordPrg
     45   let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer ReadlineKeywordPrg'
     46 endif
     47 
     48 let &cpo = s:cpo_save
     49 unlet s:cpo_save
     50 
     51 " vim: nowrap sw=2 sts=2 ts=8 noet: