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?

tinlyx
  • 1,276
  • 1
  • 12
  • 27
  • See the Elisp manual, node [Remapping Commands]()https://www.gnu.org/software/emacs/manual/html_node/elisp/Remapping-Commands.html. – Drew Dec 09 '17 at 16:42

1 Answers1

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).

tinlyx
  • 1,276
  • 1
  • 12
  • 27