Replace String in all files in Eclipse

前端 未结 10 1359
情歌与酒
情歌与酒 2020-12-02 05:37

Do you know how can I search an replace a String in all files of my current project?

Lets say I have this string \"/sites/default/ now I want it to be \"/public/si

相关标签:
10条回答
  • 2020-12-02 06:21

    Ctrl+F gives me Find/Replace dialog box.

    Or you can,

    First Alt+A

    Next Alt+F

    Then press on Replace button.

    If non of them worked:

    Goto -> Window -> Preferences -> General -> Keys and search for replace then you will see binding for Find and replace. In the bottom of that window, you can add your key to Binding text box. There you can add or edit any keys as shortcut.

    0 讨论(0)
  • 2020-12-02 06:22

    Strange but it is a two step task:

    1. Search what you want
    2. In the search tab right click and select replace , or replace all:

    A demo at:

    http://www.avajava.com/tutorials/lessons/how-do-i-do-a-find-and-replace-in-multiple-files-in-eclipse.html

    0 讨论(0)
  • 2020-12-02 06:24
    • "Search"->"File"
    • Enter text, file pattern and projects
    • "Replace"
    • Enter new text

    Voilà...

    0 讨论(0)
  • 2020-12-02 06:26
    ctrl + H  will show the option to replace in the bottom . 
    

    Once you click on replace it will show as below

    0 讨论(0)
提交回复
热议问题