• little issue on overlapping lables

    4
    0 Votes
    4 Posts
    290 Views
    wonkawillyW

    @Alan-Kilborn said in little issue on overlapping lables:

    @wonkawilly said in little issue on overlapping lables:

    N++ 583

    Would assume this means 8.5.3.

    Yes it does

  • Help - Update Notepad++ issue

    6
    0 Votes
    6 Posts
    2k Views
    PeterJonesP

    I have reported this in the Announcement topic where @Snabel42 had reported about the captcha affecting Notepad++ Update, as well as I just created issue #13685. We’ll see if Don can get his ISP to turn that off for those URLs.

  • RSS feed and Captcha

    2
    1 Votes
    2 Posts
    427 Views
    PeterJonesP

    @timendum ,

    I have reported this in the Announcement topic where someone had complained about the captcha affecting Notepad++ Update, as well as I just created issue #13685. We’ll see if Don can get his ISP to turn that off for those URLs.

    update: fixed.

  • User manual certificate

    3
    0 Votes
    3 Posts
    235 Views
    PeterJonesP

    It appears that the server is reliably giving a valid certificate again.

  • I don't understand why this simple regex doesn't work

    14
    0 Votes
    14 Posts
    783 Views
    guy038G

    Hello, @pbarney and All,

    I’ll try to explain you why your initial regex ^.*?(SID=\d+)?.* cannot work !

    To begin with, let’s consider the first part of your regex :

    ^.*?(SID=\d+)?

    If you try this regex, against your text :

    Lorem ipsum dolor sit amet, libero turpis non cras ligula, id commodo, aenean est in volutpat amet sodales, porttitor bibendum facilisi suspendisse, aliquam ipsum ante morbi sed ipsum SID=324221815251191 mollis. Sollicitudin viverra, vel varius eget sit mollis. Commodo enim aliquam suspendisse tortor cum diam, commodo facilisis, rutrum et duis nisl porttitor, vel eleifend odio ultricies ut, orci in SID=32422181753241& adipiscing felis velit nibh. Consectetuer porttitor feugiat vestibulum sit feugiat, voluptates dui eros libero. Etiam vestibulum at lectus. Donec vivamus. Vel donec et scelerisque vestibulum. Condimentum SID=324221819525920 aliquam, mollit magna velit nec, SID=324221821424161 tempor cursus vitae sit

    You’ll note that it always matches a zero-length string but the 6-th line, beginning with the SID=.... string. Why ?

    Well, as you decided to put a lazy quantifier ( *? ( or also {0,}? ), the regex engine begins to match the minimum string, i.e. the empty string, at beginning of line and, of course, cannot see the string SID=... at this beginning. But, it does not matter as the SID=... string is optional. So, the regex engine considers that this zero-length match is a correct match for the current line ! And so on till …

    The 6th line, where the Sid=... string does begin the line. So, the regex engine considers this string as a correct match for this 6th line. And so on…

    Now, when you add the final part .*, then, at each beginning of line, due to the lazy quantifier, your regex is equivalent to :

    ^.*?.* ( in other words equivalent to .* ), if the SID=... string is not at the beginning of current line. Thus, as the group1 is not taken in account, the regex engine simply replaces the current line, without its line-break, with nothing, as the group 1 is not defined, resulting in an empty line

    (SID=\d+).* if the SID=... string begins the current line. In this case the group 1 is defined and the regex engine changes all contents of current line with the string SID=.....

    Finally, note that your second regex ^.*?(SID=\d+).* matches ONLY the lines containing a SID=... string. Thus, it’s obvious that the other lines remain untouched !

    Neverthless, it was easy to solve your problem. You ( and I ) could have thought of this regex S/R !

    SEARCH (?-s)^.*(SID=\d+).*|.+\R

    REPLACE \1

    When a line contains the SID=.... string, it just rewrites that string ( group 1 )

    When a line does not contain a SID=.... string, the second alternative of the regex, .+\R grabs all contents of current line WITH its line-break. But, as this second alternative does not refer at all about the group 1, nothing is rewritten during the replacement, and the lines are just deleted

    Best Regards,

    guy038

  • Dictionary Autocompletion

    8
    0 Votes
    8 Posts
    2k Views
    Mark OlsonM

    The dictionary autocompletion thing with PythonScript has been implemented here.

  • Compare Navigation Bar is awol

    4
    0 Votes
    4 Posts
    2k Views
    FirstName LastName 0F

    @Terry-R
    Okay - fair enough. Noted.

  • Is it possible to keep a block folded when cutting and pasting?

    6
    0 Votes
    6 Posts
    349 Views
    pbarneyP

    @PeterJones said in Is it possible to keep a block folded when cutting and pasting?:

    You could record a macro

    Excellent idea! I’ll do just that. Thank you.

  • "Session Manager" no longer updated-Feb 2015

    2
    0 Votes
    2 Posts
    165 Views
    PeterJonesP

    @Jeff-Kuehl ,

    Well, @chcg did make a fork, so that he could release a 64bit version in 2018 (v1.4.3) and an arm64 version in 2021 (v1.4.4): and v1.4.4 is actually the version that Plugins Admin will install now. But other than updating the included files and providing the new build rules, as far as I know, there were no substantive changes or even significant bug fixes. And this reply in the original issue tracker confirms that he doesn’t use it and won’t be digging into issues or feature requests.

    However, the original author did say it was up for adoption… so if you wanted to fork it yourself to maintain it and improve it, I’m sure the community wouldn’t mind. ;-)

  • regex help with reverse line

    13
    0 Votes
    13 Posts
    1k Views
    guy038G

    Hello, @namx3249, @alan-kilborn, @mark-olson, @peterjones, @sky-247 and All,

    I found out a general method to reverse the lines of sections, separated with a pure empty line :

    Whatever the number of lines of each section

    Whatever the number of sections

    Let’s go :

    We start with the following INPUT text :

    01 02 03 04 aaaaa bbbbb ccccc ddddd eeeee fffff ggggg hhhhh iiiii 05 06 07 08 09 10 11 01 02 03 FIRST Line Second line Third line Fourth line Fifth line LAST line

    Note the empty line at the very beginning of the data ! ( Important )

    With this first regex S/R, we replace any EOL chars, not followed with other EOL chars, with a colon character

    SEARCH (?x) \R (?! ^\R )

    REPLACE :

    We get this temporary text :

    :01:02:03:04 :aaaaa:bbbbb:ccccc:ddddd:eeeee:fffff:ggggg:hhhhh:iiiii :05:06 :07:08:09:10:11 :01:02:03 :FIRST Line:Second line:Third line:Fourth line:Fifth line:LAST line

    As you can see :

    Any section is rewritten in a single line

    Any previous line is simply preceded with a colon character

    Any line must end with text without a colon character

    Now, with this second regex S/R, we separate each line in two parts :

    A first part between the first colon of the line and right before the last colon

    A second part from after the last colon till the end of current line

    In the replacement phase, we rewrite these two parts, in reverse order, with a leading slash

    SEARCH (?x) ( : .+ ) : ( .+ )

    REPLACE /\2\1

    Click of the Replace All button as many times as the maximum number of lines in sections

    Regarding our example, you should click nine times on the Replace All button !

    You may also hit the Alt + A shortcut, repeatedly, till the message Replace All: 0 occurrence were replaced... occurs

    And we get this temporary text below :

    /04/03/02:01 /iiiii/hhhhh/ggggg/fffff/eeeee/ddddd/ccccc/bbbbb:aaaaa /06:05 /11/10/09/08:07 /03/02:01 /LAST line/Fifth line/Fourth line/Third line/Second line:FIRST Line

    Finally, let’s come back to the normal displaying of your data, with this third regex S/R which simply replaces the colon and slash chracters with a line-break

    SEARCH [:/]

    REPLACE \r\n

    Anc here is your expected OUTPUT text :

    04 03 02 01 iiiii hhhhh ggggg fffff eeeee ddddd ccccc bbbbb aaaaa 06 05 11 10 09 08 07 03 02 01 LAST line Fifth line Fourth line Third line Second line FIRST Line

    Notes :

    The trivial cases, of a single data section only or sections of one line only, are correctly handled, too !

    Any additional line-breaks, between sections, are preserved in your OUTPUT text

    Of course, you can use any char, instead of the colon and the slash characters :

    Provided that they cannot be found in your present INPUT data

    Provided that you modify the regexes, accordingly

    As said above, the second regex S/R needs N successive searches/replacements, where N is the number of lines of the longest section, in your data

    BTW, if you redo all the same process, you get the original order of each section !!

    Best Regards,

    guy038

  • to sound when text not found?

    3
    0 Votes
    3 Posts
    226 Views
    Ihsiu W.I

    Thanks. All good ;-}

  • bookmarks line with value numbers

    4
    0 Votes
    4 Posts
    614 Views
    namx3249N

    wow, great solution. wonderful
    it work fine, thank you Peter

    about your second post: i agree, and i’ve try to search around the web some solution, but i didn’t find anything useful, and few have the knowledge as you have
    I hope in the future to increase my notions, in fact i’m following all the threads here!

    all the best

  • Auto-generate unit tests in macro-like way

    8
    0 Votes
    8 Posts
    629 Views
    PeterJonesP

    @rdipardo said in Auto-generate unit tests in macro-like way:

    If you can hack Perl, there’s Win32::Mechanize::NotepadPlusPlus

    Ooh, if someone other than me and @Michael-Vincent acknowledge its existence, I suppose I need to find the time to go update it for all the new messages and updates that have been added since Notepad++ v8.3.3

    If @Mark-Olson cannot hack Perl, the same principles can be applied from other languages: although Don’s reason for the Messages were for Plugin Communication, any process – whether a plugin for Notepad++ or an external process like Perl script or a C executable or even something like AutoHotKey – can SendMessage to any Win32 window… so if you know how to search for Notepad++'s hWnd in your language of choice, and know how to use the SendMessage from win32-API in your language-of-choice, you too can remote-control Notepad++, even without a “plugin”.

    (The next version of the User Manual’s Plugin Communication will actually emphasize that external processes like AHK can SendMessage to Notepad++.)

  • NPP can't handle large files

    11
    0 Votes
    11 Posts
    2k Views
    rdipardoR

    @Coises

    My guess is that the way to implement this would be to set a timer just before making the call, so there would be an interrupt if the process ran too long.

    SendMessageTimeout with the SMTO_NORMAL flag would achieve something like that: https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendmessagetimeoutw

    As you point out, however, that would entail picking a fixed, arbitrary number of milliseconds for every single plugin message that Npp would dispatch.

    A more provident implementation would have all plugins running on separate threads, the way Sublime Text plugins have done since version 3.

    I think the OP was really asking for some way to detect the source of a (potentially problematic) message; e.g., if XMLTools wants to check syntax, ask the user for permission first. Of course that’s impossible, and any workaround would penalize every other plugin at the same time.

  • Removing multiple blank lines

    5
    0 Votes
    5 Posts
    257 Views
    Alan KilbornA

    @Gerd-Selter said in Removing multiple blank lines:

    Because I had first posted it in the wrong forum

    Oh. You mean the wrong Category. You thought that your question would be better received in Help Wanted vs. General Discussion.

    It hardly matters; I don’t know for sure but I don’t think people pay much attention to what category a posting is in.

  • Swapping Blocks of Code with Regex

    6
    1 Votes
    6 Posts
    310 Views
    guy038G

    Hello, @dick-adams-0, @alan-kilborn, @peterjones and All,

    Here is my solution, which can be applied in all cases of text swapping ;-))

    First you add a specific character, NOT YET used in your current file, in front of each concerned block of text

    Thus, if I choose the ― character ( Unicode char HORIZONTAL BAR, \x{2015} ), your INPUT text is temporarily changes to :

    ―<link rel="prev" href="../d/myfile.htm"> <link rel="next" href="../../../l/a/n/ilandsas.htm"> <link rel="up" href="../../../../../ttl/ttl-i.htm"> ―<link rel="stylesheet" href="../../../../../css/hymn.css"> ―<script src="../../../../../js/jquery.js"></script> <script src="../../../../../js/base.js"></script> <script src="../../../../../js/myscripts.js"></script> ―

    Then using the regex S/R below :

    SEARCH (?xs) ^ ― ( .+? ) ― ( .+? ) ― ( .+? ) ― \R

    REPLACE \2\3\1

    You’ll get your expected OUTPUT text :

    <link rel="stylesheet" href="../../../../../css/hymn.css"> <script src="../../../../../js/jquery.js"></script> <script src="../../../../../js/base.js"></script> <script src="../../../../../js/myscripts.js"></script> <link rel="prev" href="../d/myfile.htm"> <link rel="next" href="../../../l/a/n/ilandsas.htm"> <link rel="up" href="../../../../../ttl/ttl-i.htm">

    Notes :

    You may choose any kind of character to begin a block of text which is to be moved ! For instance, in my previous example, I could have chosen the BULLET char ( \x{2022} ) as shown below : •<link rel="prev" href="../d/myfile.htm"> <link rel="next" href="../../../l/a/n/ilandsas.htm"> <link rel="up" href="../../../../../ttl/ttl-i.htm"> •<link rel="stylesheet" href="../../../../../css/hymn.css"> •<script src="../../../../../js/jquery.js"></script> <script src="../../../../../js/base.js"></script> <script src="../../../../../js/myscripts.js"></script> • This method allows you to select very large multi-lines blocks of text as well as simple single-line blocks too !

    Here is a general example which deals with 6 blocks of text :

    Group 1 contains 3 lines

    Group 2 contains 3 lines

    Group 3 contains 4 lines

    Group 4 contains 1 line

    Group 5 contains 2 lines

    Group 6 contains 5 lines

    So, let’s begin this text with a ¤ character in front of lines A, D, G , K, L and N

    ¤line A Group 1 Line B Group 1 Line C Group 1 ¤Line D Group 2 Line E Group 2 Line F Group 2 ¤Line G Group 3 Line H Group 3 Line I Group 3 Line J Group 3 ¤Line K Group 4 ¤Line L Group 5 Line M Group 5 ¤Line N Group 6 Line O Group 6 Line P Group 6 Line Q Group 6 Line R Group 6 ¤

    Then, the following regex S/R :

    SEARCH (?xs) ^ ¤ ( .+? ) ¤ ( .+? ) ¤ ( .+? ) ¤ ( .+? ) ¤ ( .+? ) ¤ ( .+? ) ¤ \R

    REPLACE \3\4\6\2\5\1

    would produce this expected OUTPUT text :

    Line G Group 3 Line H Group 3 Line I Group 3 Line J Group 3 Line K Group 4 Line N Group 6 Line O Group 6 Line P Group 6 Line Q Group 6 Line R Group 6 Line D Group 2 Line E Group 2 Line F Group 2 Line L Group 5 Line M Group 5 line A Group 1 Line B Group 1 Line C Group 1

    Notes :

    As you can verify, the resulting order respects the replacement numbering of the groups !

    The single line block ( Group 4 ) was moved upwards

    The two-lines block ( Group 5 ) has not been moved during the process

    As a conclusion, if we don’t use the free-spacing mode ( (?x) ), just TWO rules to remind :

    Between the leading part (?s)^ and the trailing part ¤\R, just add, in the search regex, as many ¤(.+?) syntaxes than the number of blocks concerned by the replacement

    In the replacement regex, just re-organize your blocks, from 1 to n, whatever you want to ! You could even duplicate some blocks using, from the above example, the replacement syntax \3\4\3\6\2\5\2\1\6 ;-))

    Best Regards,

    guy038

  • Autocomplete code, NOT words?

    4
    0 Votes
    4 Posts
    580 Views
    PeterJonesP

    @jabcreations said in Autocomplete code, NOT words?:

    I had to install from scratch after a hardware failure

    That’s not an update, then. It’s a new installation. No wonder your old settings weren’t kept.

    Very simple: while creating a new paragraph (<p>) Notepad++ would immediately append the end tag to the paragraph element to the right of the keyboard caret (</p>).

    Then why did you never mention that previously? That’s a different aspect of the auto-completion feature, called “Auto-Insertion”, controlled by the “html/xml close tag” checkbox on the same page of the Preferences dialog:
    1a094258-e628-4888-962d-df2efc7fff4c-image.png
    As shown in my screenshot, you can also have it auto-insert matching parentheses, brackets, braces, quotes, and single quotes, if you so desire.

    Suggestions please?

    Read the User Manual descriptions of the general Auto-Completion feature, as well as all the various settings which are affected by Settings > Preferences > Auto-Complete. (And note that I linked you to both of those on Tuesday, with the hopes that you would actually read the sections I linked you to.)

    I thought it might be some poor oversight like that someone was too lazy

    You made the desired behavior active in your old installation by changing those settings. At some point, you then apparently forgot that those settings existed (since you didn’t remember how to set them up in your new installation). After your installation from scratch, those settings were not set by default. Instead of trying to look for settings that might affect the behavior of auto-completion, and instead of reading the manual which is linked from the ?-menu in Notepad++, you came to us to (essentially) have us read the manual to you. And then, even after we pointed you to a related setting for a related feature, along with the documentation for all such settings and features, instead of reading the documentation to learn more about those settings and features and the ones related, you come back and ask us to tell you which settings to change. And then you have the temerity to call the developers too lazy to implement things – despite the fact that they have implemented them. So my suggestion to you is to not assume others are lazy when you haven’t finished researching the problem.

  • Merge plugin .Can this be added ?

    2
    0 Votes
    2 Posts
    347 Views
    PeterJonesP

    @Doğancan-yılmazer ,

    Yes, you can install that plugin. You can even use Plugins Admin to do it:

    653f8c8a-5a43-4c92-824c-a508ca369f1e-image.png

    Plugins > Plugins Admin Mark the checkbox “Merge files in one” Click Install button
  • How to get windows explorer right-click menu "Open/Edit with Notepad++"

    6
    0 Votes
    6 Posts
    18k Views
    namx3249N

    more easy: go to np++ folder then make shortcut to exe file
    then trim this shortcut and paste on this folder ...\AppData\Roaming\Microsoft\Windows\SendTo
    so click on your txt file then mouse - right click - send to and choose np++

  • Adding properties for the CSS language

    Locked
    2
    0 Votes
    2 Posts
    236 Views
    PeterJonesP

    @DomOBU ,

    Adding new properties to CSS lexer: while it might be nice to have them in the default (langs.model.xml), you can just use the Style Configurator to add them to your CSS > IDENTIFIER > User-defined keywords, and they will be highlighted for you; this should be able to hold you over while you are waiting to see whether the developers decide to implement your request or not.

    Side note:

    You don’t actually have to notify us fellow users in the Community forum that you create an issue. We in the Community forum are just fellow users, and making a post here won’t somehow make the developers decide to implement your request faster (if at all).

    edit: oh, I see, you were just trying to follow the FAQ instructions to “please come back to the Community Forum and reply to your original post, giving us a link to the issue you found or created” – you didn’t quite make it, because you created a brand-new topic, rather than replying to your original post here. Any follow-up conversation should go there.