Last active
December 13, 2015 22:19
-
-
Save sentientmonkey/4983974 to your computer and use it in GitHub Desktop.
interactive repl with vim
This file contains 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
" map ,r to run contents in repl | |
map ,r :w\|:silent !cat % > repl-command<cr>:redraw!<cr> | |
" map ,r in visual mode to run contents in repl | |
vmap ,r :w !cat > repl-command<cr>:redraw!<cr> | |
" map ,l to map current line in repl | |
map ,l :silent.w !cat > repl-command<cr>:redraw!<cr> |
This file contains 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
pipe-repl.sh "lien clj" |
This file contains 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
pipe-repl.sh irb |
This file contains 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
if [ ! -p repl-command ]; then | |
mkfifo repl-command | |
fi | |
tail -f repl-command | $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment