index rss mastodon twitter github linkedin email
Álvaro Ramírez
sponsor

Álvaro Ramírez

10 October 2019 Emacs swiper and multiple cursors

Emacs swiper is awesome. I bound swiper-isearch to C-s. Also a big fan of multiple cursors. I use it regularly (it's fun).

I had totally missed Ole's post back in 2015: A simple multiple-cursors extension to swiper. Turns out, swiper has multiple cursors support out of the box (bound to C-7 by default). Yay!

UPDATE: Thanks to irreal's post, please remember to add swiper-mc to mc/cmds-to-run-once list (or things won't work as expected). This typically happens interactively when you invoke C-7 the first time around. Make sure you answer "n" when you see a prompt like:

swiper-mc-no.png

If you happen to choose "y" by mistake, take a look at ~/.emacs.d/.mc-lists.el to correct it. Remove swiper-mc from mc/cmds-to-run-for-all and add it to mc/cmds-to-run-once. Invoke m-x eval-buffer to reset the values and you're good to go.

swipermc.gif