Created
December 31, 2008 06:56
-
-
Save hchoroomi/41910 to your computer and use it in GitHub Desktop.
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
" rdoc.vim | |
command! -nargs=0 RDocPreview call RDocRenderBufferToPreview() | |
noremap <buffer> <LocalLeader>rd :RDocPreview<CR> | |
function! RDocRenderBufferToPreview() | |
if (system('which rdoc') == "rdoc not found\n") | |
throw "Could not find rdoc!" | |
end | |
let rdocoutput = "/tmp/vimrdoc/" | |
call system("rdoc " . bufname("%") . " --op " . rdocoutput) | |
call system("open -a Safari ". rdocoutput . "index.html") | |
endfunction | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment