![]() My own config files are available in my dotfiles repo, with the exception of my tmuxinator project definitions. If you're interested in exploring this further, the tmuxinator README is comprehensive. Hopefully this gives you a taste of a modern terminal-based workflow. In practice I've found that most of the projects I work on have too many nuances for this to be useful though. For example, you might define a tmuxinator project called "laravel" and use that one definition for any Laravel project you work on. It is also possible to define a project as a template and start multiple tmux sessions from that one definition. Alternatively, you can configure your own custom window layout. If you like splitting your windows into panes, tmuxinator comes with a decent set of preset layouts you might like to explore. If I run the above command and the project is already running, it will simply attach to the existing session. I can close my terminal window at any time and it will automatically detach. If the project isn't already running, it will first make sure Homestead is up, and then it will start a new tmux session with my chosen name and the windows and processes I have configured. It allows me to type that quick command and have everything ready to go.Īfter installing Tmuxinator, you can define a project using: Tmuxinator bills itself by saying "Create and manage tmux sessions easily". I just want to think about the project I want to work on, type a quick command, and have everything ready to go. I don't want to have to think about that or start anything manually, especially when I'm ready to dive right into the code. Starting a session and opening windows in tmux is easy, but it's a pain remembering which specific processes I need to start for each project, especially for those I only work on sporadically. I don't often divide windows into panes but there are times when it can be useful. Within that session I will typically have one window (tab) for each process. I like to start a separate tmux session for each project that I work on. Switching between sessions shows you a preview of each window in the session. You can "detach" from tmux and it will keep everything running in the background for you to reattach to later (perhaps from a different terminal!). These programs can be divided into different sessions, windows (tabs), and panes. Tmux is a "terminal multiplexer" which basically means that it allows you run multiple programs within a single terminal and switch between them all. To manage all of these different projects and their respective CLI programs, I like to use tmux, with the assistance of tmuxinator. In fact, the only desktop apps I often have open are a terminal and a web browser. Personally I like a lot of terminal or CLI (command line interface) programs. Other projects might be using Docker or Homestead, Gulp instead of Webpack. My static website, for example, requires the Jigsaw server, Webpack, a text editor, and a shell. Not every project requires the same set of tools either.
0 Comments
Leave a Reply. |