• in correct version reporting

    8
    1 Votes
    8 Posts
    405 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
    199 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
    506 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
    189 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
    382 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
    325 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.

  • 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=“”/>.

  • Find line including string, copy this line and replace numbers in xml fie

    9
    0 Votes
    9 Posts
    679 Views
    guy038G

    Hello, @ottiditto, @pbarney, @peterjones and All,

    A tiny piece of information : The & character is not a regex character, so the following syntax is sufficient :

    FIND (?-s)^((.*? layer=")(25)(".*?>&gt;NAME.*\R))

    REPLACE ${1}${2}21${4}

    Best Regards,

    guy038

  • Search string to replace sheet protection multiple .xml files.

    3
    0 Votes
    3 Posts
    143 Views
    Ken McQuestonK

    @PeterJones

    That worked! Thanks for your help!

    Ken

  • Cannot get Autocompletion to work for my own language

    2
    0 Votes
    2 Posts
    131 Views
    PeterJonesP

    @Paul-Cobben said in Cannot get Autocompletion to work for my own language:

    What am I doing wrong?

    Per the User Manual section on the autoCompletion definition file syntax (https://npp-user-manual.org/docs/auto-completion/#create-auto-completion-definition-files), with emphasis added:

    The basic character set used to recognize keywords is made of letters a-z, A-Z, digits 0-9, and the underscore _. Punctuation might work for auto-completion; however, if you want to use the parameter hints, you should not use punctuation in the keyword name.

    You are relying on the : at the start of the keyword and the - in the middle. This is a double-whammy against you. However, if you go to Settings > Preferences > Delimiter and set ⦿ Add your character as part of word to :- so that those two characters are more “word-like”, then restart Notepad++, it will be able to show up in the function-name autoCompletion:

    6c680cbc-5b88-4169-b76d-affbf204618e-image.png

    However, the parameter hint portion has two more problems:

    The easy one is you need func="yes" in the <KeyWord name="..." func="yes"> tags, otherwise Notepad++ doesn’t pay attention to the overload/param elements nested in the KeyWord. This might not ever work, because the internal regex that Notepad++ uses to determine if it’s valid to prompt for function parameters refuses to work because of the - in the keyword. If I have the delimiter setting as above, and added a keyword :FUNCT_SETTEXT which has the : as the prefix but does not include the hyphen, like:<KeyWord name=":FUNCT_SETTEXT" func="yes"> <Overload retVal="void" descr="Set a value in the STATUS.DAT file."> <Param name="Section" /> <Param name="Key" /> <Param name="Value" /> </Overload> <KeyWord> then when I type :FUNCT_SETTEXT(, it will prompt with the parameter hints as well: bf355c03-a51b-45ad-b0a3-47534ee92e2d-image.png As a workaround, you could “cheat” the - limitation by defining a second keyword which includes just the stuff that comes after the - in the keyword, like,<KeyWord name="SETTEXT" func="yes"> <Overload retVal="void" descr="Set a value in the STATUS.DAT file."> <Param name="Section" /> <Param name="Key" /> <Param name="Value" /> </Overload> </KeyWord> This will allow Notepad++ to see the - as a boundary and then the SETTEXT as a separate function, which then allows for the function parameter completion, as in this screenshot: d52f6232-de08-4b85-89cc-e2b852801a90-image.png
    (notice that it thinks the function is SETTEXT, not :FUNCT-SETTEXT, when doing the parameter prompting) Since punctuation isn’t guaranteed in function/parameter autoCompletion, that’s likely not going to be “fixed”, as it’s already relying on an unspecified edge case.

    In conclusion, if you just want the function autocompletion for the names with leading : and embedded -, you can do that by setting the Delimiter setting to :- , and it will work as in my first screenshot. If you want parameter hints when there are not hyphens in your function name, you can get that by setting the func="yes" in your <KeyWord...> tags, and that will work as in my second screenshot. Unfortunately, you cannot get the parameter hints directly if your keyword has the - because of a limitation in the internal processing that decides when parameter hints can be shown (though you can trick it as shown in item3).

  • Autocompletion and plugin

    6
    0 Votes
    6 Posts
    449 Views
    General CoderG

    @Ekopalypse thanks for the info. I was hoping to avoid having to create custom autocomplete but cant have everything :)

  • Cant select 64-bit version as default text edit program in win 7?

    7
    0 Votes
    7 Posts
    7k Views
    Robert BaerR

    Title says Win7 – works on Windows 11 too

    A bit late, but this post was the key to getting things working on Windows 11 for me. I had stuck with the 32-bit version for years and had installed it on a non-default disk. When I upgraded to the 64-bit version everything related to the right click menu stopped working.

    Using regedit to insure that this key pointed at my 64-bit install got things right.
    [HKEY_CLASSES_ROOT\Applications\notepad++.exe\shell\open\command]

    double click on default to see the actual key if you haven’t used regedit before.

  • Windows content is blank on remote notepad++ sessions

    17
    0 Votes
    17 Posts
    5k Views
    D

    Came here to say I got same issue when using remote session and the target laptop lid is closed. Notepad stops rending the opened files. This is on Windows 10 and notepad version is 8.8.1.

  • Notetab++ novice questions

    2
    0 Votes
    2 Posts
    204 Views
    PeterJonesP

    @mapsonx said in Notetab++ novice questions:

    Notetab++

    I think you mean “Notepad++”

    I’ll answer your last one, first, because it’s not related to the others:

    If I add content to a new file, I am not prompted to save/dismiss, but when i open notepad++, that content is still there?? Is there a filw created. I’ve never experienced that type that of behavior before.

    That’s Settings > Preferences > Backup > ☑ Enable session snapshot and periodic backup option being turned on: as described in the backup settings in the User Manual, in that mode, Notepad++ will periodically take a snapshot of any edited files, and even remember those unsaved changes the next time you restart Notepad++. I, personally, am not a fan, because it lulls people into foolish behavior (like never saving/naming a file). However, that has been Notepad++'s default behavior for years… and it’s been there long enough that Microsoft took a page from Notepad++'s book (because in the “app” version of MS notepad that gets shipped with Windows 11 – the version that also now has tabbed editing, not the old win10-and-earlier one-window-per-file – now also keeps your unsaved changes from run to run).

    If you don’t want to keep unsaved changes, and you want to be prompted before exiting Notepad++, you can turn off that option: congratulations for wanting to control your data. To better understand this feature, and other backup-related issues, I highly recommend reading the backup settings in the User Manual and this forum’s backup FAQ, just to get a better handle on what’s going on.

    Now to your first question:

    1 I have both portable versions, from here and portableapps.

    Downloading from the official website is great. Downloading the portableapps version is a bad idea, because they edit the binary without saying what they change (in violation of the open-source license, IMO); we cannot guarantee that the portableapps version behaves in any way, shape, or form like the official Notepad++ release. Use portableapps at your own risk (or better, don’t use it, ever).

    How do I update the version form this site and maintain tre current settings. I tried to keep the current .xml files bu that did not help.

    It helped, but you might not have kept all the right files. The official Online User Manual for Notepad++ has a section devoted to upgrading the portable edition: https://npp-user-manual.org/docs/upgrading/#upgrading-a-portable-edition

    Toolbar size and labels. I want the larger toolbar, and if possible, button labels., but aI like the fancier icons I don’t know why the toolbars look different.

    For builtin icons, the “large” icons only come in the new “Fluent UI” look, hence the names in the Settings > Preferences > Toolbar section (was a sub-section of the General tab, before v8.8.0) are “Fluent UI: large” and “Filled Fluent UI: large”. If you have one portable set to “standard icons (small)” and another to “Fluent UI: large”, of course your toolbars are going to look different.

    Also, this is strange. Upon opening this sites version after I trying to update it, both toolbars were now identical to portableapps, and it had the same content as the portableapps version.

    When you updated your portable copies, you presumably overwrote all your config files, including your choice of which toolbar icon set you were using, so they went back to the same. (Though I’m surprised they went back to the “Fluent UI: large”, which your screenshot appears to be showing, because

    Are they cloud connected? Yes, I know, doesn’t make sense.

    No. (Well, not unless you had set the Cloud settings in the preferences dialog, and set them both to the same cloud folder.)

    For builtin toolbar icons, your only choices are big/small and hollow/filled versions of the Fluent UI icons, or the old small-only standard icons. (That “standard icon” set has not, as far as I can remember, been published in a large-icon version. In Notepad++ 7.9.5 and earlier, before there were the “Fluent UI” icons, there were the ancient “small icons” and “big icons” and the “standard icons” (which were small, even then); I just double-checked v6.5 from 2013, the oldest copy I have downloaded right now, and the “standard” ones were only small, even then.)

    You can customize the icons, if you don’t like any of the four Fluent options or the “standard icon” set. The Toolbar Customization section of the User Manual explains how to do that, and even provides a link to a zipfile with a copy of the ancient “big icons”, which are now called the “legacy” icons. But that download doesn’t come with big versions of the “standard icons”, either… so if that’s what you wanted, you’d still be out-of-luck. It might be possible to use image editor software and grab the “standard icons” out of the Notepad++ source code, and scale them from 16x16 .ico files to 32x32 .ico files – but I don’t know of anyone who has done that and made them public.

  • System Requirements

    3
    1 Votes
    3 Posts
    236 Views
    S

    @PeterJones
    Ok thanks for your help. Probably will just use the last known supported version. Nice to know though that there may be a way to use a newer version.

  • Sorting data

    Locked
    7
    0 Votes
    7 Posts
    89k Views
    Robert PickeringR

    @Makwana-Prahlad
    Thank you genius!

  • Maintain Indent While Pasting Multiple Lines

    27
    1 Votes
    27 Posts
    8k Views
    Liam WrightL

    @guy038 said in Maintain Indent While Pasting Multiple Lines:
    This thread is a bit dated, the setting is now under
    Settings > Preferences > Indentation
    Everything else is as @guy038 said.

  • enter special characters on us 65% keyboard without numpad

    4
    0 Votes
    4 Posts
    344 Views
    Mark OlsonM

    If you know the hex code for a symbol, I prefer to use the HTMLTag plugin to automatically convert XML character encodings into their corresponding characters (e.g., &#10; will automaticaly convert to the LF character after you hit SPACE).