diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 21:52:58 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 21:52:58 +0000 |
commit | 931bffbda3668ddc609fc1da8f9eb576b170aa52 (patch) | |
tree | d8c1843a95da5ea0bb4acc09f7e37843d9995c86 /runtime/ftplugin/readline.vim | |
parent | 142d9041391780ac15b89886a54015fdc5c73995 (diff) | |
parent | 4a8bf24ac690004aedf5540fa440e788459e5e34 (diff) | |
download | rneovim-userreg.tar.gz rneovim-userreg.tar.bz2 rneovim-userreg.zip |
Merge remote-tracking branch 'upstream/master' into userreguserreg
Diffstat (limited to 'runtime/ftplugin/readline.vim')
-rw-r--r-- | runtime/ftplugin/readline.vim | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/runtime/ftplugin/readline.vim b/runtime/ftplugin/readline.vim index eba7122347..181d8ac661 100644 --- a/runtime/ftplugin/readline.vim +++ b/runtime/ftplugin/readline.vim @@ -25,11 +25,27 @@ if exists("loaded_matchit") && !exists("b:match_words") endif if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") - let b:browsefilter = "Readline Intialization Files (inputrc .inputrc)\tinputrc;*.inputrc\n" .. + let b:browsefilter = "Readline Initialization Files (inputrc .inputrc)\tinputrc;*.inputrc\n" .. \ "All Files (*.*)\t*.*\n" let b:undo_ftplugin ..= " | unlet! b:browsefilter" endif +if has('unix') && executable('less') + if !has('gui_running') + command -buffer -nargs=1 ReadlineKeywordPrg + \ silent exe '!' . 'LESS= MANPAGER="less --pattern=''^\s+' . <q-args> . '\b'' --hilite-search" man ' . '3 readline' | + \ redraw! + elseif has('terminal') + command -buffer -nargs=1 ReadlineKeywordPrg + \ silent exe 'term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . '3 readline' + endif + if exists(':ReadlineKeywordPrg') == 2 + setlocal iskeyword+=- + setlocal keywordprg=:ReadlineKeywordPrg + let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer ReadlineKeywordPrg' + endif +endif + let &cpo = s:cpo_save unlet s:cpo_save |