tmux/Q/Are there two different modes of visual selection in tmux?
Are there two different modes of visual selection in tmux?
My Answer
AI Answer
- Short answer: Yes. Stock tmux
copy-mode-vihas two selection shapes you toggle between: character-wise (normal, started withSpace) and rectangle/block (toggled withv). There is no "word-based" mode — word motions (w,b,e) just move the cursor within either shape. Stock
copy-mode-viselection bindings (no config, no oh-my-tmux)How the two shapes work
- 1. Character-wise — press
Spaceto start. Highlights linearly from mark to cursor, wrapping across lines. Useh/j/k/lor word motions (w,W,b,e) to extend. - 2. Rectangle (block) — press
vafter starting a selection to toggle rectangle mode. The highlight becomes a column-aligned block between mark and cursor, regardless of line content. Pressvagain to toggle back. Equivalent to vim'sCtrl-vvisual block.
- 1. Character-wise — press
oh-my-tmux remaps these
- oh-my-tmux rebinds
vtobegin-selectionandC-vtorectangle-toggle, matching vim conventions — so if yourvstarts a selection rather than toggling rectangles, you are using those remapped bindings, not stock tmux defaults.
- oh-my-tmux rebinds
"Word-based" clarification
Verify your session
Sources
- tmux(1) man page — copy-mode commands (
begin-selection,rectangle-toggle,select-line,select-word) - Superuser: tmux copy mode select text block
- tmux(1) man page — copy-mode commands (
- Short answer: Yes. Stock tmux