You can start screen with -e to pass the control character in. I use
% screen -e^]]
Then Ctrl-] is my escape.
Isn't C-w kill-region in emacs? I recently came up against this problem too, but what else to change it to .. ?
I used ctrl-z, when I'm in screen I rarely need to push something to the background (prefer to just start a new vc in screen), and ofcourse I can still background something with ctrl-z z.
A screen within a screen gets ctrl-v, just because it seems mostly unused and is next to z on a dvorak keyboard :)
(And no, I don't ever nest them any deeper).
I use C-z as escape in screen. This would be "send process to background" in a vanilla shell, which I don't need that often in screen.
Re:GNU Screen - A Hacker's Ideal Terminal
by silentbicycle on Monday September 28, 2009 @03:12PM
(#849005)
I like ` (just backtick, no control), though that clashes with Lisp a bit. (I don't usually use Lisp inside tmux, though.)
` cannot be used since in terminal C + ` or C + SPC or C + @ translates into same thing(only allowed characters are @ [ \ ] ^ and _ ). I personally prefer using \
Re:GNU Screen - A Hacker's Ideal Terminal
by silentbicycle on Monday September 28, 2009 @03:24PM
(#849034)
Oh, I'm using just ` , not C-`. It's like hitting ESC in vi. (I also noticed that space and shift-space are indistinguishable, which is a bit annoying because in Emacs I use S-spc for languages with lots_of_soft_spacing or-several-words-joined-with-dashes.)
Re:GNU Screen - A Hacker's Ideal Terminal
by cturner on Monday September 28, 2009 @04:26PM
(#849163)
Readers - I found the .screenrc change for this not-entirely-obvious. You need to say
escape ``
whereas you'd have thought it would be just escape `
Re:GNU Screen - A Hacker's Ideal Terminal
by silentbicycle on Monday September 28, 2009 @04:52PM
(#849205)
The second character doesn't have to be another ` - that option controls what you type for an unescaped version of your meta key. I use
escape `~
and reserve `` for switching to the most recently used window. (It looks like I didn't need to specify that explicitly.)You could try C-o (open-line by default) or C-z (suspend/minimize by default). I use C-z as a personal command prefix. Emacs really puts those ctrl shortcuts to work, it's damn near impossible to find one that I don't use at least semi-regularly.
edit: You could maybe try C-9 or use a symbol. I was only thinking in letters.
Re:GNU Screen - A Hacker's Ideal Terminal
by steveklabnik on Monday September 28, 2009 @03:04PM
(#848989)
I'd suggest changing it to vim.
But no, seriously, screen is one of the more useful programs I've ever used. I have a screen session running on a server somewhere, and just log into it from whatever terminal I happen to be using at the time. It's pretty much the best.
I bound my left winkey to @, and use ^@. I wanted to bind it directly to NUL, but I couldn't get that to work for some reason.
Re:GNU Screen - A Hacker's Ideal Terminal
by jherdman on Monday September 28, 2009 @02:40PM
(#848940)
I'm using C-z, but it's sort of an awkward key to use.
Changing caps lock to control helps. Switching to dvorak helps even more. I kid.
Re:GNU Screen - A Hacker's Ideal Terminal
by tomjen2 on Monday September 28, 2009 @05:10PM
(#849229)
You may be kidding, but you are right on both counts. Emacs is so much better when your control key is next to 'a'. Your hands prefer it when 'aoeu' is right under your left hand. You will prefer it when your colleagues can't figure out how to type on you computer.
I was serious in that Ctrl-Z is easier to hit with dvorak, and with caps lock as control it becomes even easier, but I don't expect anyone to switch for that reason.
I use
escape ^^^
Ctrl+Shift 6
You can also just hit "C-a a", which screen will interpret as "send C-a to the terminal".
In your .screenrc file:
This will default C-w as the command character.