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

5 comments

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.

0

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! ;-)

0

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)

2

Uhm, it's alt+a by default. Doesn't that work for you?

1

Thanks PAL! Option-A is what I needed.

0

Please sign in to leave a comment.