shownotes-w3m-rice/tmux_copy_mode_vim.txt

27 lines
1.0 KiB
Plaintext
Raw Normal View History

2013-07-09 08:41:44 +00:00
Notes for video: http://www.youtube.com/watch?v=OW-lKJDFOzc
add to ~/.tmux.conf
# vim keys in copy or choice mode
set-window-option -g mode-keys vi
# copying selection vim style
# http://jasonwryan.com/blog/2011/06/07/copy-and-paste-in-tmux/
# https://github.com/myfreeweb/dotfiles/blob/master/tmux.conf
bind-key Escape copy-mode # enter copy mode; default [
bind-key -t vi-copy Escape cancel # exit copy mode; or hit q
bind-key p paste-buffer # paste; default ]
bind-key -t vi-copy v begin-selection # begin visual mode
bind-key -t vi-copy V select-line # visual line
bind-key -t vi-copy y copy-selection # yank
bind-key -t vi-copy r rectangle-toggle # visual block toggle
# read and write and delete paste buffer ( xsel method)
# https://wiki.archlinux.org/index.php/Tmux#ICCCM_Selection_Integration
# ctrl+shift+v
bind-key < command-prompt -p "send to tmux:" "run-shell 'tmux set-buffer -- \"$(xsel -o -b)\"'"
bind-key > command-prompt -p "send to xsel:" "run-shell 'tmux show-buffer | xsel -i -b'"
bind-key + command-prompt "delete-buffer"