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

      Is There a Way to Prevent Pasted Text from Spreading Out with Rows of Spaces?

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      16
      0 Votes
      16 Posts
      924 Views
      mpheathM

      @Troglo37 said in Is There a Way to Prevent Pasted Text from Spreading Out with Rows of Spaces?:

      Is there a way to make it automatic?

      If register a callback to respond to the notification SC_MOD_INSERTCHECK then it can be automated to change the text before insertion. This example code can be added to the user startup.py file. Make sure the PythonScript configuration is set to ATSTARTUP.

      import re def event_paste_single_line(args): SC_MOD_INSERTCHECK = 0x100000 if args['modificationType'] & SC_MOD_INSERTCHECK: text = args['text'] if ' episode\r\n ' in text: result = notepad.messageBox('Paste text as single line?', 'InsertCheck', MESSAGEBOXFLAGS.ICONQUESTION | MESSAGEBOXFLAGS.YESNO) if result == MESSAGEBOXFLAGS.RESULTNO: return text = re.sub(r'\s+', ' ', text) editor.changeInsertion(text) editor.callbackSync(event_paste_single_line, [SCINTILLANOTIFICATION.MODIFIED])

      I added a messagebox to allow a choice rather then being fully automatic with the text change.

    • BB

      Search accented and non-accented characters alike with one simple setting?

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      8
      0 Votes
      8 Posts
      184 Views
      guy038G

      Hi, @b, @peterjones, @coises and All,

      Let’s consider the Spanish word comparación and its various forms below, pasted in a new tab :

      comparación cömparÅciõn CömꝕarÅcⓘoñ ȻOℳₚA⒭ⱯℭᴵꝊᵰ ƆºᶆⱷǞℝȺꜿᵼᴓɲ ɕƢꟽⓟǻꝝⱭƆⅈᴗN

      Note that I have deliberately exaggerated the shapes and modified the case of the possible characters !!

      If you do any of the six N++ searches, below, against the six lines in the new tab, you’ll see that ONLY the two first regexes, which refer to standard equivalence clases, can find all the lines.

      SEARCH (?=[[=c=]])\X(?=[[=o=]])\X(?=[[=m=]])\X(?=[[=p=]])\X(?=[[=a=]])\X(?=[[=r=]])\X(?=[[=a=]])\X(?=[[=c=]])\X(?=[[=i=]])\X(?=[[=ó=]])\X(?=[[=n=]])\X

      SEARCH (?=[[=c=]])\X(?=[[=o=]])\X(?=[[=m=]])\X(?=[[=p=]])\X(?=[[=a=]])\X(?=[[=r=]])\X(?=[[=Å=]])\X(?=[[=c=]])\X(?=[[=i=]])\X(?=[[=õ=]])\X(?=[[=n=]])\X

      SEARCH (?=[[=C=]])\X(?=[[=ö=]])\X(?=[[=m=]])\X(?=[[=ꝕ=]])\X(?=[[=a=]])\X(?=[[=r=]])\X(?=[[=A=]])\X(?=[[=c=]])\X(?=[[=ⓘ=]])\X(?=[[=o=]])\X(?=[[=ñ=]])\X

      SEARCH (?=[[=Ȼ=]])\X(?=[[=O=]])\X(?=[[=ℳ=]])\X(?=[[=ₚ=]])\X(?=[[=A=]])\X(?=[[=⒭=]])\X(?=[[=Ɐ=]])\X(?=[[=ℭ=]])\X(?=[[=ᴵ=]])\X(?=[[=Ꝋ=]])\X(?=[[=ᵰ=]])\X

      SEARCH (?=[[=Ɔ=]])\X(?=[[=º=]])\X(?=[[=ᶆ=]])\X(?=[[=ⱷ=]])\X(?=[[=Ǟ=]])\X(?=[[=ℝ=]])\X(?=[[=Ⱥ=]])\X(?=[[=ꜿ=]])\X(?=[[=ᵼ=]])\X(?=[[=ᴓ=]])\X(?=[[=ɲ=]])\X

      SEARCH (?=[[=ɕ=]])\X(?=[[=Ƣ=]])\X(?=[[=ꟽ=]])\X(?=[[=ⓟ=]])\X(?=[[=ǻ=]])\X(?=[[=ꝝ=]])\X(?=[[=Ɑ=]])\X(?=[[=Ɔ=]])\X(?=[[=ⅈ=]])\X(?=[[=ᴗ=]])\X(?=[[=N=]])\X

      In constrast to the last release of the Columns++ plugin, independant of Scintilla and doing true UTF-32 searches, which is able to match the six lines of our example, whatever the regex used among the six regexes above !

      This example clearly demonstrates that it’s possible to perform a search without considering case and/or accentuated characters with the v1.3.1 release of Columns++ plugin ;-))

      Best Regards,

      guy038

    • Mateusz KowalskiM

      Clipboard content is lost after using Ctrl+L (Delete Line)

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

      @Evelyn-Walker ,

      I tested the behavior you described. In Notepad++ the Ctrl+L (Delete Line) command

      That is wrong terminology, as already described above. Ctrl+L is Line Cut, not Line Delete. To use the wrong terms causes confusion for everyone. From the OP, it was acceptible, because they didn’t know better. But to post like you are an authority, but to use the incorrect terminology, is detrimental to yourself and anyone who reads the answers here.

      internally performs a cut-like operation,

      Of course it does. It’s literally Line Cut, so it definitionally affects the clipboard

      which means the deleted line is temporarily placed into the clipboard.

      It’s no more “temporarily” on the clipboard than any Ctrl+C or Ctrl+X is “temporarily” in the clipboard. It’s in the clipboard until something else replaces it, just like every other clipboard action.

      Use Ctrl+Shift+L (if configured) or another plugin/command that deletes the line without copying it.

      Did you come up with that alternative all on your own, or did you just reiterate what @guy038 and I had already said?

      Alternatively, copy the text again after performing line deletions if you still need it in the clipboard.

      That’s horrible advice.

      If preserving clipboard content during line deletion is important, it could be considered as a feature request rather than a bug.

      No it couldn’t, because the feature already exists. Line Delete already exists as Ctrl+Shift+L: use Line Delete if you don’t want to affect the clipboard, and Line Cut if you do want to affect the clipboard.

      @Evelyn-Walker , make sure you are not using LLM or GPT or any other AI to write your posts for you: that’s expressly forbidden in this forum.

    • Murray Sobol 1M

      Idea of a new installation routine

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      6
      0 Votes
      6 Posts
      98 Views
      PeterJonesP

      @Murray-Sobol-1 said in Idea of a new installation routine:

      @PeterJones said in Idea of a new installation routine:

      No one should ever download a 32bit installer for modern OS. For any app. (Modern OS don’t come in 32-bit versions anymore, so I don’t understand why apps still bother distributing the 32-bit versions)

      I agree with the above statement, however when I ask for an update by clicking Downloads I see this section:
      Download 32-bit x86
      Installer | GPG Signature
      Portable (zip) | GPG Signature
      Portable (7z) | GPG Signature
      Mini-portable (7z) | GPG Signature

      Why is this even being distributed anymore??

      Because my statement was just my opinion, and not everyone agrees with it. Because there are some people who mistakenly think they need a 32-bit even though they have a 64-bit OS. And there are some people who have some unmaintained plugin that only comes in 32-bit (*). And because the developer has never decided to cut off those poor, unfortunate souls.

      (*: aside: anytime I come across someone like that, I do a bit of research to help them find an alternative, or find someone who has done an unofficial recompile of the plugin for 64-bit. there are very few public plugins that have no 64-bit version and no alternative)

      But that’s why we lobbied to put the 32-bit below the 64-bit, so the 64-bit gets the prominence it deserves – and why I rejoiced when it happened. Someone downloading N++ for the first time will see the 64-bit first, and will likely download that. Someone updating N++ should use the menu or auto-update, and never have to go back to the website.

    • H

      Harmandeep Singh Kandhari - How Can I Recover Unsaved Files After Notepad++ Crash?

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      4
      0 Votes
      4 Posts
      173 Views
      Evelyn WalkerE

      Hi Harmandeep,

      Welcome to the community.

      Yes, there is a good chance you may still be able to recover your unsaved work. Notepad++ has a built-in backup and session snapshot feature that often restores files after a crash.

      First, try reopening Notepad++. If the session snapshot feature was enabled, the file may reopen automatically with the content you were working on before the crash.

      You can also check the backup folder manually. Go to:
      C:\Users\YourUsername\AppData\Roaming\Notepad++\backup
      Sometimes Notepad++ stores temporary backup files there, which may contain the unsaved content.

      To reduce the risk of losing data in the future, it’s a good idea to enable a few settings:

      Open Settings → Preferences → Backup. Enable Session snapshot and periodic backup. Choose Remember current session for next launch. Set a backup interval such as every 7 or 10 seconds.

      With these options enabled, Notepad++ will automatically save temporary snapshots of your work and restore them if the program closes unexpectedly.

      Hopefully your file is still in the backup folder. Let us know if you need help locating it.

      Regards.

    • Guido ThelenG

      C# Plugin for ARM64

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      2
      1 Votes
      2 Posts
      63 Views
      rdipardoR

      @Guido-Thelen said in C# Plugin for ARM64:

      DNNE (Dot-Net Native Exports) is a modern NuGet package that generates a native C wrapper DLL around your .NET 8 assembly. It uses [UnmanagedCallersOnly] attributes to define exports and supports ARM64 natively.

      I assume you mean this?

      I tried it, and quickly ran into the limitation that custom types require user-defined C-language equivalents, which are passed to the code generator as strings of C code(!)

      So, for example, to export the setInfo function from a plugin, you would provide a definition of the C++ template’s NppData structure that compiles to the C99 standard. (The generator can emit C or Rust, but not C++, in the interest of portability, I guess.) Then you annotate the method with your type definition code, and apply the C type specifier to the corresponding C# type:

      [UnmanagedCallersOnly] [DNNE.C99DeclCode("#include <windows.h>\r\nstruct NppData { HWND _nppHandle, _scintillaMainHandle, _scintillaSecondHandle; };")] public static void setInfo([DNNE.C99Type("struct NppData")]NppData theData) { // use theData ... }

      This would be quite fragile against API changes, unless you can produce the code strings automatically from the Notepad++ headers.

      It’s much easier to install a template package and target ARM64 with Native AOT. You can even start a project in Visual Studio:

      vs.npp.dotnet.templates.start.screen.png

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

    • K

      Plugins Admin gets Curl Error

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

      @KelltimeOG
      Fixed in https://github.com/notepad-plus-plus/wingup/commit/5d89e486a5cb63251b8ed0b0e9f441a9774709ff
      The fix will be in WinGUp v5.4.1, which is included in Notepad++ 8.9.3 release.

    • Robk BlueR

      Change specific tags in HTML code

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      1
      0 Votes
      1 Posts
      57 Views
      No one has replied
    • Z

      NppCSharpPluginPack: how to add toolbar buttons?

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      1
      0 Votes
      1 Posts
      42 Views
      No one has replied
    • 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
      157 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.

    • donhoD

      v8.9.3 Release Candidate will be available in about one week (2026-03-14)

      Watching Ignoring Scheduled Pinned Locked Moved Announcements
      1
      4 Votes
      1 Posts
      508 Views
      No one has replied
    • 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.