diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-01-06 15:24:31 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-01-06 15:24:31 +1300 |
commit | 3e3e0488eb70c91195707027db0e83d4c358fa6c (patch) | |
tree | bad1aee6b532e4d07b15649e37ebfa20026821b7 /vim/after/ftplugin/help.vim | |
parent | Make name of autocmd group more specific (diff) | |
download | dotfiles-3e3e0488eb70c91195707027db0e83d4c358fa6c.tar.gz dotfiles-3e3e0488eb70c91195707027db0e83d4c358fa6c.zip |
Add test to 'keywordprg' setting for Vim help
Diffstat (limited to 'vim/after/ftplugin/help.vim')
-rw-r--r-- | vim/after/ftplugin/help.vim | 9 |
1 files changed, 6 insertions, 3 deletions
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') |