I started using tmux on my mac.
However, Ctrl+a
and Shift+ <
(|)
But the panes don't split, why?
set-option-g prefix C-a
bind-key C-a send-prefix
# split panels using | and -
bind | split-window-h
bind-split-window-v
unbind '' ''
unbind%
# force a reload of the config file
# reload config file (change file location to your tmux.conf you want to use)
bindr source-file through /.tmux.conf
# quick panecycling
unbind^A
bind^A select-plane-t:.+
# smart pane switching with awareness of vimsplits
bind-n C-h run "(tmux display-message-p'#{pane_current_command}' | grep-iq vim & & tmux send-keys C-h) | | tmux select-plane-L"
bind-n C-j run "(tmux display-message-p'#{pane_current_command}' | grep-iq vim & & tmux send-keys C-j) | | tmux select-plane-D"
bind-n C-k run " (tmux display-message-p'# { pane_current_command}' | grep-iq vim & & tmux send-keys C-k) | | tmux select-plane-U"
bind-n C-l run " (tmux display-message-p'# { pane_current_command}' | grep-iq vim & & tmux send-keys C-l) | | tmux select-plane-R"
bind-n C-\run "(tmux display-message-p'#{pane_current_command}' | grep-iq vim & & tmux send-keys 'C-\\') | | tmux select-plane-l"
# resize pane
bind-n C-Down resize-plane-D5
bind-n C-Upsize-pane-U5
bind-n C-Right resize-plane-R10
bind-n C-Left resize-plane-L10
bind-n S-Down resize-plane-D1
bind-n S-Upsize-plane-U1
bind-n S-Right resize-plane-R2
bind-n S-Left resize-plane-L2
# tmux status bar color
set-option-g status-keys "emacs"
set-g status-left-length 50
set-g status-right "Show Terminal # (date'+%a, %b%d-%I:%M')"
bind c new-window-c "#{pane_current_path}"
set-grenumber-windows on
bind-key b break-plane-d
bind-key C-j choose-tree
# Use vim keybindings in copy mode
setw-g mode-keysvi
# Setup 'v' to begin selection as in Vim
bind-key-t vi-copy v begin-selection
bind-key-t vi-copy copy-pipe "reattach-to-user-namespace pbcopy"
# Update default binding of `Enter` to use copy-pipe
unbind-t vi-copy Enter
bind-key-t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
I tried replacing .tmux.conf with tmux2.6, which normally enters on LinuxMint 19.2 (equivalent to Ubuntu 18.04 LTS), but
After entering the keys in the order Ctrl+a and |, the terminals were split left and right as a result of the addition of the panes.
However, Ctrl+a and Shift+ ((|)
I didn't know what kind of key to enter, but
What happens if I type the keys in the order Ctrl+a and |?
© 2024 OneMinuteCode. All rights reserved.