@guy038 :
So these are not bad ideas. The biggest problems I see with implementation is the quantity of new proposed new buttons, because:
screen space is limited, and
so many new buttons makes it hard to have enough Alt+symbol (e.g. Alt+a =
Replace All button press) key combinations for all of the controls
Another problem is that currently there aren’t buttons that disappear or change form (within one tab of the Find family dialog) depending upon the state of other controls. I fear that this, and some of the other proposed changes, are just “too much” to change all at once (Notepad++ seems to evolve slowly).
An additional thing to think about more is the proposed “<<Count” and “Count>>” features. I found that with certain regular expressions you can have matches that “straddle” the caret, thus there can really be 4 different match counts:
matches that occur globally (anywhere in the file); this is existing functionality
matches above the caret position
matches below the caret position
matches that straddle the caret position
Here’s some Pythonscript code that will demonstrate. Put the caret in the middle of a word before running this script (CountAboveAndBelowCaret.py):
import re
def CABABC__main():
search_str = r'\w+'
search_str = notepad.prompt('enter a find-what regex', '', search_str)
if not search_str or len(search_str) == 0: return
caret_pos = editor.getCurrentPos()
CABABC__main.match_above_count = 0
CABABC__main.match_below_count = 0
CABABC__main.match_global_count = 0
def match_found_above(m): CABABC__main.match_above_count += 1
def match_found_below(m): CABABC__main.match_below_count += 1
def match_found_globally(m): CABABC__main.match_global_count += 1
reflags = 0
editor.research(search_str, match_found_above, reflags, 0, caret_pos)
editor.research(search_str, match_found_below, reflags, caret_pos, editor.getTextLength())
editor.research(search_str, match_found_globally, reflags, 0, editor.getTextLength())
notepad.setStatusBar(STATUSBARSECTION.DOCTYPE, '{gc} total matches. {ac} matches above caret; {bc} below.{s}'.format(
gc=CABABC__main.match_global_count,
ac=CABABC__main.match_above_count,
bc=CABABC__main.match_below_count,
s='' if CABABC__main.match_global_count == CABABC__main.match_above_count + CABABC__main.match_below_count else ' 1 match straddles the caret.'
))
CABABC__main()