Skip to content

Commit

Permalink
tmux: improve copy/paste with X
Browse files Browse the repository at this point in the history
  • Loading branch information
majutsushi committed Mar 25, 2013
1 parent 77af190 commit 1f4fce8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tmux/tmux.conf
Expand Up @@ -89,10 +89,11 @@ bind-key -r C-k resize-pane -U 1
bind-key -r C-l resize-pane -R 1 bind-key -r C-l resize-pane -R 1


bind-key -t vi-copy Escape cancel bind-key -t vi-copy Escape cancel
#Copy tmux paste buffer to CLIPBOARD # Copy tmux paste buffer to CLIPBOARD
bind-key C-y run "tmux show-buffer | xclip -i -selection clipboard" # Use save-buffer instead of show-buffer to avoid inserting spurious linebreaks
#Copy CLIPBOARD to tmux paste buffer and paste tmux paste buffer bind-key C-y run-shell "tmux save-buffer - | xclip -i -selection clipboard"
bind-key C-p run "tmux set-buffer -- \"$(xclip -o -selection clipboard)\"; tmux paste-buffer" # Copy CLIPBOARD to tmux paste buffer and paste tmux paste buffer
bind-key C-p run-shell "xclip -o -selection clipboard | tmux load-buffer -; tmux paste-buffer"


# The following helps with Shift-PageUp/Shift-PageDown # The following helps with Shift-PageUp/Shift-PageDown
set-option -g terminal-overrides 'xterm*:smcup@:rmcup@' set-option -g terminal-overrides 'xterm*:smcup@:rmcup@'
Expand Down

0 comments on commit 1f4fce8

Please sign in to comment.