iTerm2 Tricks

Some of my favourite iTerm2 tips and tricks. A mixture of useful and fun tips for iTerm2

I spend most of my day in iTerm2, and with anything that you spend time in it pays to learn quick ways to interact with it.

Here is a non-exhaustive list of some of my favourite little tips and tricks.

Locating your cursor

Pressing ⌘ + / will result in the screen whiting out and showing you exactly where your cursor is, this can be useful when you are in full screen mode and in the middle of a document you have been reading and have lost your place.

Jumping between tabs

If you are anything like me you will have several tabs open at once in your iTerm2 session, you can quickly jump between them by either pressing ⌘ + ← / ⌘ + → or if you know the number of the tab (from left to right)

Set any new tabs to be in the current working directory

This is something that really annoys me when working on machines owned by other people who don’t have this set up, you can set any new tabs to start in the directory you were last in. Under Profiles tab, go to General subtab, set Working Directory to “Reuse previous session’s directory”.

Splitting Panes

I do this less and less but you can easily do this with ⌘ + d, it can be handy if you have a couple of things you want to look at at the same time, I prefer to focus in on one task or document at a time though.

Entering text into all splits at the same time

This is pretty cool although like I said I rarely use splits any more, but if you press ⌘ + alt + i you can enter text into all splits at the same time.


Recent posts View all

Ruby

How to ignore Bullet in RSpec tests

Using Bullet during a test can pick up mistakes but also has false negatives; here is an easy way to ignore them

Ruby

How we used Nokogiri to fix a sizing issue in YouTube's oEmbed

At some point, one of our calls to YouTube's oEmbed endpoint was returning videos way too small; we fixed in in our Rails application by using Nokogiri