aboutsummaryrefslogtreecommitdiff
path: root/vim/after/ftplugin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-12-04 10:30:14 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-12-04 10:30:31 +1300
commit57b1a87e9817f6109a8ffde9e3506c33489c3dcc (patch)
tree5a6f5bd0bb1d666e23f00a26bc84cab55114493c /vim/after/ftplugin
parentcebbf704f7e3048624bddb2e96eaa1db5fe9ef16 (diff)
downloaddotfiles-57b1a87e9817f6109a8ffde9e3506c33489c3dcc.tar.gz
dotfiles-57b1a87e9817f6109a8ffde9e3506c33489c3dcc.zip
Use :help for 'keywordprg', junk tag binding
This is a much nicer approach.
Diffstat (limited to 'vim/after/ftplugin')
-rw-r--r--vim/after/ftplugin/help.vim13
1 files changed, 8 insertions, 5 deletions
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 <buffer> K <C-]>
- let b:undo_ftplugin .= '|nunmap <buffer> K'
-endif
+" ,K runs :helpgrep on the word under the cursor
+nnoremap <buffer> <LocalLeader>K
+ \ :<C-U>helpgrep <cword><CR>
+let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>K'