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
    • M

      macro question re:

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      5
      1
      0 Votes
      5 Posts
      101 Views
      guy038G
      Hello, @murraysobol, @peterjones and All, I corrected, in my first post to @troglo37, the spelling mistake on the word shortcuts.xml and rearranged a few lines to make my description more precise ! Of course, @murraysobol, it’s better to use the second version of my macro. Note, however, that this macro generally replaces a fairly short piece of text with a rather long string of characters ! Therefore, you may need to change a default setting in the Search section of Preferences... if the resulting regular expression becomes too long ! For example, in my last post to @troglo37, the two lines of the test contains, respectively, 124 and 135 chars and the resulting regexes contains, both, 1,612 chars ! So, go to Settings > Preferences... > Searching section. Then, in the part When Find Dialog is Invoked, move to the Max Characters to Auto-Fill Find field from Selection option and modify the default 1024 value to a greater value. Personally, I use the maximum 16383 value ! However, it’s obvious that your initial selection must be as short as possible This macro will be used mainly to get the different spellings of names or surnames ! An exemple with this INPUT text, below : Our friends Šarūnas, Đorđe, Ørjan, Paweł, Ștefania, Ángel and Uğur had already left Our friends Sarūnas, Đorđe, Orjan, Paweł, Ștefania, Ángel and Uğur had already left Our friends Šarunas, Đorđe, Ørjan, Pawel, Stefania, Ángel and Uğur had already left Our friends Šarūnas, Dorde, Ørjan, Paweł, Ștefania, Angel and Ugur had already left Now if I copy, at random, the third line of this INPUT text somewhere else, select that line and run the Global Search macro, I get this regex : (?=[[=O=]])\X(?=[[=u=]])\X(?=[[=r=]])\X(?=[[= =]])\X(?=[[=f=]])\X(?=[[=r=]])\X(?=[[=i=]])\X(?=[[=e=]])\X(?=[[=n=]])\X(?=[[=d=]])\X(?=[[=s=]])\X(?=[[= =]])\X(?=[[=Š=]])\X(?=[[=a=]])\X(?=[[=r=]])\X(?=[[=u=]])\X(?=[[=n=]])\X(?=[[=a=]])\X(?=[[=s=]])\X(?=[[=,=]])\X(?=[[= =]])\X(?=[[=Đ=]])\X(?=[[=o=]])\X(?=[[=r=]])\X(?=[[=đ=]])\X(?=[[=e=]])\X(?=[[=,=]])\X(?=[[= =]])\X(?=[[=Ø=]])\X(?=[[=r=]])\X(?=[[=j=]])\X(?=[[=a=]])\X(?=[[=n=]])\X(?=[[=,=]])\X(?=[[= =]])\X(?=[[=P=]])\X(?=[[=a=]])\X(?=[[=w=]])\X(?=[[=e=]])\X(?=[[=l=]])\X(?=[[=,=]])\X(?=[[= =]])\X(?=[[=S=]])\X(?=[[=t=]])\X(?=[[=e=]])\X(?=[[=f=]])\X(?=[[=a=]])\X(?=[[=n=]])\X(?=[[=i=]])\X(?=[[=a=]])\X(?=[[=,=]])\X(?=[[= =]])\X(?=[[=Á=]])\X(?=[[=n=]])\X(?=[[=g=]])\X(?=[[=e=]])\X(?=[[=l=]])\X(?=[[= =]])\X(?=[[=a=]])\X(?=[[=n=]])\X(?=[[=d=]])\X(?=[[= =]])\X(?=[[=U=]])\X(?=[[=ğ=]])\X(?=[[=u=]])\X(?=[[=r=]])\X(?=[[= =]])\X(?=[[=h=]])\X(?=[[=a=]])\X(?=[[=d=]])\X(?=[[= =]])\X(?=[[=a=]])\X(?=[[=l=]])\X(?=[[=r=]])\X(?=[[=e=]])\X(?=[[=a=]])\X(?=[[=d=]])\X(?=[[=y=]])\X(?=[[= =]])\X(?=[[=l=]])\X(?=[[=e=]])\X(?=[[=f=]])\X(?=[[=t=]])\X Finally, if you select the 1,079 characters of this regex and open the Find dialog with Ctrl + F, you can easily verify that it matches, successively, the four lines of the INPUT text. Whaooou ;-)) Note that I could have chosen the first, the second or the fourth line, either. The resulting regexes would have matched the four lines of the INPUT text, as well ! Best Regards, guy038
    • CoisesC

      Search++: A work in progress

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      117
      5 Votes
      117 Posts
      34k Views
      CoisesC
      @guy038 said: Now, based on my test, have you conducted any similar tests of your own, and have you found that searching with Search++ also takes longer compared to the native search in N++ ? I ran some tests this morning because I wanted to get a reference before I start testing changes to the multithread scheduling in Search++ — so I can verify that what is supposed to be better actually is better. This is Windows 10 Pro, 64 bit, running on a 2019 desktop with a Core i9-9900K and 32 GB RAM. D is an internal SSD. S is an internal HDD. U is a USB thumb drive. \\PEACOCK is another machine on the same local area network. The content of the folder Testing2 on each drive is the same. It’s a mix of 3,762 files in 228 folders, 591 MB total. Somewhere around 5% are binary files (dll, exe, png, etc.). For U, following your lead, I did a “repeat” running the same search immediately after the first; after that, I unplugged and reconnected the drive before proceeding to another test. I couldn’t conveniently unplug the internal drives, but testing showed no significant variation in successive trials on D, S or PEACOCK. Some of these results are surprising. (I thought the hard disk would be noticeably slower than the SSD, and I expected to see a repeat of your experience with the USB drive.) I suspect that some specialized knowledge I do not have, and perhaps a more controlled environment, is required to measure performance meaningfully, so all this should be taken as anecdotal. Search++ 0.6.3.1: D:\Quick\Testing2 a([^\r\n])[^\r\n]*b\1 0:08.71 149,919 matches in 2,505 of 3,762 files (Regex): a([^\r\n])[^\r\n]*b\1 D:\Quick\Testing2 the 0:01.44 445,907 matches in 3,342 of 3,762 files (Regex): the S:\Testing2 a([^\r\n])[^\r\n]*b\1 0:08.91 149,919 matches in 2,505 of 3,762 files (Regex): a([^\r\n])[^\r\n]*b\1 S:\Testing2 the 0:01.10 445,907 matches in 3,342 of 3,762 files (Regex): the U:\Testing2 a([^\r\n])[^\r\n]*b\1 0:16.36 149,919 matches in 2,505 of 3,762 files (Regex): a([^\r\n])[^\r\n]*b\1 U:\Testing2 (repeat) a([^\r\n])[^\r\n]*b\1 0:08.87 149,919 matches in 2,505 of 3,762 files (Regex): a([^\r\n])[^\r\n]*b\1 U:\Testing2 the 0:24.84 445,907 matches in 3,342 of 3,762 files (Regex): the U:\Testing2 (repeat) the 0:01.03 445,907 matches in 3,342 of 3,762 files (Regex): the \\PEACOCK\Testing2 a([^\r\n])[^\r\n]*b\1 0:12.32 149,919 matches in 2,505 of 3,762 files (Regex): a([^\r\n])[^\r\n]*b\1 \\PEACOCK\Testing2 the 0:07.07 445,907 matches in 3,342 of 3,762 files (Regex): the Notepad++ 8.9.7: D:\Quick\Testing2 a([^\r\n])[^\r\n]*b\1 1:53:64 Search "a([^\r\n])[^\r\n]*b\1" (149919 hits in 2505 files of 3762 searched) [RegEx] D:\Quick\Testing2 the 0:14.14 Search "the" (445907 hits in 3342 files of 3762 searched) [RegEx] S:\Testing2 a([^\r\n])[^\r\n]*b\1 1:53.99 Search "a([^\r\n])[^\r\n]*b\1" (149919 hits in 2505 files of 3762 searched) [RegEx] S:\Testing2 the 0:12.42 Search "the" (445907 hits in 3342 files of 3762 searched) [RegEx] U:\Testing2 a([^\r\n])[^\r\n]*b\1 2:08.20 Search "a([^\r\n])[^\r\n]*b\1" (149919 hits in 2505 files of 3762 searched) [RegEx] U:\Testing2 (repeat) a([^\r\n])[^\r\n]*b\1 1:54.96 Search "a([^\r\n])[^\r\n]*b\1" (149919 hits in 2505 files of 3762 searched) [RegEx] U:\Testing2 the 0:31.62 Search "the" (445907 hits in 3342 files of 3762 searched) [RegEx] U:\Testing2 (repeat) the 0:14.16 Search "the" (445907 hits in 3342 files of 3762 searched) [RegEx] \\PEACOCK\Testing2 a([^\r\n])[^\r\n]*b\1 2:11.36 Search "a([^\r\n])[^\r\n]*b\1" (149919 hits in 2505 files of 3762 searched) [RegEx] \\PEACOCK\Testing2 the 0:29.46 Search "the" (445907 hits in 3342 files of 3762 searched) [RegEx] (The reason for using [^\r\n] instead of . is that Notepad++ and Search++ have slightly different definitions of . when “matches newline” is not in effect: like Columns++, Search++ excludes only the characters that cause a line break in Scintilla, new line and return; while Notepad++ also excludes four other control characters, FF, NEL, LS and PS. The . is noticeably faster, but it returns different results for Search++ and Notepad++, almost certainly due to the binary files in Testing2.) Edit: Added local area network tests.
    • M Andre Z EckenrodeM

      Search++ Config save prompt when exiting after multi-instance

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      4
      0 Votes
      4 Posts
      102 Views
      M Andre Z EckenrodeM
      @Coises You’re welcome, and thank YOU for promptly creating the new version, and for your plugins in general to begin with! The new one lets me exit without incurring any dialog.