Skip to content

mm--/ace-mc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 

Repository files navigation

Ace-mc - Add Multiple Cursors with Ace Jump

Ace-mc makes it really easy to add and remove multiple cursors using ace jump mode.

Screenshots

Adding cursors with ace-mc

Deleting cursors with ace-mc

Using the region with ace-mc

Installation

Ace-mc is available through MELPA, so installing it is as easy as:

M-x package-install RET ace-mc RET

Usage

Ace-mc comes with two commands:

  • ace-mc-add-multiple-cursors
  • ace-mc-add-single-cursor.

Both do pretty much the same thing.

I have ace-jump-mode bound to C-0, so I bind ace-mc-add-multiple-cursors to C-) and ace-mc-add-single-cursor to C-M-). The setup would be like this:

(global-set-key (kbd "C-)") 'ace-mc-add-multiple-cursors)
(global-set-key (kbd "C-M-)") 'ace-mc-add-single-cursor)

ace-mc-add-multiple-cursors prompts for a "Query Char" for the first character of a word, much in the same way that Ace Jump does. In fact, ace-mc-add-multiple-cursors takes similar prefix arguments that ace-jump-mode does. So if you pass one C-u prefix to it, it'll activate ace-jump-char-mode, and with C-u C-u it'll activate ace-jump-line-mode.

Once you enter a query char, you'll be prompted for locations to add multiple-cursor-mode cursors. If a cursor is already at the location, it'll be removed. You'll be continually prompted for more locations to add or remove cursors until you exit out of it by pressing Enter or Esc or anything really that's not alphabetic.

When you have an active region, no "query char" is prompted for. Instead, you just get a list of locations that match the text in your region.

ace-mc-add-single-cursor does the same thing as ace-mc-add-multiple-cursors, just without looping.

About

Add Multiple Cursors using Ace Jump

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published