I use my terminal as an IDE, largely thanks to Tmux. I spin up sessions for the API, the client front-end, and any other codebases I happen to be working in, as well as a session for tracking to do's and ideas.
I launch a session using a script I call zmux
. If given a session name, zmux
attaches to the session. If given a directory, zmux
launches a new session and looks for a .tmuxrc
file in the directory that it can source to set up the session, allowing me to easily spin up a workspace and daemon processes for a project. This is especially useful for projects I haven't touched in years.
I created a Tmux binding to switch between sessions on partial session name matches:
unbind t; bind t command-prompt -p "session" "run-shell \"find-tmux-session %%\""