Skip to content

Instantly share code, notes, and snippets.

@marlun
Created April 23, 2016 13:28
Show Gist options
  • Save marlun/1e2a4f55b8dc23c033e273136a2764d8 to your computer and use it in GitHub Desktop.
Save marlun/1e2a4f55b8dc23c033e273136a2764d8 to your computer and use it in GitHub Desktop.
Show reference manual for current word in muttrc
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