

Ask HN: Workflow for switching between projects - biomene

I always work in several projects in parallel. All of them use Git (for version control and sometimes deployments) and a task runner (grunt&#x2F;gulp).<p>I switch between projects several times a day. This means closing the terminal window I&#x27;m currently on, opening a new one, splitting it in 2 (I use iTerm), navigating to the project folder in each of them, starting up Grunt&#x2F;Gulp in one of them and managing Git in the other, and then switching projects in Sublime.<p>This routine gets very boring very quickly. I&#x27;m looking into ways to automate it, but the only solution I&#x27;ve found is to write a bash script for each project, which isn&#x27;t ideal because:<p>1. It means a new custom script for each new project (the projects are usually quite small and have fast turnarounds, so I would have to do this a couple of time a month)
2. iTerms panes and bash scripts don&#x27;t play very well along<p>I was wondering what other people&#x27;s workflows were like? There must be a better way.
======
hkarthik
I use tmux and either tmuxinator or teamocil to accomplish this. I use vim as
my editor so it just works within the shell.

Each project can have its own tmuxinator config and load up tmux with a number
of shells. There is even native tmux support built into iTerm2 but I haven't
used it.

------
gnachman
Why not use a saved window arrangement? It'll restore your splits, and working
directories too if you use the nightly build.

------
cauterized
Why not just use one iTerm window for each and minimize the inactive ones or
use a separate virtual desktop for each project?

~~~
biomene
But you still have to open the iTerm with split panel and navigate to the
correct folders the first time you open a project every day. These are the
steps I want to automate.

~~~
cauterized
Why do you close everything out every night?

~~~
biomene
That's a good question.

