Replace all keyboard shortcut
Hi,
I cannot find out how to run a replace all with only my keyboard.
Tabbing in the search or replace fields only switches between them, so I cannot find a way to change focus to the "Replace all" button.
Alt + Enter adds a new line in the field,
Enter replaces a single instance,
Ctrl + Enter, Shift+Enter, and every other combination does nothing.
Is this impossible?
Tom
Please sign in to leave a comment.
Hello,
Indeed, this is known issue: https://youtrack.jetbrains.com/issue/IDEA-120554. Please vote for it in order to move it up in the queue and receive notifications regarding the progress of the feature. See more information on working with tracker at <https://intellij-support.jetbrains.com/entries/23368682>.
As a workaround, I would suggest to select the word you want to replace, then use Select All Occurrences - Ctrl+Alt+Shift+J on Lin/Win or Cmd+Ctrl+G on Mac - and then type the replacement which will effectively replace already selected occurrences.
Thanks Vladimir,
I agree - the workaround works fine, but is useless for regex replacements.
I guess I'll just have to use the mouse occasionally. Woe is me! ;-)
This seems to have been resolved as per this thread-
command+R (open replace box)
Option-P - replace this occurrence
Option-A - replace all occurrences
Option-L - exclude/skip/ignore this occurrence
(tested on IntelliJ IDEA ultimate 2017.2.6)
Uhm, it's alt+a by default. Doesn't that work for you?
Thanks PAL! Option-A is what I needed.
I've been looking for these shortcuts for years; thank you!
How can I change that keyboard shortcut from Option-A to something else?
I need it because I use "ABC – Extended" keyboard layout, so Option-A is considered a special accent character ("Dead Macron"), the one that goes above following letters: ā ē ī ō ū – and is not considered as "A".
Dmitry, this is a mnemonic, mnemonics are not configurable, unfortunately: https://youtrack.jetbrains.com/issue/IDEA-169195
On a good note, you can invoke them both with Alt and Ctrl+Alt. Check if Ctrl+Alt+A works better for you.