Skip to content

Instantly share code, notes, and snippets.

@ajorgensen
Last active December 19, 2015 01:58
Show Gist options
  • Save ajorgensen/5879435 to your computer and use it in GitHub Desktop.
Save ajorgensen/5879435 to your computer and use it in GitHub Desktop.
set splitright
map <leader>a :call OpenTestFile()<cr>
function! OpenTestFile()
let test_file = system("echo " . expand("%:t") . " | sed 's/\.rb/_test.rb/' | xargs find ./test -name | head -1")
exec ':vsp ' . test_file
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment