• find in files LIST instead of SHFT-F4

    2
    0 Votes
    2 Posts
    324 Views
    Alan KilbornA

    @havkicker

    Are you trying to say that the Search results panel doesn’t display for you?
    If so, you probably want to check the FAQ.

    this is driving me to distraction

    I guess this has been a distracting problem for you since Aug 2023 at least?

  • -1 Votes
    19 Posts
    2k Views
    dr ramaanandD

    @guy038 Oui, merci beaucoup!

  • Change Font for this Document Only

    4
    0 Votes
    4 Posts
    328 Views
    mpheathM

    @NotSoBitWise Seems like a familar issue with printing that someone else had. Have a look at this doPrint function that I rediscovered by using the PythonScript plugin.

  • config.xml reset debugging

    5
    0 Votes
    5 Posts
    294 Views
    Alan KilbornA

    I learned my lesson a long time ago, and I have a batch file that starts Notepad++. Before it starts it, it zips up a snapshot (into a zip file with a name derived from system date/time) of relevant config files. The batch file also removes older snapshots so this mechanism doesn’t use up too much disk space.

    It’s a shame we have to take defensive action against our favorite software. :-(

  • notepad ++ adjust indentation

    7
    0 Votes
    7 Posts
    6k Views
    Terry RT

    @Bob-Smith said in notepad ++ adjust indentation:

    Where is this hiding? Not seeing it. Have the settings been moved around?

    Which version of Notepad++ are you running. The preference option is certainly there in the recent versions. You might need to show us your debug info. From the ? menu, select debug info, copy and paste that info here.

    As well as the previous post another idea is I think the “Column Editor”. If you want all the lines in your file to have the same prefix, position the cursor at the very start, use column editor and enter the text to be the prefix on EVERY line.

    If you just want a group of lines to have a prefix, position the cursor on the first line of the group, use Ctrl + Alt + mouse control to move down the left margin for the group of lines. Then use the column editor to insert a prefix for that group. You could also just type the character(s).

    Terry

  • 1200 second time limit

    2
    0 Votes
    2 Posts
    153 Views
    PeterJonesP

    @Bob-Smith ,

    The way you avoid that 1200 second time limit is to get enough upvotes that the system doesn’t consider you a threat.

    That rule assumes that anyone who has been here long has posted enough good quality posts to have earned a few upvotes.

    Given our additional anti-spam that’s been implemented since that limit was originally enacted, I think I’m willing to shrink the delay. But there will still be limitations on you until people have upvoted you enough.

  • How to multiselect with double click without ignoring whitespace?

    2
    0 Votes
    2 Posts
    165 Views
    PeterJonesP

    I’m not 100% sure whether I’ve understood your problem.

    I was going to ask for a screenshot of your Preferences > Delimiter page, wondering if maybe you had something added to your list of characters… but then I was reminded of the Delimiter selection settings (Ctrl + Mouse double click), which I forget about under most circumstances.

    So with the example text

    one two three four five six blah(seven eight nine)

    if I Ctrl+DoubleClick on one then five then eight, I get one and five and seven eight nine selected. Based on being reminded of the existing of the special meaning for inside-delimiter Ctrl+DoubleClick, that is now my expectation. But I’m wondering if you were hoping for just one and five and eight in that situation. If so, you would have to “defeat” the Delimiter selection settings, by changing the open and close delimiters to something else (or to nothing).

    Examples:

    Default:
    24ae143e-ce00-4581-80a2-fb80a695b2c7-image.png

    With no selection-delimiters:
    5ce5d936-0a72-485f-a6ca-090f85935023-image.png

  • notepad ++ dark background in NppFTP show message window

    2
    1 Votes
    2 Posts
    185 Views
    PeterJonesP

    @Bob-Smith ,

    A few years ago, it was requested in the NppFTP repository’s issue tracker, but the maintainer didn’t have time (at least then) to take on the effort of adding all the DarkMode hooks.

    I’ve pinged the issue, and updated with the current state (because in the original issue, even the Profiles and Progress panel was still white, not just the Output and dialog boxes) – but the maintainer asked for help 3 years ago, and no one volunteered, so it’s not likely to happen any time soon, unless someone new volunteers. (@chcg is highly involved in a variety of plugins, plus contributes to the main app, so doesn’t often find time for requests like this; hence the 2021 request for help, which was unfortunately ignored.)

  • Update Failure

    6
    0 Votes
    6 Posts
    878 Views
    PeterJonesP

    @mkupper ,

    the OP’s question seemed clear enough to me. While they did not show their debug info …

    Maybe you didn’t notice which FAQ @Alan-Kilborn directed the OP to, because “it’s ambiguous” wasn’t meant to say that “the OP question was ambiguous” – “It’s Ambiguous” is one of the headers in the FAQ that was linked to.

    b33b6177-5cf3-472f-9d0c-ddd0247abe99-image.png

    I am thinking that when Alan said, “It’s Ambiguous” and directed the OP to a FAQ that you thought he was linking to the “request for more information, especially debug info” FAQ. But he actually linked to the FAQ: Why Can’t I Just Say “Most Recent Version”, which explains in detail about why the Update Notepad++ doesn’t find v8.7.4 right now, using much the same language that you used in your reply.

    update 1: Yes, I admit that “Most Recent Version” FAQ also asks for Debug Info, but the “It’s Ambiguous” section can double as the answer to the FAQ “why does Notepad++ say there’s no newer version, when the downloads page clearly shows a newer version”.
    I guess I could make the FAQ more explicit in that regard.

    update 2: I have now tried to make the FAQ more clear that it’s answering two questions that both have the same root description, even though they seem, on the surface, unrelated.

  • 0 Votes
    13 Posts
    685 Views
    dr ramaanandD

    On using the above RegEx, in 80 files out of 300 files in a folder, the whole text of the file was selected, instead of just a word stuck to a simple, round bracket/parenthesis to its right. Is it because no such words were found in the file (only 2 such words were found in two different files)?

  • HTML – USER TAGSx & USER ATTRIBUTESx

    4
    0 Votes
    4 Posts
    291 Views
    DomOBUD

    @PeterJones

    Thank you for these figures.

    However, I can confirm that it was impossible to enter data in the USER TAGSx fields on my laptop at the time I wrote my message.
    After restarting my laptop, it was possible to enter data again.
    The reason for the sudden freezing of data entry is a mystery.

  • Run an external program

    3
    0 Votes
    3 Posts
    564 Views
    Thomas HoppeT

    @PeterJones Thank you very much, all works fine;=)

    Thomas

  • Change in the way end of line characters act in regex?

    11
    0 Votes
    11 Posts
    669 Views
    Daniel BrandonD

    @Daniel-Brandon It also appears that some (but not all!) of the files are indeed reaching me with \r Carriage Return characters instead of \n Line feed characters baked in, which should not be happening, and never happened before, but there you go. Thanks to everyone who suggested looking for them. Between that and matches newline, I’m really hoping I’ve got it sorted now.

  • 0 Votes
    6 Posts
    591 Views
    Mark OlsonM

    @Matthew-Owen @PeterJones
    It’s actually perfectly feasible to remove all non-empty lines that are duplicated anywhere in the file, regardless of order, without using plugins, although this unfortunately can’t be saved in a macro. This is an extension of the “group lines by content and then put them back in order” procedure that I’ve also used to empty all duplicate lines (leaving them empty) efficiently. The general “group lines by content and then put them back in order” procedure is just steps 1-5 and 7-10 below, where step 6 is the part where you do whatever you want with the lines while they’re grouped by content.

    For all of the below find/replace operations, Wrap around must be checked, and Search Mode must be set to Regular expression.

    The steps are as follows:

    Replace ^ with \x20 (add a space at the beginning of each line) Move the caret to the start of the file Use the column editor to add line numbers at the start of each line: Number to Insert checked Initial number, Increase by, Repeat all set to 1 Leading = Zeros Format: Dec Replace (?-s)^(\d+)\x20(.*) with ${2}\x20${1} (swap the line numbers with the rest of the line, so that unique lines are annotated with their location) Run the command Edit->Line Operations->Sort Lines Lexicographically Ascending Replace ^(.+?)\x20\d+(\R)(?:\1\x20\d+\R?)+ with nothing (remove all non-empty lines that aren’t unique, replace the .+? with .*? if you also want to remove empty lines) Replace ^(.*?)\x20(\d+)$ with ${2}\x20${1} (move the line numbers back to the start of the line) Remove the empty line from the end of the file, if there is one Run the command Edit->Line Operations->Sort Lines Lexicographically Ascending again (put lines back in the original order) Replace ^\d+\x20 with nothing (remove the starting line numbers and space)

    As a demonstration, this procedure can take the file

    1337 1 bar 1337 1 baz jke quz 1337 1 quz nhj blah baz jke 103

    and convert it into

    bar nhj blah 103
  • How to combine a multi-line html element into one line?

    3
    0 Votes
    3 Posts
    335 Views
    Terry RT

    @pbarney said in How to combine a multi-line html element into one line?:

    What’s the best way to construct this search and replace?

    A similar question was posted some time ago here. I suggest reading that. As you seem to be proficient at regex hopefully you can adjust to suit your need.

    Terry

  • Copy all text that are exactly 4 lines before a search result.

    6
    0 Votes
    6 Posts
    300 Views
    guy038G

    Hi, @david-l, @mark-olson and All,

    @david-l, I do not understand !

    The second part of my regex, AFTER the alternation symbol ( | ) was :

    SEARCH (?<=<text>).+(?=</text>\R(?:.+\R){3}\h*<color)

    That I, now, improved as :

    SEARCH (?-is)(?<=<text>).+(?=</text>\R(?:.+\R){3}\h*<color value="255,255,255"/>)

    and these both regexes just match the string 400, against the INPUT text below, not more :

    <value> <text>400</text> </value> <font size="8pt" typeface="Helvetica" baselineShift="0pt" weight="bold"> <fill> <color value="255,255,255"/> </fill>

    So what ?

    Now, @david-l, in your first post, you said :

    Also, I’d like the expression copy what is inside

    <text name=“title”>Find and copy me</text>

    This was considered in the first part of my regex :

    SEARCH / MARK <text name=.+>\K.+(?=</text>) which does find the string Find and copy me only, against the INPUT text, below :

    <text name="title">Find and copy me</text>

    Now, may be it’s because i’m not fluent with the HYML language but, in your second post, you said :

    So, my idea was to search for all code that make a box black

    <fill> <color value="255,255,255"/> </fill>

    And, obviously, the color referenced is the white color ! So what ?

    Sorry, I’m a bit lost !!

    BR

    guy038

  • User define Language question

    3
    0 Votes
    3 Posts
    214 Views
    PeterJonesP

    @MURIM-BAUDIN said in User define Language question:

    I am assuming is possible as pre-user SHELL language manage to do it.

    To clarify, the pre-defined languages are all made with custom code compiled into the Notepad++ source; the UDL are all based on simple text-matching without any wildcard ability or any such “fancy” features. Just because something can be done in a built-in lexer doesn’t mean it can be replicated in UDL.

    For anything more complicated than simple text-matching, UDL is not sufficient. You would either need something like a lexer plugin, or have another plugin (like @Ekopalypse’s EnhanceAnyLexer, already mentioned) that could provide an alternative method of doing the highlighting.

  • 0 Votes
    7 Posts
    310 Views
    guy038G

    Hello, @dr-ramaanand, @coises and All,

    I tried to simplify the @coises search regex and I ended up with this search regex :

    (?s-i)(<(.+?)[> ].*?(?:/>|</\2>))(*SKIP)(*F)|(?-s).+\R

    So, given your INPUT text :

    <html lang="en"> <head> <meta http-equiv="Content- Type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <META name="viewport" content="width=device-width, initial-scale=1" /> <h1>BOTHROPS</h1> <p style="color: black; font-family: Verdana,sans-serif; font-size: 18px; font-style: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; display: inline ! important; float: none;">BOTHROPS LANCEOLATUS uses [Both-l uses]</p> Haemor- rhages- dark Fear- of death E-mail us <h6>Remedies A- Z</h6> <ul> Some- list- here Dunking- donuts Seventytwo- houris </ul> <style type="text/css"> @media (min- width: 1281px) { .left { width: 180px; border-width:1px; border-style:solid; border-color:lightblue; padding-top:10px; } .right { width: 560px; border- width:1px; border- style:solid; border- color:lightblue; margin- top:0px; } } </style> <script type="text/javascript"> function googleTranslateElementInit() { new google.translate.TranslateElement({pageLanguage: 'en'}, 'google- translate- element'); } </script>

    This regex just matches the three consecutive lines, below :

    Haemor- rhages- dark Fear- of death E-mail us

    Note that I deliberately added an other string r-, followed with a space character, for tests !

    Thus, the following regex S/R :

    SEARCH (?s-i)(<(.+?)[> ].*?(?:/>|</\2>))(*SKIP)(*F)|(?<=\w)-(?=\x20)

    REPLACE \x20-

    Will replace, in these three lines ONLY, any string letter-, followed with a space char, with the string letter - and a space char

    Best Regards,

    guy038

  • Control characters: ESC & ^char

    5
    0 Votes
    5 Posts
    25k Views
    Simon ForsythS

    @Ken-Yiu Because this post keeps popping up as first search:
    Notepad++ has a Character Panel
    Edit > Character Panel
    The panel should pop up on the left, and you can click on the 27 ESC row, make sure you click on the correct column. This will insert the escape character at the cursor.

  • Remove data lines with same value in certain column

    11
    0 Votes
    11 Posts
    605 Views
    guy038G

    Hi, @jizhao-li, @coises, @mark-olson and All,

    Ah… OK. Thanks, @jizhao-li, for your additional pieces of information :-)

    Then, from this INPUT text, below :

    GAP 1461 311 1826 311 2191 311 2556 311 2921 311 3287 311 3652 311 4017 311 4382 311 4748 311 5113 311 5478 311 5843 311 6209 311 6574 311 6939 311 7304 311 7670 311 8035 311 8400 311 8765 311 9131 311 9496 311 9861 311 10026 311 10592 311 10957 311 11322 311 11687 311 12053 311 12418 311 12783 308 13148 308 13514 308 13789 308 END GAP 1461 303 1826 303 2191 303 2556 303 2921 303 3287 303 3652 303 4017 303 4382 303 4748 303 5113 303 5478 303 5843 303 6209 303 6574 303 6939 303 7304 303 7670 303 8035 303 8400 303 8765 303 9131 303 9496 303 9861 303 10026 303 10592 303 10957 303 11322 303 11687 303 12053 303 12418 303 12783 303 13148 303 13514 303 13789 303 END GAP 1461 327.5 1826 327.5 2191 327.5 2556 327.5 2921 327.5 3287 327.5 3652 327.5 4017 327.5 4382 327.5 4748 327.5 5113 327.5 5478 327.5 5843 327.5 6209 327.5 6574 327.5 6939 327.5 7304 327.5 7670 327.5 8035 327.5 8400 327.5 8765 327.5 9131 327.5 9496 327.5 9861 327.5 10026 327.5 10592 327.5 10957 327.5 11322 327.5 11687 327.5 12053 327.5 12418 327.5 12783 327.5 13148 327.5 13514 327.5 13789 327.5 END GAP 1461 302 1826 302 2191 299 2556 299 2921 299 3287 299 3652 299 4017 299 4382 299 4748 299 5113 299 5478 299 5843 299 6209 302 6574 302 6939 302 7304 302 7670 302 8035 302 8400 302 8765 302 9131 302 9496 302 9861 302 10026 302 10592 302 10957 302 11322 302 11687 302 12053 302 12418 302 12783 302 13148 302 13514 302 13789 302 END

    The following regex S/R should do the work nicely :

    SEARCH (?-is)^(GAP\R)(\d+ (\d+(?:\.\d+)?)\R)+?(?=\d+ (?!\3$))

    REPLACE \1\2

    And here is your expected OUTPUT text :

    GAP 12418 311 12783 308 13148 308 13514 308 13789 308 END GAP 1461 303 1826 303 2191 303 2556 303 2921 303 3287 303 3652 303 4017 303 4382 303 4748 303 5113 303 5478 303 5843 303 6209 303 6574 303 6939 303 7304 303 7670 303 8035 303 8400 303 8765 303 9131 303 9496 303 9861 303 10026 303 10592 303 10957 303 11322 303 11687 303 12053 303 12418 303 12783 303 13148 303 13514 303 13789 303 END GAP 1461 327.5 1826 327.5 2191 327.5 2556 327.5 2921 327.5 3287 327.5 3652 327.5 4017 327.5 4382 327.5 4748 327.5 5113 327.5 5478 327.5 5843 327.5 6209 327.5 6574 327.5 6939 327.5 7304 327.5 7670 327.5 8035 327.5 8400 327.5 8765 327.5 9131 327.5 9496 327.5 9861 327.5 10026 327.5 10592 327.5 10957 327.5 11322 327.5 11687 327.5 12053 327.5 12418 327.5 12783 327.5 13148 327.5 13514 327.5 13789 327.5 END GAP 1826 302 2191 299 2556 299 2921 299 3287 299 3652 299 4017 299 4382 299 4748 299 5113 299 5478 299 5843 299 6209 302 6574 302 6939 302 7304 302 7670 302 8035 302 8400 302 8765 302 9131 302 9496 302 9861 302 10026 302 10592 302 10957 302 11322 302 11687 302 12053 302 12418 302 12783 302 13148 302 13514 302 13789 302 END

    Some other tests, all OK ! On the left the INPUT text and on the right the OUTPUT text :

    GAP 4017 123 4382 123 GAP 4748 123 5478 123 5113 123 5843 456 5478 123 6209 456 5843 456 => 6574 456 6209 456 6939 456 6574 456 7304 456 6939 456 END 7304 456 END GAP 4017 123 4382 123 GAP 4748 123 5478 123 5113 123 5843 456.789 5478 123 6209 456.789 5843 456.789 => 6574 456.789 6209 456.789 6939 456.789 6574 456.789 7304 456.789 6939 456.789 END 7304 456.789 END GAP 4017 123 4382 123 GAP 4748 123 5478 123 5113 123 5843 123.789 5478 123 6209 123.789 5843 123.789 => 6574 123.789 6209 123.789 6939 123.789 6574 123.789 7304 123.789 6939 123.789 END 7304 123.789 END GAP 4017 123.012 4382 123.012 GAP 4748 123.012 5478 123.012 5113 123.012 5843 456 5478 123.012 => 6209 456 5843 456 6574 456 6209 456 6939 456 6574 456 7304 456 6939 456 END 7304 456 END GAP 4017 123.012 4382 123.012 GAP 4748 123.012 5478 123.012 5113 123.012 5843 123 5478 123.012 => 6209 123 5843 123 6574 123 6209 123 6939 123 6574 123 7304 123 6939 123 END 7304 123 END GAP 4017 123.012 4382 123.012 GAP 4748 123.012 5478 123.012 5113 123.012 5843 456.789 5478 123.012 6209 456.789 5843 456.789 => 6574 456.789 6209 456.789 6939 456.789 6574 456.789 7304 456.789 6939 456.789 END 7304 456.789 END GAP 4017 123 GAP 4382 123 4748 123 4748 123 5113 456 5113 456 5478 456 5478 456 5843 456 5843 456 => 6209 456 6209 456 6574 123 6574 123 6939 123 6939 123 7304 123 7304 123 END END GAP 4017 123.012 GAP 4382 123.012 4748 123.012 4748 123.012 5113 456.789 5113 456.789 5478 456.789 5478 456.789 5843 456.789 5843 456.789 => 6209 456.789 6209 456.789 6574 123.012 6574 123.012 6939 123.012 6939 123.012 7304 123.012 7304 123.012 END END

    Note that your file will be unchanged if you redo the search-replacement !!

    Best Regards,

    guy038