forked from gotbletu/shownotes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux_copy_mode_vim.txt
26 lines (20 loc) · 1.04 KB
/
tmux_copy_mode_vim.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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"