Region Operations in Emacs
Region operations here as a reminder
I access an editor on several functions:
- UTF-8 support;
- syntax highlight;
- quick navigation;
- custom shortcuts;
- column selection;
- region operation;
While there are several excellent editors, I change to work with Emacs, I am not an infuser for Emacs but I recommend you give it a try. Ok, let’s see how to operate the regions in Emacs flexibly. By default, Emacs can deal with a marked region, which is marked by C-Spacebar
or your own shortcut. In that situation, there are two options may be used frequently.
C-c < or >: to move the region left or right
C-x r t: to insert some chars before the region
These two operations are almost enough for daily writing and coding, but sometimes I need to select and change part of the text content. So the cua-mode saved me a lot, M-x
and input cua-mode
will toggle the cua-mode. With cua-mode on, you are allowed to enter a visible mode to select a column and do some operations. To enable the visible selection, type C-Enter
and you can move your cursor to make a selection as you want. This can make a column operation once in a time, so convenient.
And I found a video to illustrate that well. vimeo :D