• 0 Votes
    19 Posts
    1k Views
    guy038G

    Hello, @maverick-f-16c, @peterjones, @coises, @terry-r, @mark-olson and All,

    Ah… OK. If your two files have approximately 300K lines, my previous regex S/R won’t probably find nothing as it’s over the usual capacities of the Boost regex engine of Notepad++ !

    So, I would choose the @coises’s way, using the N++ sort to get the right results. I did not fully read the @coises’s method and I prefer start from scratch !

    So, let’s suppose we start with two files :

    File_1.txt : FFF = 79 K = 6 C = 4 A = 8 XXX = 7 H = 51 BB = 6 E = 0 GA = 339 J = 4 DZ = 9 II = 6 File_2.txt : E = 5 J = 0 FFF = 4 ZYX = 1 A = 0 II = 18 DZ = 2 K = 6 C = 17 H = 27

    Note that the records, in these two files, are randomly sorted, on purpose !

    As in my previous post, create a new File_3.txt with the contents of File_1.txt, a separation line of some @ chars then the contents of File_2.txt : FFF = 79 K = 6 C = 4 A = 8 XXX = 7 H = 51 BB = 6 E = 0 GA = 339 J = 4 DZ = 9 II = 6 @@@@@@@@@@@@@@@ E = 5 J = 0 FFF = 4 ZYX = 1 A = 0 II = 18 DZ = 2 K = 6 C = 17 H = 27

    Now, execute , successively, the two regex S/R, below :

    • SEARCH \x3D • REPLACE ( )\x3D

    Then :

    SEARCH (?-s)^.{40}\K\x20+

    REPLACE Leave it EMPTY

    Click only on the Replace All button

    You should get this OUTPUT :

    FFF = 79 K = 6 C = 4 A = 8 XXX = 7 H = 51 BB = 6 E = 0 GA = 339 J = 4 DZ = 9 II = 6 @@@@@@@@@@@@@@@ E = 5 J = 0 FFF = 4 ZYX = 1 A = 0 II = 18 DZ = 2 K = 6 C = 17 H = 27

    Then, move the caret on the first line, at column 25

    Select a 12×0 rectangular selection of all the records BEFORE the @@@@@@@@@@@@@@@ line

    Type in the A letter

    Select the column editor ( Alt + C )

    Select Number to Insert with all zones = 1, fill in with the 0 char and click on the OK button

    Then move to the first line, at column 25, AFTER the @@@@@@@@@@@@@@@ line

    Again do a 10×0 **rectangular selection of all the records AFTER the @@@@@@@@@@@@@@@ line

    Type in the B letter

    Select the column editor ( Alt + C )

    Select Number to Insert with all zones = 1, fill in with the 0 char and click on the OK button

    You should get this OUTPUT :

    FFF A01 = 79 K A02 = 6 C A03 = 4 A A04 = 8 XXX A05 = 7 H A06 = 51 BB A07 = 6 E A08 = 0 GA A09 = 339 J A10 = 4 DZ A11 = 9 II A12 = 6 @@@@@@@@@@@@@@@ E B01 = 5 J B02 = 0 FFF B03 = 4 ZYX B04 = 1 A B05 = 0 II B06 = 18 DZ B07 = 2 K B08 = 6 C B09 = 17 H B10 = 27 Now, perform a classical sort, using the Edit > Line Operations > Sort Lines Lexicographically Ascending option

    We get :

    @@@@@@@@@@@@@@@ A A04 = 8 A B05 = 0 BB A07 = 6 C A03 = 4 C B09 = 17 DZ A11 = 9 DZ B07 = 2 E A08 = 0 E B01 = 5 FFF A01 = 79 FFF B03 = 4 GA A09 = 339 H A06 = 51 H B10 = 27 II A12 = 6 II B06 = 18 J A10 = 4 J B02 = 0 K A02 = 6 K B08 = 6 XXX A05 = 7 ZYX B04 = 1 Delete the @@@@@@@@@@@@@@@ line

    Then, run the following regex S/R :

    SEARCH (?-s)^((\w+)\x20+A.+?)\d+(?=\R\2\x20+B.+=\x20+(\d+))

    REPLACE \1\3

    The OUTPUT is now changed as :

    A A04 = 0 A B05 = 0 BB A07 = 6 C A03 = 17 C B09 = 17 DZ A11 = 2 DZ B07 = 2 E A08 = 5 E B01 = 5 FFF A01 = 4 FFF B03 = 4 GA A09 = 339 H A06 = 27 H B10 = 27 II A12 = 18 II B06 = 18 J A10 = 0 J B02 = 0 K A02 = 6 K B08 = 6 XXX A05 = 7 ZYX B04 = 1

    Note : As you can see, due to the previous sort, the search regex just need to find, each time, two consecutive lines of the form :

    ABCD A#1 = xxx ABCD B#2 = yyy

    Which begin with the same value ABCD and replace the xxx value by the yyy value. This explains why this solution should work with huge files, without any problem !

    Now, move again the cursor on the first line, at column 25

    Perform a 22×0 ( or 22×3 ) rectangular selection of all the records

    Once more, use the Edit > Line Operations > Sort Lines Lexicographically Ascending option

    We get :

    FFF A01 = 4 K A02 = 6 C A03 = 17 A A04 = 0 XXX A05 = 7 H A06 = 27 BB A07 = 6 E A08 = 5 GA A09 = 339 J A10 = 0 DZ A11 = 2 II A12 = 18 E B01 = 5 J B02 = 0 FFF B03 = 4 ZYX B04 = 1 A B05 = 0 II B06 = 18 DZ B07 = 2 K B08 = 6 C B09 = 17 H B10 = 27

    Finally, use this regex S/R, to get, in File_3.txt, the updated values of File_1.txt ( from File_2.txt )

    SEARCH (?-is)\x20+(A)\d+\x20+|^.+\x20B(?s).+

    REPLACE ?1\x20

    FFF = 4 K = 6 C = 17 A = 0 XXX = 7 H = 27 BB = 6 E = 5 GA = 339 J = 0 DZ = 2 II = 18

    Notes :

    As you can verify, the order of the lines, in File_3.txt, is identical to the initial order of these lines in File_1.txt

    The records, present in File_1.txt and not in File_2.txt, are not changed

    The records, present in File_2.txt and not in File_1.txt, are not added, either

    Again, this solution should work in all cases, even with files with million of lines !

    Best Regards,

    guy038

  • Unable to run notepad++ with debug mode (for testing plugin)

    9
    0 Votes
    9 Posts
    600 Views
    ahmoy lawA

    Hi Plugin Community,

    I have managed to test my plugin using notepad++ old version 7.8.9.

    Thanks,
    Ahmoy Law

  • How to use plugin in notepadd++

    7
    0 Votes
    7 Posts
    542 Views
    Mohamed MohamedM

    @PeterJones Ok thanks.

  • PSA: BracketCheck and CSS

    2
    0 Votes
    2 Posts
    210 Views
    PeterJonesP

    @JustAnother-GoogleHater said in PSA: BracketCheck and CSS:

    The BracketCheck

    Do you mean the BracketsCheck plugin?

    I’ve never used it or installed it, so I don’t know what it’s capabilities are or are not.

    However, the latest in Plugins Admin is only v1.2.2, whereas the plugin’s Releases page currently lists v1.2.3 as the newest. You might want to try installing the newest copy from the plugin’s Releases page, to see if it’s already fixed your problem.

    If it still doesn’t behave the way you want, I would suggest checking the plugin’s issues, and if your issue hasn’t been reported by someone else, create a new issue there.

    Because while maybe someone here in the forum knows enough to be able to help you (though I don’t remember people mentioning it recently), if they can confirm it’s truly a bug or missing feature, that plugin’s developer will need to be the one to be notified, not us fellow Notepad++ Users.

  • Breakpoints disabled in release mode

    3
    1 Votes
    3 Posts
    362 Views
    CoisesC

    @Alan-Kilborn said in Breakpoints disabled in release mode:

    I’d run in Debug build mode, but there are some assertions that fire when I have certain data in a Scintilla editing window, and these “get in the way” of what I’m trying to debug.

    If you right-click the Notepad++ project in the Solution Explorer pane and select Properties, under Linker there is a Debugging page. Select the Release configuration and change Generate Debug Info to “Generate Debug Information (/DEBUG)”; that should let you compile as for release, but with symbols. Just remember not to commit the changes to the .sln file.

  • Settings specific to plugin (maybe folder to the plugin)

    3
    0 Votes
    3 Posts
    243 Views
    ahmoy lawA

    @Coises Many thanks!!!

  • Is there any documentation for the DockingFeature

    3
  • Implementing a Gripper in StaticWindows Dialog

    4
    1 Votes
    4 Posts
    307 Views
    CoisesC

    @Thomas-Knoefel
    I’m afraid I have no useful experience.

    Since I didn’t plan for any of my dialogs to be dockable, I’m just using ordinary Windows dialogs, built using the resource editor in Visual Studio. Since the resource editor’s toolbox doesn’t offer a status bar control, on the one dialog I have that does show a status line at the bottom, I’m just using a static text control — which means, no sizing grip.

    I’m not sure if I could manually edit the .rc file to add a “STATUSBAR” control; I haven’t tried. I assume that would make the dialog uneditable in the resource editor, and I don’t really want that. Maybe someday, if everything else is working so perfectly that that level of polish is the only priority left…

  • DockingDlgInterface: Disabling Docking & Size Restriction

    8
    0 Votes
    8 Posts
    523 Views
    Thomas KnoefelT

    I finally managed to switch the StaticDialog Window into DarkMode using NPPM_DARKMODESUBCLASSANDTHEME. Making the switch to StaticDialog effectively resolved the window resizing issue.

  • TextFX plugin.

    17
    0 Votes
    17 Posts
    45k Views
    REG OPD IPDR

    Notepad++ v8.5.7 (64-bit)
    Build time : Sep 6 2023 - 23:13:49
    Path : C:\Program Files\Notepad++\notepad++.exe
    Command Line :
    Admin mode : OFF
    Local Conf mode : OFF
    Cloud Config : OFF
    OS Name : Windows 11 Home Single Language (64-bit)
    OS Version : 22H2
    OS Build : 22621.2134
    Current ANSI codepage : 1252
    Plugins :
    LuaScript (0.12)
    mimeTools (2.9)
    NppConverter (4.5)
    NppExport (0.4)
    NppOpenAI (0.2.1)
    PlanetCNCNpp64 (3001.21.1125.1)
    PythonScript (2)

  • Zeilenzahl größe bei android version

    2
    0 Votes
    2 Posts
    277 Views
    PeterJonesP

    @TG-King said in Zeilenzahl größe bei android version:

    I also wanted to have it on my Android tablet, found it,
    but unfortunately the lines of numbers are very small there.

    Sorry, the various “Notepad++” apps that are available in the Google Play store (yes, I just searched and found at least two) are not truly Notepad++, and are not controlled by the real Notepad++ development team. As a result, the Windows Notepad++ developers cannot do anything to change the app for you, and we fellow Windows Notepad++ users are not experts on that completely separate software, and will not be able to tell you how to use that Android app.

    Tut mir leid, die verschiedenen „Notepad++“-Apps, die im Google Play Store verfügbar sind (ja, ich habe gerade gesucht und mindestens zwei gefunden), sind nicht wirklich Notepad++ und werden nicht vom echten Notepad++ Entwicklungsteam kontrolliert. Daher können die Entwickler von Windows Notepad++ nichts tun, um die App für Sie zu ändern, und wir Mitbenutzer von Windows Notepad++ sind keine Experten für diese völlig separate Software und können Ihnen nicht sagen, wie Sie diese Android-App verwenden.

    English is the primary language of this forum. I used online translation to read your message and to translate my English to German; I make no guarantees as to the quality or accuracy of the translation.

  • TI-Basic Support

    3
    0 Votes
    3 Posts
    415 Views
    PeterJonesP

    @Ovismue-Veholkin ,

    I have a personal User Defined Language (UDL) for TI-Basic / Extended Basic for the TI-99/4A. It doesn’t currently use those extensions (I’m not overly connected to the modern TI-users world, so I didn’t know there was a standard extension for TI-Basic files), but it highlights the syntax. I haven’t uploaded it to the public UDL Collection because I didn’t figure it would be of general use, since I don’t know how many Notepad++ users intersect with 99ers. So you can download that UDL definition into your %AppData%\Notepad++\userDefineLangs\ folder, then restart Notepad++ to make it see the new UDL) – and then you can manually add 8xp 8xk to the Language > User Defined Language > Define Your Language dialog’s User Language: TI-BASIC selection, in the Ext.: input which currently has TIBAS (so you would change it to TIBAS 8xp 8xk or just 8xp 8xk). (That said, I also am just assuming that by “TI-Basic”, you mean the BASIC that was used on the TI-99/4A; I don’t know if that name has a different meaning to other people. And if those extensions are for binary files that encode/store TI-Basic, like maybe for emulated “tape” storage or something, it won’t help, because Notepad++, as a text editor, has no way of understanding a binary file.)

    As an aside: When we created the Themes Collection, I uploaded a theme that you might find amusing (though given that it’s inspired by the default TI-99/4A bright-cyan background color, I doubt anyone would want to use it on a regular basis. And no, when I made my UDL, I used standard light-theme color scheme, rather than a TI-inspired color scheme)

    ----
    addenda: after making this post, I did a websearch, and found that 8xp appears to be the file extension for TI-83/84 calculator’s BASIC – confusing of Texas Instruments to use the same name for what are likely two totally different implementations of BASIC. My UDL probably won’t help you; sorry. And it wouldn’t surprise me if the 8xp/8xk extensions were binary files that compress the BASIC text into bytecodes/opcodes that the calculator uses internally; in which case, you would need an external converter to convert from binary to text, then edit the text in Notepad++, save it, then use a converter to convert it back to the binary format.

  • Dictionary plugins

    2
    0 Votes
    2 Posts
    376 Views
    PeterJonesP

    @Virginia-Chapman ,

    The DSpellCheck plugin (available through Plugins > Plugins Admin), which is the standard spell check plugin for Notepad++, has both Hebrew and Arabic available through the default Hunspell library:

    Install DSpellCheck: Plugins > Plugins Admin checkmark ☑ DSpellCheck click Install Notepad++ will restart Configure DSpellCheck: Plugins > DSpellCheck > Settings Confirm it’s on the default Library: Hunspell Click Download checkmark ☑ Arabic and ☑ Hebrew (Israel) click Install Selected select the correct Language: pulldown value to activate the appropriate dictionary (or select Multiple Langauges and then checkmark all the languages that you want active at the same time)
  • Creating a 'find in files and click' type window

    8
    0 Votes
    8 Posts
    453 Views
    R

    I think the source of the confusion is the outdated copyright notice, e.g.,

    // This file is part of Notepad++ project // Copyright (C)2006 Jens Lorenz <jens.plugin.npp@gmx.de> // . . .

    @ThosRTanner, just look at the git history and you’ll see that these files are not actually 17 years old.

    git clone https://github.com/npp-plugins/plugintemplate.git cd plugintemplate git log -p -- src/DockingFeature/*.h
  • Task List

    6
    0 Votes
    6 Posts
    20k Views
    wonkawillyW

    Maybe even implementing a filter to show only items the user is searching for; very useful when the list contains a lot of tasks/todos items

  • Function list customization

    2
    0 Votes
    2 Posts
    300 Views
    PeterJonesP

    @Stephan-Romhart-0 said in Function list customization:

    Are there any plans that the function list can be customized? Probably font-size or icons?

    No plans for that, that I’m aware of: I doubt anyone has ever made an official feature request like that.

    And I’m dubious that it would receive any attention, even if someone were to make an official request. The font-size just follows the Windows standard size for interface elements (which is the size that Notepad++ uses for menu text and similar text elements)

  • Function list parser for classes

    14
    0 Votes
    14 Posts
    1k Views
    Stephan Romhart 0S

    @Stephan-Romhart-0
    My final javascript class parser I use now for work is the folling:

    <parser displayName="JavaScript" id="javascript_function" commentExpr="(?s:/\*.*?\*/)|(?m-s://.*?$)"> <classRange mainExpr="class [A-Za-z_$]*\s*\{" openSymbole ="\{" closeSymbole="\}"> <className> <nameExpr expr="Klasse: [A-Za-z_$]*" /> </className> <function mainExpr="^\t[A-Za-z_$]*\([a-zA-Z,=0-9]*\)\s*\{"> <functionName> <funcNameExpr expr="[A-Za-z_$][\w$]*" /> </functionName> </function> </classRange> </parser>

    It works for me at the moment, because I use only js classes with declaration.

  • Styling Speed tied to Visible Area

    9
    0 Votes
    9 Posts
    457 Views
    Thomas KnoefelT

    @Coises said in Styling Speed tied to Visible Area:

    Have you checked whether setting different options for SCI_SETIDLESTYLING makes any difference?

    I tested them right now, and they make no difference. They seem to be more tied to a direct lexer implementation, as they control the threads for styling.

  • Plugin DLL becomes incompatible after calling CreateLexer()

    4
    0 Votes
    4 Posts
    289 Views
    Thomas KnoefelT

    @Thomas-Knoefel Just a short update on my achievements. I managed to compile everything using the original N++ sources. However, upon further investigation, I realized that if I wanted to use the Lexer, I would need to adapt a lot of code to fit into the plugins framework.
    I decided to run some tests by setting the styles without a Lexer. Remarkably, I found that using Styles instead of Indicatorstyles (which I initially used for my first test) was much faster than expected.
    Surprisingly, the speed almost matches that of a Lexer (even if it is 3 times slower, it still offers good usability for that purpose).But i think i will probably leave the N++ Source Code next to the Plugin to have a better updated in future for some other files.

  • NppExec v0.8.6 has been released!

    26
    7 Votes
    26 Posts
    2k Views
    Vitalii DovganV

    One more idea that requires help of someone familiar with HTML.
    It would be great to add a search index (ability to search for a given word) to the online NppExec Manual.
    I’ve created the corresponding issue on github, please feel free to comment right there:
    https://github.com/d0vgan/nppexec/issues/80