aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-04-01 21:00:23 +1300
committerTom Ryder <tom@sanctum.geek.nz>2019-04-01 21:01:30 +1300
commite2929b7c53e5e4f0b390f95ca9fe762a1a283571 (patch)
tree2fde1b38d024082820628ef38e846d8e582a07b7
parent607527f2d20e40dea83a1fc6ead4ad37467c0f4c (diff)
downloaddotfiles-e2929b7c53e5e4f0b390f95ca9fe762a1a283571.tar.gz
Set 'keywordprg' to :help for older Vims
I didn't realise this had been introduced in the stock runtime files so late.
-rw-r--r--vim/after/ftplugin/vim.vim7
1 files changed, 7 insertions, 0 deletions
diff --git a/vim/after/ftplugin/vim.vim b/vim/after/ftplugin/vim.vim
index 905d21dc..d2fa77e2 100644
--- a/vim/after/ftplugin/vim.vim
+++ b/vim/after/ftplugin/vim.vim
@@ -9,6 +9,13 @@ endif
let b:regex_escape_flavor = 'vim'
let b:undo_ftplugin .= '|unlet b:regex_escape_flavor'
+" Use :help as 'keywordprg' if not already set; this is the default since Vim
+" v8.1.1290
+if &keywordprg !=# ':help'
+ setlocal keywordprg=:help
+ let b:undo_ftplugin .= '|setlocal keywordprg<'
+endif
+
" Stop here if the user doesn't want ftplugin mappings
if exists('g:no_plugin_maps') || exists('g:no_vim_maps')
finish