Mastering iTerm2: A Comprehensive Guide to Keyboard Shortcuts for Split Windows and More
Are you an adamant fan of Terminator in linux? Do you want to have the same experience in macOS? iTerm2 is the best alternative to Terminator in macOS. iTerm2 is a terminal emulator for macOS that does everything you ever wanted from a terminal emulator and more. iTerm2 comes with a lot of features and customization options that you can use to make your terminal experience more productive and enjoyable. In this article, we’ll look at how to use iTerm2 keyboard shortcuts to split the window, change the split windows, maximize one window, and more.
iTerm2 is a popular terminal emulator for macOS that offers a range of features and customization options. One of the most useful features of iTerm2 is the ability to split the terminal window into multiple panes, allowing you to view and work with multiple terminals at the same time.
In this article, we’ll look at how to use iTerm2 keyboard shortcuts to split the window, change the split windows, maximize one window, and more.
Splitting the Window
To split your iTerm2 window into multiple panes, you can use the following keyboard shortcuts:
To split the window vertically, press Command + D.
To split the window horizontally, press Command + Shift + D.
Once you’ve split the window, you can use the following shortcuts to navigate between the panes:
To move focus to the next pane, use Command + ].
To move focus to the previous pane, use Command + [.
You can also use the mouse to resize the panes by clicking and dragging the divider between the panes.
The keyboard shortcut Cmd + Option + Arrow Key is used to move between split panes in iTerm2 in the direction of the arrow key.
Here’s how it works:
- Cmd + Option + Right Arrow Key: Move focus to the pane on the right.
- Cmd + Option + Left Arrow Key: Move focus to the pane on the left.
- Cmd + Option + Up Arrow Key: Move focus to the pane above the current pane.
- Cmd + Option + Down Arrow Key: Move focus to the pane below the current pane.
This keyboard shortcut can be very useful when you’re working with multiple split panes and want to quickly switch between them. By pressing the appropriate arrow key combination, you can move focus to the pane you want to work with without having to use the mouse.
Changing Split Windows
To close a split pane, use Command + W. If you want to resize the current pane, hold down the Option key and drag the pane border with your mouse. Additionally, you can use the following shortcuts to move and close split panes:
To close the current pane, use Command + W.
Maximizing One Pane
To maximize one of the split panes, press Command + Shift + Enter. This will make the current pane take up the entire iTerm2 window. To restore the pane to its original size, press Command + Shift + Enter again.
Switch between full screen and normal mode
To switch between full screen and normal mode, press Command + Enter.
Other Useful Shortcuts
Here are some other useful iTerm2 keyboard shortcuts that you can use to navigate and work with the terminal:
- To open a new tab, press Command + T.
- To switch between tabs, use Command + Number (1–9) or Command + Shift + Left/Right Arrow Keys.
- To search your command history, press Control + R and start typing.
Conclusion
iTerm2 offers a range of powerful features and customization options that can help you work more efficiently with the terminal. By using keyboard shortcuts to split the window, change the split windows, maximize one window, and more, you can navigate and work with multiple terminals at the same time. Remember that these shortcuts are just the beginning — there are many more shortcuts and customization options available in iTerm2 that can help you work more efficiently.