• CRTL+Z & CTRL+Y

    4
    0 Votes
    4 Posts
    220 Views
    CoisesC

    Going by the translation Terry R posted, this is the same behavior discussed recently here:

    https://community.notepad-plus-plus.org/topic/26403/

    and, as noted in that thread, there is a GitHub issue here:

    https://github.com/notepad-plus-plus/notepad-plus-plus/issues/15878

    addressing it.

    Honestly, I think this is very unlikely to change, and I think it would be very difficult to “fix” in a consistent way. But, see the GitHub discussion and add to it, if you have observations or suggestions.

  • Windows taskbar; filename only?

    3
    0 Votes
    3 Posts
    159 Views
    Harly WalshH

    @PeterJones I just found it…
    I don’t skim too fast…
    Cheers anyway mate.

  • Grab Mobile Phone Number from wrap data

    3
    0 Votes
    3 Posts
    712 Views
    guy038G

    Hello, @tcast-mobile, @mark-olson and All,

    @tcast-mobile, just a variant which does not care about the socmed string but simply searches for the nearest multi-digits phone number, preceded by a + sign, beginning a line :

    FIND (?-is)healthcare\R(.+)\R(?:.+\R)+?\+(\d+\R)

    REPLACE $1 | $2

    Notes :

    Most of the explanations, relative to the regex syntax, have already been given by Mark. Two other points :

    The (?:......) syntax is a non-capturing group, as we do not need this information in replacement

    The \+ represents a literal +

    Best Regards,

    guy038

  • How to Markdown code on this forum?

    Locked
    12
    1 Votes
    12 Posts
    29k Views
    PeterJonesP
    For Future Readers

    The hints in this discussion are mostly still good (other than suggesting imgur, as the moderator note clarifies); however, a few years after this discussion, we added a FAQ: Formatting Forum Posts which should be used as the canonical/official guide for using Markdown on this Forum; the benefit of the FAQ is that it can and will be kept up-to-date, which is harder to do for these older discussions.

  • The Notepad++ website is blocked in Russia.

    4
    0 Votes
    4 Posts
    3k Views
  • Hidden shortcut ctrl+} ?

    3
    0 Votes
    3 Posts
    222 Views
    Y

    @Coises Oh, I see, shift+] = }
    Now it works.
    Much appreciated!

  • after upgrade, I lost most tabs

    3
    0 Votes
    3 Posts
    179 Views
    Y

    @PeterJones Thanks for your help. I’ll try.

  • Coding of it

    3
    0 Votes
    3 Posts
    172 Views
    Alan KilbornA

    @Mark-Olson

    What? A picture of Mark now?
    I am in no way surprised. :-)

  • Auto Update Notification upon closing NPP

    3
    0 Votes
    3 Posts
    187 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
    7k 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
    4k Views
  • 0 Votes
    2 Posts
    352 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
    142 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
    1k 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
    107 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
    122 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
    247 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
    723 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.