From 981021f18aa9ada153070b08b4fc075059999190 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 7 Aug 2018 14:23:06 +1200 Subject: Bind K in Vim help to jump to tag --- vim/after/ftplugin/help.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/vim/after/ftplugin/help.vim b/vim/after/ftplugin/help.vim index e21a5259..db621315 100644 --- a/vim/after/ftplugin/help.vim +++ b/vim/after/ftplugin/help.vim @@ -9,3 +9,14 @@ if has('conceal') && &modifiable && !&readonly setlocal conceallevel=0 let b:undo_ftplugin .= '|setlocal conceallevel<' endif + +" 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 -- cgit v1.2.3