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
      227
      7 Votes
      227 Posts
      111k Views
      guy038G
      Hello, @coises and All, You said, in a previous post : I do think it would be possible, and that it would be a useful enhancement. I haven’t studied the problem in detail yet. The relevant concepts exist and are well-defined: Unicode canonical equivalence and compatibility equivalence. Probably someone has already implemented practical searches using canonical and compatibility equivalence in open source code, To my mind, we do not need the help of anyone to achieve such a feature. Of course, my statement seems a little pretentious, but consider this : In your Search++ plugin’s code, the ONLY thing you have to do, in order to use this fantastic improvement, would be : When the Plain button is selected, to use this layout : □ M̱atch case □ Whole word only □ Matches all U̱nicode forms When the Regex button is selected, to use this layout : □ M̱atch case □ Ḏot matches line breaks □ Free spacing̱ □ Unicode word ḇoundaries ( greyed ) When the ICU button is selected, to use this layoout □ M̱atch case □ Ḏot matches line breaks □ Free spacing̱ □ Unicode word ḇoundaries Thus, when the Search++ dialog is selected : ALT + B toggles 'Unicode word boundaries' ( ICU mode ) ALT + D toggles 'Dot matches line breaks ( Regex / ICU mode ) ALT + G toggles 'Free spacing' ( Regex / ICU mode ) ALT + M toggles 'Match case' ( Plain / Regex / ICU mode ) ALT + U toggles 'Match all Unicode forms' ( Plain mode ) ALT + W toggles 'Whole word only' ( Plain mode ) Then, as long as, both, the Plain button and the Match all Unicode forms option are selected : Switch INTERNALLY to the Regex mode Replace, INTERNALLY, ANY character • of the text ( ABOVE \x001F and different from \R), within the search window, by the regex (?=[[=•=]])\X That’s all ! One short example : internally, IF the search dialog contains : The Sarun string, you would change it with the regex (?=[[=S=]])\X(?=[[=a=]])\X(?=[[=r=]])\X(?=[[=u=]])\X(?=[[=n=]])\X The Šarūn string, you would change it with the regex (?=[[=Š=]])\X(?=[[=a=]])\X(?=[[=r=]])\X(?=[[=ū=]])\X(?=[[=n=]])\X The Šarūn string, you would change it with the regex (?=[[=S=]])\X(?=[[=a=]])\X(?=[[=r=]])\X(?=[[=u=]])\X(?=[[=n=]])\X And you can verify that each of these three regexes do match the three strings Sarun, Šarūn and Šarūn , simultaneously !! Best Regards, guy038 P.S. : In the first string Sarun, NO character with an accent In the second string Šarūn, two single chars with an accent ( Š and ū ) In the third string Šarūn, two characters with a base letter ( S and u ) followed with an accent ( ̌ and ̄ )
    • Carlos SánchezC

      [New plugin] Smart Math

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      14
      1 Votes
      14 Posts
      3k Views
      Vitalii DovganV
      @matsnorberg FreeBasic is compiled to a native DLL file, and the code uses “header” files “Notepad_plus_msgs. bi”, “PluginInterface. bi” and “Scintilla. bi” which are partial ports of the corresponding C/C++ headers. So, we have a native dynamic-link library file that follows Notepad++'s and Scintilla’s API, as well as WinAPI. Generally speaking, it should not matter which programming language was used for that. It could be FreePascal, for example. By the way, since FreeBasic uses GCC under the hood, the generated DLL is very close to the one generated from C code :)