aboutsummaryrefslogtreecommitdiff
path: root/vim/after/ftplugin/help.vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim/after/ftplugin/help.vim')
-rw-r--r--vim/after/ftplugin/help.vim11
1 files changed, 11 insertions, 0 deletions
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 <buffer> K <C-]>
+ let b:undo_ftplugin .= '|nunmap <buffer> K'
+endif