From 3e3e0488eb70c91195707027db0e83d4c358fa6c Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 6 Jan 2019 15:24:31 +1300 Subject: Add test to 'keywordprg' setting for Vim help --- vim/after/ftplugin/help.vim | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'vim/after/ftplugin') diff --git a/vim/after/ftplugin/help.vim b/vim/after/ftplugin/help.vim index a0b637aa..a72dac8e 100644 --- a/vim/after/ftplugin/help.vim +++ b/vim/after/ftplugin/help.vim @@ -11,9 +11,12 @@ if has('conceal') && &modifiable && !&readonly let b:undo_ftplugin .= '|setlocal conceallevel<' endif -" Use :help for 'keywordprg'; odd that this isn't the default -setlocal keywordprg=:help -let b:undo_ftplugin .= '|setlocal keywordprg<' +" Use :help as 'keywordprg' if not already set; this is the default since Vim +" v8.1.0690 +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_help_maps') -- cgit v1.2.3