mirror of
https://github.com/gotbletu/shownotes
synced 2024-11-05 00:00:51 +00:00
27 lines
1.0 KiB
Plaintext
27 lines
1.0 KiB
Plaintext
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"
|
|
|
|
|