berlinjilo.blogg.se

Iterm save session
Iterm save session




iterm save session

Opening new tabs or windows, splitting panes, even keeping the same working directory, all worked as I would expect when using iTerm on my host machine! Window ArrangementĪs I mentioned earlier, I always keep at least six separate panes open to run various builds for the project I’m currently working on. But, tmux and iTerm to the rescue! Instead, I only needed to run docker run -it container tmux -CC, and then could use iTerm as I normally would. This is especially useful if you need to connect to remote servers or even Docker containers on a regular basis.įor some time, I was developing inside of a Docker container, and it was tedious to consistently open a new terminal pane and run docker run -it container /bin/bash command again and again, and not to be able to take advantage of iTerm features. George Nachman, the iTerm2 developer added this support to make a tight integration between tmux and iTerm.īasically, you can take advantage of one of the most convenient features of tmux, pane splitting, and just rely on iTerm to handle it for you. That is, until I learned about tmux -CC, or control mode. I’ll be honest: I’ve tried learning tmux a few times, but I’ve never been able to make it stick. I try to avoid using cd as much as I can, and I rely on fasd. That’s because I use this interaction dozens of times per day. This is just muscle memory at this point (I actually had to test it out when writing this, because I couldn’t remember). Most of my profiles have “open in current working directory” set, so if I want another tab or window pane in the same directory, I just need to hit ⌘ + N for a new window, ⌘ + T for a new tab, ⌘ + D to split my pane vertically, or ⌘ + ⇧ + D to split it horizontally. If I do want to see the output, I can press ⌘ + ⇧ + ⏎, and it will temporarily expand the pane. For most of the common tasks, I cram them all into a single tab with multiple panes because I don’t want to think about them very often. Currently, I’ll run six separate processes at minimum and will track the output for each. I rely on multiple terminals running different commands because I don’t want to conflate front-end build output with back-end logs. This is a great way to quickly get some additional context about where you’re located. You can even color your tabs by right-clicking and selecting a color. You can even set custom background images for terminal windows. When I look at a terminal window, I know immediately where I am. Each profile for different repository + directory combination is set to a slightly different color, so I can quickly tell if I am where I need to be. For example, I have different profiles set up for various directories. We can engage our visual cortex to help quickly determine where we are in a work tree. In my case, I have separate profiles for certain working directories. With the shell integration installed, you can even turn on automatic profile switching when your hostname, username, or directory changes. Profiles are a great solution for customizing your setup without changing global settings. Many of the features of iTerm are improved exponentially with a complicated setup like this, but it’s still powerful even if your needs aren’t as complicated. This is a complicated setup, but it’s emulating a micro-service architecture, both on the frontend and backend, and some mock AWS services running locally. It can be hard to keep track of all of this, so I tend to rely on my tools to do it for me. I’m working across four repositories, multiple separate frontends, multiple backends, and various other runners. I’ve been recommending it to people for almost as long, without really understanding why.īelow, I’ll talk about killer features I can’t live without in a terminal emulator and why iTerm2 is the best choice for you.īut first, let me quickly describe the constraints for a project I’m currently working on, so I can refer to this as I’m describing my iTerm setup. Nearly 10 years ago, one of my first programming mentors told me to use it, and I blindly followed that advice. Until recently, I never reflected on how important it is to my development workflow. Other than my text editor, this is where I spend the most time in my development workflow.

iterm save session

The iTerm 2 terminal emulator is one of the most crucial applications in my toolbelt, as I live on the command line.






Iterm save session