aboutsummaryrefslogtreecommitdiff
path: root/vim/after/ftplugin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-08-07 14:29:19 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-08-07 14:29:52 +1200
commit593558497df441300342a7cb55cd7de5fbbd7485 (patch)
treec338628f06afd45ca3a1cb8353037380e74f9595 /vim/after/ftplugin
parentImprove a comment on HTML URL links (diff)
downloaddotfiles-593558497df441300342a7cb55cd7de5fbbd7485.tar.gz
dotfiles-593558497df441300342a7cb55cd7de5fbbd7485.zip
Bind ,K in Vim buffers as a :helpgrep shortcut
Diffstat (limited to 'vim/after/ftplugin')
-rw-r--r--vim/after/ftplugin/vim.vim5
1 files changed, 5 insertions, 0 deletions
diff --git a/vim/after/ftplugin/vim.vim b/vim/after/ftplugin/vim.vim
index ca6b01b0..bfac623a 100644
--- a/vim/after/ftplugin/vim.vim
+++ b/vim/after/ftplugin/vim.vim
@@ -13,6 +13,11 @@ if exists('g:no_plugin_maps') || exists('g:no_vim_maps')
finish
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'
+
" Get rid of the core ftplugin's square-bracket maps on unload
let b:undo_ftplugin .= '|nunmap <buffer> [['
\ . '|vunmap <buffer> [['