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

  • Turn Off Paragraph Highlighting

    3
    0 Votes
    3 Posts
    19 Views
    CoisesC

    @Craig-W said in Turn Off Paragraph Highlighting:

    How do you turn off the automatic highlighting of anything you are typing. I went to settings and turned de-selected everything under highlighting, and it hasn’t changed anything. I don’t want the background highlighted as I type or have to go to a previous paragraph and it’s all highlighted.

    Try changing Settings | Preferences | Editing 1 | Current Line Indicator to None.

  • 0 Votes
    2 Posts
    24 Views
    PeterJonesP

    1: How can I tell NP++ to search for multiple different text snippets at once? For example all instances of 45/23 31/89 and 21/77 should all be replaced with 66/55

    (a|b|c) will match a or b or c, so for the exact three you said, it would be (45/23|31/89|21/77) as the FIND and 66/55 as the replace.

    But if you’re not describing it well, and you just want any two-digit fractions of the form ##/## to be replaced with 66/55, then it would be \d\d/\d\d (where \d is regex-speak for “any digit”)

    If neither of those is what you really want, you will need to give more examples of what should and shouldn’t match.

    2: How can I tell NP++ to delete the first three lines and the last four lines (the last line is always empty) of a file?

    First three lines: FIND \A(^.*?\R){3} will match the start of file and the first three lines, and replacing that with empty text will delete them.

    Last four: FIND (^.*?\R){4}\Z will match four lines and the end-of-file, so replacing that with empty text will delete them.

    Fancy: do both with the | to say “either/or”, so FIND = \A(^.*?\R){3}|(^.*?\R){4}\Z

    (don’t have . matches newline enabled)

    All of that syntax is described in the User Manual regex section, so if you want more details, you can load that page and use your browser to search for \A or \Z or similar; the concepts used were anchors (for beginning/end of file), multiplying operators (for doing N lines), and groups (so the multiplying operators apply to the entire-line matcher)

    200 files

    Regex will work in the Find in Files, which is how you make it apply to that many files. But try it in one open file first, to make sure it does exactly what you think. And for bulk operations, always keep a backup, in case things don’t go as you expected.

    ----

    Useful References Please Read Before Posting Template for Search/Replace Questions Formatting Forum Posts Notepad++ Online User Manual: Searching/Regex FAQ: Where to find other regular expressions (regex) documentation
  • Perl keywords "class" and "method" not recognised by Function List

    7
    0 Votes
    7 Posts
    313 Views
    PeterJonesP

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

    for these two syntaxes, I just supposed that standard ASCII characters are used, from \x20 to \x7E, except for \x28 and \x29 in one part and \x7B in second part ! May be, the \t should be part of each class character, either

    Perl allows Unicode alphanumeric/“word character” in any such identifier or token (just cannot start with a numeric), so restricting to ASCII is not going to work

  • Change or specify plugins directory or folder location

    6
    0 Votes
    6 Posts
    8k Views
    BlastocystisB

    @PeterJones
    As a user of Notepad++ in a highly-controlled corporate environment, Peter’s explanation is lucid, thorough and relevant.

  • How do I change font?

    14
    0 Votes
    14 Posts
    174k Views
    K

    @guy038 ,

    Thank you for the elaborate explanation, clearly distinguishing the three drop-down lists and clarifying that in the Language list, Global Styles is a different from the others, as is Search Result.

  • Compare plugin, output a list of line numbers that do not match

    2
    0 Votes
    2 Posts
    93 Views
    PeterJonesP

    @Robert-Or-Janet-Diebel said in Compare plugin, output a list of line numbers that do not match:

    I wish to be able to run a compare and output a list of line numbers that do not match. This, whether with Notepad++, the Compare plugin, or some other utility.

    “some other utility”: GNU’s diff command (which there are various ports to windows) could make a diff file or patch report similar to what’s described below. But anything that’s outside of Notepad++ and its plugins is OFF TOPIC here, so you’d have to look elsewhere for details of how to do that. Please don’t ask for off-topic (non-Notepad++) suggestions until it’s 100% certain that it can’t/shouldn’t be done in in Notepad++, and don’t expect more than hints if that’s the only way, because this isn’t a generic “transoform my text for me” forum.

    Never use Compare plugin; it is out of date and no longer supported, and has known dark-mode bugs. ComparePlus is the updated version of the Compare Plugin, and is the plugin you should use for comparing files.

    ComparePlus has had Generate Patch action since v2.0.0. That comes close to what you want, in that it generates a new file that has all the differences in an industry-standard “patch” file, which does list the line numbers that are different, but also includes the changes needed to convert from old to new version, so it might be more than what you want. But you could extract the info you wanted from that patch file.

    For example, if you had a patch file that looked like

    --- new 2 +++ new 3 @@ -1,6 +1,7 @@ one -two +two2 three +four has more alpha beta gamma @@ -16,4 +17,4 @@ nu xi omicron -pi +pie

    the lines in the @@ would indicate the lines that had changes (sometimes with context lines around them.

    -1,6 +1,7 says that “in the LEFT file, starting at line 1 for a total 6 lines, it is changed to the RIGHT file starting at line 1 and for a total of 7 lines” -16,4 +17,4 says “in the LEFT file, starting at line 16 with 4 lines, it is changed to the RIGHT file starting at line 17 for 4 lines.”

    So if you did a MARK for ^@@.*$ in regex mode and then Copy Marked Text, it would put all those line-number indicators in the clipboard, and you could paste those into a new tab that would just have the indications of which lines are changed.

  • Why does my editor has this weird syntax highlighting?

    2
  • Renumber lines?

    3
    0 Votes
    3 Posts
    168 Views
    S

    @PeterJones

    Thank you.

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

    6
    0 Votes
    6 Posts
    132 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
    790 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
    144 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
    124 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
    180 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
    79 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
    904 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
    87 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)