• 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.

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

    2
    0 Votes
    2 Posts
    34 Views
    PeterJonesP

    @JohnL22 said in Perl keywords "class" and "method" not recognised by Function List:

    The language highlight for perl recognises new keywords - class, field, ADJUST, method - BUT the Function List does not recognise class or method entries

    The syntax highlight keyword lists are separate from the FunctionList parser, so having added one doesn’t guarantee having added the other.

    And during the last update of the FunctionList parser, the test file that was being used didn’t already include that syntax, so I forgot to add in the class to match package and method to match sub. (I haven’t started using the new perl class/method syntax yet)

    Does this screenshot do what you want? (I added the class NewClassSyntax section to the Perl FunctionList test file for this screenshot)
    a9f4c6e2-3794-4270-b123-91db838f04ba-image.png

    using a file ending with…

    ################ From here on was added by pryrt/PeterJones to test Notepad++'s FunctionList, and is not part of pltags source code sub MyClass::new { return bless {}, 'MyClass' } sub MyClass::do_thing { return 42 } sub MyClass::debug { print "ok\n" } sub Other::run { return 'running' } sub Other::stop { return 'stopped' } package NameSpace::Block { sub inBlock { return 1 } sub inBlockProto($) { return $_[0] } sub inBlockAttrib :prototype($) { return $_[0] } } package NameSpace::Semicolon; sub afterSemi { return 0 } class NewClassSyntax { method inBlock { return 1 } method inBlockProto($) { return $_[0] } method inBlockAttrib :prototype($) { return $_[0] } }

    If so, then you can replace c:\program files\Notepad++\functionList\perl.xml with

    <?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 --> <!-- ... replacement perl parser ...: https://community.notepad-plus-plus.org/topic/19842 ... make sure to rename the id\s*=\s*"perl_function" near the beginning with "perl_syntax" to match ... ... 2025-11-26: Improve the regex to not include as much pointless backtracking --> <parser displayName="Perl" id="perl_syntax" commentExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`) (?m-s:\x23.*$) # Single Line Comment | (?s:__(?:END|DATA)__.*\Z) # Discard up till end-of-text " > <classRange mainExpr ="(?x) # free-spacing (see `RegEx - Pattern Modifiers`) (?m) # ^ and $ match at line-breaks (?'PACKAGE_HEADER' ^ # NO leading white-space at start-of-line (?-i:(?:package|class)\b) ) (?s:.*?) # whatever, (?= # ...up till \s* # ...optional leading white-space of (?: (?&amp;PACKAGE_HEADER) # ...next header | \Z # ...or end-of-text ) ) " > <className> <nameExpr expr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`) \s \K # discard text matched so far [^;{]+ " /> </className> <function mainExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`) (?m) ^\h* (?:sub|method) \s+ (?:\w++\:\:)* # optional prefix::package::names:: \w+ \s*+(?:\([^()]*+\)\s*+)?+ # prototype or signature (?:\:[^{]+)?+ # attributes \{ # start of function body " > <functionName> <funcNameExpr expr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`) ((?:sub|method)\s+)? \K # discard text matched so far (?:\w++\:\:)* # optional prefix::package::names:: \w+ # move the \K to just before this line if you don't want prefix::package shown in the functionList Panel " /> </functionName> </function> </classRange> <function mainExpr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`) (?m) ^\h* (?:sub|method) \s+ (?:\w++\:\:)* # optional prefix::package::names:: \w+ # add \K before the \w+ if you don't want prefix::package:: shown in the functionList Panel \s*+(?:\([^()]*+\)\s*+)?+ # prototype or signature (?:\:[^{]+)?+ # attributes \{ # start of function body " > <functionName> <nameExpr expr="(?x) # free-spacing (see `RegEx - Pattern Modifiers`) (?:(?:sub|method)\s+)? \K # discard text matched so far (?:\w++\:\:)* # optional prefix::package::names:: \w+ " /> </functionName> <className> <nameExpr expr="(?:sub|method)\s+\K\w+(::\w+)*(?=::\w)"/> </className> </function> </parser> </functionList> </NotepadPlus>

    and try it out for a while. If it does what you expect, let me know, and I can create an official Issue and submit the updated FunctionList definition with class and method added.

    And if you have examples of class or method definitions that include syntax that this updated functionList parser doesn’t handle right, give me a brief snippet of code which shows the ones that aren’t done right…

    update: for example, do you think ADJUST blocks should show up in as functions/methods in the FunctionList panel or not? Since it’s just code that’s run during object construction, so it’s more like a BEGIN/END block, which don’t show up as functions in the FunctionList, so I would lean toward not including them, but I could be persuaded otherwise.

  • Renumber lines?

    3
    0 Votes
    3 Posts
    129 Views
    S

    @PeterJones

    Thank you.

  • ascii nfo sh problem dos2unix is required to fix the bash files!

    6
    0 Votes
    6 Posts
    104 Views
    Daniel B. 0D

    Thank you for your explanation! I’m glad I wasn’t alone with this problem. It’s very well written and easy for me to understand. Thank you!

  • Style Configurations Reset After Update

    12
    0 Votes
    12 Posts
    716 Views
    PeterJonesP

    @networkproblemsolver said in Style Configurations Reset After Update:

    @PeterJones

    But what if I want (need) to run in “Admin Mode” ??? Is Notepad++ unable to run in “Admin Mode” and still save Style Configurations? That seems silly.

    Security experts would tell you that constantly running any app in admin/root mode is a lot worse than silly.

    And since Notepad++ v8.6.6, there is no reason to run Notepad++ in Admin mode to edit/save UAC-protected files, because Notepad++ can ask for UAC Elevation for the individual save actions . So the only activity that you might still need to run Notepad++ in Admin mode for is when installing a new plugin, and you don’t need to be constantly running in Admin mode for that. That is: you most likely don’t “need” to run in Admin mode anymore.

    That said, the reason why Notepad++ often has problem with Admin mode and settings is because of cross-contamination of permissions: running an app in Elevated privileges makes WINDOWS treat that app differently. It may be that with your current setup, the Elevated/Admin-mode won’t allow writing to AppData (since that’s a per-user, and for some system configurations, WINDOWS won’t allow admin to write to %AppData%). Or it might be that because you often ran N++ as Admin that the AppData-based settings might have been created/saved with Admin-privileges, so when you run N++ as normal user it cannot read or save the settings. Without being able to look at your file permissions for you, I cannot say exactly what caused it – you would need to verify where Notepad++ is trying to do the settings, and look at the directory and the stylers.xml in that directory, looking at Windows’ SECURITY settings for both; and then maybe try running experiments to see whether changing a setting/style-configurator in Notepad++ is saved when you exit Notepad++ when running normally and/or when running as Admin.

  • Vertical White Bar Appeared

    4
    0 Votes
    4 Posts
    86 Views
    Terry RT

    @networkproblemsolver
    Your images show you seem to be running NPP as administrator. That could be the source of your problem.

    Read this thread, there might be the solution.

    Terry

  • config Search to ignore \CR \LF

    2
    0 Votes
    2 Posts
    111 Views
    PeterJonesP

    @Wolfgang-Grafeneder ,

    Read Find Text Copied From Excel Cell and the issue(s) it links to, as there was an entire recent discussion on this.

  • Display many Files in Filelist of Notepad++, but not open

    12
    0 Votes
    12 Posts
    129 Views
    Alfred JanssenA

    @Terry-R
    Thanks for letting me know.

  • 0 Votes
    15 Posts
    4k Views
    Xue DavisX

    @Terry-R This is very helpful and I was unaware of that issue. Thank you. Based on dates, it looks like I was using 8.8.5. It seems likely, especially the description of removing the structure around the installation.

  • I'm in a Paragraph Find and Replace Hell

    2
    1 Votes
    2 Posts
    65 Views
    guy038G

    Hello @offshore9521 and All,

    Humm…, @offshore9521, there are two separate problems with your regex !

    From your INPUT text :

    ‘Colt?’ He turns to face her, and clears his throat. Guilty sign. Very guilty. Probably has a guilty look on his face, but you can’t tell, because he’s still wearing that helmet so you can’t see his eyes.

    Your regex (?<![\.\!\?])\r\n([a-z]) means :

    If a \r\n sequence, followed with a letter (a through z), is not preceded by :

    A dot

    An exclamation mark

    An interrogation mark

    Then rewrite this letter

    BTW, you can shorter this regex as (?<![.!?])\r\n([a-z])

    But, the character is not a character of the [.!?] list. Thus, this explains why your regex merges the lines 1 and 2

    Now, I suppose that your true goal was : if a line is not a true sentence, then merge that line with the next one with a space character ? This lead to the following regex S/R :

    FIND (?<![.!?’])\r\n(?=\w)

    REPLACE \x20

    So, any \r\n sequence, which respects the before and after conditions, is simply replaced with a space character

    Notes :

    As you see, I included the character within the list of the forbidden chars, in the negative look-behind

    I used \w, which is identical to the [\u\l\d_] class character, instead of [a-z] to not bother about case !

    Remark :

    Instead of \r\n, I could have used the \R syntax with matches any kind of line endings ( \r, \n or \r\n ), but, because it is preceded by a negative look-behind, we must insert \r and \n as forbidden characters, as well !

    FIND (?<![.!?’\r\n])\R(?=\w)

    REPLACE \x20

    Best Regards,

    guy038

    P.S. : As an exercice, try to understand why the following regex S/R does not work as expected :

    FIND (?<![.!?’])\R(?=\w)

    REPLACE \x20

    To help you, don’t forget to click on the icon of the Toolbar !

  • DoxyIT on 64bit: Access violation

    6
    1 Votes
    6 Posts
    880 Views
    Đức Anh NguyễnĐ

    Hi @Clicketyclick,
    I’ve updated DoxyIt and tested it on my x64 machine.
    Please give it a try: https://github.com/AN-2101/DoxyIt/releases/tag/v0.4.5

  • Can't get the old toolbar

    2
    0 Votes
    2 Posts
    70 Views
    PeterJonesP

    @prof-tech said in Can't get the old toolbar:

    Help! I have tried everything to get the old toolbar and it doesn’t appear! can anyone help me?

    Settings > Prefernces > Toolbar: the “Fluent UI” variants are the “new toolbar” and “standard icons: small” are the “old toolbar” (and the “Hide” checkbox turns it on and off)

  • 'Find in Files' doesn't appear to work

    6
    0 Votes
    6 Posts
    72 Views
    CoisesC

    @Alan-Kilborn said in 'Find in Files' doesn't appear to work:

    If a folder doesn’t exist, I think when the search is initiated, input focus will immediately jump to the Directory: box, signaling a problem with that folder to the user (without a message box). Not on a PC right now, so can’t verify; going from memory.

    I see you are correct. However… I also see that the search results show 0 files searched. So I don’t see how it could be a problem with what is in the Find box. The directory might exist, but not be the one OP meant to search.

  • RegEx assistance for adding a space before an Upper case letter

    2
    0 Votes
    2 Posts
    84 Views
    guy038G

    Hello, @brenda-gross-0 and All,

    Very easy with regexes !

    Open the Replace dialog ( Ctrl + H )

    Un-tick all box options

    FIND (?-i)(?<=\l)(?=\u)|_

    REPLACE \x20

    Tick the Wrap around option

    Select the Regular expression search mode

    Click, once only, on the Replace All button

    Voila !

    Notes :

    The leading part (?-i) is an in-line modifier which force to take care about the case of letters, meaning non-insensitive search !

    Then, due to the alternation symbol |, two individual regexes are performed, simultaneously :

    (?<=\l)(?=\u) which searches for an empty string between a lower-case letter and an upper-case letter

    _ which simply searches for the underline character

    In both cases, the replacement changes the regex search with an normal space character \x20. I could have chosen to type a single space char, instead !

    The regex search may also be expressed as a non-capturing group : (?-i:(?<=\l)(?=\u)|_), with the leading non-insensitive option

    Best Regards,

    guy038

  • Menu command for ensuring current position is visible

    4
    3 Votes
    4 Posts
    227 Views
    MarkusBodenseeM

    @Mark-Olson said in Menu command for ensuring current position is visible:

    I agree with you that this is pretty confusing, and agree that using the arrow keys should have the same effect as typing. This would obviously be a separate feature request though, and as you noted I rather doubt that it would be accepted because it would only add confusion for some other users.

    After sleeping one night about it, and rereading your posting about typing any char and undo. Also in your issue #17297 and @Alan-Kilborn 's issue #12107 … I have changed my mind a bit, because I think that both situations of keystrokes (typing char from keyboard input or pressing arrow key) should be handled in the same way. This would make consistent behaviour of the application.

    I think, keystrokes should always have direct effect on a visible caret, so the caret should be made visible first, and afterwards perform the action from keyboard (typing char/moving caret).

    Keystrokes on an invisible caret look more like undefined behaviour. The user does not know, where his focus is. Even making caret jump to next visible position could be unexpected, because user did not know where he previously has been. Maybe user is even confused, because of the jump.

    So from this perspective, the current behaviour of arrow keys could be worth considering if it is unexpected/inconsistent.

  • 0 Votes
    4 Posts
    166 Views
    Unmarked0146U

    @PeterJones

    If you are using one of the built-in themes, you might try to compare your %AppData%\Notepad++\themes___.xml with the version from c:\program files\Notepad++\themes,

    I don’t have a custom theme; I just use whatever existing themes and modify them (just two, really). I just replaced my %AppData% theme with the “program files” themes, and the colors look okay again.

    795725ad-50a6-4d40-a0cf-308501ed7cea-image.png

    But both your margins being light gray imply that your theme was missing both those definitions when you ran 8.8.9 for the first time.

    I am pretty sure that when I installed Notepad++, I just copied the old saved themes over, which is why the new styles were probably missing.

    In this screenshot, I set one to Bookmark to salmon and Change History to yellow, to make it obvious which was which.

    This makes it much easier to understand. Thank you!

    Update: See our Change History Margin FAQ, especially the “How do I change the size” section, for an example of how to change the size using PythonScript or NppExec. (But yikes, I see that FAQ is out of date, since it doesn’t show the ability to change the four colors, which was added years ago… I will have to fix that next)

    I am not that ambitious, but I am sure the update will be appreciated!

    Thank you again, Peter. Not only did your post help fix the problem, but it’s also educational and shows me how dedicated people are to Notepad++.

  • 0 Votes
    5 Posts
    130 Views
    LoisL

    @Terry-R This has worked perfectly. Its a very long document so this was great. Thanks again, greatly appreciated.

  • Show/hide tab or change tab width

    3
    0 Votes
    3 Posts
    102 Views
    VTGroupGitHubV

    Thank you for all of the information. While it might be fun to dig into the Windows APIs again, I was hoping for something simple I could run with NppExec, etc. without a lot of coding. Since it’s not a lot of extra work to move the splitter manually, I’ll live with that for now. And maybe the MarkdownPanel team will find my request worth implementing, though it’s possible it can’t be done since one side is a NPP tab and the other is a panel.