4

I use Tmux version 1.9. To push tmux's clipboard to my X clipboard I have such a string in tmux.conf:

bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"

The problem is that after pressing C-b C-c content of tmux's buffer goes to the X clipboard, but also all the key bindings stop working.
I can't create a new window, pane, etc.

Has anyone faced such a problem?

UPD

After a about a minute tmux starts responding to C-b bindings.

2

Instead of:

bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"

I ended up using this code:

bind -t vi-copy y copy-pipe 'xclip -in -selection clipboard'

With such a binding to copy something to the X clipboard:

  • Press CTRL + b + [
  • Hit the SPACE
  • Select the text using vi-mode key combinations
  • Instead of Enter I hit y and without any freezes text goes to the system clipboard.
  • Vi-mode is always the right answer, irrespective of the question... :) – jasonwryan Mar 2 '15 at 22:24
  • Unfortunately, this isn't really an answer to the question. The key binding given in the original question is useful if you have selected something with your mouse, but then want to paste in an X window. – Jon Gjengset Apr 8 '16 at 21:16
0

I have this same problem. The way I workaround it is by making a few X selections (by simply highlighting text in my terminal). If I do this a few times tmux seems to "catch up" and starts responding normally again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.