Created
July 26, 2013 21:23
-
-
Save garyharan/6092332 to your computer and use it in GitHub Desktop.
Run a single spec block in vim using a named pipe.
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
" Of course this can be edited to run whatever you want instead of spring and rspec | |
map <leader>l :w\|:silent exe "! echo \"spring rspec " . "%" . ":" . line('.') . "\" > test-commands"<cr> |
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
#!/bin/bash | |
if [ ! -p test-commands ]; then | |
mkfifo test-commands | |
fi | |
while true; do | |
sh -c "$(cat test-commands)"; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment