Copy tmux not working

I am trying to become more experienced with tmux, but I came across (which seems to me) a strange problem. Here is my tmux.conf:

1 TERM=screen-256color 2 set-option -g default-terminal $TERM 3 4 TMUX_COLOUR_BORDER="colour237" 5 TMUX_COLOUR_ACTIVE="colour231" 6 TMUX_COLOUR_INACTIVE="colour16" 7 8 set-window-option -g window-status-activity-bg $TMUX_COLOUR_BORDER 9 set-window-option -g window-status-activity-fg $TMUX_COLOUR_ACTIVE 10 set-window-option -g window-status-current-format "#[fg=$TMUX_COLOUR_ACTIVE]#I:#W#F" 11 set-window-option -g window-status-format "#[fg=$TMUX_COLOUR_INACTIVE]#I:#W#F" 12 13 14 set -g prefix Ca 15 16 bind-key o split-window -v 17 bind-key e split-window -h 18 19 bind-key w kill-pane 

I am trying to copy paste between two panels. So, I pressed Ctrl-a- [and then Ctrl-space. The fact is that I do not see the visual selection of the block, and alt-w also does not work (since I assume that it does not even enter copy mode). Is there a clear error in my tmux.conf? Can you tell me what I'm doing wrong?

+4
source share
1 answer

tmux has an option, mode-keys , you can find it on the manual page.

default is emacs , but if your $EDITOR is vim / vi, tmux will use vi .

So, key binding will be in vi mode.

eg. your Alt-w will not work, this is emacs binding. you can see the key binding table on the tmux man page.

Some of them are related to your question:

 Function vi emacs Copy selection Enter Mw Start selection Space C-Space 

so you have to go with vi-mode keys.

I also used vim mode and made a little tweak (to make it the same as vim) in tmux.conf, maybe you could try:

 bind-key -t vi-copy 'v' begin-selection # Begin selection in copy mode. bind-key -t vi-copy 'Cv' rectangle-toggle # Begin selection in copy mode. bind-key -t vi-copy 'y' copy-selection # Yank selection in copy mode. 
+8
source

Source: https://habr.com/ru/post/1501160/


All Articles