Skip to content

Instantly share code, notes, and snippets.

@scmx
Last active August 29, 2015 13:59
Show Gist options
  • Save scmx/10466312 to your computer and use it in GitHub Desktop.
Save scmx/10466312 to your computer and use it in GitHub Desktop.
#tmux #testing #rake #vim
# Infinitely do something, wait half a second between iterations
infdo () {
while true; do
$@
echo "restarting $@..."
sleep 0.5
done
}

Open a tmux session with two windows

0:test - Window for running tests
1:editor - Window for your editor of choice

Enter test command in the test window

infdo bundle exec rake test

Change some files in the editor and then press Ctrl+b v to automatically start tests and switch to test window

bind v \
send-keys -t 'test' "c-m" \;\
select-window -t 'test'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment