Community
    • Login
    1. Home
    2. Popular
    Log in to post
    • All Time
    • Day
    • Week
    • Month
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics
    • All categories
    • S

      PythonScript: "New Script" not shown

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      10
      0 Votes
      10 Posts
      328 Views
      Alan KilbornA

      @PeterJones said:

      And if you choose to continue using PortableApps, do not blame Notepad++ or its plugins for problems caused by PortableApps.

      Also, please don’t come HERE for help.

    • CoisesC

      Search++: A work in progress

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      50
      5 Votes
      50 Posts
      2k Views
      CoisesC

      @guy038 said in Search++: A work in progress:

      Now, for any command that cancels all previous selection(s), like the Find in Selection option, the Replace and Find in Selection option and the Find or Replace in Selection option, they seem to act on the whole document, anyway !

      Not quite (unless there’s a bug). The first match (meaning first in time) will be the first match (meaning top/left) in the selection for a forward find, or the last match in the selection for a backward find.

      After that, the selection is lost. However:

      Strictly speaking, to handle properly this case, you should keep a map of the beginning and end of EACH selection, in current document ! Probably not easy with huge documents and a nightmare because of all possible types of selection :-((

      That came up in the discussion @Alan-Kilborn and I had when I was working out search in Columns++. Later in that discussion, Alan mentioned the idea of marking text, which became the basis for how search in Columns++ works.

      In Search++, there is an option is in the Settings dialog: Convert selections to marked text before beginning a stepwise search. This applies only when you use a stepwise command without a scope specified (default scope); so, if that option is checked, Find when there is a selection (but no marked text) will convert the selection to marked text and search within the marked text, but Find in Selection won’t.

      BTW, why the choice between the Replace and Find... options and the Find or Replace... options is not placed in the Settings dialog, like within Notepad++ ? This would simplify some menus !

      My thought was that users might change their mind about whether they want to see what the replacement did before moving on; for example, with a complicated regex replacement, perhaps at first wanting to see each replacement in context, then if they seem to be working as expected, start skipping forward to the next candidate for replacement.

    • Phil ShearerP

      Download Status Page Out of Date

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      5
      0 Votes
      5 Posts
      214 Views
      PeterJonesP

      @Phil-Shearer said in Download Status Page Out of Date:

      hopefully it will all be good again in a week or two

      As of 2026-Apr-7 (per this post), v8.9.3 has been triggered for Auto-Update, so ? > Update Notepad++ should see a new version available now.

    • donhoD

      Notepad++ release 8.9.3

      Watching Ignoring Scheduled Pinned Locked Moved Announcements
      6
      7 Votes
      6 Posts
      4k Views
      donhoD

      FYI, auto-update is triggered for v8.9.3.

    • guy038G

      About single and duplicate lines...

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      2
      1 Votes
      2 Posts
      250 Views
      Evelyn WalkerE

      @guy038 said in About single and duplicate lines...:

      About single and duplicate lines…
      General Discussion
      1 posts
      1 posters
      225 views

      guy038
      Mar 24, 2026, 8:45 PM

      Hello, All,

      Reading that post made me realize that searching for single or duplicate lines is a very common task. Some time ago, for my personal workflow, I had written a method to solve the main cases ! So, in this post, I’m going to show you, from an original file, how to keep :

      All single lines, ONLY

      All duplicate lines, ONLY

      All single lines and the first copy of all duplicate lines

      All single lines and the last copy of all duplicate lines

      The first copy of all duplicate lines, ONLY

      The last copy of all duplicate lines, ONLY

      I’ll use a file, named Test_File.txt, that both contains single lines and duplicate lines that appear in 2, 3, 4 or more times. It contains 48 color palettes, found from various sites and added one after another, giving a total of 78,117 records whose 39,532 are single lines and 38,585 are duplicate lines. On the other hand, if we count one copy of all the duplicates, this file contains 11,290 different duplicate lines.

      To test my solutions, simply download this UTF-8 file ( 5,937,560 bytes ) from my Google Drive account :

      https://drive.google.com/file/d/1aYOpKon4KYw_NXSdj4Tm4Ti_FrygC2ky/view?usp=sharing

      Remarks :

      Note the definition of single lines : these are lines that differ in characters and/or case from all the other lines of the current file. For example, in this small file of 14 lines, below :

      ABC xyz 123 789 HIJ HIJ 123 AbC 123 HIJ abc HIJ 456 xyz

      The 5 lines ABC, AbC, abc, 789 and 456 are considered to be single lines, as different in chars and/or case from all the other lines.

      The 3 123 lines are considered to be a duplicate line with 3 copies ( Multiple occurrences )

      The 2 xyz lines are considered to be a duplicate line with 2 copies ( Multiple occurrences )

      Les 4 HIJ lines are considered to be a duplicate line with 4 copies ( Multiple occurrences )

      IMPORTANT :

      I’ve done some of the work for you, by adding a final column that numbers all lines in this file. Thus, is will be easy to restore the original order of the remaining records, after that each processing is complete. So, in case you need this initial order :

      Put the caret right before the present number, at the end of the first line

      Run the Edit > Begin/End Select in Column Mode option ( or use the Alt + Shift + B shortcut )

      Move to the last line of the file

      Put the caret right before the present number, at the end of the last line

      Run again the Edit > Begin/End Select in Column Mode option ( or use the Alt + Shift + B shortcut )

      => A ZERO-LINE column mode selection should appear throughout all the lines

      Then, run the Edit > Line Operations > Sort Lines Lexicographically Ascending option
      => The original order of the remaining records, AFTER completion of one of the 6 methods below, should be back !

      In each procedure, below, 1 or 2 S/R are used. To process them :

      First, cancel any existing selection to ensure that any line-end character will be taken in account during the S/R phase

      Open the Replace dialog ( Ctrl + H )

      Uncheck all box options

      Check the Wrap around option

      Select the Regular expression search mode

      Click on the Replace All button

      (1) To keep all the SINGLE lines ONLY ( 39,532 records ) :
      Paste the Text_File.txt contents in a new tab

      Switch to that new tab and select all text ( Ctrl + A )

      Run the Edit > Line Operations > Sort Lines Lexicographically Ascending option

      Click anywhere, in the new tab, to cancel the entire selection

      SEARCH (?x-is) ^ ( .+ ) .{7} \R (?: \1 .{7} \R )+

      REPLACE Leave EMPTY

      Perform the IMPORTANT section, above

      (2) To keep all the DUPLICATE lines ONLY ( 38,585 records = 78,117 - 39,532 ) :
      Paste the Text_File.txt contents in a new tab

      Switch to that new tab and select all text ( Ctrl + A )

      Run the Edit > Line Operations > Sort Lines Lexicographically Ascending option

      Click anywhere, in the new tab, to cancel the entire selection

      SEARCH (?x-is) ^ ( .+ ) .{7} \R (?: \1 .{7} \R )+ (*SKIP) (*F) | ^ .+ \R

      REPLACE Leave EMPTY

      Perform the IMPORTANT section, above

      (3) To keep all the SINGLE lines and the FIRST copy of ALL the DUPLICATE lines, found AFTER the sort ( 50,822 records ) :
      Paste the Text_File.txt contents in a new tab

      Switch to that new tab and select all text ( Ctrl + A )

      Run the Edit > Line Operations > Sort Lines Lexicographically Ascending option

      Click anywhere, in the new tab, to cancel the entire selection

      SEARCH (?x-is) ^ ( ( .+ ) .{7} \R ) (?: \2 .{7} \R )+

      REPLACE \1

      Perform the IMPORTANT section, above

      (4) To keep all the SINGLE lines and the LAST copy of all the DUPLICATE lines, found AFTER the sort ( 50,822 records ) :
      Paste the Text_File.txt contents in a new tab

      Switch to that new tab and select all text ( Ctrl + A )

      Run the Edit > Line Operations > Sort Lines Lexicographically Ascending option

      Click anywhere, in the new tab, to cancel the entire selection

      SEARCH (?x-is) ^ ( .+ ) .{7} \R (?: \1 .{7} \R )* ( \1 .{7} \R )

      REPLACE \2

      Perform the IMPORTANT section, above

      (5) To keep the FIRST copy of all the DUPLICATE lines ONLY, found AFTER the sort ( 11,290 = 50,822 - 39,532 ) :
      Paste the Text_File.txt contents in a new tab

      Switch to that new tab and select all text ( Ctrl + A )

      Run the Edit > Line Operations > Sort Lines Lexicographically Ascending option

      Click anywhere, in the new tab, to cancel the entire selection

      SEARCH (?x-is) ^ ( .+ ) .{7} \R (?: \1 .{7} \R )+ (*SKIP) (*F) | ^ .+ \R

      REPLACE Leave EMPTY

      Then :

      SEARCH (?x-is) ^ ( ( .+ ) .{7} \R ) (?: \2 .{7} \R )+

      REPLACE \1

      Perform the IMPORTANT section, above

      (6) To keep the LAST copy of all the DUPLICATE lines ONLY, found AFTER the sort ( 11,290 = 50,822 - 39,532 ) :
      Paste the Text_File.txt contents in a new tab

      Switch to that new tab and select all text ( Ctrl + A )

      Run the Edit > Line Operations > Sort Lines Lexicographically Ascending option

      Click anywhere, in the new tab, to cancel the entire selection

      SEARCH (?x-is) ^ ( .+ ) .{7} \R (?: \1 .{7} \R )+ (*SKIP) (*F) | ^ .+ \R

      REPLACE Leave EMPTY

      Then :

      SEARCH (?x-is) ^ ( .+ ) .{7} \R (?: \1 .{7} \R )* ( \1 .{7} \R )

      REPLACE \2

      Perform the IMPORTANT section, above

      At the very end of any of these choices, you may delete the extra numeration :

      SEARCH (?x-s) .{7} $

      REPLACE Leave EMPTY

      Then run the Edit > Blank Operations > Trim Trailing Space

      Best Regards,

      guy038

      P.S. :

      Note that there is also a native way to get all the single lines and the first copy of all the duplicate lines, found with the present order ( 50,822 records ) :

      Paste the Text_File.txt contents in a new tab

      Switch to that new tab

      Delete the numeration, at end of each line :

      SEARCH (?x-s) .{7} $

      REPLACE Leave EMPTY

      Then, use the Edit > Line Opérations > Remove Duplicate lines option

      That’s a pretty solid breakdown 👍

      For most cases though, I’d honestly just go with the built-in “Remove Duplicate Lines” unless you specifically need first/last occurrences. Way simpler and less error-prone.

      The regex approach is powerful, but yeah… a bit overkill unless you’re dealing with very specific cases or large datasets.