Sample Header Ad - 728x90

How can I configure tmux's copy-mode-vi so that the m key moves to the end of line (equivalent to $)

0 votes
1 answer
2116 views
The QA [how to set shortcut for 'copy mode'?](https://unix.stackexchange.com/questions/450184/in-tmux-how-to-set-shortcut-for-copy-mode) explains how to set a shortcut to tmux copy mode. My question is different, I want to change a shortcut within copy mode, in particular copy-mode-vi. This is part of my ~/.tmux.conf where I have set up copy mode: # Copy paste in tmux based on # https://www.rushiagr.com/blog/2016/06/16/everything-you-need-to-know-about-tmux-copy-pasting-ubuntu/ bind P paste-buffer bind-key -T copy-mode-vi v send-keys -X begin-selection bind-key -T copy-mode-vi y send-keys -X copy-selection bind-key -T copy-mode-vi r send-keys -X rectangle-toggle # Also copy to system clipboard bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -sel clip -i' # map copy mode to ctrl+alt+c bind-key -n 'C-M-c' copy-mode # map paste buffer to ctrl+alt+v bind-key -n 'C-M-v' paste-buffer I have my vim normal mode $ mapped to the m key (I use an azerty keyboard). How can I configure tmux's copy-mode-vi in a similar way so that the m moves to the end of line (i.e. $).
Asked by Paul Rougieux (231 rep)
May 20, 2020, 12:01 PM
Last activity: Jul 27, 2025, 07:03 AM