From e2929b7c53e5e4f0b390f95ca9fe762a1a283571 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 1 Apr 2019 21:00:23 +1300 Subject: Set 'keywordprg' to :help for older Vims I didn't realise this had been introduced in the stock runtime files so late. --- vim/after/ftplugin/vim.vim | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'vim/after') 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 -- cgit v1.2.3