Created
May 7, 2011 08:51
-
-
Save anyakichi/960334 to your computer and use it in GitHub Desktop.
Search vim help with K.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let g:ref_no_default_key_mappings = 1 | |
nnoremap <silent> K :<C-u>call Ref('normal')<CR> | |
vnoremap <silent> K :<C-u>call Ref('visual')<CR> | |
function! Ref(mode) | |
if &filetype ==# 'vim' | |
execute 'silent! help ' . expand("<cword>") | |
"execute 'help index| tj /' . expand("<cword>") | |
if &filetype !=# 'help' | |
echo 'No entry' | |
endif | |
else | |
call ref#K(a:mode) | |
endif | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment