UP | HOME

Bulk edit with multiple cursor

Table of Contents

Some neat editing feature of Emacs when combining with multiple-cursor.el:

1 Search and replace in a project with helm-ag

First, use helm-ag to find for something you want to replace, then press C-c C-e, which will put the search result into an editable buffer, now use M-x mc/mark-all-like-this or M-x mc/mark-all-dwim to highlight and replace it. Commit the change with C-c C-c.

2 Rename multiple files in dired

When you are in a dired-mode buffer, press C-x C-q to turn it into edit mode, then use multiple-cursor to edit the file names, then C-c C-c to commit the change.

Demo:

emacs-mc-dired.gif

Date: 2019-04-22 Mon 00:00

Author: Huy Tran

Created: 2019-04-25 Thu 11:43