Skip to content

Instantly share code, notes, and snippets.

@qickstarter
Created September 12, 2012 11:27
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qickstarter/3706057 to your computer and use it in GitHub Desktop.
Save qickstarter/3706057 to your computer and use it in GitHub Desktop.
" カーソル下のgemのrdocを開く
function! OpenYard(...)
let gem = a:1 == "" ? "" : a:1
if gem == ""
call OpenBrowser("http://localhost:8808/")
else
let url = "http://localhost:8808/docs/" . tolower(gem) . "/frames/"
call OpenBrowser(url)
endif
endfunction
command!
\ -nargs=* -complete=file
\ OpenYard
\ call OpenYard(<q-args>)
" マッピング
nmap <Space>y :<C-U>OpenYard <C-R><C-W><CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment