In emacs, the region is delimited by the point (cursor) and the mark (some previous position of the cursor, which has been "marked").
Thus, to "select a region", you need to place that mark, then move your point around.
The easiest way to place the mark is to press C-SPC
. Then just move the cursor around, you'll see the "region" extend as you do.
To "deselect the region", you can press C-SPC
again.
Since "shift+movement" is a common keybinding in other software, by default, it emulates this "select region" behavior. However, it doesn't work in terminal, because shift cannot be sent to emacs as a modifier key.
Note that generally, the C-SPC
method is much more powerful than other methods for selecting a region: you are not limited to up/down/left/right for movement (you can use search for example...), and it doesn't require that you maintain an uncomfortable key combination for a long time.
Are the (define-key ...)
commands supposed to go into init.el? Is there a detailed example somewhere I can look at? – vfclists Jul 06 '17 at 21:50define-key
commands go into your init file. That can be~/.emacs.d/init.el
or a couple of other locations. You'll find plenty of examples of uses ofdefine-key
by searching fordefine-key
, but finding which map to bind is another matter. Several maps are involved:global-map
,input-decode-map
,function-key-map
,keyboard-translate-map
. I don't know how to answer your question because I don't know Spacemacs. I do not recommend the use of packages such as Spacemacs that messily redefine standard interfaces. – Gilles 'SO- stop being evil' Jul 06 '17 at 22:36input-decode-map
after finding some examples. Can I take it thatinput-decode-map
applies when the user is entering text into a buffer? – vfclists Jul 06 '17 at 23:02input-decode-map
is one of the keymaps that apply. See the manual for details. – Gilles 'SO- stop being evil' Jul 06 '17 at 23:06