Request for a small improvement of the N++ status bar !



  • +1

    Lets not forget N/E/R/D (Search Mode = Normal, Extended, Regex, Regex with ‘Dot’ matching Newline) while we’re at it!

    And I suppose Direction should be there too.

    Crazy idea to save space on the -W/!W/+W/W and -C/!C/+C/C ideas: Use upper case to mean selected and lower case for NOT selected:

    WcPND would mean:

    Whole word
    Ignore case
    wraP around
    Normal
    Down



  • @JimDailey ,
    If we are searching through the find dialog we can see the different search options in the dialog itself.
    But the last used “Match case” and “Whole word” settings in that dialog are actually applicable to the direct search also (when you select a word and hit Ctrl-F3, without the find dialog). This is why it would be good to have those two search options visible in the status bar - because they are applicable also outside the find dialog. As long as both regular expression search and extended mode search are not reachable / usable without the help (outside the) find dialog then we won’t need those in the status bar. Am I missing something?
    Do you agree?

    BR



  • @pnedev ,

    The “wrap around” setting is applicable to most search types “outside” the Find dialog. Technically, the “NERD” setting is as well, although that is much less of a use-case (example: Find dialog has regex selected, in editor window make a selection over the text “ab.de” in an editor tab and hit the shortcut key for “select and find next”…caret will jump to “abcde”).



  • @pnedev The NERD setting does seem to apply. If I highlight ExpectedLength[Index] and press Ctrl+F3, I find no match if Regex is checked, but I do find the next reference to the Indexth element of the ExpectedLength array if Regex is NOT checked.



  • Guys,
    we can’t add every option in the status bar. We should add only the most usefull : those proposed by @guy038



  • @cmeriaux I would say they are all equally useful: every one of them affects whether you find (or not) what you are looking for.



  • @Jim-Dailey

    If you had something like “WcPND” in the status bar, it would certainly be space-efficient, but clicking on an individual letter to change its setting per guy038’s original proposal might be a bit challenging. :)



  • Hi All,

    From all your posts and your helpful ideas, I imagined a very short expression, although easy to understand, which could be inserted in the status bar !

    It would be composed of five capital letters, eventually separated by a space for a better reading ?

    • The first one would stand for the search mode ( N, E, R or A, as DOT matches Any character )

    • The second one would stand for the direction ( D for “Down” OR U for “Up” )

    • The third one would stand for the Whole word option ( W for “Whole Word” OR E for “Exact string” )

    • The fourth one would stand for the Match case option ( S for “Sensitive” OR I for “Insensitive” )

    • The fifth one would stand for the Wrap around option ( L for “Loop” from Bottom / Top OR E for “Ends” at bottom /top


    The different combinations are listed, below :

    | N | D | W | S | L |
    | E | U | E | I | E |
    | R |   |   |   |   |
    | A |   |   |   |   |
    

    I, already, verified that two adjacent letters are never identical !


    Moreover, reading that letters, from left to right, is very easy to memorize, as it, quite, follows the natural way of speech ! Indeed, just look to my representation, below :

    Search, with |N|ormal   mode, in a  |D|ownwards direction, for a  |W|hole Word   , in a  |S|ensitive   way and |L|oop from Bottom / Top
                 |E|xtented          an |U|pwards   direction      an |E|xact String      an |I|nsensitive way     |E|nd  at
                 |R|egular  
                 |A|ny
    

    So, for instance :

    • The string E U W I L would mean : Search, in Extended mode, in an Upwards direction, for a Whole word, in an Insensitive way, and Loop from the top

    • The string N D E S E would mean : Search, in Normal mode, in a Downwards direction, for an Exact string, in a Sensitive way and End at bottom

    • The string R D E I L would mean : Search, in Regular mode, in a Downwards direction, for an Exact string, in an Insensitive way and Loop from the bottom

    May be, I think that it would be nicer to separate some letters with a dash ! From the three examples, above, I suggest the form :

    E U - W I - L
    
    N D - E S - E
    
    R D - E I - L
    
    • The first part ( mode and direction options ) rather concerns the search process, itself

    • The second part ( Whole word and Match case options ) concerns, basically, the Find what zone

    • The final part ( Wrap around option ) concerns the action to perform, when the top /bottom of file is reached


    … Any thought about my delirium ???

    Cheers,

    guy038



  • @guy038 Very nicely done, Guy.



  • @Scott-Sumner and @Jim-Dailey ,

    You are right - some other search options are also applicable outside the Find dialog.
    My point is that the options that are valid outside the Find dialog are the ones that should be in the status bar.

    @guy038 ,

    Having that in mind, is Up / Down search direction option used outside Find dialog? I really don’t know because my typical search use case outside the Find dialog is selecting a word and using Ctrl-F3 shortcut (which does the search downwards while Shift-Ctrl-F3 does it upwards).
    I would prefer @Jim-Dailey 's approach to the options that have only two states (for example Case sensitive (‘C’ and ‘c’), Whole Word (‘W’ and ‘w’)… etc.). This reduces the letter-abbreviations one needs to remember. The options that have more possible states are OK the way you are suggesting.
    Personally I like the hyphen separation you propose.

    BR



  • I think Direction is not relevant in this proposed feature. All of the commands that are affected when not using the Find dialog itself either have a Find Next or Find Previous distinction, or they work in both directions at once (e.g. Style 1 - 5, smart highlighting). My opinion: don’t include Direction

    The search mode, while it can come into play, rarely does. So rarely, in fact, that it doesn’t really justify taking up status bar space for it. My opinion: don’t include Search Mode

    Whole/partial words and case sensitive/insensitive, the status bar enhancement originally proposed, is solid. I think I agree with pnedev that uppercase (active) and lowercase (inactive) might be best. Something like: “Find: W c”, for example. Minimal space taken up and gets the job done.

    I haven’t mentioned a wraparound option because I’m lukewarm about it. My opinion on wrap: no opinion… :)



  • Fortunately (or, perhaps, unfortunately in this case) we all have different use cases. While some people may never search for regular expressions, there are those of us who do. And when we switch between regex and normal searches, it affects the (Shift\+)?(Control\+)?F3 functionality every bit as much as case sensitivity or whole/partial word options.

    It makes sense to me to handle everything affecting the search if there is room in the UI. If there isn’t room for all, then I will sadly admit that the mode is the one option that probably affects fewer people, because many users (many of them programmers!) fail to realize just how useful regex search/replace can be, not withstanding the excellent posts of @guy038 on the subject.



  • The regexp option for (Shift+)?(Control+)?F3 should be deactivate. It don’t see how it can be used outside the search menu or if it can be, it’s only on few case.



  • @cmeriaux Maybe the behavior is not intended, but all of the options/selections that were made in the Find dialog seem to be used when you do any of the various F3 hotkey searches. Here is a way to see it. Enter this into a blank document:

    You will find 7{4} in Normal mode,
    but you will NOT find 7{4} in Regex mode.
    

    Move the cursor to the start of the file and then press Ctrl+F and do a regular expression search for 7{4} You should not find anything. Exit the dialog, highlight 7{4} in the first line and then press F3 (or Ctrl+F3). You will not find anything. Do another Ctrl+F, switch to Normal mode, then close the dialog. Now highlight 7{4} in the first line and then press F3 (or Ctrl+F3). You should find that text in the second row.



  • I agree with @Jim-Dailey on this. We are not talking here if the regular expressions search is useful in the F3 case but rather the strange results you would get from this:

    1. First open the Find dialog and search using regular expressions mode.
    2. Next, you select something in the document like word1.word2 and use F3.

    Now I would expect the search to be normal but would rather get a regular expression search. At least I have forgotten what search mode is currently active and I would need to open the Find dialog again just to see and change that.

    Perhaps it is reasonable to think in other direction here - should the Find dialog options be preserved and used in the F3 case?
    Perhaps we might need Status bar with different search options that are actually affecting only the quick searches (F3 and company).

    And finally, my opinion as expressed before is that ALL search options that remain active / affect the F3 search should be present in the Status bar to at least give you a clue what you are searching for. Nobody would like to miss a match just because some option somewhere he had forgotten about is not in the proper state.



  • Hi All,

    Thank you, all, for your interest about my request. I’ll try, in that post, to get a summary and raise some other ideas !

    • A) I, personally, think that, IF the status bar should content, ONLY, the two states of the Word only and Match case flags, the @scott-sumner’s formulation, below, seems to be a common-sense solution to everyone !

      +W / +C
      -W / +C
      +W / -C
      -W / -C

    May be, Scott, the displaying could be, even, shortened, with, at least, two spaces, between the two options, for easy changes, on mouse clicking, as shown below :

    +W  +C
    -W  +C
    +W  -C
    -W  -C
    

    • B) As @jim-dailey and @pnedev, I think, however, that we should display all the flags, in the status bar. Indeed, although I agree, with Scott, that all flags are not needed, in all cases, some of them may be useful, in some cases !

    • C) To @jim-dailey and @pnedev : Like you, I, first, thought about the uppercase/lowercase difference, for displaying the two states of some flags. But, as shown below, some letters have an uppercase glyph really different from its lowercase glyph and some others haven’t. And, unfortunately, the W, C and P letters rather belong to the second category :-((

      UPPER / LOWER case letters QUITE different : A a B b D d E e F f G g H h M m N n Q q R r T t

      UPPER / LOWER case letters NOT MUCH different : C c I i J j K k L l O o P p S s U u V v W w X x Y y Z z

    Of course, it’s just a first and personal impression, that you may not share at all !

    However I agree with you : we should not increase the number of symbols displayed. So, what about the displaying, below ?

    N  D | W  C | A
    E  d | w  c | a
    R              
    A              
    
    • The first one would stand for the search mode ( N, E, R or A, as DOT matches Any character )

    • The second one would stand for the direction ( D for “Down” OR d for “Up” )

    • The third one would stand for the Whole word option ( W for “Whole word only” OR w for “No Whole xord only” )

    • The fourth one would stand for the Match case option ( C for “Match case” OR c for “No Match case” )

    • The fifth one would stand for the Wrap around option ( A for “Wrap around” OR a for “No wrap around” )


    REMARK :

    Does anyone know if it"s possible, technically, to colour these letters in the status bar ? Or, may be, to underline letters, in status bar, like in menus, when we’re using the ALT key ?

    In that case, a capital letter C would mean that the Match case option is set and an underlined capital C would mean that the Match case option in unset !


    I change my mind and consider, by now, that two pipe characters look better as separators, than two hyphens ! As I said before, these two characters make visible the logical parts of the search process :

    • The first part ( mode and direction options ) rather concerns the search process, itself

    • The second part ( Whole word and Match case options ) concerns, basically, the Find what zone

    • The final part ( Wrap around option ) concerns the action to perform, when the top /bottom of file is reached


    • D) To @cmeriaux : The totality of the flags, even the spaces and the separators characters, take only 15 characters long. With my suggestion, about the EOL characters displaying, in my first post, we could already get back 9 spaces. To my mind, it shouldn’t be very difficult to get six extra spaces positions !

    • E) To @cmeriaux, @jim-dailey and @pnedev : Indeed, as you, I think that, on using the Select and Find feature ( Ctrl + Shift + F3 or Ctrl + F3 shortcuts ) the search should be run, automatically, in NORMAL mode, without updating the last user choice, done in the Find dialog. This would suppress all the odd results, obtained for the first matched string !!

    • F) To All : What do you think of this new option, in the Find/Replace/Mark dialog : Close F/R dialog, on first match. By this means, we could, at once, after the first match, go on searching, with the F3 or Shift + F3 shortcut :-))

    Best Regards,

    guy038

    P.S. : Two more points :

    • 1)

    As said above, the Select and Find feature depends of all the options, previously defined in the Find dialog

    So, it’s important to note that, contrary to the Select and Find feature, the Find ( Volatile ) feature is, automatically and always, performed, with the following options :

    • NORMAL mode

    • Case SENSITIVE

    • NO WHOLE word only

    • WRAP around

    and this, WITHOUT changing the present state of these four options, in the Find dialog, NOR thesearch expression, itself ( Volatile, isn’t it ? )


    • 2)

    Do you know the main difference between the Find ( Volatile ) and the Select and Find features ? Well :

    • The Find ( Volatile ) feature does NOT affect the continued search process, with the Shift + F3 or F3 shortcuts

    • The Select and Find feature DOES affect the continued search process, by remembering this search, for further matches, with the present options of the Find dialog, on hitting the Shift + F3 or F3 shortcut.

    This explains why, contrary to the Find ( Volatile ) feature, which exploits its own fixed options, the Select and Find feature is dependant on the Find dialog’s options, and, especially, on the search mode !



  • Point (E), which was @cmeriaux’s suggestion originally, is a good one!

    Point (F)…is an excellent suggestion. I’m coming to Notepad++ after using Multiedit for almost 20 years. One of the hardest things to get used to in that transition was the Find dialog staying open after you tell it to Find something. It should close until I want it again (shifting input focus to the current editor tab), at which point I can bring it up with a single shortcut. I know I can close it with Esc, but I’ve never gotten used to doing that.

    Another Find dialog situation that frustrates me that point (F) would solve: I’ve specified my text and it has done the first find for me, and I’ve put the focus back the in an document tab. If I use shortcut keys to find successive matches, all is good until no more matches are found. At this point (here comes the frustrating part), focus is returned to the Find dialog! This only happens with the Find dialog still open; Notepad++ won’t re-open a closed Find dialog…but I just want the window border to flash at the end of matches, regardless of whether the Find dialog is open or not


Log in to reply