• 0 Votes
    10 Posts
    680 Views
    K

    @Coises : My thoughts about the topics:

    “IsDialogMessage” (“standard Windows way of separating messages that are directed to a non-modal dialog or any of its child controls from the normal flow through the message loop”) and “WM_GETDLGCODE” (“If keyboard focus is in a control, that control will decide which keys it wants and which keys should be processed as container navigation”):

    Basically the Lazarus component library (LCL) acts as a fully qualified message loop system that is able to react on nearly each message and notification within a windows message loop, nearly all WM_, eg. WM_KEY(down,press;up;…) can be detected and processed (*).
    Normally it’s hard to detect any lacks here imo. However i initially looked into that hierarchy, as here, like everywhere else in the programming world, some business rules might have been come into play for to negate a message (like eg. an app can do when it nulls out an Enter Key for to suppress a beep; Key := #0).

    (*) At least in the win32 “widgetset” as one within all those platforms: all-interfaces win32-interface
    It depends a bit on whether someone compiles “cross-platform” or for an OS-specific build, ie. “win32”):

    But - right, maybe that is it what matches your pointing! - there is no explicit call of “IsDialogMessage” itself within the LCL hierarchy (i grepped here)!
    But it is a function that is known and predefined in the free pascal compiler system (FPC) though. And, so, there really low-level based apps can be written (and do exist) without the LCL, using basic TranslateMessage, DispatchMessage etc. which are calling “IsDialogMessage” explicitely.
    “Matches your point” in so far as it makes understandable why without NPPM_MODELESSDIALOG (which calls “IsDialogMessage”) “most shortcut keys will be intercepted by Notepad++” - with other words, let NPP act as a gate-keeper for messages here.

    In sum, with your explanations it’s much more understandable now for me what’s going on (hope so).
    And why “RegisterForm” (-> the NPPM_MODELESSDIALOG-Send) in the docking formcreate now lets work again F2 (and Ctrl-c, Ctrl-v & co.) by the plugin. Otherwise the NPP gate-keeper would decide itself and won’t pass messages to the plugin that it claims for own usage, e.g as defined in the shortcut mapper.

    I hope I’m somehow on the right track here :-)
    I’d use this solution, it does indeed remove the issue :-)
    (i have to sort out a few subsequent flaws now, but those are assumingly outside the current thread)

  • Feature request - Make font size in tabs adjustable

    Locked General Discussion
    2
    1 Votes
    2 Posts
    178 Views
    Mark OlsonM

    There’s another topic on this subject; it would probably be best if further discussion happened there.

  • 0 Votes
    3 Posts
    237 Views
    PeterJonesP

    Additional info:

    First, once I was on my computer this morning, I was able to confirm that ino is already in the default list of extensions for C++, so you don’t need to add it to user ext. Sorry for my poor memory.

    Notepad++, by default, doesn’t know the Arduino-specific keywords/constants. But the Style Configurator has 8 “USER KEYWORDS #” styles for C++, and you can add your own keywords into User-defined keywords box for each, and define your own colors.

    Before:
    e1e7f4e3-e45c-4e1c-853d-82658355ecfd-image.png

    After:

    Change USER KEYWORDS 1 to green, with setup loop Change USER KEYWORDS 2 to orange, with pinMode digitalWrite delay begin Change USER KEYWORDS 3 to bold+orange, with Serial Change USER KEYWORDS 4 to aqua, with HIGH LOW OUTPUT

    d2149d3c-47bd-4c08-a4e6-46bfc6b44aec-image.png

    You would have to go through and figure out any other keywords (I don’t currently have a list of arduino keywords, though you could probably search the forum for “Arduino” and maybe find something).

    Ah, there, I knew it must exist: this post had a link to a zipfile with an old UDL for Arduino. From it, I was able to extract some lists of keywords, paste them into Arduino IDE 1.8.18 to see how it categorizes them, then re-allocate them:

    USER KEYWORDS 1:loop setup USER KEYWORDS 2:ANALOG_PORT BSSID Client END_SYSEX File Firmata MAX_DATA_BYTES REPORT_VERSION RSSI SSID START_SYSEX TOTAL_PORTS WiFiClient WiFiServer Wire abs accept acos analogRead analogReference analogWrite asin atan atan2 attach attachInterrupt attached autoscroll available begin beginPacket beginTransmission bit bitClear bitRead bitSet bitWrite blink blinkVersion callbackFunction ceil clear click close connect connected constrain cos createChar cursor degrees delay delayMicroseconds detach detachInterrupt digitalRead digitalWrite direction disconnect display encryptionType end endPacket endTransmission exists exp find findUntil floor flush gatewayIP getResult getSocket highByte home interrupts isListening isPressed leftToRight listen localIP log lowByte macAddress map max micros millis min mkdir move noAutoscroll noBlink noCursor noDisplay noInterrupts noTone onReceive onRequest open overflow parseFloat parseInt parsePacket peek pinMode position press print printFirmwareVersion printVersion println processInput pulseIn radians random randomSeed read readBytes readBytesUntil readMicroseconds release releaseAll remoteIP remotePort remove requestFrom rightToLeft rmdir round scrollDisplayLeft scrollDisplayRight seek send sendAnalog sendDigital sendDigitalPort sendString sendSysex setBitOrder setClockDivider setCursor setDataMode setFirmwareNameAndVersion setFirmwareVersion setSpeed setTimeout shiftIn shiftOut sin size speed sq sqrt status step stop stringCallbackFunction subnetMask sysexCallbackFunction tan tone transfer version write writeMicroseconds USER KEYWORDS 3:Serial Serial1 Serial2 Serial3 USER KEYWORDS 4:ANALOG_MESSAGE BIN CHANGE DEC DEFAULT DIGITAL_MESSAGE EXTERNAL FALLING FILE_READ FILE_WRITE HALF_PI HEX HIGH INPUT INPUT_PULLUP INTERNAL INTERNAL1V1 INTERNAL2V56 LOW LSBFIRST MSBFIRST OCT OUTPUT PI PROGMEM REPORT_ANALOG REPORT_DIGITAL RISING SET_PIN_MODE SPI_CLOCK_DIV128 SPI_CLOCK_DIV16 SPI_CLOCK_DIV2 SPI_CLOCK_DIV32 SPI_CLOCK_DIV4 SPI_CLOCK_DIV64 SPI_CLOCK_DIV8 SPI_MODE0 SPI_MODE1 SPI_MODE2 SPI_MODE3 SYSTEM_RESET TOTAL_ANALOG_PINS TOTAL_DIGITAL_PINS TWO_PI

    I don’t guarantee that’s all, or even most, of the Arduino keywords. But it’s a reasonable selection to get you started.

  • 0 Votes
    6 Posts
    543 Views
    Bas de ReuverB

    Nice, thanks for fixing the issue 👍

  • 1 Votes
    4 Posts
    398 Views
    David MackD

    @PeterJones Thanks for that information, I’ll definitely turn on that setting. As far as searching goes, I hadn’t thought of using the term “backup.”

  • Change size of tab text

    Help wanted · · · – – – · · ·
    4
    1 Votes
    4 Posts
    423 Views
    C BaccaC

    @PeterJones Ok, Reduce was checked. So I’m stuck with this.

    It would be nice to control the font size and font name for the tab bar text.

    Thanks!

    Consider this closed.

  • 1 Votes
    9 Posts
    785 Views
    PeterJonesP

    @peklei said in UDL: Folding with Alt-0 no longer works correctly:

    It would be interesting to know how this is implemented there and whether it can be recreated in a UDL definition.

    In a UDL definition? No. Each built-in lexer has dedicated code for deciding where to fold (if that lexer has folding). The source code for UDL has a separate set of code, that is purely keyword-based.
    From the “UDL definition” point of view, all you can do is set the open/middle/close keywords; you cannot change the logic from the UDL interface or config file. If you wanted to change the logic, it would require a change to the UDL source code, which requires a feature request

  • Tail with filter

    Help wanted · · · – – – · · ·
    2
    0 Votes
    2 Posts
    207 Views
    PeterJonesP

    @Franz ,

    Natively, no. Notepad++ doesn’t have a “filter” feature that just hides text without deleting it.

    There might be some plugins that do a “filter”-like feature, but I don’t know which they are, and it would be doubtful if they’d work correctly with the Monitor (tail -f) feature of Notepad++. If someone else knows of a way, they can chime in.

    As a workaround: assuming you have the logfile.log open as the current file (doesn’t need to be in “tail” mode, but it can be): Run > Run…

    powershell -command "Get-Date -Format 'MM/dd/yyyy' >> '$(CURRENT_DIRECTORY)\filtered.log' ; Get-Content -Path '$(FULL_CURRENT_PATH)' -Wait | Select-String -pattern '^[AEOIU].*$' >> '$(CURRENT_DIRECTORY)\filtered.log';"

    and then File > Open filtered.log, and set Monitor (tail -f).

    This example filters your original logfile.log for any line in that starts with a vowel, and pipes it into filtered.log in the same directory; when you then open filtered.log in tail-mode, only the text that matches the filter will make it into filtered.log , which you are watching as it goes, so it gives you the basic effect, even though Notpead++ doesn’t do it natively.

    If you want something other than “starts with a vowel”, change the '^[AEOIU].*$' from the command I gave to a valid powershell regular expression (make sure to keep it wrapped in single quotes, like the example regex was). (In this forum, we’re good at Notepad++ regular expressions; but powershell regex are not our area of expertise, so, if you need help with the powershell regex aspect, this forum probably isn’t the best place to ask)

  • My future is secured. But what about yours?

    Humour
    3
    5 Votes
    3 Posts
    340 Views
    xomxX

    I_LOVE_AI.jpg

  • To all the monetizing companies...

    Pinned Announcements
    10
    25 Votes
    10 Posts
    46k Views
    Clod TwothousandC

    @donho I created an account just to upvote, but I didn’t have the reputation. There is no information on how to gain reputation (that I could find). I was probably not going to do whatever was required anyway. It would have been nice to allow new users to allow to upvote useful posts, without jumping hoops.

  • 0 Votes
    22 Posts
    2k Views
    Troglo37T

    @PeterJones Great catch! Thanks Peter!! It works! I didn’t notice the double .XML.

    Just noticed your comment about the extensions. I keep it like that because I frequently use the search software Everything and several file conversion programs. I need to know what I’m dealing with while using them simultaneously.

    The other reason I keep it hidden is so I don’t accidentally screw up the extension and can’t find the file. It’s happened to me several times. The only way that can happen is when I use Everything, However, it nicely only highlights the file name and not the extension, making it harder to unintentionally change the extension.

  • 0 Votes
    3 Posts
    266 Views
    mkupperM

    @Claudia-Svenson, I am wondering, What are you trying to achieve?

    The reason I ask is that it’s possible to run a “portable” copy of Notepad++ without a doLocalConf.xml file.

    You may want to review https://npp-user-manual.org/docs/config-files/#configuration-files-location.

  • 0 Votes
    5 Posts
    508 Views
    Ariel DiamondA

    If anyone else is interested in an AHK script that works, it’s simple enough:

    #HotIf WinActive("Notepad++") XButton1::XButton2 XButton2::XButton1 #HotIf
  • Notepad++ strange behavior if I change the style

    General Discussion
    3
    1 Votes
    3 Posts
    407 Views
    Mauricio CagnassoM

    @xomx Thanks!!!

    This WORKS!!! 👌

    a269e947-c335-4c76-a071-455ded5c8931-image.png

  • 0 Votes
    2 Posts
    179 Views
    PeterJonesP

    @Martin-Neosel ,

    Do you mean the orange bar on the left margin, as shown in this screenshot?
    90102f0a-b5ce-44ca-9472-e03bf0a8d861-image.png

    That’s the Change History. We have a FAQ that explains that feature, and how to turn it off (but also explains why it’s a good idea to leave it on, now that you know what it is).

  • 0 Votes
    4 Posts
    366 Views
    Terry RT

    @inkognito said in Remove "duplicate" lines based on only a specific part of the line:

    How can I apply it to the text file without opening it in Notepad++?
    Are there any corresponding options over the command line?

    Two very leading but somewhat loosely defined questions.

    Find in Files allows you to select a number of files based on filters, such as folders (and hidden & sub-folders), file type, partial filename. So the files are edited by Notepad++ (NPP) but don’t show in the NPP view(s). You could say they aren’t opened by NPP if you mean “do I see them in the NPP view”.

    I am aware that there is the ability to have an “auto start” functionality upon loading NPP. The information is in the FAQ section here. So it uses the PythonScript plugin along with an “auto-start” script file called “startup.py”. Upon NPP loading it immediately starts processing the commands in this script file.

    There is another PlugIn called NppExec and a post late last year suggested it might have a method on autostarting once NPP is loaded, see post #26006. Unfortunately there isn’t a lot else I have seen on NppExec, it doesn’t tend to get much exposure.

    If you are referring to editing these files without NPP itself loading, then that is a whole other question which resides outside of this forum. Other command line editors such as AWK, SED, GREP etc might offer you that functionality but as I say that is not for this forum to answer. You would need to visit forums based on which ever editor you wish to use. The regular expression I provided might work as is in another editor, but likely would require some massaging to perform correctly.

    Terry

  • 0 Votes
    2 Posts
    220 Views
    PeterJonesP

    @Manish-Patel,

    Based on your description, I assume you are seeing something akin to
    e28deaed-860a-4b30-9409-669bbcf0badd-image.png
    … where the regex starts looking like a quote starts inside.

    In that example, I also showed examples of how the escape is actually intentended to work: the “Escape” character escapes the various open/close symbols _when embedded between open/close symbols. So "In \" quotes", it properly treats the \" as being inside the string, not ending the string, and similarly for the single-quote example.

    Since, based on your <Keywords...> line, you don’t have regex defined as delimiters, the parser is not in a mode where it knows it needs to escape them.

    If you define regex wrappers as delimiters as well, like:
    c4459c06-30a2-4102-b735-97449b2d96f2-image.png

    … then you can get it to treat the regex as a string:
    9c3810c4-bef3-4bb0-b24e-9443e312a000-image.png

    The reason the quote isn’t starting a string inside the regex is because, by default, UDL doesn’t allow nesting of delimiters, unless you tell it to in the Stylers. This is more obvious if I do the same regex, but with the quotes not escaped:
    186dddd5-94e5-4595-a12f-d3b85b0f2d2b-image.png

    The quotes are still not treated as string-starters, because the regex delimiters were not defined to allow nesting of the string delimiters.

    On the other hand, if you define Delimiter 5 to be [ and \ and ] and then in the Styler definition you also allow nesting of Delimiters 1 and 2:
    f6821207-5207-450b-98b9-5168b42c7068-image.png

    … then you can get another example, which shows quotes embedded in brackets, and escaped brackets:
    347cbe63-ed9c-482b-8cbd-97498d8cc7f3-image.png

    If you escape the quotes when inside brackets, they will not be recognized as embedded quotes anymore:
    8ec9e14d-4e2d-48fe-848b-4b5bf5931cd6-image.png

    So I believe these are the kinds of setups you will want. Defining the regex wrappers as delimiters as well should go a long way to giving you what you want, I think.

  • 0 Votes
    6 Posts
    545 Views
    glandonG

    截屏2025-05-06 07.10.16.png

  • Download Says we are with Ukrine

    Boycott Notepad++
    1
    -1 Votes
    1 Posts
    258 Views
    No one has replied
  • 0 Votes
    13 Posts
    1k Views
    rdipardoR

    @ThosRTanner said in When is there going to be a release of NPP plugintemplate with a definition of NPPM_ADDSCNMODIFIEDFLAGS:

    @rdipardo Wouldn’t a better place to put the action be in the notepad++ repo so when a new version was released it’d do the updates to the template repo automatically?

    You make a good point.

    The workflow steps would essentially be the same, but in the opposite direction (clone the template repo, update the file tree, validate the build and push if successful). The main difference would be the trigger; ideally you would want to watch for tagged Notepad++ releases, e.g.,

    on: push: tags: - 'v*'

    This way new template versions can be explicitly tied to a Notepad++ release, e.g.,

    # 'refs/tags/vX.Y.Z' -> 'vX.Y.Z' echo "NPP_RELEASE=${env:GITHUB_REF}.Split('/')[2]" >> $env:GITHUB_ENV # ... git tag -a "${{ env.NPP_RELEASE }}" '@' -m "plugintemplate-for-Npp-${{ env.NPP_RELEASE}}" git push --tags --repo=https://github.com/npp-plugins/plugintemplate

    But it would be a problem if incompatible changes were made to the template. A failed build would cause a red X to appear beside the tagged Notepad++ commit, giving the false impression the release was a botch.

    I think the separation of concerns principle is best observed if the template project looks after its own updates. A little extra churn won’t be a great inconvenience. The majority of plugin authors are still copy-pasting the template files into their source tree, as shown by how many have “C” as their detected primary language, since the template files contain no unique C++ syntax or standard headers, which GitHub relies on to classify header files, unless you manually override the heuristics.