I used to remember a key combination in c-mode to select a C function (i mean select the text between start and end of function for copying/killing etc) but i've since forgotten it and can't seem to find it anywhere. Does anyone remember what this key combination is?
To set the mark, type C- SPC ( set-mark-command ). This makes the mark active; as you move point, you will see the region highlighting grow and shrink. The mouse commands for specifying the mark also make it active.
You can select blocks of text in Emacs just as you would in most other environments. You could, for example, drag your mouse over a region. You could also hold down the Shift key and use arrow keys.
Alternatively, if you are running Emacs in its own window (and not within an "xterm" window) as part of an X Window session, you can select the region simply by using the mouse. Click the mouse's left button at the start of the area to be selected, and drag the mouse to the end of the area.
With Emacs 25, simply press Ctrl + Space and then move your cursor wherever you want to highlight/select the region of text which interests you. After that, you may need these commands: Ctrl + W for cutting.
In Emacs 23, it appears to be bound to:
C-M-h c-mark-function
FWIW, I found this by listing all the commands for the mode C-h b
, and searching for 'mark'.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With