strindberg / emacsj

Emacs-inspired IntelliJ plugin
MIT License
16 stars 3 forks source link

Keyboard macros that work like in Emacs #70

Open HaraldKi opened 4 weeks ago

HaraldKi commented 4 weeks ago

Just in case you get bored: a great addition would be keyboard macros that actually work.

Yes, Intellij has keyboard macros, but whenever I try to use them, some things go wrong. Very simple things work, but my typical use (in Emacs) is something like

  1. incremental search to an anchor
  2. carefully edit around the anchor, may include additional incremental searches or M-x commands
  3. move cursor past the edited area for a save start

Then just go Ctrl-X e e e e e e ...

I did not figure out what really goes wrong in Intellij. It feels a bit like keyboard interaction is not strictly synchronous and when running a macro, the keyboard actions overtake each other, in particular when the equivalent of M-x (Find Action) is involved. I often get just a mess as a result.

Fell free to close as off topic, this may just be too cumbersome to fix in a plugin. (Great plugin, btw., thanks.)

strindberg commented 3 weeks ago

Thanks for the great suggestion. I have dabbled with this before since, as you say, the IntelliJ macros are not working great. More specifically, I was interested in seeing if "repeat macro" would be possible to implement. My attempts have not been very promising so far; it's difficult to build something upon an unstable foundation, but I'll keep trying when I find the time. If I close this later on, it will be because I couldn't find a way to do it.