• Please Read This Before Posting

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

    Pinned
    15
    0 Votes
    15 Posts
    5k 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
    19k 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.

  • How to Use Notepad++ As a Daily Journal

    2
    0 Votes
    2 Posts
    8 Views
    PeterJonesP

    @tedhettel ,

    With native Notepad++, you cannot get that exactly. But you can get close.

    Notepad++ has a keystroke Ctrl+End to take you to the end of a document, and a menu action (Edit > Insert > Date Time … of three variants, one of which is customizable in settings). So you could record a macro (Macro > Start Recording, Ctrl+End, ENTER, Edit > Insert > Date Time …, ENTER, Macro > Stop Recording) and save it with a keystroke (Macro > Save Current Recorded Macro), which means when you open your logfile, you can do that one keystroke, and it would then take you to the end and put in the date for you. So it would be one extra keystroke when you open the file… but one keystroke isn’t bad.

  • using User Defined Language : v.2.1.0.12

    4
    0 Votes
    4 Posts
    101 Views
    PeterJonesP

    @Fred-Morant said in using User Defined Language : v.2.1.0.12:

    Let’s create “alphatest” as a name for a new user defined language , close notepad++, new bloc appears in userDefineLang.xml for that “alphatest” , remove it from userDefineLang.xml manually , repopen Notepad++ : you can’t use that name “alphatest” again,

    I cannot replicate. No matter how I try (ie, no matter how I interpret “remove it manually”):

    First try: Start Notepad++ with no userDefineLang.xml existing Language > User Defined Language > Define your language… Create new…: alphatest Set ext: at and close the UDL dialog Exit Notepad++ userDefineLang.xml exists Edit userDefineLang.xml in Notepad++, delete the whole alphatest section, save, exit Notepad++ Run Notepad++: alphatest no longer exists. Create new…: alphatest works without difficulty Second try: Start Notepad++ with no userDefineLang.xml existing Language > User Defined Language > Define your language… Create new…: alphatest Set ext: at and close the UDL dialog Exit Notepad++ userDefineLang.xml exists Run Notepad++, go into UDL dialog, and select alphatest Remove, and answer Yes when it asks if you’re sure. It’s gone. Create new…: alphatest works again immediately. Remove, and answer Yes when it asks if you’re sure. It’s gone again. Exit Notepad++ and restart. Create new…: alphatest works again here, too. I don’t know what else you could mean by “manually delete”

    It works just fine. Again, this is not with v8.9.2. I tried those tests with v8.9.3-RC, and again with the older v8.9.1. It works exactly 100% as expected, and it never prevented me from creating alphatest after I’d deleted it in any way I could think of.

  • Is there any way to disable the cursed "In selection" checkbox forever?

    2
    0 Votes
    2 Posts
    25 Views
    PeterJonesP

    @Võ-Văn-Hiếu ,

    Settings > Preferences > Searching > Minimum Size for Auto-Checking “in selection”:

    e1b5f537-fcbb-4f03-bfae-356c18eab696-image.png

    It defaults to 1024, meaning you need to select at least 1024 characters in order to get it to checkmark the “in selection” box with the default setting. If you changed it to a lower number (like “1”), that would explain why it always auto-checks that box.

    And if you really want never, instead of >=1024, then set that to 0, as it says when you hover your mouse cursor over the (?) and in the user manual’s section on the “Searching” preferences.

  • search-and-replace NOOB question - CR and (any number)

    4
    0 Votes
    4 Posts
    69 Views
    J

    @PeterJones
    hello and Thank You…
    I think I had read all of the references you posted, and must have misunderstood everything.
    (sigh) I’m feeling so old (LoL)
    just used your example and it worked perfectly

    well, except I next will want to enter an exception for cases of a period before the first carriage return.
    I think I know how to get that working, now that you’ve given me a great direction.
    Again, Thank You!

  • Dark Mode style for UDL

    3
    0 Votes
    3 Posts
    64 Views
    dfs-D

    Thank you @PeterJones, this is a perfect solution.

  • 0 Votes
    20 Posts
    1k Views
    Troglo37T

    @PeterJones said in Is There a Way to Prevent Pasted Text from Spreading Out with Rows of Spaces?:

    Or, since you said,

    there aren’t any unused ones available under Plugins > Customize Toolbar

    - I assume this is the one where you say, "there aren't any unused ones available". I cannot imagine that you've _actually_ enabled another couple-dozen buttons from its list, so that there are no other "available toolbar buttons", as that toolbar would be so full as to be unusable. On the other hand, that's the only thing I imagine that you _could_ mean by such a sentence.

    Yes, all of the Old Large Legacy Icons are in the Current toolbar buttons box. After checking them, I decided that I might use all of them in the future.

    Well, with all of that said, thanks for being patient and hanging in there through all of this. I have everything working, including adding a new icon to the toolbar. And thanks for the updated scripts.

    I hope this thread serves many others.

  • Plugin to hide/unhide (collapse/expand) lines

    1
    0 Votes
    1 Posts
    55 Views
    No one has replied
  • 0 Votes
    8 Posts
    317 Views
    guy038G

    Hi, @b, @peterjones, @coises and All,

    Let’s consider the Spanish word comparación and its various forms below, pasted in a new tab :

    comparación cömparÅciõn CömꝕarÅcⓘoñ ȻOℳₚA⒭ⱯℭᴵꝊᵰ ƆºᶆⱷǞℝȺꜿᵼᴓɲ ɕƢꟽⓟǻꝝⱭƆⅈᴗN

    Note that I have deliberately exaggerated the shapes and modified the case of the possible characters !!

    If you do any of the six N++ searches, below, against the six lines in the new tab, you’ll see that ONLY the two first regexes, which refer to standard equivalence clases, can find all the lines.

    SEARCH (?=[[=c=]])\X(?=[[=o=]])\X(?=[[=m=]])\X(?=[[=p=]])\X(?=[[=a=]])\X(?=[[=r=]])\X(?=[[=a=]])\X(?=[[=c=]])\X(?=[[=i=]])\X(?=[[=ó=]])\X(?=[[=n=]])\X

    SEARCH (?=[[=c=]])\X(?=[[=o=]])\X(?=[[=m=]])\X(?=[[=p=]])\X(?=[[=a=]])\X(?=[[=r=]])\X(?=[[=Å=]])\X(?=[[=c=]])\X(?=[[=i=]])\X(?=[[=õ=]])\X(?=[[=n=]])\X

    SEARCH (?=[[=C=]])\X(?=[[=ö=]])\X(?=[[=m=]])\X(?=[[=ꝕ=]])\X(?=[[=a=]])\X(?=[[=r=]])\X(?=[[=A=]])\X(?=[[=c=]])\X(?=[[=ⓘ=]])\X(?=[[=o=]])\X(?=[[=ñ=]])\X

    SEARCH (?=[[=Ȼ=]])\X(?=[[=O=]])\X(?=[[=ℳ=]])\X(?=[[=ₚ=]])\X(?=[[=A=]])\X(?=[[=⒭=]])\X(?=[[=Ɐ=]])\X(?=[[=ℭ=]])\X(?=[[=ᴵ=]])\X(?=[[=Ꝋ=]])\X(?=[[=ᵰ=]])\X

    SEARCH (?=[[=Ɔ=]])\X(?=[[=º=]])\X(?=[[=ᶆ=]])\X(?=[[=ⱷ=]])\X(?=[[=Ǟ=]])\X(?=[[=ℝ=]])\X(?=[[=Ⱥ=]])\X(?=[[=ꜿ=]])\X(?=[[=ᵼ=]])\X(?=[[=ᴓ=]])\X(?=[[=ɲ=]])\X

    SEARCH (?=[[=ɕ=]])\X(?=[[=Ƣ=]])\X(?=[[=ꟽ=]])\X(?=[[=ⓟ=]])\X(?=[[=ǻ=]])\X(?=[[=ꝝ=]])\X(?=[[=Ɑ=]])\X(?=[[=Ɔ=]])\X(?=[[=ⅈ=]])\X(?=[[=ᴗ=]])\X(?=[[=N=]])\X

    In constrast to the last release of the Columns++ plugin, independant of Scintilla and doing true UTF-32 searches, which is able to match the six lines of our example, whatever the regex used among the six regexes above !

    This example clearly demonstrates that it’s possible to perform a search without considering case and/or accentuated characters with the v1.3.1 release of Columns++ plugin ;-))

    Best Regards,

    guy038

  • 0 Votes
    4 Posts
    222 Views
    Evelyn WalkerE

    Hi Harmandeep,

    Welcome to the community.

    Yes, there is a good chance you may still be able to recover your unsaved work. Notepad++ has a built-in backup and session snapshot feature that often restores files after a crash.

    First, try reopening Notepad++. If the session snapshot feature was enabled, the file may reopen automatically with the content you were working on before the crash.

    You can also check the backup folder manually. Go to:
    C:\Users\YourUsername\AppData\Roaming\Notepad++\backup
    Sometimes Notepad++ stores temporary backup files there, which may contain the unsaved content.

    To reduce the risk of losing data in the future, it’s a good idea to enable a few settings:

    Open Settings → Preferences → Backup. Enable Session snapshot and periodic backup. Choose Remember current session for next launch. Set a backup interval such as every 7 or 10 seconds.

    With these options enabled, Notepad++ will automatically save temporary snapshots of your work and restore them if the program closes unexpectedly.

    Hopefully your file is still in the backup folder. Let us know if you need help locating it.

    Regards.

  • How do I save fold settings in User Defined Language profile?

    3
    0 Votes
    3 Posts
    183 Views
    PeterJonesP

    @P-A hasn’t come back since my reply. But I had a few minutes to experiment.

    Using the published v8.9.2, I could replicate the problem:

    Open fresh v8.9.2 Language > User Defined Language > Define your language… Folding in code 2 style: open = openfold, close = closefold Save as… = SomethingNew open disappears, but close remains Exit and restart Notepad++ Language > User Defined Language > Define your language…, choose UserLanguage: SomethingNew Folding in code 2 style> open still missing, but close remains Add again open = openfold, and close the UDL dialog: it appears to be there, but repeating 6/7 will show back in condition 8 at this point.

    But, when I try the same sequence with the bugfix version from PR#17522, it works as expected (openfold doesn’t go missing at all).

    That PR will be part of v8.9.3 Release Candidate, expected Mar 14. So it looks to me like the bug has already been fixed.

  • Alternative for Notepad++ on Mac

    39
    0 Votes
    39 Posts
    1m Views
    Chris RichardsonC

    @Alan-Kilborn

    I understand, but unfortunately, to have it hosted on the App Store, Apple charges £80 a year for the developer license, so I need to cover this cost, hence the 99p price.

  • Adblock360Updater Batch File Keeps Appearing

    4
    0 Votes
    4 Posts
    246 Views
    Terry RT

    @Linen-Gray said in Adblock360Updater Batch File Keeps Appearing:

    but wanted to know if anyone else had experienced this happening and if so how they took care of it.

    Well if you are certain your system isn’t infected then that is a step in the right direction. Just understand that according to the bat file’s contents the “malware” had been apparently residing in the location referenced in almost every line. I would still take a look at that location to be absolutely sure it is gone.

    I am re-reading your initial post and trying to understand what is occurring. You say this “bat” file is opening regularly. What is the app that is opening this file? If it is Notepad++ (the “bat” file shows within a Notepad++ tab), then try to identify the location of that file. It should show the location if you move the mouse pointer over the tab’s title line. Then open that location to have a better look around, you should be able to right click on the tab’s title line and select Open into… and select the Explorer line. Once you are happy that you can delete the file, just close it in Notepad++ and then remove it from the location.

    So in terms of the question has any one else experienced this issue, the answer is no, no one else has mentioned this on this forum. You could easily do a forum search on the string “adblock” but you won’t find this specific one, just mentions of “real” adblock apps.

    Terry

  • Regex matching anomaly

    3
    0 Votes
    3 Posts
    201 Views
    M Andre Z EckenrodeM

    @Coises said in Regex matching anomaly:

    If the line endings in the file aren’t consistent, it could mismatch.

    Huh. Right you are. Ironically, that possibility had actually occurred to me, and I even thought I’d checked for it adequately by enabling View > Show Symbol > Show EOL, but apparently I failed to pick the single LF out of all the CRLF. Thanks.

  • File type associations not working

    4
    0 Votes
    4 Posts
    237 Views
    PeterJonesP

    @PeterJones said in File type associations not working:

    it’s at the mercy of the OS as to whether the OS will propagate such settings to the user, or completely bypass them

    It worked reasonably for me. I ran my installed Notepad++ v8.9.1 As Administrator, then went to the File Association setting, picked customize, typed .pcj (which is a file extension that didn’t have any associated app or filetype), then clicked -> to move it to the Registered extensions column. If I then exit Notepad++ (to get out of Admin mode), and double-click on blah.pcj in Windows Explorer, it opened it in Notepad++. (And looking at the registry, I can confirm it added HKCR\.pcj to point to Notepad++_file, and HKCR\Notepad++_file sets the shell\open\command as expected. (But maybe you didn’t think it “worked” at this point, because it doesn’t necessarily change the text of the “file type” column in Explorer. Even if it doesn’t, the double-click did what I expected.)

    When I tried with the preferences dialog misc > .nfo, it edited the existing HJCR\.nfo to point to Notepad++_file (with a Notepad++_backup entry pointing to the original MSInfoFile. When i double-click on an NFO file, Windows actually pops up a Select an App to open this .nfo file, which includes the “Notepad++ (New)” entry (because Windows has been trained to not fully allow applications to hijack extensions, because users hate it when an app does that without their permission) – and from there, you can choose whether you really want to.

    But by doing it through the Windows OS Open With interface to begin with, you make sure Windows knows it’s you who wants the change, not the app, and so lets you do it more easily there.

    IOW: it works for me on Windows 11 as Notepad++ tries it, with the caveats that Windows 11 is trying to protect me from nefarious apps, so might require a confirmation; and when I do things the way Windows OS wants, it works as expected rather than having to do the extra steps.

  • How do i configure markdown (.md) display style?

    18
    0 Votes
    18 Posts
    19k Views
    O

    For future users, you need to make your own variation of the pre-installed Markdown laguage.

    Go to Languages>User Defined Languages->Define Your Language.

    Then click on a Styler button. I’m using dark mode and just prefer white text for formatting italics bold etc. So I set foreground to transparent, this means no colour override and uses the dark mode settings.

    d7869850-e1bc-4ebe-ac09-75f35e022ade-image.png

    Then go to Save As and give it a name.
    You’ll need to activate the new language variant which will be available in the Languages menu.

  • Perl keywords "class" and "method" not recognised by Function List

    13
    0 Votes
    13 Posts
    1k Views
    guy038G

    Hello, @peterjones,

    First, read this post to @coises, where I discuss the Unicode concept of identifiers, particularly in Perl !

    Thus, as explained at the end of that post, I created a second version of my perl.xml file parser which should work correctly without significant delay !

    In short :

    I do NOT use any atomic structure !

    In mainExpr of the class range, I do NOT use a named group but, simply, use the part ^ (?: package | class ) \b, twice !

    I changed your prototype / signature syntax (?:\([^()]*+\)\s*+)?+ to (?: \( [\x20-\x7E\w]* \) \s* )?

    I changed your attributes syntax (?:\:[^{]+)?+ to (?: : [\x20-\x7A\x7C-\x7E\w]+ \s* )?

    In the two syntaxes above, I simply added \w within each character class

    Note that, from this article https://www.effectiveperlprogramming.com/2015/04/use-v5-20-subroutine-signatures/, the following syntax seems possible :

    sub animals ( $cat, $auto_id = get_id() ) { say "$auto_id: The cat is $cat"; }

    Thus, for prototype / signature syntax, I’ve allowed parentheses within the outer parentheses. If this example seems not pertinent, use the alternate syntax :

    (?: \( [\x20-\x27\x2A\x7E\w]* \) \s* )?

    Finally, I changed the regex class name (?x)\s\K[^;{]+ to (?x) \s+ \K .+? (?= \x20* [;{] )

    BTW, my parser presently contains 13 strings \s. May be, the \h or even the [\t\x20] syntax should be more appropriate, in some parts ?

    <?xml version="1.0" encoding="UTF-8" ?> <!-- ==========================================================================\ | | To learn how to make your own language parser, please check the following | link: | https://npp-user-manual.org/docs/function-list/ | \=========================================================================== --> <NotepadPlus> <functionList> <!-- ======================================================== [ PERL ] --> <!-- Perl - functions and packages, including fully-qualtified subroutine names --> <parser displayName="Perl" id="perl_syntax" commentExpr="(?x) # 'Free-spacing' mode (see `RegEx - Pattern Modifiers`) (?m-s: # 'Multi-lines' mode ( ^ and $ match at line-breaks ) / 'Dot' char does NOT match line-breaks \x23 .* # Single Line Comment ( #................ ) ) # | # OR (?s: # 'Single line' mode (letter s optional as mode set by DEFAULT) __ (?: END | DATA ) __ # String '__END__' or '__DATA__' .* # ANY character(s), including line-breaks, till... \Z # Last line-break, included ) " > <classRange mainExpr="(?x) # 'Free-spacing' mode (see `RegEx - Pattern Modifiers`) (?m-i) # 'Multi-lines' mode (^ and $ match at line-breaks) / 'Sensitive case' mode ^ # NO leading white-space at start of line (?: package | class ) \b # Header : word 'package' or 'clas', in LOWER case (?s: # 'Single line' mode (letter s optional as mode set by DEFAULT) .+? # ANY character(s), including line-breaks, till... ) # Section below, excluded (?= # Start of look-ahead \s* # Optional leading white-space of ^ # NO leading white-space at start of line (?: package | class ) \b # Next header : word 'package' or 'clas', in LOWER case | # OR \Z # last line-break ) # End of look-ahead " > <className> <nameExpr expr="(?x) # 'Free-spacing' mode (see `RegEx - Pattern Modifiers`) \s+ # Leading white-space(s) \K # Discard text matched so far .+? # ANY character(s) till... (?= \x20* [;{] ) # First semi-colon or left brace, excluded " /> </className> <function mainExpr="(?x) # 'Free-spacing' mode (see `RegEx - Pattern Modifiers`) (?m-i) # 'Mutli-lines' mode (^ and $ match at line-breaks) / 'Sensitive case' mode ^ \h* # Optional leading spaces or tabulations (?: sub | method ) \b # Word 'sub' or 'method', in LOWER case \s+ # White-space character(s) (?: \w+ :: )* # Optional list of words EACH followed with :: \w+ # Word character(s) \s* # Optional white-space character(s) (?: \( [\x20-\x7E\w]* \) \s* )? # Optional Prototype or Signature section (?: : [\x20-\x7A\x7C-\x7E\w]+ \s* )? # Optional Attributes section \{ # Start of function body " > <functionName> <funcNameExpr expr="(?x) # 'Free-spacing' mode (see `RegEx - Pattern Modifiers`) (?: sub | method ) # Word 'sub' or 'method', in LOWER case \s+ # White-space character(s) \K # Discard text matched, so far (move this line right before \w+ if 'prefix::' part NOT desired) (?: \w+ :: )* # Optional prefix:: part ( package:: / names:: ) \w+ # Word character(s) " /> </functionName> </function> </classRange> <function mainExpr="(?x) # 'Free-spacing' mode (see `RegEx - Pattern Modifiers`) (?m-i) # 'Mutli-lines' mode (^ and $ match at line-breaks) / 'Sensitive case' mode ^ \h* # Optional leading spaces or tabulations (?: sub | method ) # Word 'sub' or 'method', in LOWER case \s+ # White-space character(s) (?: \w+ :: )* # Optional list of words, EACH followed with :: \w+ # Word character(s) \s* # Optional white-space character(s) (?: \( [\x20-\x7E\w]* \) \s* )? # Optional Prototype or Signature section (?: : [\x20-\x7A\x7C-\x7E\w]+ \s* )? # Optional Attributes section \{ # Start of function body " > <functionName> <nameExpr expr="(?x) # 'Free-spacing' mode (see `RegEx - Pattern Modifiers`) (?: sub | method ) # Word 'sub' or 'method', in LOWER case \s+ # White-space character(s) \K # Discard text matched, so far ( move this line right before \w+ if part 'prefix::' NOT desired (?: \w+ :: )* # Optional prefix:: part ( package:: / names:: ) \w+ # Word character(s) " /> </functionName> <className> <nameExpr expr="(?x) # 'Free-spacing' mode (see `RegEx - Pattern Modifiers`) (?: sub | method ) # Word 'sub' or 'method', in LOWER case \s+ # White-space character(s) \K # Discard text matched, so far \w+ # Word character(s) ( :: \w+ )* # Optional list of words, EACH preceded with :: (?= :: \w ) # Till a last string ':: + word char' excluded " /> </className> </function> </parser> </functionList> </NotepadPlus>

    In the https://github.com/notepad-plus-plus/notepad-plus-plus/blob/a91b22bd8337465e04c1afa30cb71f7909340293/PowerEditor/Test/FunctionList/perl/unitTest file, I added text at various locations :

    Before the line ############### Start ############### ################ Added by guy038 to test Notepad++'s FunctionList sub animals ( $cat, $autoid = get_id() ) { say "$auto_id: the cat is $cat"; } sub _function_été { return 1 } Before the line package NameSpace::Block { ################ Added by guy038 to test Notepad++'s FunctionList sub grâce::Hôte { return 'running' } sub grâce::Son_ø { return 'stopped' } ################################################################# At the very end of file : ################ Added by guy038 to test Notepad++'s FunctionList class NewClassSyntax { method inBlock { return 1 } method inBlockProto($) { return $_[0] } method inBlockAttrib :prototype($) { return $_[0] } } class Chaîne{ method inBlock { return 1 } method Dûment($) { return $_[0] } method ƒ_Hameçon :prototype($) { return $_[0] } } #################################################################

    In terms of speed, the Function List panel seems quickly displayed. I also did a test copying UniTest.txt twice, and then adding, by regex, _1, _2 and _3 at end of the different names, the Function List panel still appeared without delay !

    Best Regards,

    guy038

  • DSpellCheck not underlining misspelled words

    10
    0 Votes
    10 Posts
    1k Views
    Six PS

    @PeterJones said in DSpellCheck not underlining misspelled words:

    current

    Downloading a library was only half the fix for me.
    I also had to switch to ‘Current User’ (was ‘All Users’).
    Otherwise I got a Windows error message ‘Can’t create directory .\plugins\config\Hunspell’
    Hope it’s helpful.