• Little script is very slow (depends on file size)

    9
    0 Votes
    9 Posts
    483 Views
    PeterJonesP

    @0BZEN said in Little script is very slow (depends on file size):

    Not necessarily, no, it’s just very convenient, especially with shortcuts.

    I’m just saying, select, Ctrl+M, visually confirm checkboxes, and click Mark All isn’t that onerous… and if your script is “very slow”, it’s sure to be faster than >15sec for the script version.

    Possibly, although that will get invalidated when the file content changes

    Mine doesn’t cache that information from run-to-run. It just precomputes the mapping of the positions-from-lines in a way that only requires going through the whole document once (as far as I can tell), rather than counting from the beginning every time.

    Yeah, the search results don’t contain meta-data, like line numbers. It might be possible to count the number of ‘/R’ characters from the last hit, the first search result using the slow function (or count the ‘/R’ from beginning of file).

    I’m pretty sure that the extra effort of counting between matches (which isn’t implemented already, so it’d have to be manually done) would be more time-consuming than the current.

  • New Language for TeraTerm Macro (TTL)

    2
    0 Votes
    2 Posts
    489 Views
    PeterJonesP

    @Jens-Lindhardt ,

    There is a User Defined Language Collection at
    https://github.com/notepad-plus-plus/userDefinedLanguages , where users can share their UDL definitions (along with AutoCompletion and now FunctionList definitions that go with that UDL)

  • Error File plug-in

    2
    0 Votes
    2 Posts
    324 Views
    PeterJonesP

    @Dave-Mear ,

    Specifically for that? Not that I’m aware of. But…

    The NppExec plugin has Console Output Filters, which will color error messages (and similar) for things that are printed into the NppExec Console – and double-clicking on those lines in the NppExec Console will take you to the right file and line number (and even character position in the line, if your error log is that specific). So if you set up an NppExec script that ran cmd /c type "$(FULL_CURRENT_PATH)" , it would take the contents of the current file and print them in the NppExec console.

    So if you use Plugins > NppExec > Console Output Filters to define a pattern that matches the errors in your specific format. The NppExec_Guide.txt help-file that comes with the plugin shows examples for gcc warnings and errors:

    Example 1: %ABSFILE%:%LINE%: warning:* => detects the warning lines from gcc
    Example 2: %ABSFILE%:%LINE%: error:* => detects the error lines from gcc

    (The %CHAR% sequence will match the character-position number)

    Further, you can use NppExec to actually run your compiler or build process, so if you wanted to skip the temporary error-output file, you could run the build inside NppExec (from a script or manually typed in the Console) and just allow the build to output to STDERR as per normal inside the Console, and NppExec would still be able to see the errors.

  • Search Commands and settings

    4
    0 Votes
    4 Posts
    789 Views
    mkupperM

    @conky77 I deal with it by searching the manual and have a shortcut for https://www.google.com/search?q=site%3Anpp-user-manual.org

    For settings/preferences I sometimes look at the config.xml file and have another shortcut that opens that file using a portable copy of Notepad++… It’s often faster for me to search and edit the config.xml file than to try to remember where in the sub-menus of the preferences a setting is found.

    I agree though that modern software seems hard to navigate. You are in a maze of twisty little passages, all alike. :-)

  • show the current zoom

    28
    1 Votes
    28 Posts
    8k Views
    Alan KilbornA

    @PeterJones said in show the current zoom:

    try to start a language-war with the proponents of Python

    No saber-rattling detected…or intended with the following:

    My history is Perl first, then Python – standalone, not PythonScript.
    And both were for text processing type things; for other things I’ve always been a C/C++ person (mainly C).
    The old command-line guy in me really liked Perl’s quirkiness, perhaps readers know what I mean … command.com’s interpreter really had/has a bunch of quirks.

    However, as much as I liked Perl at the time, I found that if I “put it down” for a while, it was really hard to come back to it (due to ever-advancing age perhaps). With Python, I found it just sort of flows from the fingertips, so to say, and was easy to come back to after some time off. Aside from maintenance of some large scripts I wrote and still use, I haven’t done any new Perl in many years (perhaps a decade?).

    I was rather pleased when I discovered Notepad++ and saw that its most popular scripting plugin was Python-based. (This might be the only sentence in the post that is on-topic).

    But overall, I see no need for “language wars”.
    I’m reminded of the quote from the Lord of the Rings (movies): “Go off and die in whatever manner most suits you” (or something like that).
    In this case, “Go off and use whatever language most suits you, as long as it gets your job done”.

  • "Whole Word Only" Option in Combination with Non-Alphanumeric Characters

    13
    1 Votes
    13 Posts
    825 Views
    Alan KilbornA

    @Coises said in "Whole Word Only" Option in Combination with Non-Alphanumeric Characters:

    that modifying Scintilla would be “off limits” for the Notepad++ project

    It mostly is.
    But I think in some areas it was judged to be something that “had to be done”.

  • Intercept a command before it is executed

    10
    3 Votes
    10 Posts
    700 Views
    EkopalypseE

    @Alan-Kilborn said in Intercept a command before it is executed:

    I’m sure you didn’t know ahead of time

    Read it, forgot about it :-( and then remembered it again when I read your question :-)

  • Upgrading notepad++ with one click.

    14
    0 Votes
    14 Posts
    4k Views
    Кирилл ФроловК

    You can use WingetUI
    9afa65b2-3420-4133-a5f0-bea9be1e1836-image.png

  • Notepad++: Delete A line before and After of Specific Word in Files

    4
    0 Votes
    4 Posts
    347 Views
    Alan KilbornA

    @alphaone

    I Tried Your Solution of Find Regax It’s Working But when i tried to Replace its’s not working

    It appears you did a Find All in Current Document. For this search to find hits it doesn’t matter what the current caret position is.

    When you tried replace, your caret was further down in the file and no hits occurred between the position of the caret and the file’s end (the error message told you this: no occurrence was found from caret to end-of-file).

    Solution for replace: Either move the caret to the top of the file (Ctrl+Home), or checkmark the Wrap around checkbox, before pressing Replace.

  • Keeping the find/replace window centered on the main window

    2
    0 Votes
    2 Posts
    277 Views
    PeterJonesP

    @astrohart343 said in Keeping the find/replace window centered on the main window:

    There are moments when Notepad++ is on one monitor, and then, when I call up the dialog box, it appears on my other monitor.

    At that moment, hit the shortcut for the dialog a second time, and it will re-center in the Notepad++ application’s monitor. (So Ctrl+F, Ctrl+F for FIND, Ctrl+H, Ctrl+H for REPLACE, Ctrl+Shift+F, Ctrl+Shift+F for FIND-IN-FILES, etc)

    That “call it a second time” feature was added as the response to the last request that was similar to yours, and it was deemed as the appropriate solution to that and all similar problems (including yours).

    It appears to me at the moment […], that the dialog box remembers its previous position.

    Yes, from the way I understand it, either Windows or the app (I am not sure which, I’ve never looked into it) the position of all such dialogs, and unless the application intentionally overrides the position, the dialog will be opened in the previous location. But when the previous feature request came, he implemented the second-call-re-centers feature to override (and update) the remembered position to be centered on the current app monitor.

    Another UI/UX enhancement would be to use the dialog box as a docking pane instead.

    I don’t remember ever seeing an official feature request to make the find/replace dialog dockable. Like the UDL dialog, I think that dialog is too big to be effectively docked on all but the hugest of monitors… but if you think it would work for you, you could request it by following the instructions in our feature request FAQ.

  • Columns++ version 1.1

    12
    8 Votes
    12 Posts
    849 Views
    CoisesC

    I said in Columns++ version 1.1:

    There is a serious fault in my progress dialogs.
    […]
    What I discovered today is that the progress dialogs themselves cause the operation to take many times longer

    This is fixed in Columns++ v1.1.2.

    I’m still seeing misbehavior when the same file is visible in both views, elastic tabstops is enabled for the file, there is a rectangular selection in one view, and you make edits in the other view (e.g., that enlarge a column to the left of the selection). It might be that this is like the old joke — “Doctor, it hurts when I do this!” / “Well… don’t do that!” — but I’m not sure what is happening. It looks, superficially, as if perhaps the selection remains correct but the display is wrong… then, after sufficient scrolling about, it rights itself. Very strange.

    So I guess the bottom line is, another update to the 1.1.* sequence that is not yet marked as stable, and quite possibly not the last before things settle down.

  • how to call the API to rename a new tab?

    8
    0 Votes
    8 Posts
    497 Views
    Alan KilbornA

    @Mark-Olson said in how to call the API to rename a new tab?:

    calling NPPM_INTERNAL_SETFILENAME does not automatically trigger the NPPN_FILEBEFFORERENAME and NPPN_FILERENAMED notifications,

    I can’t think of any circumstance where I’d care about this. But, I suppose it could be important to others…

  • ViSimulator Not supported anymore?

    7
    0 Votes
    7 Posts
    6k Views
    G

    @PeterJones
    I managed to chat with him on Twitter, and got these answers:

    He did not continue with the ViSimulator because:
    a. He switched laptop and not using Windows at that time.
    b. Lost the code because lost his git account.

    He is using Windows again due to needing the MS Office and other tools, and He mentioned that he will try to find a long holiday to rewrite the plugin as per my current request:)

  • Cannot add values ​​to CListBox in the GoToLineDlg.cpp file.

    2
    0 Votes
    2 Posts
    222 Views
    Zhixun QuZ

    @Zhixun-Qu USE SendDlgItemMessage OK.

  • How to get all lines of the current document

    5
    0 Votes
    5 Posts
    335 Views
    Zhixun QuZ

    @Alan-Kilborn Thanks.solved。

  • Only fixed langType check in the isNeededFolderMarge

    5
    0 Votes
    5 Posts
    420 Views
    G

    @Ekopalypse done!

  • Can't get the current buffer pos now?

    5
    0 Votes
    5 Posts
    317 Views
    G

    @glandon OK, please forgive my ignorance

    LRESULT bufID = ::SendMessage(g_nppData._nppHandle, NPPM_GETCURRENTBUFFERID, 0, 0);
  • Is There A Plugin That Highlights Hex?

    11
    -1 Votes
    11 Posts
    892 Views
    guy038G

    Hello, @robin-ramy, @ekopalypse, @alan-kilborn, @michael-vincent and All,

    @michael-vincent, I tried your very fresh new release v2.2.1.1 of your plugin, on my two laptops :

    An old 32 bits XP machine

    A 64 bits Windows 10 machine

    Regarding the XP machine, it seems to not work anymore ! I suppose that this is an expected dehaviour as XP is quite out of date !

    I don’t mind to stay with the previous 2.1.2.1 release on my old laptop.

    BTW, this previous version seems to work even if I check the Use DirectWrite option. But, I suppose that it’s just because, globally, the DirectWrite technology does not work properly with Win XP ?

    Now, regarding the W10 64 bits machine, no trouble at all ! However, I noticed some oddities about the coloring !

    Note that these oddities are identical on both 32 and 64 versions of your plugin, for the two releases 2.1.2.1 and 2.2.1.1

    As a reminder, the coloring is visible ONLY IF a document is opened with one of these four languages :

    CSS

    HTML

    JavaScript

    XML

    So, @michael-vincent :

    Insert this text below in a new tab •-------------------------------------------•---------------------------------------------•--------------------• | | W10 64 bits machine | XP 32 bits machine | | •---------------------------------------------•--------------------• | | N++ 8.6.5 64 bits / 32 bits | N++ 7.9.2 32 bits | | •---------------------------------------------•--------------------• | | Version 2.1.2.1 / 2.2.1.1 32 / 64 bits | 2.1.2.1 32 bits | •-------------------------------------------•---------------------------------------------•--------------------• | #ECBA57 | Coloring OK | Coloring OK | | | | | | rgb(236,186,87) | Coloring OK | Coloring OK | | | | | | rgba(236,186,87,1) | Coloring OK | Coloring OK | | | | | | hsl(40,0.80,0.63) | Coloring OK | Coloring OK | | | | | | hsl(40,80%,63%) | Coloring OK | Coloring OK | | | | | | hsla(40,0.80,0.63,1) | Coloring OK | Coloring OK | | | | | | hsla(40,80%,63%,1) | Coloring OK | Coloring OK | | | | | | | | | | <some_tag>#ECBA57</some_tag> | Coloring OK | Coloring OK | | | | | | <some_tag>rgb(236,186,87)</some_tag> | Coloring OK | Coloring OK | | | | | | <some_tag>rgba(236,186,87,1)</some_tag> | Coloring OK | Coloring OK | | | | | | <some_tag>hsl(40,0.80,0.63)</some_tag> | Coloring OK | Coloring OK | | | | | | <some_tag>hsl(40,80%,63%)</some_tag> | Coloring OK | Coloring OK | | | | | | <some_tag>hsla(40,0.80,0.63,1)</some_tag> | Coloring OK | Coloring OK | | | | | | <some_tag>hsla(40,80%,63%,1)</some_tag> | Coloring OK | Coloring OK | | | | | | | | | | "ECBA57 | Coloring ?? | Coloring ?? | | | | | | "ECBA57" | Coloring ?? | Coloring ?? | | | | | | fgColor "ECBA57 | Coloring ?? | Coloring ?? | | | | | | fgColor "ECBA57" | Coloring ?? | Coloring ?? | | | | | | fgColor "ECBA57 to get | Coloring ?? | Coloring ?? | | | | | | fgColor "ECBA57" to get | Coloring ?? | Coloring ?? | | | | | | fgColor="ECBA57 | Coloring ?? | Coloring ?? | | | | | | fgColor="ECBA57" | Coloring OK | Coloring OK | | | | | | fgColor="ECBA57 to get | Coloring ?? | Coloring ?? | | | | | | fgColor="ECBA57" to get | Coloring OK | Coloring OK | | | | | | | | | | #ECBA57 | Coloring OK | Coloring OK | | | | | | fgColor #ECBA57 | Coloring OK | Coloring OK | | | | | | fgColor #ECBA57 to get | Coloring OK | Coloring OK | | | | | | fgColor=#ECBA57 | Coloring OK | Coloring OK | | | | | | fgColor=#ECBA57 to get | Coloring OK | Coloring OK | | | | | | | | | | "#ECBA57 | Coloring OK | Coloring OK | | | | | | "#ECBA57" | Coloring OK | Coloring OK | | | | | | fgColor "#ECBA57 | Coloring OK | Coloring OK | | | | | | fgColor "#ECBA57" | Coloring OK | Coloring OK | | | | | | fgColor "#ECBA57 to get | Coloring OK | Coloring OK | | | | | | fgColor "#ECBA57" to get | Coloring OK | Coloring OK | | | | | | fgColor="#ECBA57 | Coloring OK | Coloring OK | | | | | | fgColor="#ECBA57" | Coloring OK | Coloring OK | | | | | | fgColor="#ECBA57 to get | Coloring OK | Coloring OK | | | | | | fgColor="#ECBA57" to get | Coloring OK | Coloring OK | | | | | | | | | | (#ECBA57 | Coloring OK | Coloring OK | | | | | | (#ECBA57) | Coloring OK | Coloring OK | | | | | | fgColor (#ECBA57 | Coloring OK | Coloring OK | | | | | | fgColor (#ECBA57) | Coloring OK | Coloring OK | | | | | | fgColor (#ECBA57 to get | Coloring OK | Coloring OK | | | | | | fgColor (#ECBA57) to get | Coloring OK | Coloring OK | | | | | | fgColor=(#ECBA57 | Coloring OK | Coloring OK | | | | | | fgColor=(#ECBA57) | Coloring OK | Coloring OK | | | | | | fgColor=(#ECBA57 to get | Coloring OK | Coloring OK | | | | | | fgColor=(#ECBA57) to get | Coloring OK | Coloring OK | | | | | | | | | | fgColor #ECBA57; | Coloring OK | Coloring OK | | | | | | fgColor=#ECBA57; | Coloring OK | Coloring OK | | | | | | | | | | fgColor #ECBA57. | Coloring OK | Coloring OK | | | | | | fgColor=#ECBA57. | Coloring OK | Coloring OK | •-------------------------------------------•---------------------------------------------•--------------------• Affect the HTML language ( Language > H > HTML ) to this text

    => You should see, at once, the coloring of the lines, in the first column

    To all : an important point to note is that if you double-click on any hexadecimal numùber or within the zones rgb, rgba, hsl or hsla , it opens the Color Palette, as expected. Just test it ;-))

    Howener, @michael-vincent, you can see that, for few lines, the coloring is not trigerred, although the double-click works nicely !

    So, could you consider these small issues, specifically the three cases "ECBA57", fgColor "ECBA57" and fgColor "ECBA57" to get ?

    As usual, @michael-vincent, there’s no obligation to do so. Just do as you please !

    Best Regards,

    guy038

  • Documents List - swaps file

    2
    0 Votes
    2 Posts
    284 Views
    PeterJonesP

    @Hack-Lag ,

    You are right, the Document List doesn’t have a way to change the order of tabs. But all you have to do is drag the tab title in the tab bar, and you can move it wherever you want… so Notepad++ can accomplish your goal, just not in your preferred interface.

    That said, this feature was officially requested last year, so you could go put your comments there, in a place where the developer will see them. (As explained in our FAQ, this Community Forum is not the feature-request/bug-report tracker.)

  • why SCI_APPENDTEXT changed NPP default background?

    5
    0 Votes
    5 Posts
    413 Views
    G

    @rdipardo Perfect, with your guide, my code works well again, thanks!