aboutsummaryrefslogtreecommitdiff
path: root/vim/after/ftplugin
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 /vim/after/ftplugin
parentFix up a few cosmetic shell anti-patterns (diff)
downloaddotfiles-e2929b7c53e5e4f0b390f95ca9fe762a1a283571.tar.gz
dotfiles-e2929b7c53e5e4f0b390f95ca9fe762a1a283571.zip
Set 'keywordprg' to :help for older Vims
I didn't realise this had been introduced in the stock runtime files so late.
Diffstat (limited to 'vim/after/ftplugin')
-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