Live data from Hacker News

Little known features of iTerm2

banga.github.io

31–40 of 156 posts

Re: Little known features of iTerm2

#31

Earlier quoted context omitted.

Every time I've considered a full-on switch to Linux, the many little tools that I'd have to give up weigh heavily the cons column.

Which tools would you have to give up?

Some applications I would miss: 1Password / Preview / Acorn / Evernote / Skitch / Pingplotter / djay

Re: Little known features of iTerm2

#33

Question. Do you know how to get iTerm2 to open on split into the same directory that it was in like in Terminator on Ubuntu? Currently it always open to home directory whether I do a vertical/horizontal split.

Go to Preferences->Profiles->Default and find the option over on the right for "Working Directory". Then set it to "Reuse previous session's directory".

Then for me Cmd+D and Cmd+Shift+D (split with current profile) gives the same current directory.

Re: Little known features of iTerm2

#34
Not sure whether or not this is a little-known feature. iTerm2 has _fantastic_ integration with tmux (software used for persisting a terminal session across multiple logins).

Tmux can be a pretty complex piece of software, but iTerm can basically wrap it all up into a nice package. You don't need to know anything at all about tmux to use iTerm's tmux integration.

If you're SSHed into a server that has tmux installed, try running `tmux -CC` on the server. It'll pop up a new window that looks and feels just like it's running natively (complete with tab support), except it's all tunneled over SSH.

And if you disconnect, you can just reconnect later and your windows will all come back in the same state as when you left them.

I use this one-liner to SSH into a server and reconnect (or start) a tmux session:

    ssh -XY -F user@hostname -Ct \
     'sh -l -c "exec tmux -CC -u new-session -AD -s remote"'
iTerm2's tmux integration makes SSH access to remote machines feel almost as native as using your machine locally. It's really a killer feature, and it made iTerm2 worth a donation for me.

Re: Little known features of iTerm2

#36
I’m surprised to see that the iTerm2 dedicated hotkey window hasn’t been mentioned. It’s essentially a system-wide terminal window that you can open with a hotkey, similar to the old Visor app, and you can configure it as a floating window that appears over other apps' full screen windows. https://www.iterm2.com/documentation-hotkey.html

Re: Little known features of iTerm2

#37
This feels like a dumb question, but is the text rendering really dark for others in iTerm2? It seems like on a black background I cannot get pure white text. It’s always a middle shade of gray for me - before and after getting a Retina display.

I have messed with the colors and text rendering for literal hours over the last ten years and I genuinely cannot get it as clear and readable as Terminal.app which is a big part of the reason I always end up falling back to Terminal

Re: Little known features of iTerm2

#38
post #28

I've found a lot of use from cmd-shift-e, which shows timestamps for each output line in the terminal. Great for figuring out how long a process ran for.

I've also used this for building outage timelines after the fact by noting the timestamps for my first time to touch and the timestamp of the repair.

Re: Little known features of iTerm2

#39

Earlier quoted context omitted.

Which tools would you have to give up?

Some of the most obvious things I'd give up: - ability to plug into any monitor at any resolution that monitor supports - ability to copy and paste to/from my phone - Transmit - I really haven't found many good s3 clients on Linux - ScreenFlow - Git Tower Most of these have some sort of a work-around or close analog of course. (So I'd likely not be "giving anything up" as much as compromising or learning new techniqu…

> ability to plug into any monitor at any resolution that monitor supports

Doesn't xrandr do that?

Re: Little known features of iTerm2

#40

Question. Do you know how to get iTerm2 to open on split into the same directory that it was in like in Terminator on Ubuntu? Currently it always open to home directory whether I do a vertical/horizontal split.

Like @kevsim mentioned, you have to go advanced options etc, it’s hidden a bit, but it’s there.
Post reply on HN