Live data from Hacker News

Little known features of iTerm2

banga.github.io

41–50 of 156 posts

Re: Little known features of iTerm2

#42
post #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,…

I really wish some Linux-based terminal emulator would copy this feature.

Re: Little known features of iTerm2

#43
post #31

Earlier quoted context omitted.

Which tools would you have to give up?

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

https://keepassxc.org/

https://gitlab.gnome.org/GNOME/sushi/tree/master/, https://en.wikipedia.org/wiki/GNOME_sushi

https://krita.org/en/features/highlights/

https://github.com/klaussinani/tusk

https://oss.oetiker.ch/smokeping/, https://oss.oetiker.ch/smokeping-demo/?target=Customers.OP

https://www.mixxx.org/features/

Re: Little known features of iTerm2

#44
post #32
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 usually have my PS1 show how long the previous command took

The cool thing about iterm's timestamp is that it even applies to SSH and other shells

Re: Little known features of iTerm2

#46
A little plug: iterm2-dwim is a click handler that makes use of the iTerm2 smart selection feature to open files in your editor at the correct line.

https://github.com/dandavison/iterm2-dwim

From the README:

iterm2-dwim is a click handler for iTerm2. The aim is that you command-click on any file path, relative or absolute, and it opens the file in your editor. If there was a line number, your editor goes to that line. So, compiler/linter output, tracebacks, git output, etc.

Currently Emacs, PyCharm and Sublime are supported.

Re: Little known features of iTerm2

#47
iTerm2 is what made me finally use Emacs in the terminal, completely replacing vim for me.

You can configure Emacs when running from the terminal to respond to mouse input or to integrate with the system's clipboard. You make it run in server mode, via a Launchd config and you get instant startup times too.

iTerm2 also has built-in powerline glyphs. It was actually easier to configure Emacs's powerline package to work from the terminal than it was to work from the GUI version.

I also like iTerm2's tmux integration.

iTerm2 is one of the reasons why I won't abandon MacOS for my software development needs anytime soon.

Re: Little known features of iTerm2

#48

Earlier quoted context omitted.

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?

Problem with xrandr is figuring out how and where to run it automatically.

Re: Little known features of iTerm2

#50
post #11

Earlier quoted context omitted.

On imgcat, those extensions to the xterm protocol[0] seem really nice. I've long thought that there needs to be a simple escape sequence for a horizontal divider that doesn't break upon resizing, they should do that next! Also check out tiv[1] which is an alternative that works with any unicode terminal. [0]: https://www.iterm2.com/documentation-images.html [1]: https://github.com/stefanhaustein/TerminalImageViewer

These iterm image extensions are almost there. It is unfortunate that it can only display files, and not image created on the fly (i.e., you dump all the pixel values into the terminal and it shows an image).

The actual extension does support images created on the fly. All that's missing is some commandline tool that'll translate from whichever format it's in to the format iterm expects. For e.g. a PNG image data you could probably get away with a single-line bash script: all it has to do is stick an escape sequence in front of the base64 encoded file contents.
Post reply on HN