tmux: Use <Esc> to clear selection and cancel
Use <Esc> to clear the selection and cancel copy-mode depending on if something is selected.
This commit is contained in:
@@ -64,6 +64,9 @@ bind-key -T copy-mode-vi v send-keys -X begin-selection
|
|||||||
# Yank into system clipboard
|
# Yank into system clipboard
|
||||||
bind-key -T copy-mode-vi y send-keys -X copy-pipe "xclip -selection clipboard"
|
bind-key -T copy-mode-vi y send-keys -X copy-pipe "xclip -selection clipboard"
|
||||||
|
|
||||||
|
# Clear selection or cancel copy-mode when nothing is selected
|
||||||
|
bind -T copy-mode-vi Escape if -F "#{selection_present}" { send -X clear-selection } { send -X cancel }
|
||||||
|
|
||||||
# Navigate panes with <prefix>-[hjkl]
|
# Navigate panes with <prefix>-[hjkl]
|
||||||
# NOTE: C-[hjkl] (w/o prefix) moves through vim splits and tmux panes
|
# NOTE: C-[hjkl] (w/o prefix) moves through vim splits and tmux panes
|
||||||
# See vim-tmux-navigator
|
# See vim-tmux-navigator
|
||||||
|
|||||||
Reference in New Issue
Block a user