2

I use column editing in cua-mode (cua-selection-mode) a lot. A main issue I have is that the most frequently used keybinding, C-RET (Control + Return), doesn't work in most terminals (Ubuntu 16.04, Emacs 24.5), or with emacs -nw.

I did some research and found that this is a nasty problem as C-RET is often neglected by terminals and emacs does not receive it at all in non-GUI modes.

As a work-around, how can I rebind the functions of C-RET in cua mode to another key, e.g. C-^, that is not lost along the way?

(I searched around here and only found questions about how to Unbind C-RET in emacs?)

Also, is it possible to rebind in a way that allow both the original key C-RET and the new key C-^ to work?

2

After testing the potential solutions I can find, this is what worked for me (Ubuntu 16.04, emacs 24.5):

(setq cua-rectangle-mark-key (kbd "C-^"))
(cua-selection-mode t)

Basically, define the key in question to the new value before enabling cua-mode in init file. This seems to work both for emacs -nw, and terminals local and remote (windows and Linux).

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.