Skip to content

Instantly share code, notes, and snippets.

@r00k
Created March 28, 2012 15:04
Show Gist options
  • Save r00k/2226918 to your computer and use it in GitHub Desktop.
Save r00k/2226918 to your computer and use it in GitHub Desktop.
A function for opening the currently-focused jasmine spec in the browser
function! OpenJasmineSpecInBrowser()
let filename = expand('%')
let url_fragment = substitute(filename, "spec/javascripts", "evergreen/run", "")
let host_fragment = "http://localhost:3000/"
let url = host_fragment . url_fragment
silent exec "!open ~/bin/chrome" url
endfunction
@r00k
Copy link
Author

r00k commented Mar 28, 2012

(You'll need to symlink chrome into ~/bin, or update line 6).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment