Created
April 23, 2016 13:28
-
-
Save marlun/1e2a4f55b8dc23c033e273136a2764d8 to your computer and use it in GitHub Desktop.
Show reference manual for current word in muttrc
This file contains hidden or 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
function! s:ShowDocForCurrentWord() | |
let word = expand("<cword>") | |
let query = substitute(word, "_", "-", "g") | |
echom query | |
let url = "http://www.mutt.org/doc/manual/#" . query | |
echom url | |
!open url | |
redraw! | |
endfunction | |
if has('mac') | |
nnoremap <buffer> K :call <SID>ShowDocForCurrentWord()<CR> | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment