Screen

Commandline
Important commandline options for 'screen'

attach without detach (multiple simultaneous attachments) $ screen -x

detach and reattach - create if necessary $ screen -dR

Standard Hotkeys
C-a n                  next screen C-a p                  previous screen C-a ' [title]      get screen by its title

Regions
Region Hotkeys

C-a S                  split C-a [tab]              switch region C-a Q                  this region only C-a X                  remove this region C-a :resize +/- number resize

Copy Mode
Copy mode is a very efficient form of copy-pasting, it may or may not be faster than using the mouse, I am not sure. An example of usage:


 * You want to copy an URL from a browser like w3m into an email. The URL looks like this: http://www.some.thing.edu . You change to the screen containing the webbrowser
 * You copy the URL by something like: C-A [ ?some0$
 * You change to the screen containing the email editor
 * You paste the URL by something like C-A ]

Copy Mode Hotkeys
C-a [ enters copy mode [esc] exits copy mode C-a ] paste

vi-movement in the whole scrollback buffer with h,j,k,l, g,G, C-u,C-d

W     yank Word Y     yank line

C-a s Emacs style incremental search forward. C-r   Emacs style reverse i-search.

Press a before the final space key to toggle in append mode. Thus the contents of the paste buffer will not be overwritten, but is appended to.

c     set the left margin for rectangular yanking C     set the right margin for rectangular yanking - see also the screen manual, search for 'Mov'.

Column Yanking
Ctrl+a [ c ... JJ

Ctrl+a [       - copy mode c       - column yank from here... JJ      - ... to here, joining lines with spaces

Example
This is motivated by the output of the Subversion status command. It could for example read like this: $ svn st D     original.png A +   imageWithHiddenData.png M     decode2lsbits.rb Now, I would like to yank the 3 filenames to a   command. How to do it? Ctrl+a [ ? ori  c jj$ JJ  Ctrl+a ] Not at all complicated ;) - here's a breakdown of the commands Ctrl+a [       - copy mode ? ori    - search backwards for 'ori' c        - column yank from here... jj$             - ...to here JJ              - join lines with spaces          - end yank Ctrl+a ]        - paste it