Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Emacs how do I edit multiple points at once?

Tags:

emacs

elisp

There's two variations. I think you can select a rectangle and add stuff to the beginning and end of all lines.

I'd also like to know if it's possible to select multiple points that are on different offsets to where you edit all the points at once. I think Yasnippet provides something similar, but only when you use a predefined template. Something like this.

<div class="">
<a class="">

where i can mark a point on both class things and typing will edit both class attributes. Is it possible?

like image 891
BreezyChick89 Avatar asked Jul 05 '12 16:07

BreezyChick89


1 Answers

Emacs Rocks! describes mark-multiple, which does what you want. (Here's their video introduction.)

EDIT: @Lifton points out it has been superceded by multiple-cursors.

like image 145
Juancho Avatar answered Sep 22 '22 01:09

Juancho