• Auto Update Notification upon closing NPP

    3
    0 Votes
    3 Posts
    170 Views
    PeterJonesP

    @Alan-Kilborn said in Auto Update Notification upon closing NPP:

    But don’t bother making such a request; it’s been requested before, and is still an open item.

    Even worse, it’s been requested multiple times – recently in #15369, and earlier in #8457, and earlier in #3755.

    And in the two earlier issues, the statement from the developer when they were closed was that “the silent installation” option that now exists is the only way he’s willing to address the issue…

    But I don’t think those issues ever pointed out the specific issue that @morgantic pointed out: that if you are accustomed to opening the app and immediately typing, it will just absorb all that typing without doing anything useful (and hitting ENTER might even accidentally start the update process, when you really thought you were just typing a newline in text). However, the developer didn’t close the most-recent #15369 (yet), so maybe @morgantic could supply the additional information there, trying to lend credence to the argument that the “silent installation” mentioned in the closed issues is not a sufficient fix for all the problems that update-at-launch causes.

  • Insert sequential numbers at start of lines

    26
    0 Votes
    26 Posts
    6k Views
    deleeleeD

    @Alan-Kilborn said in Insert sequential numbers at start of lines:

    This version handles all types of selections.

    Perfect!!! Thank you so much 😁👍

  • Pinned Tabs: Now and Future

    34
    2 Votes
    34 Posts
    3k Views
  • 0 Votes
    2 Posts
    261 Views
    Mark OlsonM

    @Freya-Smith
    Probably not. There is at least one plugin (XMLTools) that can format XML (and thus HTML), but that plugin does not understand CSS or JavaScript. There is also JSTool, a plugin that can format JavaScript, but it doesn’t understand HTML or CSS.

    So the best workflow I can think of to reformat HTML and JavaScript would be something like:

    Use XMLTools to reformat the HTML Use the regular expression (?s-i)<script[^<>]*>\K(?:(?!(?:<\w+|</script>)).)* to find script tag, and for each script tag: Copy the selected text into a new tab Use JSTool to reformat the text in that tab (this will make the JavaScript pretty Select the reformatted JavaScript Paste it back over the selected script tag

    Sadly JSTool is not smart enough to reformat selected text while ignoring text that isn’t selected, and given that the maintainer seems relatively uninterested in the plugin nowadays, I doubt that feature will ever be implemented. Thus, it doesn’t seem like there’s any way to efficiently reformat JavaScript+HTML in Notepad++, and that’s before even considering the CSS.

    To be honest, I don’t think Notepad++ is the best text editor for working with JavaScript/HTML/CSS in 2024 on Windows; I would probably use VSCode for a project in those languages, and save Notepad++ for working with things like CSV’s, log files, or JSON.

  • POLL: Remove 'Show close button on each tab' option

    30
    0 Votes
    30 Posts
    2k Views
    ErolB1E

    @Alan-Kilborn
    I’m running 8.7 (32 bit), and what I see is that all tabs have an always-visible close button that becomes active on hover (changing color) and that can be clicked to close the tab. That’s something I want to keep in future versions.

    I don’t recall this being different in 7.8.2, but I could be misremembering.

    Edit: I do have “show close button on each tab” checked.

  • Why doesn’t the notepad++ I use have the following menus?

    2
    0 Votes
    2 Posts
    123 Views
    PeterJonesP

    @Freya-Smith said in Why doesn’t the notepad++ I use have the following menus?:

    Why doesn’t the notepad++ I use have the following menus?

    That exact version has that option available for me:

    bd852d81-662f-45b6-b563-b51ce4f989d3-image.png

    (This was a fresh portable unzip, with no changes, showing the default is unchecked, but if you want the option on, checkmark it)

  • Help Needed with COMPARE plugin..thanks in advance

    14
    0 Votes
    14 Posts
    983 Views
    pnedevP

    @ray-Landolfi said in Help Needed with COMPARE plugin..thanks in advance:

    I tried to select all and copy the lines but it copies every line not just the compared lines so its back to individually marking them…

    Check this description (I quote myself from the corresponding issue in ComparePlus repository):

    After a compare you switch to the file which differences you want to copy, open the ComparePlus menu and use one of the new Bookmark… commands depending on what type of diffs you want to copy (for example Bookmark All Diffs in Current View). This will add a Notepad++ bookmark on every diff line matching that criteria. Next you can use the Notepad++ functionality to copy all bookmarked lines (you will find it under Search -> Bookmark sub-menu).

    BR

  • 9 Votes
    20 Posts
    1k Views
    PeterJonesP

    @notdodgeball ,

    Apparently the xml.etree library behaves differently between Python 2.7 and 3.12 (used by PS2 and PS3 respectively).

    I really wish PS3 would move out of alpha and release into Plugins Admin, so that we could just stick with PythonScript 3 for sharing scripts in the forum, and not have to contend with all the headaches of keeping scripts compatible with two major versions of Python, and all the library differences that come with that.

    (it also would’ve been nice if Don hadn’t allowed theme authors to submit themes with XML that have invalid top-level comments, which the XML parsing engines don’t like because it’s not valid XML)

    v1.08 is available from the permalink, fixing the handling of the invalid XML in PythonScript 2.

    However, I highly recommend making the switch to PythonScript 3, despite it claiming to be alpha, unless you are using a lot of ANSI characterset files rather than real unicode-based encodings. I don’t know how much longer I’ll support PythonScript 2 for this script.

  • how to extract number between the tags then adding some number?

    2
    0 Votes
    2 Posts
    99 Views
    guy038G

    Hello, @fajar-zulianto and All,

    Very easy with regexes !

    So, starting with your INPUT text, below, that I slightly changed in order to introduce possible leading indentation, on any line :

    <audGrainData> <startSample>253</startSample> <pitch>14.1668348</pitch> </audGrainData> <audGrainData> <startSample>2390</startSample> <pitch>14.1668348</pitch> </audGrainData> <audGrainData> <startSample>4521</startSample> <pitch>14.1668348</pitch> </audGrainData> <audGrainData> <startSample>6475</startSample> <pitch>14.1668348</pitch> </audGrainData> <audGrainData> <startSample>8547</startSample> <pitch>14.2084284</pitch> </audGrainData>

    Open the Replace dialog ( Ctrl + H )

    Uncheck all box options

    SEARCH (?-is)^\h*<(audGrainData)>\R\h*<(startSample)>(.+)</\2>\R\h*<(pitch)>(.+)</\4>\R\h*</\1>

    REPLACE \3 \5 10000 10200

    Check the Wrap around option

    Select the Regular expression search mode

    Click once on the Repalce All button

    => You should get the expected OUTPUT text :

    253 14.1668348 10000 10200 2390 14.1668348 10000 10200 4521 14.1668348 10000 10200 6475 14.1668348 10000 10200 8547 14.2084284 10000 10200

    Voila !

    NOTES :

    The (?-is) syntax are in-line modifiers which ensure that the search is sensible to case and that the . represents one standard character only

    There are five groups, located between parentheses, whose three of them store the name of the tags ( audGrainData, startSample and pitch ) and two of them store the numbers (.+) to re-use them in the replacement, with the \3 and \5 syntax

    The \h* syntax represents possible leading space or tabulation characters, on any line

    The \R syntax stands for any kind of line-break ( \r\n, \n or \r )

    Best Regards,

    guy038

  • UDL styles are defunct

    2
    0 Votes
    2 Posts
    113 Views
    PeterJonesP

    @Sean-Harding

    UDL styles are defunct

    I have never found that to be true.

    However, Notepad++ has decided that this (left) was what I wanted. Spoiler alert: it is not.

    Then tell it what colors you actually want for they various keywords, rather than telling it the wrong color.

    You need to change the individual style colors for each keyword group. So whatever keyword# the LD and PUSH keywords are in, you need to choose it’s Styler button, then set the foreground color to green, probably with bold enabled. And whichever keyword# A and AF and C are defined in, you need to set to your aqua/cyan color with the right background (instead of white background). And your number style definition need to be set to magenta rather than white+italic+underline

    I will admit, UDL does have limitations, and there are some things you won’t be able to do. But I believe that the symptoms you showed are easily correctable by you hitting the Styler button and selecting appropriate colors.

  • Operation of Sorting "Sort Lines as Decimals"

    7
    0 Votes
    7 Posts
    226 Views
    Alan KilbornA

    @guy038

    Peter should document all of this in the user manual.
    (Just kidding, Peter!)

  • Is there a way to prevent the cursor moving after a undo/redo command?

    17
    1 Votes
    17 Posts
    619 Views
    Alan KilbornA

    @notdodgeball said:

    After using the macros for some more time, I came to the realization that the problem also manifests when the screen is in a different position from that of the cursor, in fact, the cursor is not what matters. It only may seem it does when it’s visible in the screen (which is most of the time), otherwise jumping to it’s position is not the solution.

    So I made a simple python script

    top_line = editor.getFirstVisibleLine()
    editor.undo() #redo
    editor.setFirstVisibleLine(top_line)

    I really don’t see how that is going to be a workaround that always works, either. It’s likely going to be situation-dependent, I’m afraid.

    The virtue of the “bookmark” workaround is that bookmarks seem to stay set “around” where they were first set, even when the original line of the bookmark is removed.

  • problem with char encoding for suggested words

    7
    1 Votes
    7 Posts
    255 Views
    guy038G

    Hello, @pilagit, @peterjones, @coises, @mpheath and All,

    Not really off-topic but yes, sorting problems are always a nightmare :-(( Just some general remarks about the alphabetical sorting order :

    https://en.wikipedia.org/wiki/alphabetical_order

    Read, particularly, the section below :

    https://en.wikipedia.org/wiki/Alphabetical_order#Language-specific_conventions

    Just an example, which, however, concerns two bordering countries :

    (for example, the correct lexicographic order is baa, baá, báa, báá, bab, báb, bac, bác, bač, báč [in Czech] and baa, baá, baä, báa, báá, báä, bäa, bäá, bää, bab, báb, bäb, bac, bác, bäc, bač, báč, bäč [in Slovak])

    On the other hand, on the Unicode consortium site, take the time to fully read this technical and interesting report :

    https://www.unicode.org/reports/tr10/

    The beginning of this article says :

    Collation is the general term for the process and function of determining the sorting order of strings of characters.
    It is a key function in computer systems; whenever a list of strings is presented to users, they are likely to want it
    in a sorted order so that they can easily and reliably find individual strings. Thus it is widely used in user interfaces.
    It is also crucial for databases, both in sorting records and in selecting sets of records with fields within given bounds.

    You’ll be stunned by the complexity of the problem !

    So, practically, I suppose that anyone, trying to create a sort algorithm, must do a lot of simplifications. Indeed, taking in account all the specifications, for a correct sorting of all languages, seems to be a superhuman task !

    Luckily, there’s nothing mysterious about the sort algorithm used by Notepad++ :

    If you use the Edit > Line Operations > Sort lines Lexicographically Ascending option, any character is simply sorted by its Unicode code-point.

    However, for all code-points over the BMP ( Basic Multilingual Plane ), i.e. with code-point over U + FFFF, they all lie within the surrogates section. So :

    After the D7FF and previous code-points of the BMP

    Before the E000 and next code-points of the BMP

    Thus, a general N++ sorted list, with Unicode v16.0, is always of this form :

    U + 0000 NULL character \ ... | ... | ... | Plane 0 : Basic Multilingual Plane ( BMP ) ... | ¯¯¯¯¯¯¯¯ ... | U + D7FB HANGUL JONGSEONG PHIEUPH-THIEUTH character / U + 10000 LINEAR B SYLLABLE B008 A \ ... | ... | ... | Plane 1 : Supplementary Multilingual Plane ( SMP ) ... | ... | U + 1FBF9 SEGMENTED DIGIT NINE / U + 20000 CJK Ideograph Extension B GKX-0075.06 \ ... | ... | ... | Plane 2 : Supplementary Ideographic Plane ( SIP ) ... | ... | U + 2FA1D CJK COMPATIBILITY IDEOGRAPH-2FA1D / U + 30000 CJK Unified Ideographs Extension G UK-02764 \ ... | ... | ... | Plane 3 : Tertiary Ideographic Plane ( TIP ) ... | ... | U + 323AF CJK Unified Ideographs Extension H T13-3D2C / U + E0001 BEGIN LANGUAGE TAG \ ... | ... | ... | Plane 14 : Supplementary Special-purpose Plane ( SSP ) ... | ... | U + E01EF VARIATION SELECTOR-256 / U + F0000 Private Use-A \ ... | ... | ... | Plane 15 : Supplementary Private Use Area A ( SPUA-A ) ... | ... | U + FFFFD Private Use-A / U + 100000 Private Use-B \ ... | ... | ... | Plane 16 : Supplementary Private Use Area B ( SPUA-B ) ... | ... | U + 10FFFD Private Use B / U + E000 Private Use Area \ ... | ... | ... | Plane 0 : Basic Multilingual Plane ( BMP ) ... | ¯¯¯¯¯¯¯¯ ... | U + FFFD REPLACEMENT character /

    Best Regards,

    guy038

  • Does Notepad++ support Language Server Protocol (LSP)

    5
    0 Votes
    5 Posts
    617 Views
    EkopalypseE

    @PeterJones said in Does Notepad++ support Language Server Protocol (LSP):

    though it’s not feature-complete yet

    If you, or anyone else, would like to have a missing feature implemented in the LSP client, feel free to start a discussion on github because for me it already has everything I need ;-)

    Even though the goal is to have a 3.17 compatible client I’m happy to listen to suggestions on what to implement first.

  • 0 Votes
    3 Posts
    131 Views
    PeterJonesP

    @Jim-Harris ,

    See, for example, this official request and accompanying discussion

  • 0 Votes
    2 Posts
    84 Views
    PeterJonesP

    @Jim-Harris said in Enable snapshot backups without enabling opening the last file at startup?:

    It would be better if these options were separate.

    Since the one was implemented using the other, it would require a significant rework of both of those features to disentangle them, which I doubt is likely to happen

  • Automatic sum of numbers in a column

    4
    4 Votes
    4 Posts
    537 Views
    Alan KilbornA

    @guy038 said:

    I suppose you were a bit upset to not be able to add a comment for the 1602 message, relative to the replacement.

    <Action type=“3” message=“1602” wParam=“0” lParam=“0” sParam=“(?1+:=)(?2 ‘Replace with’ regex)” />

    Nice one!
    For readers that don’t see it, I’m talking about the addition of (?2 'Replace with' regex) as the “comment” for this action line.
    And note also, with that addition, it is needed to wrap the original ?1+:= with parentheses.

    When considering “commenting” a macro by using unused sParam values, how is one to know if sParam is needed by the macro, or you can safely stick a comment in there?

    Well, it isn’t always obvious, so, in that case it might be best to use a “null” command, which for sure doesn’t use sParam, like I did in the first line of the revised macro:

    <Action type="0" message="2172" wParam="0" lParam="0" sParam="see https://community.notepad-plus-plus.org/topic/26363" />

    Message 2172 is SCI_NULL.

  • Closing all tabs when closing Notepad++

    2
    0 Votes
    2 Posts
    131 Views
    PeterJonesP

    @radpopl ,

    It’s called the current “session”.

    Disable Settings > Preferences > Backup > Remember current session for next launch

    This behavior (along with all the other settings) is described both in the user manual in the sections on sessions

  • Does anyone else hate "Enable Copy/Cut Line without selection"?

    16
    4 Votes
    16 Posts
    508 Views
    Alan KilbornA

    I had forgotten that some else has the same fat fingers that I do, and thus shared my pain; it’s a bit of a rant, but some good reading: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/15480

  • Bug? "Find All.." does very often not work anymore

    14
    2 Votes
    14 Posts
    792 Views
    xomxX

    @ahopsu said in Bug? "Find All.." does very often not work anymore:

    To me, with 8.6.7 (32-bit) version, the search results window came back, after I changed this “curr” value from “5” to “3” for the “InternalFunction”

    Thanks for the report. I know about such N++ Docking Manager problems (it can happen in some specific steps) but currently I do not have a simple fix for it.

    Did you undock that Search results panel to the floating state before?