Created
June 1, 2012 14:15
-
-
Save dahu/2852448 to your computer and use it in GitHub Desktop.
ExpandHelpWord()
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
" Help terms can include characters typically not considered within keywords. | |
function! ExpandHelpWord() | |
let iskeyword = &iskeyword | |
set iskeyword=!-~,^),^*,^\|,^",192-255 | |
let word = expand('<cword>') | |
let &iskeyword = iskeyword | |
return word | |
endfunction | |
" F1 to show context sensitive help for keyword under cursor | |
" Deliberately left off the terminating <cr> to allow modification. | |
" Moves the cursor to the beginning of the term for contextual markup. | |
" (:help help-context) | |
nnoremap <F1> :help <c-r>=ExpandHelpWord()<cr><c-left> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment