[iTerm2 Series 3] Split panes, search, and shortcuts

한국어 버전

Build a workflow, not just a shortcut list

In Part 1, we compared Terminal and iTerm2. In Part 2, we installed iTerm2 and applied the base settings. Now we will use the features that make iTerm2 feel faster in real work: keeping multiple sessions visible, searching long output, and reusing commands without retyping them.

This post assumes you already have iTerm2 installed and have finished the basic setup from Part 2.

What this post covers

  • Split panes so your editor, server, and Git status stay visible together
  • Search the current session quickly, then search across sessions when needed
  • Reuse earlier commands and paths with iTerm2 Autocomplete
  • Add a few quality-of-life upgrades without creating risky habits

Before you start

  • macOS with iTerm2 installed
  • The base configuration from Part 2
  • A project folder where you can safely run simple practice commands

If you want a concrete place to practice, open any web project where commands like git status, npm start, or npm run dev already make sense.

Practice 1: Split panes for real multitasking

Split panes matter when you want to watch two or three things at once. Tabs are still useful, but panes are better when you need simultaneous visibility.

When panes are better than tabs

Use panes when you want to:

  • edit code while watching a dev server
  • keep git status visible while testing changes
  • tail logs without losing your command prompt

If you only need separate contexts and do not need to see them together, a new tab is still fine.

Split left and right

Shortcut: Command + D

Use this when you want two panes side by side.

Split left and right with Command + D zsh · ~/workspace
Ready. Press Replay to run the scripted session.

Now try it yourself:

  1. Open iTerm2.
  2. Press Command + D.
  3. Confirm that one window becomes two side-by-side panes.

Split top and bottom

Shortcut: Command + Shift + D

Use this when the current pane should be divided into an upper and lower section.

This matters because iTerm2 always splits the active pane, not the whole window. Watch the active pane move after each split.

Build a 4-pane layout step by step zsh · ~/workspace
Ready. Press Replay to run the scripted session.

If the layout becomes messy, close the active pane with Command + W and simplify before continuing.

Move, resize, and save panes

Once you have several panes open, you need a small set of navigation habits.

  • Command + [ and Command + ] move to the previous or next pane
  • Command + Option + Arrow moves to a pane by direction
  • drag the divider to resize panes
  • Command + W closes the active pane
  • Window -> Save Window Arrangement saves a layout you want to reuse later

There is no need to memorize everything at once. Start with split, move, close, and drag-to-resize.

A practical 3-pane setup

This is a beginner-friendly layout for normal web development: editor on one side, server output on the other, and Git status nearby.

Three-pane development setup zsh · ~/workspace
Ready. Press Replay to run the scripted session.

Use this sequence on your machine:

  1. Open your project directory.
  2. Split left and right with Command + D.
  3. Split the right pane again with Command + Shift + D.
  4. Run your editor, server, and git status in separate panes.

At this point, iTerm2 stops feeling like a prettier terminal and starts feeling like a working dashboard.

Practice 2: Search output without scrolling forever

Search becomes valuable as soon as your terminal shows more output than you can hold in your head.

Search the current session

Start with the active pane.

  • Command + F opens search
  • Command + G jumps to the next match
  • Command + Shift + G jumps to the previous match

This is usually enough when one pane contains the server output you care about.

Use regex or case-sensitive search only when needed

The search gear menu lets you turn on Regular Expression or Case Sensitive mode.

For beginners, the safe pattern is simple:

  • search error when you just need the obvious failures
  • search ERROR|WARN when you want a first regex example

Know the search limit

Command + F searches the current session's scrollback, not every tab in the app. If the text is in another session, switch panes or use Edit -> Find -> Find Globally.

Example: find the important lines in logs

The point of this example is not just to highlight text. It is to cut through noisy logs and land on the few lines that explain the failure.

Search for errors in the current session zsh · ~/workspace
Ready. Press Replay to run the scripted session.

Try the same flow yourself:

  1. Press Command + F.
  2. Search for error.
  3. Use Command + G and Command + Shift + G to move through matches.
  4. If you still cannot find the text, check whether you are searching the wrong pane.

Practice 3: Reuse commands with Autocomplete

Autocomplete helps when you know you typed something before, but you do not want to re-enter the whole command or path.

Trigger Autocomplete

Shortcut: Command + ;

iTerm2 calls this feature Autocomplete. It suggests commands and paths from the current tab's scrollback.

Autocomplete from earlier history zsh · ~/workspace
Ready. Press Replay to run the scripted session.

Pick the right suggestion

  • Up / Down moves through suggestions
  • Enter or Tab applies the selected entry
  • Esc cancels

If the list is empty, that usually means you have not created enough history in the current tab yet.

Autocomplete is not the same as shell Tab completion

These two features solve related but different problems.

  • Tab completes file and folder names that exist right now
  • Command + ; recalls commands and paths you already used before

That difference matters when you want to recover a long project path or a command you ran an hour ago.

Reuse a long path instead of typing it again zsh · ~/workspace
Ready. Press Replay to run the scripted session.

After you use this a few times, long paths stop feeling expensive.

Bonus features worth adding carefully

The next tools are useful, but they work best when you understand the caveats.

Copy, paste, and Smart Selection

iTerm2 copies selected text to the clipboard by default. If that behavior changes on your machine, check Settings -> General -> Selection.

Two practical notes:

  • middle-click paste is mainly for a three-button mouse setup
  • Smart Selection is not normal double-click selection; iTerm2 uses a quad-click by default, and you can also bind it to a gesture

Smart Selection is handy for URLs, email addresses, and file paths because it grabs the whole object at once.

Profiles for repeated tasks

Profiles are saved setups for things like shell behavior, colors, startup commands, or server connections. They become useful when you repeat the same environment often.

Good beginner examples:

  • a profile for a Node project shell
  • a profile for an SSH session you open often
  • a profile with larger text for presentation or pair programming

To jump to sessions and profiles quickly, use Open Quickly with Command + Shift + O.

If you create an SSH profile, consider using ~/.ssh/config aliases so the profile launches a stable alias instead of a long raw command.

Custom shortcuts and broadcast input

You can add custom mappings in Settings -> Keys or in a profile's Keys section. Mapping menu items is a safe way to add shortcuts for actions you use frequently.

Useful examples:

Shortcut Action How to set it
Command + Left Previous tab Select Menu Item -> Previous Tab
Command + Right Next tab Select Menu Item -> Next Tab
Command + Shift + T Reopen closed session Select Menu Item -> Undo Close Session
Command + / Broadcast input to all panes Select Menu Item -> Broadcast Input To All Panes

Broadcast input is powerful and risky. When it is on, every keystroke goes to multiple panes in the current tab. Use it only when you are sure the same command should run everywhere.

Practice scenario: debug one project without leaving the window

This scenario ties the post together. The goal is simple: keep code, logs, and Git visible while you investigate an error.

A complete iTerm2 debugging flow zsh · ~/workspace
Ready. Press Replay to run the scripted session.

Repeat this sequence on your own machine:

  1. cd into your project.
  2. Split the window into three panes.
  3. Run your editor, server, and git status in separate panes.
  4. Use Command + F and Command + G to jump to the error lines.
  5. Return to the editor pane, fix the code, and watch the server output update.
  6. Use Command + ; when you want to recall a path or command you already used.

That is the real payoff of iTerm2: fewer context switches and less repeated typing.

Shortcut recap

Shortcut Action
Command + D Split left and right
Command + Shift + D Split top and bottom
Command + [ / ] Previous or next pane
Command + Option + Arrow Move to a pane by direction
Command + W Close the active pane or tab
Command + F Search the current session
Command + G / Command + Shift + G Next or previous match
Command + ; Open Autocomplete
Command + Shift + O Open Quickly

Troubleshooting

Too many panes, too little space

Close the active pane with Command + W, then rebuild the layout more slowly. If you only need three jobs, three panes are usually enough.

Search finds nothing

Check the active pane first. Command + F searches the current session, so the text may be in another pane or tab.

Autocomplete is empty

Run a few commands in the current tab first. Autocomplete becomes useful after iTerm2 has something to suggest from that tab's scrollback.

Selected text did not copy

Open Settings -> General -> Selection and confirm copy-on-selection still matches your preference.

Smart Selection did not behave like normal double-click

That is expected. Smart Selection uses its own trigger, such as iTerm2's default quad-click or a gesture you configured.

Broadcast input feels dangerous

It is. Keep it off unless you intentionally want the same command to run in multiple panes, and double-check the broadcast indicator before typing.

Wrap-up

You now have the full beginner path for this series:

  1. understand why iTerm2 is useful
  2. install it and apply a comfortable base setup
  3. use panes, search, and Autocomplete to make daily work faster

Keep using the three-pane workflow for a few days. Once those motions feel natural, iTerm2 will start saving you time without needing any flashy setup.

💬 댓글

이 글에 대한 의견을 남겨주세요