Created
March 28, 2012 15:04
-
-
Save r00k/2226918 to your computer and use it in GitHub Desktop.
A function for opening the currently-focused jasmine spec in the browser
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
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(You'll need to symlink chrome into ~/bin, or update line 6).