19

I've started splitting window in GNU screen into different regions - rather than switching between windows.

Anyway, having split a window into 4 regions (2x2) it takes 3 C-a <Tab> to return focus to the original region. That is quite cumbersome...

Are there other keybindings to move up, down, left, right between regions?

I can't understand this: hitting C-a t gives me time, does not switch to top win.

Should I change keybindings?

  • 2
    Adding as a comment since it's not an answer but see if tmux is available for your distribution. It's a modern re-write of what screen is. Very nifty and cleanly supports exactly what you're asking for. tmux.sourceforge.net – Kyle Smith Jun 1 '11 at 13:12
  • @Kyle: thanks, I know of tmux and probably I'll check it out. Moreover I notice screen splits are lost if you detach and reattach or just lock. A the end swapping between full-screen windows using C-a C-a or C-a windownumber is way more comfortable... – neurino Jun 1 '11 at 13:17
10

screen commands for switching between regions are: actually focus up, focus down, focus right and focus left. To type these commands (or any other screen command, for that matter) you type C-a :focus up, for example.

These commands are tedious to type, that's why you must create key bindings in your ~/.screenrc file. Since I'm a Vim user I opted for these lines in my ~/.screenrc file:

bind j focus down
bind k focus up
bind l focus right
bind h focus left

To switch to the left region I type C-a h

  • I guess a vim user would have bind ; focus right and bind l focus left – Daan Jul 29 '16 at 7:59
5

Take a look at the manual (man screen) - search for focus (using / to search). There is an example for binding focus up/down/top/bottom keys there. Not sure about left/right - focus doesn't seem to accept those as parameters.

  • you are right about left and right, it was top and bottom, my fault. The link in my answer is same as man screen anyway. It would be useful to me having a C-a Shift <Tab> to go backwards in order... – neurino Jun 1 '11 at 11:14
  • 2
    if I only knew what to put in bind command for Shift and Tab... – neurino Jun 1 '11 at 11:27
  • Yes - that would make a load of sense - you could probably bind it to focus up. You may need to figure out a termcap name for shift + tab though. A quick google shows that may take a bit of fiddling. – Danny Staple Jun 1 '11 at 11:28
  • Okay - names I've found (none which yet work with/without -k) backtab, shifted-tab, F91, kB. – Danny Staple Jun 1 '11 at 11:37
  • 1

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.