To split a tmux pane vertically (creating a pane to the right), press Ctrl+b
followed by %
(percent sign). You can also use the command tmux split-window -h
.
Splitting panes vertically in tmux creates side-by-side terminal views, allowing you to work on multiple tasks simultaneously within the same window. This is one of tmux's most powerful features for multitasking.
tmux's terminology can be confusing: a "vertical split" creates a vertical line dividing panes horizontally (side by side). This is why some users prefer to use the term "split vertically" to mean "create a vertical divider."
Ctrl+b %
- Split current pane vertically (create pane to the right)Ctrl+b "
- Split current pane horizontally (create pane below)Ctrl+b :
then type split-window -h
- Split verticallyCtrl+b :
then type splitw -h
- Shorthand for split-window -htmux split-window -h -t session:window.pane
- Split specific pane verticallysplit-window -h -p 25
- New pane takes 25% of spacesplit-window -h -b
- Create pane to the left instead of rightsplit-window -h -c "~/projects"
- Set starting directorysplit-window -h "htop"
- Run command in new pane Create a custom key binding for splitting windows while staying in the same directory by adding these lines to your ~/.tmux.conf
:
bind % split-window -h -c "#{pane_current_path}" bind '"' split-window -c "#{pane_current_path}"
After creating multiple panes, you can cycle through preset layouts with Ctrl+b Space
, or select specific layouts with Ctrl+b Alt+1
through Ctrl+b Alt+5
.