Community
    • Login
    1. Home
    2. Popular
    Log in to post
    • All Time
    • Day
    • Week
    • Month
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics
    • All categories
    • CoisesC

      Search++: A work in progress

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      21
      4 Votes
      21 Posts
      668 Views
      CoisesC

      @guy038 said in Search++: A work in progress:

      Thanks for your new Search++_03 release !

      Thank you for testing it.

      BTW, with native N++ search, the Shift + Enter shortcut is also available when you choose the Regular expression search mode ( with the condition that the regexBackward4PowerUser="yes" option is present within the config.xml file. May be, you could allow it as well in Search++ ?

      Regex backward… I have my doubts, but I can leave it open as something I might try to make available some day. When I’ve thought about it before, I get caught up trying to define exactly what it means to match regular expressions backward. Regular expressions can match different lengths depending on where they start. Is the previous match the one that ends at the latest possible position? The one that begins at the latest possible position? The last one that would have occurred before the current position if you matched forward repeatedly from the beginning of the text? The one that would result from reversing both the text and the regular expression (but then what do you do with backreferences)?

      Shift+Enter is a different problem. Enter doesn’t work to find: since the Find and Replace boxes take multiple lines, they consume the Enter key. You can use Alt+F and Alt+R (the underlined characters on the Find and Replace buttons), but those combinations are a bit awkward. I’ve been thinking of just making Shift+Enter and Ctrl+Enter do the functions on the Find and Replace buttons — I think those would be more natural than Alt+F and Alt+R for most people (including me). But then it isn’t obvious how access to backward should work. Beyond all that, there is no standard Windows mechanism for keyboard-only access to the drop-down menus on split command buttons. Once you can get to the button without clicking it, down arrow works to open the menu; but you can’t get there with Alt+underlined letter: that does the click action. I haven’t figured out a good way to deal with all of the keyboard navigation obstacles yet.

      Which is a long way of saying I don’t know which of too many possibilities I will eventually decide must take priority for keyboard actions, so I don’t know what I can/will do in that regard.

      Personally, I think the ICU button should remain available in future versions !

      I’ll probably leave the function there… it might be “hidden” (like a Shift-click on Regex) so it doesn’t confuse people who would probably never use it.

      Choose the Select > Select in Whole Document option

      => A selection appears with the bottom message Selected 207 matches

      Without doing anything else, I use the Ctrl + C shortcut

      After opening an other new tab, I was quite surprised that the 207 tibetan chars were not pasted, after a Ctrl + V operation ?!

      Then, I understood that the selection is effective ONLY IF :

      It’s not that selection isn’t effective, it’s that keyboard focus was still in the Search++ dialog. You have to move focus to the document for the Ctrl+C to work.

      You can use Ctrl+N (think “Notepad++”) to return focus to the document, or (as you discovered) click on the tab if you’re using the mouse.

      This does make me think I should probably have an option, perhaps enabled by default, to return focus to the document automatically after a select operation, since wanting to copy is probably the most common reason for using select.

      (I’ve been bitten by this often enough in Columns++, which works the same way. It’s just so easy to forget that focus is in the dialog, not the document.)

      Note that if the Unicode word boundaries is not checked , the (?w)\b regex would also return 176 matches. Thus, a leading (?w) forces the use of the Unicode word boundaries option !

      Hmmm… I’m not sure what’s happening there.

      Then, reading https://www.regular-expressions.info/unicodeboundaries.html#grapheme, I realized that, presently, the \b regex cannot identify the different grapheme positions !

      Would it be possible to add an option for this specific case

      In both Regex and ICU, \X matches a single grapheme cluster. In Regex, (?=\X) matches a grapheme boundary; that doesn’t work in ICU. (It looks like in ICU, \X actually matches from the current position to the end of a grapheme cluster. In Regex, the match must begin and end on a grapheme cluster boundary. The Boost.Regex logic already worked that way, but I replaced/extended it to use the grapheme break algorithm specified by Unicode.) \X partially works in built-in Notepad++ search, too, but it misses some cases and falls apart entirely outside the BMP.

    • N

      How can I pass a search term to Notepad++ via command?

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      16
      0 Votes
      16 Posts
      350 Views
      N

      Hello,

      I wanted to show you the purpose of this function.

      Background:

      Highlight a term in the browser Search for it in files using Everything via a button (Content) Right-click the found file to open it in Notepad++ and jump to the searched term.

      See the video off it on Imgur

      I’ve actually been using the editor since I started using computers privately (2008), but I’ve never really explored its inner workings and capabilities. It was never necessary so far—it has everything needed for everyday use.

      I also wanted to sincerely thank you again for the prompt help—it was definitely a positive experience.

      Best regards,
      Björn

    • Troglo37T

      Is There a Way to Prevent Pasted Text from Spreading Out with Rows of Spaces?

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      20
      0 Votes
      20 Posts
      2k Views
      Troglo37T

      @PeterJones said in Is There a Way to Prevent Pasted Text from Spreading Out with Rows of Spaces?:

      Or, since you said,

      there aren’t any unused ones available under Plugins > Customize Toolbar

      - I assume this is the one where you say, "there aren't any unused ones available". I cannot imagine that you've _actually_ enabled another couple-dozen buttons from its list, so that there are no other "available toolbar buttons", as that toolbar would be so full as to be unusable. On the other hand, that's the only thing I imagine that you _could_ mean by such a sentence.

      Yes, all of the Old Large Legacy Icons are in the Current toolbar buttons box. After checking them, I decided that I might use all of them in the future.

      Well, with all of that said, thanks for being patient and hanging in there through all of this. I have everything working, including adding a new icon to the toolbar. And thanks for the updated scripts.

      I hope this thread serves many others.

    • donhoD

      Notepad++ v8.9.3 Release Candidate

      Watching Ignoring Scheduled Pinned Locked Moved Announcements
      13
      6 Votes
      13 Posts
      1k Views
      donhoD

      FYI:
      I just updated RC4 binaries with the fix:
      https://github.com/notepad-plus-plus/notepad-plus-plus/commit/9b558895e744601842ffdaff4679467863b9722d

      Sorry for the inconvenience.

    • JAKJ

      How to compare 2 text files and delete duplicates

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      11
      0 Votes
      11 Posts
      655 Views
      guy038G

      Hi, @jak, @peterjones, @pnedev, @phil-pascal and All,

      Ah…, OK :! But it’s quite funny, @jak, because it’s exactly what I proposed in my last two posts !!!

      Giving the initial contents of your two files :

      The Original Music Collection which contains : Coldplay yellow Elton John Rocket man Beatles abbey road Beatles Love me do Beatles hey Jude Monkees daydream believer The New Music file which contains : Beatles abbey road Beatles Love me do Beatles hey Jude Monkees daydream believer The move blackberry way (1) By running a search/ replacement with regular expressions :

      I append, at the very end of the New music file, the contents of the Original Music Collection file, after a line of, at least, 3 equal signs, giving this temporary New music file :

      Beatles abbey road Beatles Love me do Beatles hey Jude Monkees daydream believer The move blackberry way ========== Coldplay yellow Elton John Rocket man Beatles abbey road Beatles Love me do Beatles hey Jude Monkees daydream believer

      Now :

      Switch to the New Music file

      Open the Replace dialog ( Ctrl + H )

      Uncheck all box options

      SEARCH (?x-is) ^ (.+\R) (?= (?s) .+? ^===+ .+ ^ \1) | (?s) ^ ===.+

      REPLACE Leave EMPTY

      Tick the Wrap around option

      Select the Regular expression search mode ( IMPORTANT )

      Click on the Replace All button

      => You should get your expected New Music file, below :

      The move blackberry way Save the modification of the New Music file (2) By using the ComparePlus plugin :

      First, use the Plugins > ComparePlus > Diff Visual Filters... option

      Check the Hide added/removed lines option and valid this choice with the OK button

      Then, use the specific option Plugins > ComparePlus > Find Unique lines

      Now, select the New Music file ( IMPORTANT )

      Run the Plugins > ComparePlus > Delete all/selected visible lines option

      Run the Plugins > ComparePlus > Clear Active Compare option

      Finally, save the modifications of the New Music file ( IMPORTANT )

      Best Regards,

      guy038

    • BB

      Search accented and non-accented characters alike with one simple setting?

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      8
      0 Votes
      8 Posts
      424 Views
      guy038G

      Hi, @b, @peterjones, @coises and All,

      Let’s consider the Spanish word comparación and its various forms below, pasted in a new tab :

      comparación cömparÅciõn CömꝕarÅcⓘoñ ȻOℳₚA⒭ⱯℭᴵꝊᵰ ƆºᶆⱷǞℝȺꜿᵼᴓɲ ɕƢꟽⓟǻꝝⱭƆⅈᴗN

      Note that I have deliberately exaggerated the shapes and modified the case of the possible characters !!

      If you do any of the six N++ searches, below, against the six lines in the new tab, you’ll see that ONLY the two first regexes, which refer to standard equivalence clases, can find all the lines.

      SEARCH (?=[[=c=]])\X(?=[[=o=]])\X(?=[[=m=]])\X(?=[[=p=]])\X(?=[[=a=]])\X(?=[[=r=]])\X(?=[[=a=]])\X(?=[[=c=]])\X(?=[[=i=]])\X(?=[[=ó=]])\X(?=[[=n=]])\X

      SEARCH (?=[[=c=]])\X(?=[[=o=]])\X(?=[[=m=]])\X(?=[[=p=]])\X(?=[[=a=]])\X(?=[[=r=]])\X(?=[[=Å=]])\X(?=[[=c=]])\X(?=[[=i=]])\X(?=[[=õ=]])\X(?=[[=n=]])\X

      SEARCH (?=[[=C=]])\X(?=[[=ö=]])\X(?=[[=m=]])\X(?=[[=ꝕ=]])\X(?=[[=a=]])\X(?=[[=r=]])\X(?=[[=A=]])\X(?=[[=c=]])\X(?=[[=ⓘ=]])\X(?=[[=o=]])\X(?=[[=ñ=]])\X

      SEARCH (?=[[=Ȼ=]])\X(?=[[=O=]])\X(?=[[=ℳ=]])\X(?=[[=ₚ=]])\X(?=[[=A=]])\X(?=[[=⒭=]])\X(?=[[=Ɐ=]])\X(?=[[=ℭ=]])\X(?=[[=ᴵ=]])\X(?=[[=Ꝋ=]])\X(?=[[=ᵰ=]])\X

      SEARCH (?=[[=Ɔ=]])\X(?=[[=º=]])\X(?=[[=ᶆ=]])\X(?=[[=ⱷ=]])\X(?=[[=Ǟ=]])\X(?=[[=ℝ=]])\X(?=[[=Ⱥ=]])\X(?=[[=ꜿ=]])\X(?=[[=ᵼ=]])\X(?=[[=ᴓ=]])\X(?=[[=ɲ=]])\X

      SEARCH (?=[[=ɕ=]])\X(?=[[=Ƣ=]])\X(?=[[=ꟽ=]])\X(?=[[=ⓟ=]])\X(?=[[=ǻ=]])\X(?=[[=ꝝ=]])\X(?=[[=Ɑ=]])\X(?=[[=Ɔ=]])\X(?=[[=ⅈ=]])\X(?=[[=ᴗ=]])\X(?=[[=N=]])\X

      In constrast to the last release of the Columns++ plugin, independant of Scintilla and doing true UTF-32 searches, which is able to match the six lines of our example, whatever the regex used among the six regexes above !

      This example clearly demonstrates that it’s possible to perform a search without considering case and/or accentuated characters with the v1.3.1 release of Columns++ plugin ;-))

      Best Regards,

      guy038

    • dfs-D

      Dark Mode style for UDL

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      7
      0 Votes
      7 Posts
      384 Views
      Lycan ThropeL

      @dfs ,
      We could go a step further and lament that it would be nice if the entire graphical environment of NP++ could be contained in one dialog setting, and then when we switched between Light or Dark, the environment would change all the UI references:

      Settings->Preferences...->Dark Mode,
      Settings->Style Configurator...->Style:, and the
      Settings->Style Configurator...->Select theme:

      …could be coordinated to make just switching between Dark Mode and Light Mode change them all, accordingly. As it is, I’m glad to have just found out that the Dark and Light language files can automatically change by setting that one switch in the dark mode file @PeterJones mentioned, and that automatically chooses the correct code coloring file for the environment (Dark/Light) chosen.

    • Mateusz KowalskiM

      Clipboard content is lost after using Ctrl+L (Delete Line)

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      7
      0 Votes
      7 Posts
      414 Views
      PeterJonesP

      @Evelyn-Walker ,

      I tested the behavior you described. In Notepad++ the Ctrl+L (Delete Line) command

      That is wrong terminology, as already described above. Ctrl+L is Line Cut, not Line Delete. To use the wrong terms causes confusion for everyone. From the OP, it was acceptible, because they didn’t know better. But to post like you are an authority, but to use the incorrect terminology, is detrimental to yourself and anyone who reads the answers here.

      internally performs a cut-like operation,

      Of course it does. It’s literally Line Cut, so it definitionally affects the clipboard

      which means the deleted line is temporarily placed into the clipboard.

      It’s no more “temporarily” on the clipboard than any Ctrl+C or Ctrl+X is “temporarily” in the clipboard. It’s in the clipboard until something else replaces it, just like every other clipboard action.

      Use Ctrl+Shift+L (if configured) or another plugin/command that deletes the line without copying it.

      Did you come up with that alternative all on your own, or did you just reiterate what @guy038 and I had already said?

      Alternatively, copy the text again after performing line deletions if you still need it in the clipboard.

      That’s horrible advice.

      If preserving clipboard content during line deletion is important, it could be considered as a feature request rather than a bug.

      No it couldn’t, because the feature already exists. Line Delete already exists as Ctrl+Shift+L: use Line Delete if you don’t want to affect the clipboard, and Line Cut if you do want to affect the clipboard.

      @Evelyn-Walker , make sure you are not using LLM or GPT or any other AI to write your posts for you: that’s expressly forbidden in this forum.

    • Murray Sobol 1M

      Idea of a new installation routine

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      6
      0 Votes
      6 Posts
      383 Views
      PeterJonesP

      @Murray-Sobol-1 said in Idea of a new installation routine:

      @PeterJones said in Idea of a new installation routine:

      No one should ever download a 32bit installer for modern OS. For any app. (Modern OS don’t come in 32-bit versions anymore, so I don’t understand why apps still bother distributing the 32-bit versions)

      I agree with the above statement, however when I ask for an update by clicking Downloads I see this section:
      Download 32-bit x86
      Installer | GPG Signature
      Portable (zip) | GPG Signature
      Portable (7z) | GPG Signature
      Mini-portable (7z) | GPG Signature

      Why is this even being distributed anymore??

      Because my statement was just my opinion, and not everyone agrees with it. Because there are some people who mistakenly think they need a 32-bit even though they have a 64-bit OS. And there are some people who have some unmaintained plugin that only comes in 32-bit (*). And because the developer has never decided to cut off those poor, unfortunate souls.

      (*: aside: anytime I come across someone like that, I do a bit of research to help them find an alternative, or find someone who has done an unofficial recompile of the plugin for 64-bit. there are very few public plugins that have no 64-bit version and no alternative)

      But that’s why we lobbied to put the 32-bit below the 64-bit, so the 64-bit gets the prominence it deserves – and why I rejoiced when it happened. Someone downloading N++ for the first time will see the 64-bit first, and will likely download that. Someone updating N++ should use the menu or auto-update, and never have to go back to the website.

    • W PongW

      Columns++, I'd like to *retain* commas when converting to elastic tabs/spaces

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      5
      1 Votes
      5 Posts
      152 Views
      CoisesC

      @W-Pong said in Columns++, I'd like to *retain* commas when converting to elastic tabs/spaces:

      Is there a way to retain the commas?

      I made a new release of Columns++ with an option to do that — an additional checkbox in the Conversion settings dialog: Keep separator character when converting to tabbed.

      The new release is Columns++ version 1.3.2.

      I have not marked the release stable, but I believe that there is very little chance this change will have any unanticipated negative effects. It should be safe to install.

    • Fred MorantF

      using User Defined Language : v.2.1.0.12

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      5
      0 Votes
      5 Posts
      329 Views
      Fred MorantF

      @PeterJones

      I will try with v8.9.3-RC and v8.9.1,

      regarding my last question it’s with v8.9.2,

      “create new” works fine with old name, it’s the “save as” function which shows that behavior : “can’t use a name preivously used” (i wasn’t enough precised in my question, sorry).
      Note : if i well understand the way notepad++ works at closing : “save as” should not be used,

      I will have a try with the portable version of v8.9.3-RC,

      Again thanks for the help,

    • Kjell RilbeK

      Regex not found in large file, known limitation or bug?

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      5
      0 Votes
      5 Posts
      434 Views
      guy038G

      Hi, @kjell-rilbe, @peterjones, @Coises and All,

      In my previous post, I said :

      I did not need to use the atomic forms *+

      I did additional tests and there a difference of execution time between the two solutions : greedy quantifiers vs atomic quantifiers

      If I use the same test file , containing 524,288 correct lines, so with 0 match :

      line 1 : one;two;three;four;five;six;seven;eight;nine;ten;eleven;twelve;end line 524288 : one;two;three;four;five;six;seven;eight;nine;ten;eleven;twelve;end

      The regex ^[^;\r\n]*(?:;[^;\r\n]*){12}$(*SKIP)(*F)|^.+$ displays the message Mark: 0 matches in entire file after between 1.65s and 1.71s

      The regex ^[^;\r\n]*+(?:;[^;\r\n]*+){12}+$(*SKIP)(*F)|^.+ displays the message Mark: 0 matches in entire file after between 1.45s and 1.51s

      Now, if I add the six incorrect lines below, at the very end of the test file :

      line 524289 : one;two;three;four;five;six;seven;eight;nine;ten;eleven;end line 524290 : one;two;three;four;five;six;seven;eight;nine;ten;eleven;twelve;thirteen;end line 524291 : one;two;three;four;five;six;seven;eight;nine;ten;end line 524292 : one;two;three;four;five;six;seven;eight;nine;ten;eleven;twelve;thirteen;fourteen;end line 524293 : one line 524294 : ;two line 524295 :

      The regex ^[^;\r\n]*(?:;[^;\r\n]*){12}$(*SKIP)(*F)|^.+$ displays the message : Mark: 6 matches in entire file after between 1.58s and 1.65s

      The regex ^[^;\r\n]*+(?:;[^;\r\n]*+){12}+$(*SKIP)(*F)|^.+ displays the message Mark: 6 matches in entire file after between 1.45s and 1.51s

      Remark that, if the Match case option is not checked, the execution time increases significantly ( between 6.1s and 6.2s ) :-((

      I repeated each test many times to obtain average values !

      Best Regards,

      guy038

      Of course, the . matches new line option is not cheched and the Wrap around option is checked

    • Yan SerenadeY

      Fix npp displays Chinese characters in traditional characters in DirectWrite render mode since version 8.6

      Watching Ignoring Scheduled Pinned Locked Moved Notepad++ & Plugin Development
      4
      4 Votes
      4 Posts
      296 Views
      xomxX

      @Yan-Serenade

      https://github.com/notepad-plus-plus/notepad-plus-plus/issues/16719#issuecomment-4132203721

    • Dervars14D

      Is there a way to recover a file after clicking YES in "this file had been modified by another program" error message?

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      4
      0 Votes
      4 Posts
      180 Views
      Phil pascalP

      @Dervars14 Just checked and unfortunately the undo, ^Z, does not work. This used to be a more common occurance in the old days, Prior to Windows 7 and back in the DOS days, there was no checking to see if wanted to keep a file, it just got overwritten even if a totally different file, but just had the same name. The way we used to get around this is with a recovery program. The good thing is for a long time, whenever you save a file, it actually saves it to a different area of the dirve, precisely for this kind of incedent.

      First important thing is don’t do any work on that drive, if the data is still there, it is not protected, the more you use the computer, the more likelihood those clusters of the drive will get overwritten.

      I don’t think Windows has any internal programs, other than the Recycle bin, which is no use here, as overwritten files aren’t placed there. There is a free program called Recuva, from Piriform, the same people that do CCleaner. If possible, try and download this on another computer to a USB drive, as I said, the more work you do on the drive, the chance of losing the data.

      The other good thing with using another machine, is you quickly play around with recuva, it is very basic program, the results are in table form, so easy to rearrange. You can save any detected files to the USB drive as well. If you get the file back, then just replace the current one. And this is the way to all learn to do backups more regularly, which reminds me.

    • Võ Văn HiếuV

      Is there any way to disable the cursed "In selection" checkbox forever?

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      4
      0 Votes
      4 Posts
      210 Views
      Alan KilbornA

      @Võ-Văn-Hiếu said:

      It seems that when I select all the text (which should exceed that default number), the box stays checked even after I stop selecting.

      I’m not quite sure what your meaning is here, but…

      …and I presume that when you say “default number”, you mean 1024…

      The In selection checkbox isn’t truly dynamic; it isn’t going to change while you are selecting text. It only changes when you invoke search, and here are some examples of that:

      input focus in the editing area and you press Ctrl+f input focus in the editing area with Find window also visible, and you use the mouse to activate the Find window
    • Freon SandozF

      Unexpected match when searching files for an end-quote character (non-ASCII)

      Watching Ignoring Scheduled Pinned Locked Moved General Discussion
      4
      0 Votes
      4 Posts
      252 Views
      CoisesC

      @Freon-Sandoz said in Unexpected match when searching files for an end-quote character (non-ASCII):

      I can reproduce the file contents and the unexpected behavior

      I was able to do that, too… and now I see what is happening. The character you are calling an end quote is not the Right Double Quotation Mark, U+201D but the Double Prime, U+2033.

      Windows-1252 (and Windows-1254) contains the right double quotation mark at 0x94. However, it does not contain the double prime. The entry boxes on the file dialog are always in Unicode. (That’s how it works pretty much everywhere in modern Windows.) But if the file is in ANSI, the file search is done in ANSI, so Notepad++ asks Windows to translate the string you gave it into ANSI. Seeing that there is no double prime character in your current code page, Windows “helpfully” translates it to something that looks a lot like it… the ASCII double quote.

      Further confusing the issue is that Notepad++ never loads a file in any code page other than your system code page (which you said is 1252) or Unicode. So when you open the file in Windows-1254, Notepad++ is actually converting it from 1254 to UTF-8 and editing that way. That’s why the search behaved as expected in 1254: it wasn’t really 1254 in, it was in UTF-8.

      Bottom line… this behavior actually is “expected”… but not by any normal human being. About the only thing you can do about it is to work in Unicode wherever possible when you are using non-ASCII characters.

      It might be possible for Notepad++ to change its search so that it warned you when you tried to search an ANSI document for characters that aren’t possible in that document. I haven’t looked into it in depth; I would guess there must be a call to WideCharToMultiByte somewhere, and it could be passed the WC_NO_BEST_FIT_CHARS flag and the lpUsedDefaultChar output pointer to detect such shenanigans so the program could tell the user about it instead of potentially claiming to find something that isn’t there.

    • J

      search-and-replace NOOB question - CR and (any number)

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      4
      0 Votes
      4 Posts
      180 Views
      J

      @PeterJones
      hello and Thank You…
      I think I had read all of the references you posted, and must have misunderstood everything.
      (sigh) I’m feeling so old (LoL)
      just used your example and it worked perfectly
      …
      well, except I next will want to enter an exception for cases of a period before the first carriage return.
      I think I know how to get that working, now that you’ve given me a great direction.
      Again, Thank You!

    • H

      Harmandeep Singh Kandhari - How Can I Recover Unsaved Files After Notepad++ Crash?

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      4
      0 Votes
      4 Posts
      293 Views
      Evelyn WalkerE

      Hi Harmandeep,

      Welcome to the community.

      Yes, there is a good chance you may still be able to recover your unsaved work. Notepad++ has a built-in backup and session snapshot feature that often restores files after a crash.

      First, try reopening Notepad++. If the session snapshot feature was enabled, the file may reopen automatically with the content you were working on before the crash.

      You can also check the backup folder manually. Go to:
      C:\Users\YourUsername\AppData\Roaming\Notepad++\backup
      Sometimes Notepad++ stores temporary backup files there, which may contain the unsaved content.

      To reduce the risk of losing data in the future, it’s a good idea to enable a few settings:

      Open Settings → Preferences → Backup. Enable Session snapshot and periodic backup. Choose Remember current session for next launch. Set a backup interval such as every 7 or 10 seconds.

      With these options enabled, Notepad++ will automatically save temporary snapshots of your work and restore them if the program closes unexpectedly.

      Hopefully your file is still in the backup folder. Let us know if you need help locating it.

      Regards.

    • A

      File type associations not working

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      4
      0 Votes
      4 Posts
      320 Views
      PeterJonesP

      @PeterJones said in File type associations not working:

      it’s at the mercy of the OS as to whether the OS will propagate such settings to the user, or completely bypass them

      It worked reasonably for me. I ran my installed Notepad++ v8.9.1 As Administrator, then went to the File Association setting, picked customize, typed .pcj (which is a file extension that didn’t have any associated app or filetype), then clicked -> to move it to the Registered extensions column. If I then exit Notepad++ (to get out of Admin mode), and double-click on blah.pcj in Windows Explorer, it opened it in Notepad++. (And looking at the registry, I can confirm it added HKCR\.pcj to point to Notepad++_file, and HKCR\Notepad++_file sets the shell\open\command as expected. (But maybe you didn’t think it “worked” at this point, because it doesn’t necessarily change the text of the “file type” column in Explorer. Even if it doesn’t, the double-click did what I expected.)

      When I tried with the preferences dialog misc > .nfo, it edited the existing HJCR\.nfo to point to Notepad++_file (with a Notepad++_backup entry pointing to the original MSInfoFile. When i double-click on an NFO file, Windows actually pops up a Select an App to open this .nfo file, which includes the “Notepad++ (New)” entry (because Windows has been trained to not fully allow applications to hijack extensions, because users hate it when an app does that without their permission) – and from there, you can choose whether you really want to.

      But by doing it through the Windows OS Open With interface to begin with, you make sure Windows knows it’s you who wants the change, not the app, and so lets you do it more easily there.

      IOW: it works for me on Windows 11 as Notepad++ tries it, with the caveats that Windows 11 is trying to protect me from nefarious apps, so might require a confirmation; and when I do things the way Windows OS wants, it works as expected rather than having to do the extra steps.

    • mapsonxM

      Toolbar button names

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      3
      0 Votes
      3 Posts
      52 Views
      PeterJonesP

      @mapsonx,

      I previously said,

      I am curious where you found such advice.

      If you are talking about my reply to your 2025 question, where half of your question was about changing the icons, you misunderstood my answer, because I was talking (at that point) about Notepad++'s built-in icon-replacement, not the Customize Toolbar plugin. And I wasn’t talking about using “action names” in the button at all.