Contents |
Important commandline options for 'screen'
attach without detach (multiple simultaneous attachments)
$ screen -x
detach and reattach - create if necessary
$ screen -dR
C-a n next screen C-a p previous screen C-a ' [title]<CR> get screen by its title
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 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:
C-A [ ?some<CR>0<SPACE>$<SPACE>
C-A ]
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'.
Ctrl+a [ c <space> ... JJ <space>
Ctrl+a [ - copy mode c <Space> - column yank from here... JJ <space> - ... to here, joining lines with spaces
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 svn ci command. How to do it?
Ctrl+a [ ? ori<Enter> <Space> c jj$ JJ <Space> Ctrl+a ]
Not at all complicated ;) - here's a breakdown of the commands
Ctrl+a [ - copy mode ? ori<Enter> - search backwards for 'ori' c <Space> - column yank from here... jj$ - ...to here JJ - join lines with spaces <Space> - end yank Ctrl+a ] - paste it