Macro ?


I'd like to make a macro that selects the whole line, then replaces
"word1" by "word2". Unfortunatelly when I record such a macro and then
execute it, the replace dialog appears and I have to type word1 and
word2 everytime (so the macro is useless).

Is there a way to automate such thing?

Also is there a way to add a key shortcut to a macro?



1 comment
Comment actions Permalink

I've experienced the exact same problem. I want to record multiple replaces and re-run them for different. I would also like these replaces to preserve the settings (for each replace) in the Replace dialog (ex. case sensitive, apply to entire scope, etc.).

You can add a key shortcut to a macro according to the help. I have not tried it because I haven't been able to generate a macro worth using.

Here is the snippet from the Help page:

MACRO KEYBOARD SHORTCUTS: You can create a keyboard shortcut for any macro. From the main menu, choose File | Settings: IDE: Keymap. In the Keymap Settings group box, expand the Macros node in the treeview. Create shortcuts as described in the Keymaps topic.


Please sign in to leave a comment.