From 593558497df441300342a7cb55cd7de5fbbd7485 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 7 Aug 2018 14:29:19 +1200 Subject: Bind ,K in Vim buffers as a :helpgrep shortcut --- vim/after/ftplugin/vim.vim | 5 +++++ 1 file changed, 5 insertions(+) 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 K + \ :helpgrep +let b:undo_ftplugin .= '|nunmap K' + " Get rid of the core ftplugin's square-bracket maps on unload let b:undo_ftplugin .= '|nunmap [[' \ . '|vunmap [[' -- cgit v1.2.3