notepad4 icon indicating copy to clipboard operation
notepad4 copied to clipboard

Replace Dialog : copy search-string to replace-with & count the latter

Open meteorquake opened this issue 3 years ago • 1 comments

On many occasions one wants to adjust something globally that involves tweaking something already there. Currently you very frequently double-click a word and press Ctrl-H, or adjust something already there several times, but then you need to copy what's there and move to the replace with box and paste it there. (It might not seem so necessary if you are doing a Ctrl-H as you can do Ctrl-C first and on landing in the replace box do Ctrl-V, but that's easily forgotten particularly when hopping from other IDEs where Ctrl-H takes you to the find box, and is also hindered by the second point below where you need to do a find of the replace-text to check it doesn't exist...)

  • Can I suggest there is a symbol in the replacement box you can click - and also a keyboard shortcut when on that dialog (Ctrl-K (K for Kopy) or Ctrl-D (D for Duplicate) or similar using Alt) - which simply copies what's in "Search String" box into the "Replace With" box and sets the focus there ready so you can just use the keyboard to make an adjustment.
  • Can I also suggest that the Replace With box has a count button (also with keyboard short cut) that tells you how often it occurs in the document (whole word but case sensitive determined by document type) as very often you don't want the replacement to be something that's already there, for example renaming a variable you don't want it to happen to be an existing one. Often this also has to be done making the whole process of replacing variables with new names a little long-winded which these suggestions would greatly simplify. It may be that you could instead have a tick box "warn if destination text already exists" (and results in a count popup and confirmation if does) since usually in programmatic scripts you tend to do a lot of variable renaming and often in bunches. Cheers, David

meteorquake avatar Feb 24 '22 08:02 meteorquake

For the second: the "Find All" button can be used to tell occurrences of the search string on statusbar "Fnd xxx".

zufuliu avatar May 16 '22 22:05 zufuliu