• Find First button?

    7
    0 Votes
    7 Posts
    367 Views
    Alan KilbornA

    @datatraveller1 said in Find First button?:

    it is not worth opening a feature request

    Your feature, go ahead and open a request if you’d like.

  • Up/down arrow in comment line style looks weird

    4
    1 Votes
    4 Posts
    218 Views
    Lycan ThropeL

    @Ekopalypse ,
    Not just you, count me as a, me too.
    UDLArrows8_5_3.PNG
    Notepad++ v8.5.3 (64-bit)
    Build time : May 15 2023 - 06:09:36
    Path : C:\Program Files\Notepad++\notepad++.exe
    Command Line :
    Admin mode : OFF
    Local Conf mode : OFF
    Cloud Config : OFF
    OS Name : Windows 10 Home (64-bit)
    OS Version : 22H2
    OS Build : 19045.2965
    Current ANSI codepage : 1252
    Plugins :
    ColumnsPlusPlus (0.0.3.4)
    ComparePlus (1.1)
    CSVLint (0.4.6.2)
    CsvQuery (1.2.9)
    EnhanceAnyLexer (1.1.3)
    mimeTools (2.9)
    NppConverter (4.5)
    NppExec (0.8.2)
    NppExport (0.4)
    NppSnippets (1.7.1)
    PythonScript (2)
    XMLTools (3.1.1.13)

  • [Wishlist] Reverse search

    6
    0 Votes
    6 Posts
    527 Views
    Alan KilbornA

    @Mark-Olson said in [Wishlist] Reverse search:

    is a rather simpler but equally effective alternative to AlanKilborn’s regular expression.

    Not mine! See the linked posting.

  • 0 Votes
    7 Posts
    1k Views
    Theo FondseT

    @PeterJones Thanks! Good to know!

  • Minor style bug

    4
    0 Votes
    4 Posts
    306 Views
    Alan KilbornA

    @Brigham-Narins

    Bug report opened HERE; you probably want to go back into it and supply the requested Debug Info. Issues get rejected when people don’t supply that.

  • Set Default Language Syntax to COBOL

    3
    0 Votes
    3 Posts
    469 Views
    wonkawillyW

    Sure you can. Try this

    Settings > Preferences > New Document > Defaoult language and set COBOL there.

    Screeshot follows:

    d2c9030b-5ab0-416c-b94c-8951f3b6147b-image.png

  • 0 Votes
    22 Posts
    2k Views
    Alan KilbornA

    @mkupper said in Hi, looking for a regex that calculates distance between 2 numbers, then adjust the 2nd number to a minimum of 30.:

    Is it possible to run a PythonScript on all open tabs?

    No. What you would do is, in a single run of a single script, iterate over the open file tabs:

    for (filename, bufferID, index, view) in notepad.getFiles(): notepad.activateFile(filename) ....

    After a file is “activated”, then the editor object can manipulate the data of the activated tab, e.g., perhaps do an editor.replace(), etc.

  • Where is the option for session snapshot?

    7
    0 Votes
    7 Posts
    508 Views
    Rufi MaR

    @William-Nevil said in Where is the option for session snapshot?:

    @Alan-Kilborn Odd. When I try to update it says there are no updates. I’ll have to redownload the package and install fresh. Thanks yall

    Excellent.

  • Updating NPP and open tabs on program restart

    4
    0 Votes
    4 Posts
    243 Views
    ?

    Thank you, both! That’s very helpful.

  • little issue on overlapping lables

    4
    0 Votes
    4 Posts
    292 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
    431 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
    237 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
    800 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
    355 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
    167 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
    229 Views
    Ihsiu W.I

    Thanks. All good ;-}