Showing posts with label screen. Show all posts
Showing posts with label screen. Show all posts

Using Shift+Arrow keys in Emacs from GNU screen

While inside screen, when using the Shift+Left, Shift-Right, etc keys in Emacs (1) to mark and select, if you see the 2A 2B 2C and 2D characters instead you are probably still using the default TERM which is set to "screen".

Simple solution, use xterm-vt220 or xterm-color instead. You can either create an alias for emacs or change your .screenrc file.

$ alias em='export TERM=xterm-vt220 && emacs -nw'

OR in your ~/.screenrc add,

term xterm-vt220

----------------------------------------------------------------
(1) You need to use Emacs 23 or above.

Control-S freezes puttty

Saw a weird behavior yesterday. CTRL-S would freeze putty. It turned out to be problem related to XOFF which is triggered by CTRL+S (the terminal will accept keys but it won't show the result for that, weird!). A simple fix is CTRL+Q to trigger XON. However, that does not work well with emacs which relies a lot on CTRL+S (for searching and saving)

Just add the following to .bashrc file:

stty ixany
stty ixoff -ixon