Selecting text in Tmux copy mode

Short answer: space starts selection and enter copies.

For future reference, I got this from the tmux man page:

       Function                vi             emacs
       Back to indentation     ^              M-m
       Clear selection         Escape         C-g
       Copy selection          Enter          M-w
       Cursor down             j              Down
       Cursor left             h              Left
       Cursor right            l              Right
       Cursor to bottom line   L
       Cursor to middle line   M              M-r
       Cursor to top line      H              M-R
       Cursor up               k              Up
       Delete entire line      d              C-u
       Delete to end of line   D              C-k
       End of line             $              C-e
       Goto line               :              g
       Half page down          C-d            M-Down
       Half page up            C-u            M-Up
       Next page               C-f            Page down
       Next word               w              M-f
       Paste buffer            p              C-y
       Previous page           C-b            Page up
       Previous word           b              M-b
       Quit mode               q              Escape
       Scroll down             C-Down or J    C-Down
       Scroll up               C-Up or K      C-Up
       Search again            n              n
       Search backward         ?              C-r
       Search forward          /              C-s
       Start of line           0              C-a
       Start selection         Space          C-Space
       Transpose chars                        C-t

Update: The tmux list-keys command will also list any custom key bindings you have.


You use space bar for the beginning of the selection and enter for the end.

copy:

  • Ctrlb[
  • Space
  • Enter

paste:

  • Ctrlb]

You can also set up your .tmux.conf file by adding :

bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection

which will enable 'v' and 'y' to enter visual mode and copy, like in vim.

(Source)

Tags:

Vim

Tmux