Skip to content

Instantly share code, notes, and snippets.

@sborsje
Created February 27, 2009 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sborsje/71493 to your computer and use it in GitHub Desktop.
Save sborsje/71493 to your computer and use it in GitHub Desktop.
" Open ApiDock in a new Safari tab
let g:browser = 'open -a Safari '
" Open the Ruby ApiDock page for the word under cursor
function! OpenRubyDoc(keyword)
let url = 'http://apidock.com/ruby/'.a:keyword
exec '!'.g:browser.' '.url.' &'
endfunction
noremap RB :call OpenRubyDoc(expand('<cword>'))<CR>
" Open the Rails ApiDock page for the word under cursor
function! OpenRailsDoc(keyword)
let url = 'http://apidock.com/rails/'.a:keyword
exec '!'.g:browser.' '.url.' &'
endfunction
noremap RR :call OpenRailsDoc(expand('<cword>'))<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment