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 · · · – – – · · ·
      19
      0 Votes
      19 Posts
      1k Views
      PeterJonesP

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

      I don’t see anywhere in the FAQ how to apply an icon to the script.

      Reading the manual yourself would be more beneficial. But, to help you:

      Plugins > Python Script > Configuration… Choose either Machine Scripts (if your script is in c:\program files\notepad++\plugins\PythonScript\scripts hierarchy) or User Scripts (if your script is in %AppData%\Notepad++\plugins\Config\PythonScript\scripts hierarchy, where it should be for normal usage) Click on your script The Add button above the Toolbar icons panel at the right should be available now; click Add, and the script will be added Click the script in that panel, and click Set Icon…, and navigate to whatever 32x32 BMP or ICO you want to use If you exit Notepad++ and run it again, that script will have an button on the toolbar, using whatever icon you chose (or the Python icon if you didn’t choose one)

      Or, since you said,

      there aren’t any unused ones available under Plugins > Customize Toolbar

      If you prefer using the Customize Toolbar, you can. However, there’s probably confusion that you need cleared up. Customize Toolbar has two separate ways of customizing the toolbar

      It can manipulate the icon for tools that are already on the toolbar, or a few other builtin commands, using Plugins > Customize Toolbar > Customize Toolbar… interface, which you are likely familiar with I assume this is the one where you say, “there aren’t any unused ones available”. I cannot imagine that you’ve actually enabled another couple-dozen buttons from its list, so that there are no other “available toolbar buttons”, as that toolbar would be so full as to be unusable. On the other hand, that’s the only thing I imagine that you could mean by such a sentence. It can add an icon for other builtin or plugin tools using its Custom Buttons Use Plugins > Customize Toolbar > Custom Buttons to add a checkmark to that option. It will tell you that it will take effect the next time you start Notepad++. You can use Plugins > Customize Toolbar > Help - Custom Buttons to read more about the syntax of the file, though the file itself will have comments that help you set things up exit Notepad++ open Notepad++ File > Open %AppData%\Notepad++\plugins\config\CustomizeToolbar.btn, which was created automatically when you checkmarked the option in the earlier step Use something akin to the followingPlugins,Python Script,Scripts,No New Lines,*R:PN,*R:PN,*R:PN That setup assumes you named your script No New Lines, and that you want it to show up as a pseudo-icon with red background, with the text “PN” for “Paste: No New Lines”: d2e3ec03-e741-4d7f-a0f5-e92ca710deb1-image.png If you actually want icons, put NoNewLines.bmp, NoNewLines_light.ico, and NoNewLines_dark.ico in the same directory as CustomizeToolbar.btn Important Things To Note To add to toolbar, pick one of the two methods – either use the PythonScript Configuration… dialog, or use the Customize Toolbar’s Custom Buttons feature. DON’T USE BOTH AT THE SAME TIME If you use the script I suggested, using a button makes sense. If you use the script @mpheath suggested, it just needs to be run ATSTARTUP, and you won’t need a button at all, because it will intercept the normal paste command.
    • Carlos SánchezC

      [New plugin] Smart Math

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

      @Carlos-Sánchez said in [New plugin] Smart Math:

      I’m a bit lazy and haven’t got a clue

      I can’t solve the first part, but for the clue:

      it’s just a PR to the nppPluginList project. Since you’re working in GitHub already, I assume you know how to do the PR fork the nppPluginList repo, create your own branch in that branch, edit pl.x64.json to link to the 64-bit version, and pl.x86.json to link to the 32-bit version the id required in the JSON is just the SHA256 hash, which GitHub provides for you:
      fd4a838f-9724-477d-b755-24836141dc88-image.png once you have edited both files in your branch, submit the PR from that branch
    • donhoD

      You've a lot of reasons to hate Notepad++

      Watching Ignoring Scheduled Pinned Locked Moved Boycott Notepad++
      91
      5 Votes
      91 Posts
      154k Views
      MJKlodt747M

      @donho Hey!! Don’t ever tell me whuddafugg to-do… I’ll hate WHOEVER I feel like 🤌🏻, WHATEVER I feel like 🤌🏻, WHEN–THA-FUGGG-EVER I FEEL LIKE! 🤌🏻🤌🏻🤌🏻

      Good day sir…🫵🏻 I SAY GOOD DAY!! 🧜🏻‍♂️

    • Guido ThelenG

      C# Plugin for ARM64

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      2
      1 Votes
      2 Posts
      93 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