Categories

  • Announcements regarding our community
    320 Topics
    5k Posts
    donhoD
    @MarkusBodensee Thank you for your heads up. The fix will come with v8.9.5 release tomorrow.
  • 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
    guy038G
    Hello, All, Quite by chance, I came across this article : How do I check if a given string is a legal/valid file name under Windows? https://stackoverflow.com/questions/62771 So, I decided to run a few tests and “rework” the different regular expressions suggested as answers ! I finally came up with the multi-lines regex, below : (?xi-s) ^ ("?) (?! (?: PRN | AUX | NUL | CON | COM (?!0) \d | LPT (?!0) \d ) (?: \. .+ )? \1 $ ) [^\x00-\x1F"*/:<>?\\|\x7F]+ (?<! [\x00-\x20.] ) \1 $ Three remarks : This regex considers that cases "abcd.txt and abcd.txt" are invalid. In other words, the legal syntaxes are abcd.txt or "abcd.txt" ONLY. To do so, I use as group 1 the string "?. Thus : If a " character begins the file name, the group 1 exists and the two back-references \1 represents the character " itself If no " character begins current file name, the group 1 exists too but, as well as the back-references, it represents only an empty string The reserved names, like CON or AUX, are also reserved when written lower-case as con or aux ! Thus, the insensitive i flag In the suggested regexes, they use the final negative look-behind (?<! [\s.] ). However, I verified that ANY char over \x20, from the \s range, like \xA0, \x{2007}, \x{205F} … or even a char outside \s like \x97, \x9F … , may be added as trailing chars of a filename ! Thus, I preferred the (?<! [\x00-\x20.] ) syntax To insert a character, from the six characters SPACE & , ; = ^ and, especially, at beginning of the filename : Rename the filename between two DOUBLES QUOTES when within DOS or within any application like N++ or else Except for the space char, you may also simply use the rename option of Microsoft Explorer to insert any allowed character For information : ALWAYS forbidden : \x00-\x1F " * / : < > ? \ | \x7F : . at the END of file name : SPACE at the END of file name : ALL DOTS file name : PRN AUX NUL : COM1 COM2 com3 COM4 COM5 COM6 COM7 COM8 COM9 COM¹ COM² COM³ : com1 com2 com3 com4 com5 com6 com7 com8 com9 com¹ com² com³ : LPT1 LPT2 LPT3 LPT4 LPT5 lpt6 LPT7 LPT8 LPT9 LPT¹ LPT² LPT³ : lpt1 lpt2 lpt3 lpt4 lpt5 lpt6 lpt7 lpt8 lpt9 lpt¹ lpt² lpt³ Allowed WITHIN double quotes : SPACE & , ; = ^ Allowed WITHOUT double quotes : ! # $ % ' ( ) + - @ [ ] _ ` { } ~ : . if NOT at END of file name : SPACE if NOT at BEGINNING or END of file name You may test the multi-line regex above against the text below, pasted in a new tab : ============================================= Cas KO : ============================================= "" PRN aux NUL COM1 COM2 com3 COM4 COM5 COM6 COM7 COM8 COM9 COM¹ COM² COM³ LPT1 LPT2 LPT3 LPT4 LPT5 lpt6 LPT7 LPT8 LPT9 LPT¹ LPT² LPT³ "PRN" "aux" "NUL" "COM1" "COM2" "com3" "COM4" "COM5" "COM6" "COM7" "COM8" "COM9" "COM¹" "COM²" "COM³" "LPT1" "LPT2" "LPT3" "LPT4" "LPT5" "lpt6" "LPT7" "LPT8" "LPT9" "LPT¹" "LPT²" "LPT³" PRN. aux. NUL. COM1. COM2. com3. COM4. COM5. COM6. COM7. COM8. COM9. COM¹. COM². COM³. LPT1. LPT2. LPT3. LPT4. LPT5. lpt6. LPT7. LPT8. LPT9. LPT¹. LPT². LPT³. "PRN." "aux." "NUL." "COM1." "COM2." "com3." "COM4." "COM5." "COM6." "COM7." "COM8." "COM9." "COM¹." "COM²." "COM³." "LPT1." "LPT2." "LPT3." "LPT4." "LPT5." "lpt6." "LPT7." "LPT8." "LPT9." "LPT¹." "LPT²." "LPT³." PRN.txt aux.txt NUL.txt COM1.txt COM2.txt com3.txt COM4.txt COM5.txt COM6.txt COM7.txt COM8.txt COM9.txt COM¹.txt COM².txt COM³.txt LPT1.txt LPT2.txt LPT3.txt LPT4.txt LPT5.txt lpt6.txt LPT7.txt LPT8.txt LPT9.txt LPT¹.txt LPT².txt LPT³.txt "PRN.txt" "aux.txt" "NUL.txt" "COM1.txt" "COM2.txt" "com3.txt" "COM4.txt" "COM5.txt" "COM6.txt" "COM7.txt" "COM8.txt" "COM9.txt" "COM¹.txt" "COM².txt" "COM³.txt" "LPT1.txt" "LPT2.txt" "LPT3.txt" "LPT4.txt" "LPT5.txt" "lpt6.txt" "LPT7.txt" "LPT8.txt" "LPT9.txt" "LPT¹.txt" "LPT².txt" "LPT³.txt" . ... ..txt.. "." "..." "..txt.." ABCDE "ABCDE " abc def ghi . txt " abc def ghi . txt " .abc.def.ghi...txt. ".abc.def.ghi...txt." ============================================= Cas OK : ============================================= xyz " xyz" .txt " .txt" abc def .txt "abc def .txt" abc def . txt " abc def . txt" abc.txt lpt0 COM0 "lpt0" "COM0" CONt tCOM2 tLPT1t t.NULt "CONt" "tCOM2" "tLPT1t" "t.NULt" ...xyz...hij..tx .txt ....txt "...xyz...hij..tx" ".txt" "....txt" a.bcdefghijklmonp abcdefghijlmnop.z a.b.c.d.e.f.g.h.i "a.bcdefghijklmonp" "abcdefghijlmnop.z" "a.b.c.d.e.f.g.h.i" abc def ghi . txt " abc def ghi . txt" .abc.def.ghi...txt ".abc.def.ghi...txt" !abc!def!ghi!.!txt! #abc#def#ghi#.#txt# $abc$def$ghi$.$txt$ %abc%def%ghi%.%txt% &abc&def&ghi&.&txt& 'abc'def'ghi'.'txt' (abc(def(ghi(.(txt( )abc)def)ghi).)txt) +abc+def+ghi+.+txt+ ,abc,def,ghi,.,txt, -abc-def-ghi-.-txt- ;abc;def;ghi;.;txt; =abc=def=ghi=.=txt= @abc@def@ghi@.@txt@ [abc[def[ghi[.[txt[ ]abc]def]ghi].]txt] ^abc^def^ghi^.^txt^ _abc_def_ghi_._txt_ `abc`def`ghi`.`txt` {abc{def{ghi{.{txt{ }abc}def}ghi}.}txt} ~abc~def~ghi~.~txt~ "!abc!def!ghi!.!txt!" "#abc#def#ghi#.#txt#" "$abc$def$ghi$.$txt$" "%abc%def%ghi%.%txt%" "&abc&def&ghi&.&txt&" "'abc'def'ghi'.'txt'" "(abc(def(ghi(.(txt(" ")abc)def)ghi).)txt)" "+abc+def+ghi+.+txt+" ",abc,def,ghi,.,txt," "-abc-def-ghi-.-txt-" ";abc;def;ghi;.;txt;" "=abc=def=ghi=.=txt=" "@abc@def@ghi@.@txt@" "[abc[def[ghi[.[txt[" "]abc]def]ghi].]txt]" "^abc^def^ghi^.^txt^" "_abc_def_ghi_._txt_" "`abc`def`ghi`.`txt`" "{abc{def{ghi{.{txt{" "}abc}def}ghi}.}txt}" "~abc~def~ghi~.~txt~" Best Regards, guy038
  • 10k Topics
    54k Posts
    guy038G
    Hi, @matt-long, @coises and All, Of course, the @coises’s plugin would be the best solution, being both flexible and powerful However, @matt-long, if you don’t want to install any new plugin, here is a solution with native N++ only ! Of course, I’ll use the part of file which ONLY needs changes. But, in your personal file, the trailing part of each line will stay unchanged ! So, let’s suppose an INPUT text, like below, pasted in a new tab : 09-Jan-26 00:00:00 AM, 13-Sep-21 02:00:59 AM, 13-Jul-24 04:57:29 AM, 19-Apr-20 07:42:50 AM, 01-Mar-26 09:12:43 AM, 29-Feb-24 11:08:51 AM, 25-Jul-23 11:59:59 AM, 09-Jan-19 12:00:00 AM, 01-May-26 00:00:00 PM, 08-Oct-25 02:54:31 PM, 17-Feb-22 03:29:35 PM, 23-Sep-18 06:37:06 PM, 03-Nov-20 08:55:44 PM, 31-Aug-26 10:38:00 PM, 31-Dec-20 11:59:59 PM, 01-May-26 12:00:00 PM, Open the Replace dialog Uncheck all box options FIND (?-si)^(0(\d)|\d\d)-(.+?)-(\d\d) (\d\d):(\d\d):\d\d (AM|PM)(?=,) REPLACE (?2\2:\1)/\3/(?{4}20\4) \5\7:\6 Check the Wrap around option Select the Regular expression search mode Click on the Replace All button => You should obtain the temporary OUTPUT text below : 9/Jan/2026 00AM:00, 13/Sep/2021 02AM:00, 13/Jul/2024 04AM:57, 19/Apr/2020 07AM:42, 1/Mar/2026 09AM:12, 29/Feb/2024 11AM:08, 25/Jul/2023 11AM:59, 9/Jan/2019 12AM:00, 1/May/2026 00PM:00, 8/Oct/2025 02PM:54, 17/Feb/2022 03PM:29, 23/Sep/2018 06PM:37, 3/Nov/2020 08PM:55, 31/Aug/2026 10PM:38, 31/Dec/2020 11PM:59, 1/May/2026 12PM:00, Now, APPEND at the very end of your file, all the lines below : #Jan 1 #Feb 2 #Mar 3 #Apr 4 #May 5 #Jun 6 #Jul 7 #Aug 8 #Sep 9 #Sept 9 #Oct 10 #Nov 11 #Dec 12 #00AM 00 #01AM 01 #02AM 02 #03AM 03 #04AM 04 #05AM 05 #06AM 06 #07AM 07 #08AM 08 #09AM 09 #10AM 10 #11AM 11 #12AM 12 #00PM 12 #01PM 13 #02PM 14 #03PM 15 #04PM 16 #05PM 17 #06PM 18 #07PM 19 #08PM 20 #09PM 21 #10PM 22 #11PM 23 #12PM 00 Thus, your INPUT text is now as below : 9/Jan/2026 00AM:00, 13/Sep/2021 02AM:00, 13/Jul/2024 04AM:57, 19/Apr/2020 07AM:42, 1/Mar/2026 09AM:12, 29/Feb/2024 11AM:08, 25/Jul/2023 11AM:59, 9/Jan/2019 12AM:00, 1/May/2026 00PM:00, 8/Oct/2025 02PM:54, 17/Feb/2022 03PM:29, 23/Sep/2018 06PM:37, 3/Nov/2020 08PM:55, 31/Aug/2026 10PM:38, 31/Dec/2020 11PM:59, 1/May/2026 12PM:00, #Jan 1 #Feb 2 #Mar 3 #Apr 4 #May 5 #Jun 6 #Jul 7 #Aug 8 #Sep 9 #Sept 9 #Oct 10 #Nov 11 #Dec 12 #00AM 00 #01AM 01 #02AM 02 #03AM 03 #04AM 04 #05AM 05 #06AM 06 #07AM 07 #08AM 08 #09AM 09 #10AM 10 #11AM 11 #12AM 12 #00PM 12 #01PM 13 #02PM 14 #03PM 15 #04PM 16 #05PM 17 #06PM 18 #07PM 19 #08PM 20 #09PM 21 #10PM 22 #11PM 23 #12PM 00 Open again the Replace dialog Uncheck all box options FIND (?-si)(?|(\u\l\l|Sept)|(\d\d(?:AM|PM)))(?=(?s).+^#\1 (\d+))|(?s)^#.+ REPLACE \2 Check the Wrap around option Select the Regular expression search mode Click on the Replace All button => You should get your expected OUTPUT text : 9/1/2026 00:00, 13/9/2021 02:00, 13/7/2024 04:57, 19/4/2020 07:42, 1/3/2026 09:12, 29/2/2024 11:08, 25/7/2023 11:59, 9/1/2019 12:00, 1/5/2026 12:00, 8/10/2025 14:54, 17/2/2022 15:29, 23/9/2018 18:37, 3/11/2020 20:55, 31/8/2026 22:38, 31/12/2020 23:59, 1/5/2026 00:00, Voila ! Best Regards, guy038
  • Technical discussion of building or contributing to Notepad++ or Plugin codebases

    1k Topics
    9k Posts
    arnaud deretteA
    Hi, I am successfully using the nppgzipfileviewer plugin to edit in Notepad++ some files with gzip content (extension .flynz) that i generate and process in my PHP project. Thanks to Pascal for the plugin :) I have 2 requests : A tiny annoyance when i open the compress (or decompress) pop-up : I use a laptop plus an external 4K monitor and the pop-up is displayed partly outside of my latop screen. I can’t grab it with the mouse and i need to use [alt+space -> Move -> Arrow keys] to move it inside. Don’t know if it’s a N++ core feature or a plugin one, but could that be fixed ? Is there a way (and if not, that is a request to develop that feature) to associate a file extension (.flynz in my case) with an automatic gzip decompression/compression at the loading/saving of a file ?
  • Security shouldn't be the privilege of rich people
    72 Topics
    358 Posts
    S
    I have checked out the https://github.com/donho/xmlSigner project and it is what I needed. I have used that project to correctly pass the XML signing test. I have opened some issues with that project. Here is a quick summary of how the update process works. The wingup code first queries a website to determine if an update is required and the returned XML provides information to be used later. None of the information in the XML is used if it doesn’t pass the XML security check. After passing the security check the code looks for the update status and download location, assuming an update is required. After prompting the user to download the update and finishing the download, it checks the code signing of the installer. Assuming that the code signing is valid and the correct certificate, it starts the install. I will try to document all the customizations to the code from Notepad++, wingup and xmlSigner to make it work in my project so that future users have a place to start, but that will be after I am sure its all working correctly with the new security updates. Thank you @xomx for pointing me in the right direction.
  • All the issues (publications/questions) about binary translation
    76 Topics
    480 Posts
    U
    @xomx Thank you very much for the work you have done, which will lead to improvements in Notepad++ in the future. I am very grateful to you.
  • Say fuck to Notepad++ here, and only here
    94 Topics
    556 Posts
    baberzamanB
    Hi, I love Notepad++. I am a full stack developer from last 12 years and I am still using NotePad++ even there are a lot IDEs are in market, Like VS Code, Cursor, sublime etc… But NotePad++ is great. There is only one thing i think should be in it too. The Intellisense feature just like VS CODE…
  • 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

    60 Topics
    222 Posts
    guy038G
    Hi, All, Here is a little exercise for a Sunday ! Start N++ and open a new file ( Ctrl + N ) Write 2,047 consecutive empty lines Save your file Move back to its very beginning ( Ctrl + Home ) Select the Edit > Column Editor.. option or use the Alt + C shortcut Enter the values 0 , 1 , 1 to define the sequence Select the leading Zeros option and the Bin format => You should get a list of binary numbers between 0 and 111 1111 1111 Now, open the Mark dialog ( Ctrl + M ) Uncheck all box options Enter the regex ^(0|(1(01*0)*1))*$ in the Find what field Check the Bookmark line and Wrap around options Select the Regular expression mode Click on the Mark All button Close the Mark dialog or hit the ESC key Now, in your opinion, what do all these marked lines represent ? … After a while, it should be enough easy to detect that any marked line is a number multiple of 3 ! Therefore, the main takeaway from this text, is that regexes can simulate mathematical formulas ! Of course, I did not come up with that regex on my own, but by referring to the last example in this Wikipedia article : https://en.wikipedia.org/wiki/Regular_expression#Formal_definition Now, I suppose that other regexes could simulate other multiples or formulas, as long, as we simply use the binary format but I have not tested anything yet ! Best Regards, guy038
  • Computer/Programming Jokes are welcome here

    58 Topics
    187 Posts
    donhoD
    https://github.com/sherlock-project/sherlock/issues/2011