Pages

mardi 25 mai 2010

to deal with a rectangle region in emacs

If we have an array of data which is open in emacs, and we would like to copy/delete a part of it. It would not be quick to drag the mouse for the operation, esp if the file is large. In emacs we can operate on a specific rectangle region of the file. We need
1) set mark for the interested region
move the mouse the the beginning of the region and Ctl-space
move the mouse to the end the region and use Ctl-space

2) if want to delete this region:
use Ctl-x r k

3) if want to add "something" in a specific region:
set mark for the region;
M-x string-insert-rectangle "something"

Aucun commentaire:

Enregistrer un commentaire