hchoroomi (owner)

Revisions

gist: 41910 Download_button fork
public
Public Clone URL: git://gist.github.com/41910.git
Embed All Files: show embed
rdoc.vim #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
" 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