How do I edit all highlighted instances of a word simultaneously?

后端 未结 6 1145
执笔经年
执笔经年 2021-02-01 14:57

In Notepad++, whenever you select any word in an HTML document (or in your CSS), similar words are automatically highlighted.

Is there a shortcut I can use to edit all o

相关标签:
6条回答
  • 2021-02-01 15:32

    There used to be a way that you could just highlight and do something to edit all of the highlighted parts. I know you can click, but there was a way previous you didn't need to do this for everything (and had nothing to do with the find/replace command!)

    I should add that the Ctrl+Click option doesn't have to be matching words, so its not really related to the highlighting of similar words

    0 讨论(0)
  • 2021-02-01 15:33

    This might be a bit late though...

    1. Move your cursor to the start of the the word "unit" in one of your ul block. Just next to " character. Make sure this is the first or last item.
    2. Press 'Alt' key on your keyword.
    3. Move up (if you have selected the last line) or down (if you have selected the first line) the cursor vertically within its spot (will show just a tiny vertical highlighted line).
    4. Type: cool- You will see "cool-unit"

    If you want to override the word "unit" then: At the 1-st step select the entire word unit then follow next steps.

    0 讨论(0)
  • 2021-02-01 15:37

    See the answer here https://superuser.com/questions/621986/editing-all-instances-of-a-string-in-notepad

    Which is:

    CTRL+H to get to the Replace dialog (or Search ==> Replace via the menu).

    Input the string to find and input the string to replace it with and then hit the 'replace all' button on the right.

    0 讨论(0)
  • 2021-02-01 15:42

    Currently, the ability to select all similar text and edit (like the Ctrl+D functionality in Sublime, as mentioned by @George) is not built in to Notepad++ version 6.9.2. It does sound like it will work when Notepad++ updates the version of Scintilla it uses as the functionality is built in to the newer version of that.

    The only way to accomplish something similar to the multi-line edit you speak of is to either use the replace function or Notepad++'s version of multi-editing.

    To Find/Replace

    1. Highlight the word you would like to replace.
    2. Type Ctrl+H to bring up the Replace dialogue.
    3. Modify the "Replace with" text.
    4. Choose either "Replace" or "Replace All"

    To Multi-Edit

    You first need to enable this feature in Notepad++. Do this by going to SettingsPreferencesEditing and then enable Multi-Line Edit. Now when you hold Ctrl and click around your text, a cursor will be left at the location of each click. When you're done locating all of the places you'd like to edit, you can start typing. Whatever you type will now appear at each of the locations you left a cursor at.

    0 讨论(0)
  • 2021-02-01 15:45

    Ctrl + F, enter word, enter replacement. "Hit Replace all".

    0 讨论(0)
  • 2021-02-01 15:48

    There is a way, but I used a different editor. Sublime lets you select multiple areas by highlighting one and hitting CTRL+D, then you get many cursors and you can edit them in parallel.

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