Tmux Keyboard Shortcut: Align Two Panes Vertically (Tmux 3.2)
Tmux is a versatile terminal multiplexer that enables users to manage multiple terminal sessions within a single terminal window. This article focuses on Tmux 3.2 and explores how to align two panes vertically using keyboard shortcuts.
What is Tmux?
Tmux (Terminal Multiplexer) is a terminal emulator that allows users to run multiple terminal sessions within a single terminal window. It is particularly useful for remote login sessions, where users may need to run multiple terminal sessions simultaneously. Tmux provides a range of features, including the ability to split the terminal window into multiple panes, detach terminal sessions, and reattach them later.
Tmux 3.2: New Features
Tmux 3.2 introduced several new features, including improved support for UTF-8 characters, improved mouse support, and the ability to split the terminal window into multiple panes vertically or horizontally.
Aligning Two Panes Vertically in Tmux
To align two panes vertically in Tmux, follow these steps:
- Create a new terminal session using the command
tmux new -s session-name. - Split the terminal window into two panes using the command
Ctrl-b %. - Move the cursor to the bottom pane.
- Press the command
Ctrl-b ;to move the cursor to the last executed command. - Press the command
Ctrl-b :to enter command mode. - Enter the command
split-window -vto split the bottom pane vertically.
Alternatively, users can use the command Ctrl-b " to split the terminal window into two panes horizontally, and then use the command Ctrl-b Shift-% to split the bottom pane vertically.
Code Blocks
Here is an example of how to split the terminal window into two panes vertically:
$ tmux new -s mysession
$ tmux split-window -v
- Tmux is a versatile terminal multiplexer that enables users to manage multiple terminal sessions within a single terminal window.
- Tmux 3.2 introduced several new features, including improved support for UTF-8 characters, improved mouse support, and the ability to split the terminal window into multiple panes vertically or horizontally.
- To align two panes vertically in Tmux, users can split the terminal window into two panes using the command
Ctrl-b %, move the cursor to the bottom pane, and then split the bottom pane vertically using the commandCtrl-b :followed bysplit-window -v.