Open 3rd3 opened 8 years ago
Yes, if you mark a region evil-mc
will use that to match future cursors. When no region is marked then it uses the symbol at point. So, in this case if you select <a href
and call evil-mc-make-and-goto-next-match
(or press C-n
) it should work as expected.
Ah, I see, but this does not seem to work with standard Emacs marks, only with marks made in visual mode, could that be?
Yes, that is correct. evil-mc
checks for regions only if the visual mode is on. For more details see the method evil-mc-set-pattern
in evil-mc-cursor-make.el
Is this by design, limitation or was it just never considered? Perhaps I am using evil the wrong way, but I occasionally have Emacs marks (for example custom functions that expand the mark in certain ways, and I occasionally mark things with shift in insert mode.)
This never came up as an issue. I use evil mode via spacemacs and it's pretty well integrated. You may be able to use the evil methods when creating marks in your functions.
I came to emacs from vim though. So, I'm only used to mark via the visual mode.
@3rd3 How about installing both evil-mc
and multiple-cursors
and having the same key binding for evil-mc-make-and-goto-next-match
on normal-state
and mc/mark-next-like-this
on insert-state
(so you get consistent experience on both states)?
With
multiple-cursors
it is possible to mark some characters, for example the first<a href
in this text:then call
mc/mark-next-like-this
and it would then create a new cursor at the next occurrence of<a href
. This is very when editing repeating syntactical structures which are not necessarily matched by symbols (or words, not sure which oneevil-mc
uses).