Community
    • Login
    1. Home
    2. Popular
    Log in to post
    • All Time
    • Day
    • Week
    • Month
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics

    • All categories
    • CoisesC

      Search++: A work in progress

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      149
      6 Votes
      149 Posts
      47k Views
      CoisesC
      I had written: In the main search dialog, when the default action is active for a button (e.g., Find, Count, etc. without a scope qualification like “in Selection” or “in Marked Text”), somehow indicate what the default action would be if you pressed the button right now. That is, Find adapts to work in selection if you have a selection large enough, or in marked text, or in the whole document, but what will it actually do right now? This feels like a big missing thing to me, but I’m a bit stumped as to how to indicate it. If a put a general indicator somewhere (it will always be the same for all buttons with default scope), where, and how should it appear? I am very hesitant to take up additional space in the dialog, or to make it any more “busy” than it already is. If I show it on each button, how would I distinguish it from the marker that tells you the direct action for the button is a command with a specified scope? (Remember, this has to work for any dark mode color combination the user might pick, and some users are colorblind.) Would it be better to show it on the buttons and remove the ability to select an action with other than default scope as the action for a button by shift-clicking the drop-down menu? Does anyone even realize they can shift-click the drop-down menus (the only way to know is to do it by accident or read the help)? @guy038 wrote: Personally, I’m rather in favor of your last point. That way, we would know exactly which operation has just been performed, and it would be really helpful when pressing the Search button , at the rightmost zone of the Search++ panel — which would clearly indicate whether we’ve selected and run : a list, a selection, a mark, or just the results of a search ! and later, @guy038 wrote: I do know about using the Shift key and a click on any drop-dwon menu. However, what is your general feeling about my reply : any operation would be clearly identified and affecting a default option would not been anymore mandatory ?! While I was writing this, you clarified what you meant, and I responded to that. What I was attempting to describe is related to the problem you encountered when you did a default Show search and nothing happened. The reason was because the previous Show caused text to be marked, so when you did a new default Show, it was searching within the marked text, though you meant to search the whole document. That’s what “default scope” does: it might search selected text, it might search marked text, or it might search the whole document, depending on your settings and whether text is marked, or enough text is selected, at the time. What bothers me is that before you click the button, it’s not obvious what the current default scope will be. Maybe you forgot you had text marked. Maybe you thought your selection was over the minimums you had set in Single selections must have at least:, but it was actually a couple characters short. You could still do what you meant to do by selecting from the drop-down menu, but you might not realize that you need to use the drop-down; then you’re left puzzled by why the results were not what you expected. I’ve hit this trap myself, and I wrote the damn thing! One possibility is that my “default scope” concept is just fundamentally flawed. Maybe the user should have to indicate, each time, whether the intent is to search the whole document, search in selected text or search in marked text. Yet I fear adding that many buttons, or using some fancy, non-standard divided buttons, would make an overly busy and confusing interface; while using modifier keys or having to use the drop-downs for everything but whole document searches would be clumsy and annoying. So I’m trying to think how I can give a visual cue as to what the “default scope” is before you click the button; that way, if it isn’t what you expected, you’ll know to use the drop-down instead (or change your selections or marks). The problem then becomes, if I add a scope indicator that changes with conditions, how do I do it? The first idea I listed was a bad one. A common indicator would be in the wrong place (that is, not where you’re looking when you go to click a button), and I was wrong about it always being the same, since the unchecked states of Allow default Select command to Select in Selection and Allow default Mark command to Mark in Marked Text exclude certain scopes from those commands only. The second idea makes more sense: put the indicator on each button, letting it change as conditions change. The problem is, how would I distinguish that from the scope indicators that appear if you Shift+click the drop-down menu and select a command that does not use default scope (like “Find All in Whole Document”)? You wouldn’t (easily) know when you had selected a command with fixed scope and when you had a default scope command, except by noticing whether it ever changes when you select or mark text. The third idea questions whether being able to set a non-default scope command as the one-click command for a button is worthwhile at all. If you can never do that, then there is no problem with confusing the meaning of the scope indicator on a button: it would always mean that is the current scope of the default scope command, since other commands could not be assigned as the one-click action for a button. I don’t like any of my ideas. (For that matter, I don’t like my scope and extent icons, either. The arrows are OK, but as for the rest, I tried everything I could come up with and I still think they’re obscure, confusing, ugly and hard to read.) So I guess I was hoping someone might come up with an idea I like better than my own. Or say something that would lead to me coming up with a better idea than the ones I’ve had so far.
    • Roberts RozisR

      Feature Request: Find in Files > In all Subfolders > [nn] levels deep only

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      6
      0 Votes
      6 Posts
      1k Views
      guy038G
      Hello, @Roberts-Rozis, @Peterjones, @dennis-bulgrien, @coises and All, @Coises, I did some tests with my D USB key and with your Search++ plugin and the following generic regexes solve the problem nicely : So, @Roberts-Rozis and @dennis-bulgrien : Select The Plugins > Search++ > Search in Files... option Select your média (C, D, … ) on the left and don’t forget to check the Subfolders option and, possibly, the Hideen files option Select the Reg. exp. option for the Filter : type In the filter box : • For a search of any file, even WITHOUT extension, between level N minimum and M maximum, enter : ^(?:[^\\]+\\){N,M}[^\\]+ • For a search of any file, WITH an extension, between level N minimum and M maximum, enter : ^(?:[^\\]+\\){N,M}[^\\]+\..+ • For a search of any file with the EXACT extension 'txt' or 'log' or 'ini', between level N minimum and M maximum, enter : ^(?:[^\\]+\\){N,M}[^\\]+\.(?:txt|log|ini)$ You may also add a size and/or a date condition Of course, check your desired search options Finally, click on the Find in Files button IMPORTANT : Replace the letters N and M by true digits, with the condition N <= M. The M value may be missing ! The syntax of these regexes are specific to the Search++ These regexes allow any search in an arborescence, from level N minimum to level M maximum. However : You may search from level 0, if necessary You can go through all the structure with the 0, or the N, syntaxes Note that you can simulate the Search++ filtering mode by using one of the regexes below, directly in Notepad++ ^(?:[^\\\r\n]+\\){2,4}[^\\\r\n]+$ ^(?:[^\\\r\n]+\\){2,4}[^\\\r\n]+\..+ ^(?:[^\\\r\n]+\\){2,4}[^\\\r\n]+\.(?:txt|log|ini)$ Against the text below, that you’ll paste in a new tab : 987.txt abc\123.txt abc\def\456.txt abc\def\ghi\789.txt abc\def\ghi\jkl\012.txt abc\def\ghi\jkl\mno\pqr\stu\vwx\yz\999.txt 987.txt abc\123.txt abc\def\456.txt abc\def\ghi\789.ini abc\def\ghi\jkl\012.log abc\def\ghi\jkl\mno\pqr\stu\vwx\yz\999.txt LICENSE abc\LICENSE abc\def\LICENSE abc\def\ghi\LICENSE abc\def\ghi\jkl\LICENSE abc\def\ghi\jkl\mno\pqr\stu\vwx\yz\LICENSE You may also try, for example, the cases {0,3} or {0,} or even {4,}. Enjoy ! Best Regards, guy038
    • R

      SnippetPlus v2.1 released. Snippets, SurroundWith and SurroundWith Multiline plugin

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      4
      1 Votes
      4 Posts
      2k Views
      D
      It never inserts the text at the caret’s position for me: it either moves up a line and/or replaces the existing text. What am I misunderstanding?