From 57b1a87e9817f6109a8ffde9e3506c33489c3dcc Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 4 Dec 2018 10:30:14 +1300 Subject: Use :help for 'keywordprg', junk tag binding This is a much nicer approach. --- vim/after/ftplugin/help.vim | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'vim/after/ftplugin') diff --git a/vim/after/ftplugin/help.vim b/vim/after/ftplugin/help.vim index ae032344..a0b637aa 100644 --- a/vim/after/ftplugin/help.vim +++ b/vim/after/ftplugin/help.vim @@ -11,13 +11,16 @@ 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<' + " Stop here if the user doesn't want ftplugin mappings if exists('g:no_plugin_maps') || exists('g:no_help_maps') finish endif -" Make K jump to the help topic; NeoVim does this, and it's a damned good idea -if !has('nvim') - nnoremap K - let b:undo_ftplugin .= '|nunmap K' -endif +" ,K runs :helpgrep on the word under the cursor +nnoremap K + \ :helpgrep +let b:undo_ftplugin .= '|nunmap K' -- cgit v1.2.3