Categories

  • Announcements regarding our community
    310 Topics
    5k Posts
    PeterJonesP

    @donho ,

    Regression with UDL. See #17520 for details.

    Steps to Reproduce

    Launch fresh portable v8.9.2 In Language > User Defined Language > Define your language…, set KEYWORDS1 = ABILITYCATEGORY Paste the following:ABILITYCATEGORY:Haunted VISIBLE:QUALIFY ABILITYCATEGORY:Background / Quirk VISIBLE:INVISIBLE ABILITYCATEGORY:Arcane VISIBLE:QUALIFY Set Language > User-Defined Crash

    Issue report has NppDump.dmp file.

    Same steps work just fine in fresh portable 8.9.1, so it’s a regression in this version.

    (This occurred while I was trying to create my reply here – it would crash when I was trying to create the new UDL in v8.9.2, but if I went to v8.9.1 portable, it worked just fine.)

  • Frequently Asked Questions and Guides (about Notepad++ and this Forum)

    38 Topics
    63 Posts
    PeterJonesP
    Themes in v8.8.9

    With the release of v8.8.9, there is a new feature which automatically updates the active Theme if it is missing Style Configurator settings for any GUI elements, or missing any Languages or any Style entries in existing Languages. This is a long-needed feature, so that as Notepad++ adds new styles for the Style Configurator, you’ll be able to set them, even if your theme hasn’t been updated since before those styles were added. (Before now, if you switched to a theme years ago and set any custom color or user keyword or custom file extensions for a built-in language, it would never update the theme, no matter how many times you update Notepad++ in the meanwhile. This v8.8.9 feature is able to correct that issue, and you will be able to use the Style Configurator to set the colors of any new styles going forward, as soon as you upgrade to a Notepad++ executable that supports the new style.)

    Unfortunately, the v8.8.9 implementation included some annoying growing pains: the procedure always uses the same colors that those styles have in the stylers.model.xml file (ie, the default “light mode” colors), even if you are using a dark theme, which can make for glaring color issues: on Languages that get new styles added, the text that should be that new style can end up as black-on-white text, even if the rest of the text has a dark background; and if the theme was old enough, some GUI elements (like the Bookmark margin and Change History margin, between the line numbers and the text being edited) may clash with the surrounding GUI elements.

    In the future v8.9 this issue will be fixed, so people who had an older theme and use v8.9 will see new styles show up using the default foreground and background colors of that theme, so they won’t clash: it might not highlight the new keywords, for example, but at least it won’t look worse than it used to.

    But unfortunately, once you run it in v8.8.9, your theme will no longer have those entries “missing”, and the glaring white background will be saved. The instructions below will help you with that:

    Instructions

    These instructions are only needed if you ran Notepad++ v8.8.9. If you upgraded from something earlier to v8.9-or-later, you do not need these instructions.

    Download the updated theme file(s) from the Source (see Download Source below) Depending on circumstances, decide whether you need to update the installation-directory theme, the user-config-directory theme, or both If you have a portable version of Notepad++, without using the Cloud directory or -settingsDir, then you need to just follow the instructions to Update Theme(s) in User Config Directory If you are not using a portable version of Notepad++, then it is recommended to follow Update Theme(s) in Installation Directory first, and then decide based on the next item whether to continue or not If you have any theme file(s) in the user-configuration directory (whether it’s %AppData%\Notepad++\themes\ or the Cloud directory’s .\themes subdirectory or the -settingsDir’s .\themes subdirectory, then you should follow the Update Theme(s) in User Config Directory for those.

    Please note: when correctly following step 2, you may need to follow multiple sets of instructions. Please read and understand each point under step 2 to make the right changes.

    Download Source

    The installer themes in the source code have been updated to have all the styles needed (to be able to fix the problems from v8.8.9). You can go here to grab the theme file(s) you want: https://github.com/notepad-plus-plus/notepad-plus-plus/tree/master/PowerEditor/installer/themes.

    Update Theme(s) in Installation Directory

    Except when you have a portable version of Notepad++, you will generally need to follow this set of instructions for the themes that come in the installation directory. In a normal installation of Notepad++, the installation will be in c:\program files\Notepad++ directory or equivalent, and the installation-directory themes will thus be in c:\program files\Notepad++\themes. (See the Instructions section above for the decision process to know for sure whether to use this section.)

    Exit Notepad++ Go to the URL mentioned in the Download Source section (above), and download the raw version of your Theme file(s) Use Explorer to go to c:\program files\Notepad++\themes\ directory Copy the downloaded Theme(s) into that directory, overwriting what’s there When you run Notepad++ next time, it will use the updated theme, and the glaring color issues should be gone.

    If you have customized your theme with user-keywords or user-extensions, then this won’t be sufficient, because Notepad++ gives priority to the copy from the user-settings directory. (See the Instructions section above for the decision process to know for sure whether this section is sufficient for your needs.)

    Update Theme(s) in User Config Directory

    If you have your Theme file in the user-settings directory (AppData hierarchy or Cloud directory or -settingsDir directory) for any reason – whether you customized it by changing the font or color or added user-defined keywords or user-defined extensions using the Style Configurator, or whether you intentionally copied or downloaded a Theme into the user-settings directory, or whether it’s there and you don’t know how or why it got there: under any of those circumstances, then just replacing the theme in the installation directory won’t be sufficient. (See the Instructions section above for the decision process to know for sure whether to use this section.)

    Exit Notepad++ If you haven’t already, go to the URL mentioned in the Download Source section (above), and download the raw version of your Theme file(s) Use Explorer to go to %AppData%\Notepad++\ (🛈) or to wherever your Cloud Directory or -settingsDir option point to There should be a themes subdiretory in that directory, if you have customized your Theme. Rename your old custom theme to <themeName>_OLD.xml (like khaki.xml becomes khaki_OLD.xml) Copy the downloaded version of the Theme into that directory (for example, khaki.xml) Start Notepad++. It will use the updated version of the theme, but your customizations will be temporarily missing. Open %AppData%\Notepad++\themes\<themeName>.xml and %AppData%\Notepad++\themes\<themeName>_OLD.xml In the _OLD copy, search for ext="(?!") in Regular Expression mode. The value between the quotes will be the user-extensions for that language. Copy any that you find in the OLD file to the language’s equivalent entry in <themeName>.xml In the _OLD copy, search for (?<!>)</WordsStyle> in Regular Expression mode. Any values between the > and the </WordsStyle> should be copied to the equivalent location in the <themeName>.xml file. If <themeName>.xml just has <WordsStyle name="..." ... /> without having a </WordsStyle> closer, you can replace the /> with a > and the list of keywords, then the closing </WordsStyle> Save <themeName>.xml Exit Notepad++ When you run Notepad++ again, it should now include your customizations again. Native Feature compared to ConfigUpdater plugin

    The ConfigUpdater plugin was introduced as a testbed for some of the ideas that made it into the v8.8.9 native implementation. As such, if you are in v8.8.9 or newer, you no longer need the ConfigUpdater plugin. But if you are before v8.8.9, and waiting for the v8.9 fix to the Notepad++ feature before upgrading, then using ConfigUpdater while in v8.8.8-or-older will help you get to a point where if you did change your mind and upgrade to v8.8.9, it wouldn’t make the glaring UI clash and black-on-white text in dark themes.

    JavaScript in v8.9 Themes

    In v8.8.8 and earlier, Notepad++ would magically use the embedded javascript (JS-in-HTML) styler settings if the javascript.js (*.js) language didn’t have defined styles in a given theme, making it appear to JavaScript users that their theme had the standalone JavaScript colors defined. The v8.9 fix, which filled in default FG/BG colors for all javascript.js styles for themes that were missing javascript.js made it appear to the JavaScript users that v8.9 broke their theme, when it really meant that their already-broken theme was just being “fixed” in a different way. Updated themes are being submitted to the Notepad++ codebase, so that javascript.js will use similar colors to embedded javascript, so they won’t get the surprise color change if they upgrade from v8.8.8-or-older to v8.9.1-or-newer.

    If you already updaded to v8.9, and JavaScript *.js files look like they have stopped syntax highlighting then you will need to follow instructions similar to the Update Theme(s) in Installation Directory and/or Update Theme(s) in User Config Directory

    The PR has been merged, so you can just use https://github.com/notepad-plus-plus/notepad-plus-plus/tree/master/PowerEditor/installer/themes as the source for the updated themes (the same link as mentioned above) You can just copy the entire <LexerType name="javascript.js" desc="JavaScript" ext="">...</LexerType> section from the downloaded theme(s) and paste it overtop that same section in your Config Directory and/or Installation Directory theme file(s), then save and restart to get it to take effect.
  • Notepad++ discussions that don’t fit in other Categories

    4k Topics
    22k Posts
    PeterJonesP

    @LaMar-M said in Modleine Parser No Longer Works:

    I’ve been using “ModelineParser_0.2” for several years to automatically select the language. This parser is still available here.

    Yes. But it hasn’t been updated in 13 years. Notepad++, on the other hand, releases a new version about once a month.

    Recently my NP++ version got auto updated (by IT) to version Notepad++ v8.7.4.

    Your IT department chose a version from 14 months ago? It will still be missing security updates found in more recent Notepad++ versions.

    But yes, in the intervening 13 years, Notepad++ has made multiple changes to the documented interface for communication between a plugin and Notepad++. There have been some changes that were known to break older/unsupported plugins. But Notepad++ cannot stop all progress just because there are legacy plugins still published out there.

    When I open a program that used to default to a specific language, no language is set. I have to manually set it.

    Fortunately, the NppFileSettings plugin has modeline support, including recognizing filetype, ft, syntax, and syn for setting which syntax highlighting lexer to use. And its Releases page has 32bit and 64bit downloads, so it will work in your 32-bit edition of Notepad++.

    (And also, if you have a consistent filenaming convention with extensions that match the filetype, you can just set the User ext: box in the appropriate language(s) in the Style Configurator to make Notepad++ recognize the file type by extension, rather than by modeline. But if you need modeline support, hopefully NppFileSettings will work for you.)

    Notepad++ v8.7.4 (32-bit)

    In the modern world, where Windows OS is only maintained in 64-bit, there is virtually no reason to use 32-bit applications. For Notepad++, the only good reason for 32-bit instead of 64-bit is because you have a legacy plugin that only comes in 32-bit, that has no 64-bit version or alternative plugin with the same features.

    Looking at your other non-default plugins:

    CSVLint (0.4.6.7) PythonScript (0.9.2)

    Both of those come in 64-bit versions now.

    And PythonScript’s latest official release is up to v2.1.0, which uses Python 2.7.18, with significant bugfixes and feature improvements in both the plugin itself, and in the underlying Python interpreter (interpreter 2.7.1 from plugin 0.9.2, vs interpreter 2.7.18 from plugin 2.1.0). (Given your IT department’s apparent reticence to upgrade, I am not going to suggest moving to the “alpha” version of PythonScript 3.0.24, which uses Python interpreter 3.12.10, even though unless you use a lot of non-unicode files, I personally recommend using the version of the plugin that uses a modern Python interpreter rather than an interpreter that’s past its end of life.)

    And assuming that NppFileSettings plugin works as a replacement for the unsupported and incompatible modelineparser plugin for you, then all three of the non-preinstalled plugins that you have shown an interest in will work with 64-bit Notepad++ as well.

    As such, if you can confirm that PythonScript v2.1.0 and NppFileSettings will work for you, then I highly recommend that you talk with your IT:

    Ask if they can switch to 64-bit Notepad++. Ask if they will support a newer Notepad++. I desparately want to recommend the newest version, because of all the recent security fixes, but if you use UDL, then v8.9.2 probably won’t work for you, so you might have to stick with v8.9.1 until the regression fix for UDL is released in v8.9.3 (hopefully soon)
  • 10k Topics
    54k Posts
    Bob SmithB

    @PeterJones Thank you.

  • Technical discussion of building or contributing to Notepad++ or Plugin codebases

    1k Topics
    9k Posts
    CoisesC

    @guy038 said in Columns++ version 1.3: All Unicode, all the time:

    So, I don’t see exactly which rule should be applied, regarding the word definition !?

    and in Columns++ version 1.3: All Unicode, all the time:

    Again, I don’t understand clearly these differences between the two last columns !

    This is not going to be a complete response yet, but some further explanation.

    Even when using ICU, Boost::regex does not implement the same regex language as described in Unicode Technical Standard #18: Unicode Regular Expressions. Some of the differences are more-or-less dictated by the architecture of Boost::regex; others appear to be choices.

    This is a list of category definitions used by Boost::regex when using ICU; the table comes from matching up char_pointer_range in get_default_class_id and char_class_type in lookup_classname:

    alnum U_GC_L_MASK | U_GC_ND_MASK alpha U_GC_L_MASK blank mask_blank cntrl U_GC_CC_MASK | U_GC_CF_MASK | U_GC_ZL_MASK | U_GC_ZP_MASK d U_GC_ND_MASK digit U_GC_ND_MASK graph (0x3FFFFFFFu) & ~(U_GC_CC_MASK | U_GC_CF_MASK | U_GC_CS_MASK | U_GC_CN_MASK | U_GC_Z_MASK) h mask_horizontal l U_GC_LL_MASK lower U_GC_LL_MASK print ~(U_GC_C_MASK) punct U_GC_P_MASK s U_GC_Z_MASK | mask_space space U_GC_Z_MASK | mask_space u U_GC_LU_MASK unicode mask_unicode upper U_GC_LU_MASK v mask_vertical w U_GC_L_MASK | U_GC_ND_MASK | U_GC_MN_MASK | mask_underscore word U_GC_L_MASK | U_GC_ND_MASK | U_GC_MN_MASK | mask_underscore xdigit U_GC_ND_MASK | mask_xdigit

    Comparison with the table you referenced shows that Boost::regex does not use the same definitions. In particular, lower and upper are defined to be identical to General Categories Ll and Lu, alpha is defined to be identical to General Category L, and word does not contain all the characters mentioned in the Unicode specification.

    For the most part, Columns++ follows the Boost::regex definitions, though I did not include Mn in word. Also the Boost::regex code for isctype implements some of the classifications directly; I think I am close, but not necessarily identical, for those. It looks as if Boost::regex does define xdigit according to the Unicode spec.

    I think that Boost::regex defines word boundaries in terms of word characters (i.e. \b is equivalent to (?<!\w)(?=\w)|(?<=\w)(?!\w)) and that I wouldn’t be able to change that without forking and modifying Boost::regex code.

    I think the questions are whether Boost::regex is more accurately considered wrong, or just different in its implementation of character classes; and if the latter, which is preferable.

    At present, my estimation is that it would be time-consuming, but not impossible or fragile, to implement the Unicode definitions (aside from word boundaries) as listed in Annex C: Compatibility Properties in Columns++.

    Whether that’s what should be done might still be an open question.

  • Security shouldn't be the privilege of rich people
    70 Topics
    345 Posts
    CoisesC

    @harmansinghdeepkandhari:

    When you install through Plugins Admin, Notepad++ verifies that the hash of the downloaded zip file containing the plugin matches the hash that was supplied when the plugin was added to or updated in the plugins list.

    That is all that is done. Aside from the three plugins included with Notepad++ (MIME Tools, Converter and NppExport), the author/maintainer of Notepad++ does not vet plugins.

    Realistically, he could not do that comprehensively. And — in my opinion, wisely — he does not make a halfway, superficial attempt (like running them through a “virus checker”) which would only give a false sense of security and open up the project to claims that it didn’t do “enough.”

    Further, it should be understood that plugins in Notepad++ are fully capable of doing anything Notepad++ itself can do. They are C++ programs (or the equivalent) running in the same security context as Notepad++. The architecture is very flexible, but it presumes one only installs plugins worthy of trust.

    The user (or system administrator, in a managed system) is completely responsible for establishing the suitability of Notepad++ plugins (just as the same responsibility applies regarding Notepad++ itself). Nearly all are open source; you can examine the code, the issues, and so on. You cannot assume that inclusion in the plugins list means any plugin is “safe”; your own due diligence is required.

  • All the issues (publications/questions) about binary translation
  • Say fuck to Notepad++ here, and only here
    92 Topics
    530 Posts
    C CC

    I have been using Notepad++ for years. I frequently get this message, usually after a Windows 11 restart.
    84e247a1-494a-4e82-8eec-d4fd39f06a65-image.png

    I’ve updated Notepad++ whenever prompted, I’ve reinstalled to try to fix the problem. The problem seems to come with the program. I don’t know why I would get this message or what they want ME to do about it. I don’t even know where to find the extra DLL.

    Help?

  • No support request and bug report here, only unconditional praise and worship

    2 Topics
    7 Posts
    Maddox ArmstrongM

    @FreeMeow I goon to Notepad++ :P

  • Share personal tips and cool uses for Notepad++, and similar

    59 Topics
    220 Posts
    Tomas VirginT

    Talking about “the game of the summer,” it’s always interesting to see how different communities interpret “fun” — for some that’s about building an in‑game world, for others it’s just kicking back and enjoying downtime.

  • Computer/Programming Jokes are welcome here