I am trying to create a macro that takes a selection of text and runs some find/replace on it using a regex. I have recorded this macro in intellij, but when I run it, all I get is the find/replace dialog opened. No find/replace is executed.
Has anyone had any luck with creating a find/replace macro in intellij?
Add a keyboard shortcutOn the Keymap page of the Settings/Preferences dialog Ctrl+Alt+S , right-click an action and select Add Keyboard Shortcut. In the Keyboard Shortcut dialog, press the necessary key combination.
Macros provide a convenient way to automate repetitive procedures you do frequently while writing code. You can record, edit and play back macros, assign a shortcut to them, and share them. Macros can be used to combine a sequence of editor-related actions within a file.
This appears to be a long-standing bug in IntelliJ. One workaround that worked for me was this:
In general, Vim emulation can be really handy for IntelliJ macros.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With