diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index 39b116e..8380e31 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -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 \