• 0 Votes
    1 Posts
    8 Views
    No one has replied
  • 0 Votes
    3 Posts
    60 Views
    PeterJonesP

    @MidnightGarden said in Separate file association names?:

    Or is that just how it works and there’s not much to do about it.

    It’s the way that Windows prefers it to work, and over the years they have made it progressively harder to do it another way. It’s technically possible for someone with a knowledge of how file associations work in the registry (*) to be able to create their own filetypes, and associate those filetypes with Notepad++… but it’s way beyond the scope of this forum to go into the nitty-gritty details.

    You can get some hints from various registry hacks that have been shared over the years in the forum, but this isn’t really the right place to ask. Other than knowing the path to the notepad++ executable, usually c:\program files\notepad++\notepad++.exe, the entire process is Notepad++-agnostic, so even if you find an example for some other app, the basic instructions would still apply. (It wouldn’t surprise me if your favorite search-engine’s AI were able to get you started in the right direction, if you’re willing to take a risk; if you’re lucky, it might even still provide you links to human-generated/vetted instructions. But whatever wrote the instructions, editing your registry can brick your system, especially if you don’t understand what you’re doing, so buyer beware.)

    *: there’s at least 3 or 4 different ways it’s been handled over the years, and it’s a complicated mess trying to dig into it

  • 0 Votes
    4 Posts
    20 Views
    PeterJonesP

    @Neko_Kaioh ,

    still confused on why it merged in the first place.

    That’s the way HTML works: if you put in text in paragraphs (or leave it “unwrapped”, just inside the <html> tags with no wrapping paragraphs or divs or anything), then the browser collapses all the whitespace (including spaces, tabs, and newlines) into single space characters. If you want text in an HTML document to honor the formatting of a block of text, then you need to wrap it in <pre>...</pre>, or you need to set a CSS white-space style on your specific block or class that, where a value of pre would preserve all the spaces and newlines, or pre-line would collapse multiple horizontal whitespace (spaces and tabs) down to one space, but still preserve newlines.

    This is a fundamental concept of HTML, and has nothing to do with Notepad++ itself. (You can tell this because you would have gotten the same results if you were using Windows notepad.exe or any other text editor to edit the text into the HTML file.) If you need further help with HTML-specific questions, you will need to find a forum dedicated to HTML, or a stack overflowing with all sorts of experts – the focus of this forum is on Notepad++ itself, not on the particulars HTML (or whatever else you might be typing).

  • Handling Ctrl+C in a c++ plugin dialog

    Notepad++ & Plugin Development
    7
    0 Votes
    7 Posts
    814 Views
    CoisesC

    @PeterJones said in Handling Ctrl+C in a c++ plugin dialog:

    I interpreted as wanting to have a keyboard shortcut specific to an action inside the dialog.
    […]
    It would very much surprise me if it weren’t possible for a plugin to do that (though I cannot think of any off the top of my head that do so). But whether “subclassing” or some other strategy is the right way to implement the shortcut capture is beyond me.

    (Following based on theory/understanding. I have not actually tried to do this.)

    Subclassing the NPP window would be horrific way to go about this (if it would even work at all). Making shortcuts work specifically in a plugin window is a bit of an awkward problem, because (as far as I can tell) there is only one accelerator table for an entire running program — and Notepad++ already “owns” that table.

    In a modal dialog or a non-modal window that was registered with NPPM_MODELESSDIALOG it wouldn’t work at all, because messages for those don’t go through TranslateAccelerator. The message would get sent to the window/dialog. This is actually the right way to go, but subclassing the main NPP window would be irrelevant, because the message would never get to that window; it would be dispatched to the plugin window or one of its controls.

    For a non-modal window without NPPM_MODELESSDIALOG, the shortcut key would still send whatever menu command was assigned to it. In that case, a subclass procedure could check whether the keyboard focus is in a window belonging to the plugin. If it is, process it; if it isn’t, pass it through normally. But note that you’d be catching the command, not the shortcut. Your command would always take over from the NPP command, regardless of whether it was by menu, by tool button, or by whatever shortcut key the user assigned to the NPP function.

    For modeless dialogs that don’t register, NPP now works around this for cut, copy and paste by sending WM_CUT, WM_COPY and WM_PASTE to the window/control with keyboard focus when one of those commands is invoked and focus is not in an NPP-managed window or control. Note that if you change the shortcut for one of those commands, the dialog will respond to the new shortcut. (It will respond to the “normal” shortcut as well if and only if that shortcut isn’t assigned to a Notepad++ command. Scintilla assignments don’t count; that’s why the problem didn’t show up until the shortcuts were moved from Scintilla to Notepad++.)

    So to get it right, you have to register the window if it is modeless, and you have to pick up the key combination in your plugin code. How to pick it up is a bit of a pain in the butt, because usually the main window (typically a dialog box) won’t have focus, so the keystrokes will go to whatever control does have focus — unless the dialog manager captures it and applies its own logic (such as it does for the tab key and for Alt+ accelerators).

    I still haven’t found a clear and complete description of what the dialog manager does when the message loop calls IsDialogMessage. Part of it is bound up with WM_GETDLGCODE, which is sent to controls — not the dialog procedure — which further complicates things. Subclassing every control which could have focus when you want your key combination to work would probably be necessary. I suspect some key combinations cannot be captured, but I don’t know that for a fact.

    It’s messy. Finding another way — like adding a button for your action and then underlining a letter so that Alt+letter will activate it — is likely to be a lot easier and less fragile. (If the action is control-based, rather than independent of which control in your plugin has focus, then of course the way you did it is correct.)

  • Column Mode Indent?

    General Discussion
    12
    0 Votes
    12 Posts
    2k Views
    Anonymous UserA

    @PeterJones That fixes everything! Thank you so much! Apparently I need to be better about updating N++ plugins.

  • Notepad++ v8.8.5 Release

    Pinned Announcements
    9
    2 Votes
    9 Posts
    9k Views
    Lycan ThropeL

    @donho ,
    You’re welcome and thanks to you too.
    I saw it’s been about a month since the annoucement and I realize, unless you find a showstopper, usually 2 weeks later it’s update triggered, and I didn’t see any discussions of showstoppers, which is why I asked. :-)

    I got it updated since I check before I go to bed. :-)

  • Style typescript

    General Discussion
    2
    0 Votes
    2 Posts
    264 Views
    PeterJonesP

    @Augusto-Cesar-Santini ,

    Under normal circumstances, TypeScript is not “blank”:
    f4dfe6ae-b151-473c-bac9-4dbd1800cd34-image.png

    What Theme are you using? Default (stylers.xml) or one of the other Themes?

    Please note that themes and stylers.xml aren’t updated automatically when you update Notepad++, so your theme might be out of date, as described in the themes section of the user manual . But some themes, even fully up-to-date, are missing many of the Languages that stylers.xml or the DarkModeDefault theme provide. In that case, I recommend using Plugins > Plugins Admin to install the ConfigUpdater plugin, which can find any languages that are missing from your theme and put in dummy values; after a restart of the app, there will at least be entries, even if the colors aren’t the best or necessarily distinguished from each other.

  • 0 Votes
    2 Posts
    321 Views
    Alan KilbornA

    @jeddahcpu said :

    I can’t make text from right to left in new versions

  • Start NP++ with a blank document

    General Discussion
    3
    0 Votes
    3 Posts
    799 Views
    Charles BillowC

    @Coises Thanks

  • New Vim modal editing plugin release

    General Discussion
    3
    0 Votes
    3 Posts
    624 Views
    guy038G

    Hello, @h-jangra, @peterjones and All,

    Peter, I suppose that the @h-jangra’s project is defined in :

    https://github.com/h-jangra/NppVim

    And that his first release can be donwloaded from :

    https://github.com/h-jangra/NppVim/releases/tag/v1.0.0

    Of course, I have not tested this plugin yet !

    Best Regards,

    guy038

  • Can't print with notepad++

    General Discussion
    13
    0 Votes
    13 Posts
    9k Views
    PeterJonesP

    @Coises said in Can't print with notepad++:

    I’d say No Background as the default,

    Congratulations. That’s the default already.

    And, as you say, the warnings probably aren’t worth the effort.

    have a separate theme for printing which doesn’t change when you change the display theme

    Ick. As I said above, that breaks the expectation set up by literally every other application I can think of having printed from in the last decade or two. If the visual area has color inherent to the display, the general expectation, in my experience, is that it will print in that color… not some other set of colors which I have to pick or set somewhere other than my primary color choices.

    Printing of text files to dead trees should be rare enough that most people don’t care; printing to PDF, you want the color to match exactly. Since Notepad++ cannot tell which you are doing (it’s the OS, not the app, that knows what printer you send to), there’s another reason to not have a separate printing theme or other such workaround.

    People getting colors the same between screen and print should be the default; anything else breaks reasonable expectation. (Even “no background” being default breaks that expectation, IMO.)

  • Pinned Tabs: Now and Future

    General Discussion
    35
    2 Votes
    35 Posts
    8k Views
    Bruce JakewayB

    I’m interested in having sticky tabs, ie, tabs that will stay on screen, regardless of how right or left you scroll in your tab bar. I could use multi-line tabs, but that takes up vertical space. This is kind of like freezing columns in Excel.

  • WebEdit Plugin for NPP x64 ?

    Help wanted · · · – – – · · ·
    5
    0 Votes
    5 Posts
    1k Views
    Richárd StockingerR

    Hello everyone!

    There were a few annoying bugs in the latest release, I’ve fixed them in a Pull Request.

    In case my PR is not accepted, I’ve made a v2.7.rc.3 release available in the forked repository. I hope this helps others too!
    https://github.com/Krazal/WebEdit/releases/tag/v2.7.rc.3

  • -4 Votes
    8 Posts
    653 Views
    Helder MagalhãesH

    @webforpcnet seen similar issues before, also with other tools. Thing is accessing network drives (and even external plugged drives) triggers security and caching tools such as anti-virus, status utilities such as TortoiseGit, etc.

    A separate check needs to be done using another crawler, such as a simple script dumping the file contents. Paste something like the following in cmd.exe:

    @echo off rem Position in the target base directory pushd \\NAS\shared\code\ rem Iterate through all files in the subtree, assume all files, "*.*" for /R %i in (*.*) do ( echo Dumping '%i' rem Force reading file contents (but don't output them!), same as Notepad++ would type "%i" >nul ) popd

    (I’m assuming the \ special character sequence got escaped in the report.)
    If the speed is substantially better than Notepad++ then it might mean there’s a problem (this quick/dirty check cannot assess for any whitelisting or heuristics in the environment).

  • 0 Votes
    6 Posts
    2k Views
    Lycan ThropeL

    @PeterJones ,
    Good point. Luckily, it’s still one of a handful of functionList files…at least until you figure out how to mass produce those. :-)

  • 1 Votes
    4 Posts
    230 Views
    PeterJonesP

    @Rich said in XML - insert rows without nesting:

    I was missing a single “/”

    I hate being bit by something so small but dangerous. :-)

    If you don’t already have it, XML Tools plugin can help with XML syntax check: it can be automatic or on-demand. (If you are using XML>10Mb, you might not want to automatically do the syntax and validation checks; you can turn on/off those options in the XML Tools menu). But I think it might have helped you find that problem.

    Thanks for help!

    Glad to help.

  • 0 Votes
    2 Posts
    66 Views
    CoisesC

    @shodanx2:

    Take a look at the documentation for Columns++ and see if it will work for you.

    One of my goals when I wrote it was to never have to open a spreadsheet program again. (I hate them with a passion.)

    It won’t draw the table lines as in your examples; instead, it depends on using tabs to separate columns. The Elastic tabstops option makes tabs adjust to the width of the column content.

    You can do various column-oriented operations, such as sorting, searching, aligning left, right or numeric, and creating new columns based on calculations from other columns.

    You can install Columns++ from Plugins Admin.

  • Wrong font used

    General Discussion
    3
    0 Votes
    3 Posts
    890 Views
    CoisesC

    @Mark-Boonie

    It looks to me like Notepad++ can’t load the font you’ve chosen, and it has fallen back to a default system font. I might be missing something, but the font of your text looks to me to be the same as the font that shows the filename in the tab and the title bar.

    Can you verify that if you select a really common, system-supplied monospaced font, like Courier New, you get what you would expect?

    What is the font you’re trying to use? If appropriate, could you tell us where you got it?

  • 1 Votes
    3 Posts
    280 Views
    G

    @PeterJones said in How to open documents in different windows?:

    Settings > Preferences > Multi-Instance and Date > ☑ Always in multi-instance mode – every time you use Windows Explorer to double-click on a file (or similar) to open it with Notepad++, it will go in a new instance. (This will not change the behavior of File > Open inside Notepad++, which always opens in a new tab, not a new instance.)

    Thanks for the answer.
    Everything works.
    Issue resolved.
    Notepad++ is my favorite text editor.

    Special thanks to you for the clarification about the publication of posts and for additional information on the topic of the question.

  • JSON String Escape / Unescape

    Notepad++ & Plugin Development
    11
    0 Votes
    11 Posts
    17k Views
    Mark OlsonM

    @Artem-Repko
    @PeterJones correctly pointed to the D&ump selected text as JSON string(s) and Dump JSON string(s) as ra&w text commands in JsonTools. I just wanted to add this comment because I just added new documentation for both of those commands.