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

落花浮王杯 提交于 2019-12-02 21:55:27

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.

LiamRyan

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

iss42

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.

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

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.

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!