what is the shortcut for "replace all" in pycharm

11,245

Solution 1

ctrl+r by default (ctrl+shift+r for replace in all files)

however if you are using a different keymap it maybe different you can check under settings (under keymap>main menu> edit> find> replace)

enter image description here

after you type the replacement word you can press enter to perform the default action (replace this occurance... ) or you can press alt + the underlined letter on the button label (ie alt+a => replace all) to perform a different action ...

Solution 2

You can either select the word or move the cursor to the end of the word, and then the shortcut to replace all is Shift + F6. Type the replacement, and hit Enter.

Share:
11,245

Related videos on Youtube

Lisa
Author by

Lisa

Updated on June 04, 2022

Comments

  • Lisa
    Lisa about 2 years

    I want to hit a shortkey and replace all in Pycharm. After I hit ctrl+R, I key in text to search and text as replacement. I need to click "Replace" / " Replace all". I currently move my hand to mouse and click the button, but I do it many times in a day. Anyone knows what is the shortkey? Thanks.

    Here's the official document shows how to find and replace by click the button https://www.jetbrains.com/help/pycharm/2016.3/finding-and-replacing-text-in-project.html

    • Joran Beasley
      Joran Beasley over 7 years
      ctrl+r by default (ctrl+shift+r for replace in all files)
    • Dekel
      Dekel over 7 years
      @JoranBeasley, it actually depends on your keymap settings :)
    • Lisa
      Lisa over 7 years
      It only highlights the target, not really replace it. @Joran Beasley
    • Joran Beasley
      Joran Beasley over 7 years
      @lisa ... it is equivelent to clicking edit>find>replace
    • Joran Beasley
      Joran Beasley over 7 years
      @Dekel Im pretty sure thats the default keybinding ... if you select a different scheme for your keymaps it could indeed not be that :P
    • Lisa
      Lisa over 7 years
      @Joran Beasley yes, but you need to hit the button "replace" to make it effective. What is the shortcut for this?
    • Joran Beasley
      Joran Beasley over 7 years
      enter alt + the underlined letter of the operation you wish to perform ... (look at the buttons ... replace is alt+p, replace all is alt+a) (or just press enter after typing the replacement ...)
    • Lisa
      Lisa over 7 years
      Great!! This is the magic I'm looking for. Would you add this to your answer?@Joran Beasley