Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is it possible to paste text copied in a paste buffer to a different window with some keybinding, without having to leave the current window? I.e., instead of going to the window and doing a Ctr-a + ], giving a gnu screen command and the name of the receiving window?

share|improve this question
    
Other than having the other windows reading constantly from /tmp/screen-exchange, I don't think so. –  Stefan Seidel Sep 18 '12 at 13:08

2 Answers 2

While this does not directly answer your question I strongly recommend switching from screen to tmux if possible. Tmux is screen on steroids.

share|improve this answer

You could make a bind to create such a keybinding in your screenrc, because there is none.

Depending on how you wanted to implement it (is it for a named screen whose name is known?), the following screen functions could be useful to you:

  • copy ( C-a esc / C-a [ ) to make your copy of the current window
  • writebuf (C-a > ) to write /tmp/screen-exchange
  • readbuf ( C-a < ) to read in the other /tmp/screen-exchange
  • paste . ( C-a ] / C-a C-] ) to write the paste on the other window
  • at [identifier][#|*|%] command [args ...] to make other windows process the two former commands from the specified original window, without leaving it (through a keybind or directly at the screen commandline C-a : ).
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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