• Please Read This Before Posting

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

    Pinned
    15
    0 Votes
    15 Posts
    3k 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
    13k 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.

  • AsNotepad.xml nolonger working as it did

    5
    1 Votes
    5 Posts
    63 Views
    mkupperM

    @Chris-Gorringe said in AsNotepad.xml nolonger working as it did:

    Up until about 8.7.8, the asNotepad.xml file would make NP++ behave like Windows Notepad in that it only ever worked on one file and never showed any tabs. From 8.7.8, this appeared to stop working. I have tried to use the Preferences to acheive the same functionality but it doesn’t appear to be 100% perfect in that tabs still appear depending on the sequence that files are opened and closed.
    Is this a new bug or is this intential? I would really like to work with NP++ without tabs.

    I believe we will need more details about what is meant by “appeared to stop working.” Let’s start with the debug info from the ? / Debug info... menu.

    Like @PeterJones, I tried several versions of Notepad++ and the asNotepad.xml logic appears to work. However, my test was fairly cursory in that I verified that there was no tab bar and that opening two files created two instances, and that the session.xml files were never used nor updated. I did not push hard to see if I could get Notepad++ to behave in some unexpected way.

    I have portable versions of Notepad++ in c:\npp\~~~\notepad++.exe where ~~~ is a Notepad++ version number such as 878 or 882. For testing this issue I ran these from a command prompt as needed.

    rem Create asNotepad.xml files for testing for /d %i in (c:\npp\*) do @if not exist "%i\asNotepad.xml" cd . >"%i\asNotepad.xml" rem Rename the asNotepad.xml files to see if the latter case matters - it did not matter for /d %i in (C:\npp\*) do ren "%i\asNotepad.xml" asnotepad.xml for /d %i in (C:\npp\*) do ren "%i\asNotepad.xml" ASNOTEPAD.XML for /d %i in (C:\npp\*) do ren "%i\asNotepad.xml" ASnoTepad.xml rem Delete the asNotepad.xml files I had added for testing for /d %i in (c:\npp\*) do del "%i\asNotepad.xml" rem Look for asNotepad.xml files - Normally I don't have them dir /s /b C:\npp\asNotepad* rem Run a version Notepad++, wait 2 seconds, and run that version again to rem verify that both test files get opened in their own instances and that rem there are no tab bars. c:\npp\833\Notepad++.exe c:\tmp\tmp1 && sleep 2000 && c:\npp\833\Notepad++.exe c:\tmp\tmp2 c:\npp\878\Notepad++.exe c:\tmp\tmp1 && sleep 2000 && c:\npp\878\Notepad++.exe c:\tmp\tmp2 c:\npp\881\Notepad++.exe c:\tmp\tmp1 && sleep 2000 && c:\npp\881\Notepad++.exe c:\tmp\tmp2 c:\npp\882\Notepad++.exe c:\tmp\tmp1 && sleep 2000 && c:\npp\882\Notepad++.exe c:\tmp\tmp2
  • Notepad++ replacing '!='

    4
    1 Votes
    4 Posts
    151 Views
    PeterJonesP

    To future readers: I have updated the User Manual’s description of the DirectWrite settings to show:

    a4645737-3f77-4d64-b3e2-86137d6184d2-image.png

    This should hopefully help guide people in how to use or disable this feature of their chosen fonts

  • Unexpected change in language

    3
    0 Votes
    3 Posts
    57 Views
    PeterJonesP

    @Pat-Mitchell ,

    Since this question had nothing to do with the installer issues from the original post that you replied to, I forked it out to a separate question: this will get it in the right place so people know you are looking for help on this separate issue.

    There are two ways that I could interpret your question: your first phrase, “My note pad switched to a foreign language”, makes it seem like the user interface (menus, dialog boxes, etc) changed to a different language. For that, @Jonathan-Johansen’s advice is solid. As it says in that discussion, if you cannot figure out which menus to click to access the settings, because it’s too foreign for you, you can exit Notepad++, and use Windows Explorer to go to %AppData%\Notepad++\ (or appropriate config file location for your Notepad++) and delete nativeLang.xml – when you restart Notepad++, it will go back to the default English language.

    But you also said, “When I try to load a document, it comes up foreign and unreadable” – and the Settings > Preferences > General > Localization (or deleting nativeLang.xml) can do nothing about that. Notepad++ shows you the text that’s in a file, regardless of what localization language your user-interface is set to. If the text is in Chinese characters, it doesn’t matter whether your user interface is set to English, Russian, or pig latin – the text will still show up as Chinese.

    So if you are loading a file and it is showing up in valid Chinese – if you don’t know, you could copy the text, and paste it into your favorite online translator, and if it can spit out meaningful English when it translates, then it probably is valid) – but if it’s showing up as real Chinese, that means the file is really written in Chinese. So either you are not opening the same file as you did before (if you are sure that exact same file used to be in English), or someone edited that file and replaced its contents with the Chinese. However, if the text copied from the file cannot be translated (even if you put the translator website into “automatically detect language”), then it’s probably a binary file. If so, you are either opening a different file, or someone zipped it or changed it to a different format (a .docx or .pdf are not text files, so Notepad++ cannot be used to read them); or maybe someone encrypted the textfile, in which case you will have to ask them how to decrypt it before you try to edit the text in Notepad++; or, unfortunately, if your machine has been infected with ransomware or some other malware, that malicious code (which has nothing to do with Notepad++) may have encrypted or destroyed your text files, maybe in the hopes that you would pay them to give you back your original files (never do that; clean things up and restore your data from your backup, if that’s the condition you are in).
  • How to navigate DSpellCheck?

    3
    1 Votes
    3 Posts
    38 Views
    LordP666L

    @PeterJones

    Thank you. I thought something was wrong with my Windows setup or keyboard.

  • Export Data to Excel

    3
    0 Votes
    3 Posts
    86 Views
    PeterJonesP

    @Caroline ,

    I am going to echo @Mark-Olson’s sentiment, but with a lot more wordy detail, because that’s the kind of answers I give here. ;-)

    Notepad++ does not have a native compare function. Since you are saying you are using Notepad++ to compare, I have to conclude that you are using either the old Compare plugin or its much-improved successor ComparePlus. (If you are still using ComparePlugin, remove it and install ComparePlus, as that is the one that is getting continued support going forward.)

    Unfortunately, even ComparePlus doesn’t have any feature to export its comparison to any format (whether it be something “standard”, like normal diff output or a patch file, or something unusual like a custom spreadsheet format)

    Just so you know, Notepad++ is a text editor, and Excel natively works with binary data files. There is a text-based intermediary – the CSV format. But I cannot think of any standard CSV-based format that would be reasonable for a difference/comparison (ie, I have never heard of diff or similar tools outputting to a CSV format), so I doubt there’s anything ready-made that exists for Notepad++, any other text editor, or any command-line-based text-comparison tool like diff.

    Since no one here is likely to know what are “CRIMS codes” or what “RPA running [in Excel]” is, or what format that spreadsheet-based tool would want the “differences” in for comparison, there’s not much else we can do at this point.

    If you were to give us some short dummy “CRIMS”, along with a table

    | header 1 | h2 | h3 | |---|---|---| | A1 | B1 | C1 | | A2 | B2 | C2 | | A3 | B3 | C3 | header 1 header2 header3 A2 B2 C2 A3 B3 C3 A4 B4 C4

    And show us what pieces from the CRIMS codes (or the “comparison of CRIMS codes”) map into each of those cells.

    If it’s not too complicated, someone might be able to create a script for the PythonScript plugin that would take one or more CRIMS files and create the text-based CSV spreadsheet, which you could then open in Excel and use the “RPA” tool. And if the CRIMS codes and/or the difference format that you want is too complicated, it might be beyond the scope of free help in a text editor forum; so don’t be surprised if no one is able to help you with that, unless it’s just a simple mapping from a simple data format.

    (However, if comparing the differences between two CRIMS codes is something that people in your field often do with an RPA running in Excel, it would very much surprise me if there weren’t already tools – either command-line or Excel/VBA-based – that didn’t do the comparison or otherwise convert the CRIMS codes into the right format to read in Excel. In which case, it’s not a question for Notepad++ users.)

  • 0 Votes
    8 Posts
    449 Views
    EkopalypseE

    @Kunal-Mehta

    The problem with all these different “cloud” drives is that they don’t use a standard protocol, which makes it difficult to support multiple of them.

  • 0 Votes
    2 Posts
    166 Views
    PeterJonesP

    @Maxim-Rodin ,

    Settings > Preferences > Print, uncheck Print Line Number

  • in correct version reporting

    8
    1 Votes
    8 Posts
    314 Views
    xomxX

    @PeterJones said in in correct version reporting:

    some insight as to why the Windows program/features install version isn’t getting updated for you.

    @eli-rosen said in in correct version reporting:

    user for almost 20 years,

    The following will be only my guess.

    Since @eli-rosen uses the N++ installers for so long, maybe he previously used there also a v7.9.1 x64 one, but then he has started to use that Automox (sorry, IDK it) and it can do whatever stuff, so maybe it’s simply forgetting/blocking to update the corresponding Registry item.

    It shouldn’t be a remnant from a previously installed 32-bit v7.9.1. In such a case there should be a separate uninstall-item visible (with a corresponding Registry hive HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Notepad++\)

  • 0 Votes
    3 Posts
    152 Views
    PeterJonesP

    @Maxim-Rodin said in How do I convert a Notepad++ texst file to a PDF file with the vertical spacing bvetween the lines staying the same?:

    The book uses box drawing characters, which require the vertical spacing between lines to be very small. All of this needs to be exported in PDF format, but when I open the resulting PDF file, the vertical spacing is very high. Is there any way to fix this, either in Notepad++ or in the finished file?

    The problem might be the font you are using. When I use Fira Code as my font, print some box-drawing to PDF, and then open it in my free SumatraPDF viewer, the spacing looks reasonable (the boxes all connect) – the following is a screenshot from my PDF viewer

    33fe7d55-14fc-41e1-bfb3-d121f83b1563-image.png
    … So it’s showing them still connected.

    (Here’s NPP screenshot before I printed to PDF:
    ee7458bc-e218-417f-8fcd-5235c2f764ce-image.png
    … it shows connected there, too)

    Also, if that’s not working for you, if you take your text file in Notepad++ and use Language > M > MS-DOS Style (which is the lexer that’s useful for the old ASCII art .nfo-style files… though .nfo doesn’t seem to be in my default extension list anymore, which surprised me), Notepad++ actually changes the line spacing to make the lines closer together. So if changing fonts doesn’t work for you, try printing when in the Language = MS-DOS Style.

    Finally, the Settings > Preferences > MISC has some “DirectWrite” or “Rendering mode” settings (depending on which version of Notepad++ you are using) – you can try the various options available to you, as that influences how Notepad++ and the OS interface when dealing with fonts, so that can influence it. You may need to exit and restart Notepad++ for the DirectWrite setting change to take effect.

    For example, in my tests with Fira Code font, if I had Language = “MS-DOS Style” but “Rendering Mode” set to “Direct Write (default)”, I would see gaps, even though in Language = “None (normal text)”, I wouldn’t see gaps. If I change to “Rendering Mode” = “GDI (most compatible)” (or DirectWrite=off in the old nomenclature) and restart and look at the box drawing in “MS-DOS Style”, it goes back to being connected. But my experience may be different than yours, because as I said, when I use FiraCode in my normal setup, the box drawing characters are properly connected.

    In general, Notepad++ tries to print essentially what you see (in terms of font size, line spacing, etc), so if you see the box drawing connected when looking at it on-screen in Notepad++, it should print to PDF (or physical printer) that way, too. If not, it might be your printer driver, or you might need to change your font and/or DirectWrite settings.

  • Create File? message

    6
    0 Votes
    6 Posts
    430 Views
    PeterJonesP

    @Nostra-Damus said in Create File? message:

    but don’t have a ‘contextMenu’ folder in the Notepad++ folder, is there anywhere I can download it from? I have got the latest portable version off github but it is not in that either.

    The portable edition does not come with the Shell Extension DLL because the Shell Extension is by definition not portable (it gets registered with your OS; one of the primary points of portable editions of software is to keep them from making changes to your OS configuration and to keep themselves limited to whatever directory you happen to be running them from)

    The only way I have ever tried getting the shell extension is to run the installer (unfortunately, the installer is not one of the ones where you can change the filename to xyz.zip and just browse it like a zipfile, so you cannot easily extract from the installer without running it). And you seem to want the portable, not the installed version. However, it should be noted: you can still use the installer, and give it your alternate install directory of C:\Utils\Notepad++\ and you can choose Don't use %AppData% in the options on the last page of the installer:
    7dae6d44-f65e-4048-872d-cd58d2b61a26-image.png

    However, if you don’t want to run the installer at all, the repo for the Shell Extension is publicaly visible at https://github.com/notepad-plus-plus/nppShell/ … its “releases” only seems to share the source code, not the built DLL, but if you go to the most recent GitHub Actions CI_Build (https://github.com/notepad-plus-plus/nppShell/actions/workflows/CI_build.yml) – click on the most recent (topmost) run in the main list: if it is recent enough, it should have some artifacts attached, and you could grab the 64-bit artifact (the one with x64 in the name). You can extract the DLL from that artifact zipfile, and then create C:\Utils\Notepad++\contextMenu\ folder and put the extracted DLL there.

    But honestly, that’s a lot of work when really all you needed was to add the quotes to get "%1" in your existing registry entries. Since you’ve already confirmed that works, I’d probably recommend just sticking with that.

  • 0 Votes
    2 Posts
    168 Views
    Mark OlsonM

    @Nachum-Shmilovitz
    Do you have any plugins installed? A plugin might be responsible.

    It’s also possible that the SQL lexer is causing this slow performance. You can disable this lexer (removing all syntax highlighting) by selecting Language -> None (Normal Text) from the Notepad++ main menu.

  • 2 Votes
    21 Posts
    3k Views
    Alan KilbornA

    @guy038 said:

    the site’s ability to highlight any sub-section of the regex in green is really awesome

    https://jmrware.com/articles/2010/dynregexhl/DynamicRegexHighlighter.html

  • 0 Votes
    4 Posts
    336 Views
    Евгений КЕ

    @PeterJones said in Regex find and replace string in different types of brackets:

    @Евгений-К ,

    One way to do it simultaneously is

    FIND = (>Some String<)|("Some String")
    REPLACE = (?1>New String<)(?2"New String")
    SEARCH MODE = Regular Expression

    But that’s “annoying” because you have to repeat the Some String and New String in the FIND and REPLACE.

    There are some fancy tricks using capture groups, either named or numbered, and control-flow assertions, to make sure that things balance correctly, and it will only match .

    FIND = (?'startwrap'(?'angled'>)|(?'quoted'"))\KSome String(?'endwrap'(?=(?('quoted')")(?('angled')<)))
    REPLACE = New String
    SEARCH MODE = Regular expression

    But as you can see, the FIND becomes rather complicated to save the “expense” of having Some String and New String twice. (You could theoretically do it with numbered capture groups instead, but getting the counts right, especially as you edit to make a third pair like {Some String}, would cause problems, so I used named groups so there was no ambiguity in the future. I will leave the “numbered group” version as an exercise to the interested reader.)

    So that’s two ways. Which is best depends on which you understand, and whether it’s going to be expanded in the future and/or done often. The most important thing with regex is that you understand what it’s doing, so that you don’t mess up your data.

    If you don’t understand a “single regex version” but can get it done in two simple search-and-replace that you fully understand, then two simple is probably better for you. (If it’s something you will be doing often, you can record the two search-and-replace into a macro, so that you can just play that macro in the future.)

    @PeterJones, thank you very much for your advice!
    I look at the options you suggested and once again I am convinced that RegEx was definitely not created by people and not for people :):):)
    Way #1 (captured group) is absolutely clear to me. I myself thought that it was necessary to act somehow through the groups, but I could not understand how.

    And as you correctly noted - this way in terms of labor costs is not much more efficient than the method without RegEx. The old and new lines have to be written twice.

    The second way is also clear to me, but only in general terms. This option is a very good warm-up for the mind. And I will definitely save this option for the future.

  • Anyone can help with this regex?

    18
    0 Votes
    18 Posts
    11k Views
    guy038G

    Hello, @alan-kilborn, and All,

    Alan, you’ve just understood all my stuff quite correctly and even more regarding your last example with $+{Test} and $+{foo}, whose I did not think of !

    Best Regards,

    guy038

  • Efficient Way to Format and Debug Arduino Code in Notepad++

    2
    0 Votes
    2 Posts
    294 Views
    PeterJonesP

    @Aria-James,

    Recommended plugins for C/C++ syntax highlighting, auto-indentation, or even code suggestions for Arduino.

    Syntax highlighting occurs without plugins in Notepad++. You can set Settings > Style Configurator > Language: C++ to have user ext.: = ino so that Arduino sketches automatically get associated with C++ language.

    Further, you can set the USER KEYWORDS # > user-defined-keywords per my post here to add the Arduino-specific keywords to the syntax highlighter.

    Notepad++ does some auto-indentation natively: see Settings > Preferences > Indentation > Indent Settings = cpp to control tabs-vs-spaces on a per-language basis, and the Auto-indent = basic vs advanced which applies globally throughout Notepad++ (described in more detail here in the User Manual). But it’s not super-fancy, and is only “as you add new lines”, so it won’t clean previous code. @Michael-Vincent shares an example script for the NppExec plugin that is able to run an external “pretty print” utility for multiple languages depending on file extension in this post: his script does it for C, HTML, Perl, and Python, but once you understand what you shared, you could definitely call one for a different language (like C++: I am betting that most c pretty-printers are really c++ pretty-printers, too).

    Code suggestions – there is some auto-completion, but it won’t go as far as code suggestions (and it’s definitely not going to be a copilot AI or anything like that).

    Is there a way to integrate serial monitor output or debugging processes within Notepad++ or via external tools? Is there a recommended workflow that allows me to combine Notepad++ with the Arduino IDE or PlatformIO for compiling and uploading, while primarily coding in Notepad++?

    I’ve never tried anything like that, so maybe someone else will be able to give more advice on that end.

  • What makes notepad++ capable of making an html ???

    3
    0 Votes
    3 Posts
    276 Views
    rdipardoR

    @PeterJones said in What makes notepad++ capable of making an html ???:

    HTML Tag = makes writing HTML easier

    Just so no one is disappointed, the original and primary use case for that plugin is actually reading (X/HT)ML, i.e., by making DOM trees easier to navigate. More recent versions do have additional features that may be useful in writing web documents, but it cannot, for example, scaffold an HTML page or insert markup snippets.

    A better plugin for (simple) HTML generation would be WebEdit.

    There’s also jn-npp-emmet, a JavaScript extension for the jN plugin (a.k.a “jn-npp-plugin”), which ought to be able to generate any kind markup that emmet can.

  • How to change default tab name

    6
    0 Votes
    6 Posts
    2k Views
    zylstraZ

    @Alan-Kilborn

    Hi, Alan, I tried this (i.e. your last suggestion) and I think it worked the first couple times I tried it, but now it has stopped working.

    I have tried restarting both the software and the OS (WIndows 10). I changed both the english.xml and my newly created english_customizable.xml. The localization file changes back to English on each restart, but like I mentioned I changed that file as well, so that it has <tab-untitled-string value=“”/>.