• Please Read This Before Posting

    Pinned Locked
    1
    7 Votes
    1 Posts
    7k Views
    No one has replied
  • v8.7 Search Results Missing

    Pinned
    15
    0 Votes
    15 Posts
    4k Views
    xomxX

    This v8.6.9-v8.7.2 issue has been fixed (GitHub commit).
    The fix will be included in the next Notepad++ version (probably v8.7.3).

    @PeterJones
    I would leave this topic pinned for a while longer until the fix reaches most N++ users.

  • HELP: Having trouble with Macros in v8.5.3 or later

    Pinned
    28
    2 Votes
    28 Posts
    17k Views
    Mike NewmanM

    Moderator Note: The contents of this post were moved to a separate topic, Macro works normally, but fails when shortcut is Ctrl+Shift+C, because it’s actually separate from the >=v8.5.3 issue for this Topic.

  • Set current directory to default if no real file is open

    8
    0 Votes
    8 Posts
    132 Views
    Alan KilbornA

    @fml2

    If you’re open to a scripted solution, I think it could be achieved, if I’m understanding what you want well enough.

    Write a script, assign it to be invoked when the keycombo for the normal save is pressed (Ctrl+s).

    Within the script, check to see if the active tab is a file on disk. If it is, invoke normal Notepad++ save and exit the script.

    Since it has been established that only unsaved tabs are now present, If not, check to see if all other open tabs are files on disk. If they are, invoke normal Notepad++ save and exit the script.

    Since it has been established that only unsaved tabs are now present, save the file with more script code with the default directory of that save being the desktop folder.

    EDIT: Oh, just noticed your posting about “current directory”. I’m not entirely sure, but I don’t believe that Notepad++ does anything valuable with that.

  • FunctionList: v8.8.7 Perl parser is apparently inefficient

    7
    0 Votes
    7 Posts
    146 Views
    guy038G

    Hi, @peterjones and All,

    Peter, actually, we were not talking about the same thing !

    On GitHub, under the tree structure notepad-plus-plus/PowerEditor/Test/FunctionList/perl, there are two files :

    unitTest ( named unitTest.txt )

    unitTest.expected.result ( named unitTest.expected.result )

    And indeed, after downloading the unitTest.txt file and opening it within N++, it did automatically recognized this .txt file as a Perl file, due to the first line #!/usr/bin/env perl

    Now, in the functionList sub-folder of my portable 887_x64 installation, I copied three files :

    perl.xml of N++ v8.8.6, that I renamed perl_886.xml

    perl.xml of N++ v8.8.7, that I just re-copied as perl_887.xml

    perl.xml, from your last link ( https://github.com/notepad-plus-plus/notepad-plus-plus/blob/3d829d9a311fa05f77479b79b5b340e05986a52e/PowerEditor/installer/functionList/perl.xml ), that I renamed Perl_NEW.xml

    Then, after closing N++, from a CMD prompt, I ran, successively, the three commands :

    • D:\887_x64\functionList>copy perl_886.xml perl.xml • D:\887_x64\functionList>copy perl_887.xml perl.xml • D:\887_x64\functionList>copy perl_NEW.xml perl.xml

    I re-started N++, each time, with current tab = unitTest.txt and opening the View > Function List feature, I did verify that :

    The Function List panel with perl_886 was immediate but quite incomplete

    The Function List panel with perl_887 was correct but with a slight delay at opening time

    The Function List panel with perl_NEW was correct and with no delay at all !

    Therefore, I now have the necessary equipment to test the Perl function list regexes and imagine possible new regexes. But just for myself, because I doubt I’ll find anything better than your solution !

    Best Regards,

    guy038

  • Run Notepad++ as commandline to edit and save

    6
    0 Votes
    6 Posts
    128 Views
    h-jangraH

    @Ian-Hicks
    http://stackoverflow.com/questions/2568310/ddg#2662761

    param( [string] $inputFile = $(throw "Please enter an input file name"), [string] $outputFile = $(throw "Please supply an output file name") ) $data = [xml](Get-Content $inputFile) $xws = new-object System.Xml.XmlWriterSettings $xws.Indent = $true $xws.IndentChars = " " $xws.NewLineOnAttributes = $true $data.Save([Xml.XmlWriter]::Create($outputFile, $xws))

    Take that script, save it as formatxml.ps1. Then, from a PowerShell prompt type the following:

    formatxml.ps1 UglyFile.xml NeatAndTidyFile.xml
  • Notepad++ VERY slow to open

    18
    0 Votes
    18 Posts
    11k Views
    PeterJonesP

    @Gerard-Kiekens said in Notepad++ VERY slow to open:

    In my case it was (alsmost certain) caused by heavily editing the DarkMode-Default theme that got a size of over 500Mb. I Suspect it was caused by using many custom colors.

    I am curious what kind of editing you did to make a 220Kb file grow 2000x in size. Even if you changed every color in the theme, the size of the file would not change at all, since all color attribute values are the same length. I cannot imagine any possible way that any editing of that file would grow it to 500Mb

  • Plugin Manager

    2
    0 Votes
    2 Posts
    69 Views
    PeterJonesP

    @evdmade01 said in Plugin Manager:

    Plugin Manager - what happened with it, where did it go?

    The old Plugin Manager plugin hasn’t been compatible with Notepad++ in 7 years. In v7.6 (in 2018), it was replaced by the built-in Plugins Admin tool. Use that built-in tool, not the old, unmaintained, advertising-supported Plugin Manager.

  • duplicating lines

    2
    0 Votes
    2 Posts
    58 Views
    CoisesC

    @Doreen-Ammons

    It is possible. There are a few ways to do it, depending on your exact circumstances. Here is one way:

    Open a new, empty tab.

    If you don’t see line numbers at the left, go to Settings | Preferences… | Margins/Border/Edge and check Display in the Line Number box at the top right.

    Press and hold the Enter key until you have exactly 200 lines.

    Edit | Select All (or Ctrl+A).

    Open Edit | Column Editor….

    Select Number to Insert; set the Format to Dec. the numbers to 1, 1, 1 and Leading to None.

    Click OK. You should now see the numbers 1 to 200 in your file.

    The column editor will leave extraneous (for this purpose) blanks after the one and two digit numbers. Use Edit | Blank Operations | Trim Trailing Space to remove them.

    From your original source, copy the fixed part of the text; that is, everything from “goldplate” to “1.2.3.” including the point but not including the final 1.

    Go back to tab with the list of numbers from 1 to 200. Click at the very beginning of the list, at the left of the 1. Scroll to the bottom using the mouse (not the keyboard), hold down Shift and Alt, and click at the left of the 200. You should see a thin, blinking line running at the left of all your lines.

    Paste. You’ll see the text you copied added before each number.

    You can now Select All, copy, and paste this back into your original file.

  • Show no-break space

    9
    1 Votes
    9 Posts
    41k Views
    Septimus BobS

    nice, it really hepled me, thank you again)

  • Standard ANSI and code still change to something else

    14
    2 Votes
    14 Posts
    364 Views
    CoisesC

    @NolanNolan said in Standard ANSI and code still change to something else:

    But really weird that using Microsofts own notepad.exe that comes with a standard windows installation makes windows search not detect characters in txt files that belongs to the installation language of the OS.

    Perhaps not quite as strange as it might first appear.

    Support for Unicode in Windows dates back to the first release of Windows NT in 1993. (NT was a “business” operating system; it took another eight years or so to get Unicode into “consumer” systems.) The thing is, Windows chose to support 16-bit characters: UCS-2, which later became UTF-16. UTF-8 wasn’t even presented publicly until 1993, and it took many more years for it to become popular. Most early adopters of Unicode, like Windows, used 16-bit “wide” characters.

    So, for a long time, in Windows “Unicode” meant UTF-16. Windows XP (2001) introduced code page 65001 for UTF-8, but it was only useful in conversion functions and console sessions. In Windows 10 Version 1903 (May 2019), it became possible to set UTF-8 (65001) as the system code page; however, that doesn’t (yet, in 2025 at least) do as much as you might hope it would, and it can precipitate odd behavior in software. (I tested your specific case: setting Use Unicode UTF-8 for worldwide language support does not change how search in Windows Explorer interprets files without a byte order mark.)

    Files using legacy (“ANSI”) encodings are too common to ignore, but, as @PeterJones pointed out in his earlier post in this thread, there is no completely reliable way to distinguish an “ANSI” encoding from UTF-8. Windows chose to use the byte order mark (already in use in UTF-16 files) to signal when a file is UTF-8. Windows simply does not recognize a file without a byte order mark as Unicode.

    Notepad++ uses byte order marks, too, but it also recognizes when a file has a very high likelihood of being UTF-8 (without a byte order mark). This is possible because the details of UTF-8 encoding make it highly unlikely that a legacy text file will “accidentally” also be a valid UTF-8 file — unless it is very short, has been intentionally crafted to trigger false detection, or contains only ASCII characters. (Since ASCII characters are represented identically in UTF-8 and in legacy code pages, the last case only matters if you edit a file which contained only ASCII characters so that it contains one or more non-ASCII characters. In that case, it is important to set your intended encoding depending on how the file will be used.)

    What you’re confronting is the difference between how Windows detects UTF-8 (must have a byte order mark) and how Notepad++ detects UTF-8 (valid UTF-8 byte sequence, which is statistically highly unlikely to be a legacy encoding).

    There is no good solution to this without inventing a time machine and changing decisions that were made over three decades ago.

    Well… no good solution that does not sacrifice reasonable backward compatibility. I consider that one of Windows’ best features, and I admire Microsoft for sticking to it. Twenty-year old programs can still run on current versions of Windows. I hate the culture of “If it’s not constantly maintained and upgraded, junk it!” that’s overtaken most of the computing world. A job once done well should stay done. (I suspect this has a lot to do with Microsoft’s dominance in business applications.) Not everyone shares my view.

  • 0 Votes
    3 Posts
    54 Views
    Tristan HilamanT

    @PeterJones Thank you!

  • How do I disable updates FOREVER!

    5
    0 Votes
    5 Posts
    95 Views
    Andrei Mincov 0A

    @PeterJones I think I found the culprit behind this.

    Looks like I had my Avast autoupdater to ON, and probably it was the reason behind quiet updates for both Notepad++ and my Mozilla Thunderbird 42.

    It became a routine for me to reinstall old versions over and over and over agian.

    Thank you for your response.

    Really appreciate your help and detailed approach.

  • How to Print Pretty with missing close tags.

    7
    0 Votes
    7 Posts
    219 Views
    PeterJonesP

    @guy038 said in How to Print Pretty with missing close tags.:

    Let’s start from your solution

    I’d hardly call it “my” solution. In that I used your generic find/replace-in-region formula, and plugged in reasonable values for the “variables” from that generic formula. The whole point of that generic formula is to make it really easy for anyone to just plug in their BSR/ESR/FR into the formula, and have it “just work”, without having to optimize or tweak.

    If I run, successively,

    As @Doctor-Rashir said here, “There are many closed tags”… In other words, it’s not just SONRQ and SIGNOMSGSRQV1, and trying to manually run a separate regular expression for each of the “many closed tags” is thus not practical. That is why I went to a script to automate it.

  • Edited Post content was flagged as spam

    5
    0 Votes
    5 Posts
    87 Views
    Doctor RashirD

    @PeterJones
    Thank you for the reply. Yes, I understood that inference. I was hoping there was additional tweaks to try. Yes, I could do a reply. It was triggered on a very minor edit. Maybe the site support would be interested in the issue. But it’s not important to me now.

  • How to change file icon on txt files ?

    11
    0 Votes
    11 Posts
    468 Views
    N

    @PeterJones

    i have to hand it to you this worked, thank you :-)

    I couldnt find this description elsewhere, i tested all the 3 thirdparty apps, wthy didnt work though

    I seems to have missed the reg addition of defaulticon should be in the string sith notepad++

    best Nolan

  • 0 Votes
    9 Posts
    394 Views
    Alan KilbornA

    When the Fill Find Field with Selected Text option, in settings, is unchecked, and the user invokes Select And Find …, perhaps the program should (simply) run the code for the “volatile” version of the command.

    (I should have said this in my previous post.)

  • can't find words with search in files

    5
    0 Votes
    5 Posts
    244 Views
    László BotkaL

    @Rick-Kosters

    You can try the free Agent Ransack utility from https://www.mythicsoft.com
    It works with .doc, .docx and .pdf files too.

  • Printing (laser) black on white darkness

    3
    0 Votes
    3 Posts
    100 Views
    Alan KilbornA

    @me

    I printed out a cookie recipe in NP++ and LO Writer

    Try to be more explicit. I actually use LibreOffice and, until @PeterJones explicitly stated it in his response, I had no idea what you were talking about when you said “LO”.

  • Replacing text blocks with ToolBucket

    3
    0 Votes
    3 Posts
    81 Views
    PeterJonesP

    @JuergenBelle ,

    Further to what @h-jangra said, since N++ v8.8.6, you can just paste your multi-line text into the Replace, and use the Search @h-jangra suggested, and you don’t need the plugin at all…

    If your replacement has parentheses () or dollar signs $, it might not work as you expect, so you might have to escape them, as described in the user manual (https://npp-user-manual.org/docs/searching/#substitutions)