The Multiple Cursors package has been given much praise throughout the
Emacsphere. It has a smaller use-case than keyboard macros, but it is usually
quicker and just plain looks awesome. To make full use of its commands, I
combine two of the concepts I've explained here before, rebinding M-number and
intuitive keymaps.
I won’t go into what this package is, as Magnar already has a whole video on
that. Instead, I’ll just explain how I use it.
Firstly, the following keys make the most sense to me.
These three commands do most of the hard work. I'll never forget about them, so
their keys don't need to be clever, they just need to be quick. Having
mc/mark-next-like-thisright next to er/expand-region is really the best
place, although now-a-days I use mc/mark-all-dwim almost exclusively.
Something that took me a long time to figure out is that you can unmark stuff
you just marked. Previously, whenever I marked-next-like-this once too many I’d
just abort and start again. It makes sense to bind this to the same keys as
above with the Shift modifier.
On the other hand, this package has a myriad of commands which are extremely
useful on a less-than-daily basis, and this is where we invoke the power of
intuitive key-maps.
Note how easy these keys are to remember. I use mc/insert-numbers barely once
a week, but I never forget it's bound to C-x m i (and when I do use it, it’s a
godsend). Other commands that I rarely use but save me a lot of trouble when I
do are sort/reverse-regions and mc-hide-unmatched-lines-mode.
Multiple Cursors keybinds
12 Oct 2015, by Artur Malabarba.The Multiple Cursors package has been given much praise throughout the Emacsphere. It has a smaller use-case than keyboard macros, but it is usually quicker and just plain looks awesome. To make full use of its commands, I combine two of the concepts I've explained here before, rebinding
M-number
and intuitive keymaps.I won’t go into what this package is, as Magnar already has a whole video on that. Instead, I’ll just explain how I use it.
Firstly, the following keys make the most sense to me.
These three commands do most of the hard work. I'll never forget about them, so their keys don't need to be clever, they just need to be quick. Having
mc/mark-next-like-this
right next toer/expand-region
is really the best place, although now-a-days I usemc/mark-all-dwim
almost exclusively.Something that took me a long time to figure out is that you can unmark stuff you just marked. Previously, whenever I marked-next-like-this once too many I’d just abort and start again. It makes sense to bind this to the same keys as above with the Shift modifier.
On the other hand, this package has a myriad of commands which are extremely useful on a less-than-daily basis, and this is where we invoke the power of intuitive key-maps.
Note how easy these keys are to remember. I use
mc/insert-numbers
barely once a week, but I never forget it's bound to C-x m i (and when I do use it, it’s a godsend). Other commands that I rarely use but save me a lot of trouble when I do aresort/reverse-regions
andmc-hide-unmatched-lines-mode
.Tags: meta, intuitive, keymap, init.el, emacs,
Paradoxical Hydras »
« Better time-stamps in org-export
Related Posts
Paradoxical Hydras in keymap
(Very Late) SX.el Announcement, and more launcher-map in intuitive
Where do YOU bind expand-region? in meta
Content © 2019, All rights reserved. Icons under CC3.0.