Community
    • Login
    1. Home
    2. Popular
    Log in to post
    • All Time
    • Day
    • Week
    • Month
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics
    • All categories
    • A

      File type associations not working

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      4
      0 Votes
      4 Posts
      300 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.

    • U

      Possible error or not?

      Watching Ignoring Scheduled Pinned Locked Moved Translation
      4
      1 Votes
      4 Posts
      236 Views
      xomxX

      @PeterJones said in Possible error or not?:

      the old 4096 Mb limit was actually causing a crash, so it had to be lowered to a limit that was 2046 Mb.

      It’s true, and the 2046 is the current right ‘Define Large File Size’ threshold max value for the N++ Scintilla syntax highlighting.

      Note:
      Now we could easily shift that back (but I don’t think it’s a good idea, as the enabled syntax highlighting and the assoc. stuff substantially slow down handling and double the memory consumption needed for such large files…) to the previous larger 4096 threshold, since in the meantime I finally persuaded Don and now the SC_DOCUMENTOPTION_TEXT_LARGE Scintilla docs flag is used as default everywhere (this effectively removes the previous crash possibility for a small increase in the consumed memory price). Some details in:
      https://github.com/notepad-plus-plus/notepad-plus-plus/issues/14944
      https://github.com/notepad-plus-plus/notepad-plus-plus/pull/14982

    • T

      How to Use Notepad++ As a Daily Journal

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      3
      0 Votes
      3 Posts
      167 Views
      T

      @PeterJones

      Thanks for your reply. I will give your solution a try as a Macro learning experience. Maybe I’ll find other uses for it.

      But, I just came up with a different solution:

      I like Notepad++ so far, so I used the preferences to set Notepad++ as the default for a small number of file types I use occasionally. I renamed the extension of the file I use as my daily journal/log from .txt to my initials .th. I used the file properties to open that file with Windows Notepad.

      It’s working well for me. I can use my journal/log with Windows Notepad, and everything else uses Notepad++.

    • Joël Sabourin-PoirierJ

      Smart Highlighting - Multiline Support

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      10
      0 Votes
      10 Posts
      2k Views
      Phil pascalP

      @PeterJones Thank you. I just found this forum after searching about the multiple line issue. I’ve been using Notepad++ for years, fantastic program. First text editor I’d found that did search and replace on end of line charaters since good old Wordstar.

    • Z

      NppCSharpPluginPack: how to add toolbar buttons?

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      3
      0 Votes
      3 Posts
      212 Views
      Z

      @Mark-Olson You are right, thanx Mark.

    • Lionel LagardeL

      C++11 raw string literal syntax hightlighting

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      3
      1 Votes
      3 Posts
      225 Views
      Lionel LagardeL

      thank you

    • Vitalii DovganV

      NppExec Manual: CHM vs. HTML version [poll]

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      6
      0 Votes
      6 Posts
      451 Views
      PeterJonesP

      @Vitalii-Dovgan said in NppExec Manual: CHM vs. HTML version [poll]:

      Somebody, stop me! It has been 2 weeks I’ve been updating and improving the HTML form of the Manual!

      Sorry, it is not possible for me to stop someone from improving documentation. ;-)

    • Guido ThelenG

      C# Plugin for ARM64

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      3
      1 Votes
      3 Posts
      227 Views
      Guido ThelenG

      @rdipardo ,
      Thanks for pointing out the Native AOT template — I wasn’t aware of it when I started the ARM64 migration.

      I did actually try Native AOT early on, but ran into two issues: the export limitations you mentioned, and the resulting DLL size (~57 MB), which felt way too large for a Notepad++ plugin. That’s why I ended up going with DNNE — the plugin DLL stays small (~1 MB), though it comes with the .NET 8 runtime dependency.

      How large are the DLLs you’re getting with the Native AOT template? Has trimming improved enough to bring the size down to something reasonable for a plugin?

    • P AP

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

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      3
      0 Votes
      3 Posts
      211 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.

    • Rob PintoR

      Alternative for Notepad++ on Mac

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      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.

    • V

      [New Plugin] Line Number Highlight — VS Code-style active line number for Notepad++

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      3
      2 Votes
      3 Posts
      260 Views
      V

      @Vitalii-Dovgan
      Thanks for the feedback!
      v1.1 is now out with full Unicode compliance - all Win32 API calls migrated to W variants.
      Also added separate color settings for dark and light themes.

      GitHub

    • M Andre Z EckenrodeM

      Regex matching anomaly

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · · regex regex matching
      3
      0 Votes
      3 Posts
      217 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.

    • cmeriauxC

      survey: Incremental search usefulness

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      82
      1 Votes
      82 Posts
      49k Views
      William4565W

      @PeterJones sure.

    • donhoD

      Notepad++ v8.9.2 Release

      Watching Ignoring Scheduled Pinned Locked Moved Announcements
      11
      1 Votes
      11 Posts
      10k Views
      CoisesC

      @PeterJones said in Notepad++ v8.9.2 Release:

      https://github.com/notepad-plus-plus/notepad-plus-plus/issues/17540

      Thanks. I should know better… I forgot to search closed issues, not just open ones.

    • M

      Meenu Hinduja Dheeraj Sudan - Best Plugins for Improving Productivity in Notepad++

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      3
      0 Votes
      3 Posts
      251 Views
      PeterJonesP

      @MHindujaDheerajSudan said in Meenu Hinduja Dheeraj Sudan - Best Plugins for Improving Productivity in Notepad++:

      code formatting,

      Depends on what language your code is in. For example, for formatting XML, I recommend XMLTools; for formatting JSON, I recomment JsonTools.

      For most programming languges, there are standard executable-based formatters that are considered “best practice” for that language. Instead of having a dedicated plugin for each language you write in, my recommendation is to use a plugin to route the files through that external formatter.

      The “Pork to Sausage” (P2S) plugin is actually good for that: you can define “transformations”, where it passes the content of the file thru an executable, and replaces the contents with the output of that executable (unfortunately, you have to do a Ctrl+A to select the whole text first, before running hte P2S. this post my @Michael-Vincent, and the follow-on a couple posts down, give an example script for the NppExec plugin that routes various filetypes to their appropriate formatter/pretty-printer executables.

      Also, our compile/convert FAQ shows examples of how to do that sort of thing with both P2S or using NppExec to drive it – both are common solutions among the power-users here.

      comparison tools

      ComparePlus plugin. Hands down. No reason to consider anything else. It’s awesome.

      session management.

      The only session management plugin I can think of is Session Manager. I don’t use it, but I seem to remember people like it.

      Which plugins do you personally rely on, and are there any compatibility concerns with recent versions?

      Rely On: NppExec and ComparePlus are in my standard workflow for code development. And I use PythonScript for scripting tasks inside Notepad++ (like macros, but on steroids, because it has the full power of Python behind it), but that doesn’t fall within the types of tasks you were look for plugins for.

      Compatibility: Pork2Sausage, NppExec, and ComparePlus are all actively maintained, and definitely don’t have any compatibility issues. I don’t know how Session Manager is doing for maintenance.

    • E

      NPPftp Linux dot-directories

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      3
      0 Votes
      3 Posts
      185 Views
      PeterJonesP

      … also, you specifically called out dot-directories in the title.

      Whether or not an Open dialog will show dot-directories is definitely a function of WINE itself. See, for example, https://forum.winehq.org/viewtopic.php?t=1624

    • mapsonxM

      Make notrepad++ default

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      2
      0 Votes
      2 Posts
      34 Views
      PeterJonesP

      @mapsonx said in Make notrepad++ default:

      I read the info here Shell Extension, and here Replacing Notepad with Notepad++ in Windows 10, but I’m a bit anxious about it.

      User Manual > Other Resources > Notepad Replacement gives a fuller explanation than some random gist

      I’ve been using the portableapps version.

      shudder

      I’ve had a few issues lately with some other portableapps wiping out profiles.

      Considering that they modify the binaries without publishing the codebase changes, in violations of the open source license of the software they “distribute”, you’re lucky if losing a profile is all that happens.

      I don’t want that happening with Notepad++, so I want to switch to the regular potable version I just downloaded from here Download Notepad++ v8.9.3.

      Good idea.

      That said, I need to make Notepad++ the system default.

      It seems a mixed bag: wanting it as system default, associated with lots of file types, and using the Shell Extension, but not wanting to “install” it. It might help us give you better advice if you explain what parts of the “install” that you are opposed to. Is it just storing the settings in %AppData% that you don’t like? Or is there something else? The installer can install into any directory, not just Program Files; the installer can choose to not use %AppData% (as long as it’s not installed in Program Files); the installer automatically registers the Shell Extension for you.

      That’s when learned it is not simply a matter of doing it in Settings > Preferences > FIle Associations.
      So, it seems my only alternative is “Choose default apps by file type”??

      You can start with the Settings > Preferences > File Associations. But that uses the ancient method of file association, and modern Windows 11 actively fights against those old-style associations.

      Open With is Windows’ preferred method, because they want to make sure it’s the user, not an over-aggressive installer, that is choosing the default app (and that’s something I applaud them for).

      If you’ve done at least one Open With, then your registry should have an HKEY_CURRENT_USER\Software\Classes\Applications\notepad++.exe “key”. On that key, if you right-click and do a new key as a subkey on it, to create SupportedTypes as HKEY_CURRENT_USER\Software\Classes\Applications\notepad++.exe\SupportedTypes. Inside that, you can do new string values, where the left side is .ext (for whatever extension) and the right side is empty. Windows uses this as the way to hear an app say, “I want to handle this type”, and it helps Windows prioritize the app in the Open With and other things.
      For the individual file-type extensions, Windows stores them in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.XXX\UserChoice (for example, .txt for the .XXX location), in the ProgId=“Applications\notepad++.exe” value. So, if you created a registry file like

      Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txt\UserChoice] "ProgId"="Applications\\notepad++.exe" [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.123\UserChoice] "ProgId"="Applications\\notepad++.exe" [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.456\UserChoice] "ProgId"="Applications\\notepad++.exe"

      and ran that file, it would try to set the chosen application for each of those extensions (.txt, .123, and .456) to use Notepad++. (You would, of course, have to edit that file to have all the extensions that you wanted to choose, and to not use the .123 and .456 dummy extensions). But, again, I think Windows OS notices when someone tries to do that, and it might require you to confirm the choice the first time you double-click on such a file.

      caveat: playing with the registry, through regedit or running .reg files you find on the internet, can bork your system. these are examples that I believe are safe, but you are responsible for your own system.

      I extracted NppShell.dll, but I suppose in this scenario I won’t be using it.

      I guess I’m confused. I thought, by your first sentence, that you wanted to use it. Do you want an Edit with Notepad++ entry in the right-click context menu for every file type, whether or not it’s associated with Notepad++? If so, then register NppShell.dll. If not, then I’m not sure why you brought it up at all.

      Personally, I find that the right-click version is the easiest way for opening files that don’t default to Notepad++ (for example, editing a .bat, since you don’t want to double-click on a batch file to edit it, since that should be reserved for running it). So whether you choose to use the installer, or manually register it in the portable version, I would definitely recommend using the Shell Extension.

      I also need some advice transferring all settings from portableapps.

      copy the config.xml and similar XML files . The User Manual > Upgrading > Upgrading a portable edition talks about the critical and less-critical files for getting settings ported over from one portable to another.

    • donhoD

      Notepad++ v8.9.1 Release

      Watching Ignoring Scheduled Pinned Locked Moved Announcements
      20
      6 Votes
      20 Posts
      14k Views
      PeterJonesP

      @leleganja said in Notepad++ v8.9.1 Release:

      Why do I get these errors when I install Notepd++ with both v8.9.2 and v8.9.1?

      At first glance: it appears that whatever account that is being used to install Notepad++ doesn’t have write-permission to the temp directory that the installer created. That is odd, given that the installer usually asks for Admin privileges to install. But maybe your computer is set up so the Admin account(s) don’t have write permission to the indiviudal user file-areas.

      Try creating a directory someplace where both your normal user and your admin user have write access, and then temporarily set %TMP% to point to that directory. When you run the installer, it should use that new directory instead, and should (I would think) have write-permission there. (My experiments showed it used the alternate location if I set the %TMP% user variable, but not if I set the %TEMP% variable, so you only need to change %TMP%. If you don’t know how to change that variable: click the START menu, type system environtment which will find the Edit the system environment variables option, which you use; click Environment variables button, then in the User variables section, edit TMP to point to the new directory you created; after doing OK a few times, then you can run the installer, and it should use that directory. When done installing, don’t forget to set TMP back to %USERPROFILE%\AppData\Local\Temp in the same manner.)

    • donhoD

      Notepad++ Old Releases Download

      Watching Ignoring Scheduled Pinned Locked Moved Announcements
      2
      6 Votes
      2 Posts
      213 Views
      PeterJonesP

      @donho ,

      Thanks for doing that. It’s good to be able to grab older versions, for historical purposes / comparisons, and for people who are trying to use Notepad++ on machines that still have ancient OS installed and cannot be upgraded (like a bunch of early 2000s electronic-measurement equipment that I used to use)

    • Robk BlueR

      Tidy2 or other HTM L plugins

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      2
      0 Votes
      2 Posts
      165 Views
      PeterJonesP

      @Robk-Blue said in Tidy2 or other HTM L plugins:

      It looks like Tidy2 is a 32 bit plugin and I can’t find a x64 version. Is it able to be used still? Any other options?

      Yeah, Tidy2 hasn’t been updated in more than a decade – it’s essentially abandoned. And as far as I can tell, no one here has grabbed the source code, recompiled for 64-bit, and published it anywhere (that has happened on some other plugins that used to be only 32-bit, if someone here was interested enough in that plugin to do it for themselves and share it with others)

      XML Tools is able to make XML look pretty, and usually works on HTML files as well.

      Other than that, it’s possible to pass the current file to your favorite external command-line code-prettifier (tidy.exe, if you installed HTML Tidy utility on your computer yourself), using either the Run > Run to create a User-defined command, or using a plugin like Pork2Sausage or NppExec.

      See also the FAQ: How do I use Notepad++ to Compile my Source Code (or Convert My Text)?, which has a section on Converting text (which is what things like tidy.exe are doing), and explains how to use the plugins mentioned in the previous paragraph to accomplish conversion tasks.