When I open an emacs buffer in the terminal using
emacs -nw
C+arrow does not move me around like I would like it to.
Is there a way to chang开发者_运维问答e this behavior?
There are two steps to fix this.
First find out what your terminal is sending emacs. This can be done right inside emacs by hitting C-q then the combination you want to see, say C-⇒ or something.
Then in your .emacs, you can bind the combination to whatever you want. For example, if you want C-⇒ to go to the next word, you can use (global-set-key "<your combination here>" 'forward-word)
. Do the same for the other bindings.
I have that sometimes in combination with screen. I run emacs as a daemon -- just disconnect that screen 'window' (or is it called panel or session?) and reconnect and you should be fine.
No idea what upsets the terminal settings.
精彩评论