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



  • This is a good idea from Guy. I often use the “Select and find next – Shift-F3” search command and wonder why nothing is found. Then I have to open the find window to check and update the find options.

    Perhaps the search type of Normal or Extended or Regular expression could also be added to the status bar.



  • +1 for Guy’s proposal



  • Very good proposal guy.
    When you speak to someone, use the @ to be sure he’ll get a notification.
    @Don-HO

    What about ! instead of N

    Find : W / C, if the Match whole word only and Match case options are, both set
    Find : !W / C, if the Match case option is set, only
    Find : W / !C, if the Match whole word only option is set, only
    Find : !W / !C, if the Match whole word only and Match case options are, both unset
    

    Screen with good resolution have enough space to add a new field, we just have to reduce the language field.



  • @cmeriaux ,

    Or perhaps, following your ordering:

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



  • @AdrianHHH ,

    Why not throw the “wrap around” setting in there, too? :)



  • +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.


Log in to reply