• Need clarification about "built-in" language lexers

    General Discussion
    4
    0 Votes
    4 Posts
    254 Views
    pbarneyP

    @PeterJones said in Need clarification about "built-in" language lexers:

    So I asked ChatGPT why,

    Why would you believe that atrocity?

    It was probably an off-the-cuff question, but I figured I’d take it seriously. I know that this is going off-topic, so feel free to cull this response if you like.

    To tweak the old Russian maxim, it’s very much a case of “distrust until verified” (which is why I posted my question instead of just swallowing what the thing spit out.

    I’m not particularly a fan of them, and I honestly believe that in time, we (as in humanity) may come to regret their invention and our likely inevitable overdependence on them.

    But I’m also not an ignorant neophyte. I’m actually very well aware of the limitations and problems with LLM’s, probably more than most people, and despite that, I’ve found them to be useful in some contexts.

    First, you’re not wrong to call them “random text generators,” but that really is an oversimplification. It’s not just a flat index of word frequencies. Tehy’re trained with billions (or even trillions) of parameters that encode patterns across syntax, semantics and reasoning heuristics. From a purely mathematical point of view, it’s actually pretty intersting. But saying it’s “just statistics” is a bit like saying the human brain is “just firing neurons.” Yeah, it’s technically true, but it misses the interesting part.

    So yes, because they are probabilistic sequence models, they are perfectly capable of fabricating “facts” (i.e., hallucinations, especially with multi-dimensional requests or as the context window gets filled up), making overgeneralizations like missing edge cases, or have issues with compression bias, shallow chain-of-reasoning (although this one is getting a little better), ambiguity drift, context inference biases, fidelity drift when repeatedly iterating through details, context window size limitations for long conversations, etc. I have some experience dealing with each of these limitations to some extent.

    So I know all that going in, and since I do, I know not to rely on them as primary sources, and also how to account for many of those problems and a number of strategies to somewhat limit and mitigate the problems (e.g., authoritative source anchoring, chunking, forcing tabular output, explicitly prompting for blanks instead of it making guesses, etc). If I’m doing anything serious, I’ll use all the tools at my disposal, but I still know that if the output isn’t testable, it’s not trustworthy and I know not to rely on it for expertise; it’s just a tool I use to speed up my info gathering. I think of it as supplementary rather than authoritative.

    So it’s an occasionally useful tool that’s saved me some time by giving me a starting point to quickly gather ideas and point me to things I might not have thought of before I check with reliable sources (like you) that can actually confirm or invalidate them.

    I don’t expect to change any minds about it, and in truth, I don’t really even want to, but you always take the time to thoroughly answer people’s questions, and I wanted to respect that in turn.

  • notepad++ flagged as malicious, should i worry?

    Security
    4
    0 Votes
    4 Posts
    2k Views
    Zhane HernandezZ

    @xomx Thanks for your input, the analysis does seem to be a bit on the… overly cautious or paranoid side.
    maybe it’s time to find a new resource for risk analysis!

  • 0 Votes
    5 Posts
    212 Views
    NicholasN

    Here is my post about changing file type icons in the registry. It also changes the file type descriptions.

  • 0 Votes
    8 Posts
    170 Views
    Neko_KaiohN

    @pbarney Finally, some actual assistance on this forum. Thank you!

    The code I mentioned that was spat out included the <pre>, just in a different format. So I guess my fiddling was on the right path. I appreciate you taking the time to reply though, it gives me more info on what that code is/does.

  • Notepad++ v8.8.5 Release

    Pinned Announcements
    12
    2 Votes
    12 Posts
    10k Views
    hdtythgd sgxgxvbH

    @PeterJones
    Thanks.

  • WebEdit Plugin for NPP x64 ?

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

    Hello again!

    Small update: it looks like I got the repo (discussed in the PR), so in the future I’ll try to keep the WebEdit plugin up to date. 🎉

    This is a huge honor for me, as WebEdit has been a cornerstone of Notepad++ for me for a very long time, and I still actively use it!

    Although I’m primarily a PHP developer, since Modula-2/Oberon-2 is a PASCAL-like language (no offense intended!), and C# is hopefully close to my plugin written in C++ (I’ll continue this too!), I hope I can rise to the task. 🫡

    So the v2.7.rc.3 release above (with a slightly different approach) ;) is still alive.

  • 2 Votes
    2 Posts
    321 Views
    Vitalii DovganV

    @Coises
    Yes.
    This is why CNppExec::convertSciText uses the actual Scintilla’s encoding nSciCodePage to convert Scintialla’s text to a desired encoding:
    https://github.com/d0vgan/nppexec/blob/develop/NppExec/src/NppExec.cpp#L2516

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

    Notepad++ & Plugin Development
    7
    0 Votes
    7 Posts
    1k 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.

  • Style typescript

    General Discussion
    2
    0 Votes
    2 Posts
    482 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
    508 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
    981 Views
    Charles BillowC

    @Coises Thanks

  • New Vim modal editing plugin release

    General Discussion
    3
    0 Votes
    3 Posts
    821 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.

  • -4 Votes
    8 Posts
    658 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
    231 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
    69 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
    1k 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?