path: root/vim/after/ftplugin/help.vim
diff options
authorTom Ryder <tom@sanctum.geek.nz>2018-08-08 00:05:45 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-08-08 00:05:45 +1200
commitb1556e5af023f05dcfd4d4014e932ce55e882e4e (patch)
tree8f791914816c1821707a680a129790d2907fc77f /vim/after/ftplugin/help.vim
parentMerge branch 'release/v1.47.0' (diff)
parentCheck surround.vim actually loaded before unmap (diff)
downloaddotfiles-981f1b19ee841ec2a6e970503842b4baedd214eb.tar.gz (sig)
Merge branch 'release/v1.48.0'v1.48.0
* release/v1.48.0: Check surround.vim actually loaded before unmap Check for 'cursorline' existence Add e() and v() wrappers Bind ,K in Vim buffers as a :helpgrep shortcut Improve a comment on HTML URL links Bind K in Vim help to jump to tag Revert "Use ^= instead of += for arbitrary tex..." Add ASM to Vim filetypes
Diffstat (limited to 'vim/after/ftplugin/help.vim')
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<'
+" Stop here if the user doesn't want ftplugin mappings
+if exists('g:no_plugin_maps') || exists('g:no_help_maps')
+ finish
+" 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'