tmux: C-v should start the selection if inactive
This commit is contained in:
@@ -84,9 +84,18 @@ bind -r \} swap-pane -D
|
||||
|
||||
# Enter copy-mode with Escape
|
||||
bind Escape copy-mode
|
||||
# Start selection (e.g. visual mode) with `v`
|
||||
|
||||
# Start selection (i.e. visual mode) with `v`, and rectangle selection (i.e.
|
||||
# visual block mode) with `C-v`
|
||||
# TODO: mimic vims behaviour for visual mode cycling and toggling
|
||||
unbind -T copy-mode-vi v
|
||||
bind -T copy-mode-vi v send -X begin-selection
|
||||
unbind -T copy-mode-vi C-v
|
||||
bind -T copy-mode-vi C-v {
|
||||
if -F "#{selection_active}" {} { send -X begin-selection }
|
||||
send -X rectangle-toggle
|
||||
}
|
||||
|
||||
# Yank into system clipboard
|
||||
# TODO: This breaks on repeatable movements (e.g. `y2e`)
|
||||
bind -T copy-mode-vi y \
|
||||
|
||||
Reference in New Issue
Block a user