• Can't find the unsaved tabs after Window 10 automatic update

    2
    0 Votes
    2 Posts
    266 Views
    PeterJonesP

    @Vincent-Pringalle said in Can’t find the unsaved tabs after Window 10 automatic update:

    2 days ago after an unsollicited Windows 10 update, Notepad+ reopened without any tabs. The C:\Users\USER\AppData\Roaming\ does not contain any Notepad++.

    If you only use Portable with doLocalConf.xml in the portable directory, then then it will never create anything in the AppData hierarchy. So looking there most likely won’t help you with your portable version.

    Moreover as I use Notepad++ in Portable mode, the dir …_portable_Notepad++\App\Notepad++\backup\ defined in Settings / Preferences / Backup contains some unsaved tabs but with outdated contents : the tabs modified last week were dated feb 2022…

    Could you show us

    A screenshot of Settings > Preferences > Backup Paste a copy of your ?-menu’s Debug Info let us know where you got your portable Notepad++

    Do you have nppLogNulContentCorruptionIssue.xml in your portable directory? if so, did it create nppLogNulContentCorruptionIssue.log in the portable directory when the crash occurred? If so, its contents might be able to give some insight into the sequence of events that led to your periodic-backup-and-session-snapshot being corrupted.

    In order to proceed with my works, I backuped this backup dir before reusing Notepad++ again.
    Could someone help me retrieving my recent unsaved tabs dated last week ?

    Most likely not: if the files aren’t in the portable backup directory, then somehow Notepad++ was convinced that you had told it that it was okay to delete the unsaved files, and so they haven’t been saved. At that point, as it mentions in our backup FAQ, you might have to resort to file recovery software (we give the example of “Recuva”, but make no guarantees or warranties regarding that separate piece of software), which may or may not be able to see the no-longer-visible files in the portable backup directory. That FAQ has suggestions for how to prevent this loss of data in the future.

  • NPP+ 8.5.4 Now Folder As Workspace undocked and can't re dock it.

    4
    0 Votes
    4 Posts
    285 Views
    Alan KilbornA

    @Dennis-Kathrens said in NPP+ 8.5.4 Now Folder As Workspace undocked and can’t re dock it.:

    Not sure HOW it became undocked. I only noticed it floating on a subsequent app opening.

    Probably a “mouse stutter” that wasn’t harmless. I hate when such a stutter happens to me, but I know of no way to prevent it. Hopefully you know what is meant with this…

    no clues about how close I was to a permissible drop location. I’m thinking the visual feedback could be better.

    There IS visual feedback; probably it could be better (but that’s true of most things in life). IMO the user manual describes this fairly well.

  • XML Tools Plugin: "Pretty Print" not working- is it the file?

    8
    0 Votes
    8 Posts
    2k Views
    pseudocoderP

    I know this is an older thread but I’ve had this a few times and each time it was because the source file is read-only!

    Seems obvious I guess but as there’s no error message it always gets me.

  • Need help please

    7
    0 Votes
    7 Posts
    571 Views
    PeterJonesP

    @Wahlla-Magla said in Need help please:

    @PeterJones
    the reference post had nothing to do With this post, I certainly can’t apply the same regx and they are Two opposite things.

    The same regex – of course not. I never said you could. But it has the same concepts. And I will prove that below.

    I posted this so that someone can help me fix it because I couldn’t find it Someone else.
    I appreciate the work you’re doing and I understand that you’re doing it for free and I’m not here to argue I just need help, I use notepad++ every day And I’m definitely learning.

    You posted this so that we’d do your work for you. And you got it again this time. Lucky you. But if you haven’t figured out the concepts of the previous regex in the more-than-1.5-years since that last post, it’s really hard for us to believe you are really here to learn instead of trying to guilt us into doing your work for you.

    So here is a description of the concepts that Alan’s regex from 2021 should have taught you, and an exaplanation of how the concepts that were presented in your previous question are exactly the same concepts you are still working with here – at the same time, giving you the answer you wanted to this specific problem.

    In the previous post, you had some colon-separated text

    item:email:item:password:item:item:item:item:item:item:item:item:item

    and wanted to do something with text between the colons, but only specific fields.

    In this post, you have colon-separated text

    1111:55555:8383:jjjsyn:ayahj:jsjsja:jjsjjsjjs

    and want to do something with the text between the colons, but only for specific fields.

    In the previous post, the search (?-s)^.+?:(.+?):.+?:(.+?):.+ grabbed the second and fourth fields from your colon-separated text, and ${1}:${2} did the replacement so everything was replaced with just groups#1 and #2 (which were your second and fourth fields) with a colon between

    This time, what you want is to grab the text from the first and second fields, and replace it with the same text, but with no colon between.

    So the concepts involved:

    you want to start at the beginning of a line, so that you know which field you are in at any point in the regex – this was true of both. You do this with the ^ anchor you want to be able to temporarily store the contents of one or more of the fields – this was true of both. As Alan showed you in 2021, you do this by the (.+?) sequence you want to split the fields based on the colon – both last time and this time. Using the : in the regex in the right places does exactly that. you want to replace some or all of the line with the contents of groups you saved – you wanted this before, and you want it this time. The difference is that before, you wanted to replace the whole line with those contents, and this time, you only want to replace part of the line with those contents.

    So to evolve the old regex into the new:

    The groups you care about are the first and second instead of the second and fourth. So that will change the regex from (?-s)^.+?:(.+?):.+?:(.+?):.+ to (?-s)^(.+?):(.+?):.+?:.+?:.+ You don’t want to affect anything after the second colon from the original text. So that will mean you don’t need to continue the match beyond the second colon in the regex, so just trim it down: (?-s)^(.+?):(.+?): – now it just matches the first two fields and the colons that follow them. (I included the second colon to help anchor things) You want to replace that smaller matched section with the contents of the groups, and (since I included the trailing colon) a colon after, but no colon between. So you take the original replacement from the previous discussion, ${1}:${2}, which put a colon between the group#1 and group#2, and instead just want the two groups together with a colon after, like ${1}${2}:

    In the end, you end up with

    FIND = (?-s)^(.+?):(.+?): REPLACE = ${1}${2}:
    with just a couple of quick changes to the previous regular expression

    With initial text

    1111:55555:8383:jjjsyn:ayahj:jsjsja:jjsjjsjjs 6262g:yysh:ysyahj:hjjma:ksksygg:jsjjsj:jsjjsjz

    and doing Replace All with the find/replace I showed above, I get

    111155555:8383:jjjsyn:ayahj:jsjsja:jjsjjsjjs 6262gyysh:ysyahj:hjjma:ksksygg:jsjjsj:jsjjsjz

    That is the text you said you wanted to get.

    Thus, I have shown you that it was exactly the same concepts involved for breaking the line of text into fields, and exactly the same concepts involved for doing the replacement.

    Stop lying to yourself: you can learn this, but you have to put in the effort to do so – and since you couldn’t see that it was the same ideas this time as last time, it shows that you haven’t put in the effort to understand. I’ve given you the blow-by-blow description for the slight changes necessary this time, in the hopes that you will start to see the concepts behind the regex, so that you can continue to customize those same ideas next time.

  • 'linter' plugin issues

    3
    0 Votes
    3 Posts
    614 Views
    ThosRTannerT

    @PeterJones thanks. I eventually took a deep breath and cloned the repo, copied the latest header files and rebuilt. And - it now works…

  • Selecting text after =

    6
    0 Votes
    6 Posts
    1k Views
    drkkk whrrrD

    @Alan-Kilborn Thank you!

  • Function Parameters Hint very Limited for Python

    9
    0 Votes
    9 Posts
    791 Views
    Ahmed AbuharthiehA

    @mpheath
    Sounds good, I will give it a try. Thank you for your help

  • Notepad++ NPPEXEC Unable to Properly Run Pygame Code

    6
    0 Votes
    6 Posts
    811 Views
    Ahmed AbuharthiehA

    @Vitalii-Dovgan
    Cool, I just checked out the link. Looks good!

  • how to clear or change this ?

    6
    0 Votes
    6 Posts
    314 Views
    Sophie CongS

    @PeterJones Thank you for the explanation.

  • How to replace a dash with space within a word and not change after

    7
    0 Votes
    7 Posts
    2k Views
    KingfisherK

    @Kingfisher
    Here is my solution ending up with 2 expressions

    undefined

    ^(\w+)-(\w+).(\w+)>
    $1 $2

    ^(\w+).(\w+)>
    $1$3

    undefined

    And then I bundble them in a macro with a hot key.

    Thanks for your help!

  • java Program

    2
    0 Votes
    2 Posts
    163 Views
    PeterJonesP

    @Amol-Kamble

    Type the code using your fingers on the keyboard.

    This isn’t a “how do I program” forum. This is about Notepad++, the text editor.

  • Violet highlighting ?

    6
    0 Votes
    6 Posts
    1k Views
  • Help duplicate files

    30
    0 Votes
    30 Posts
    3k Views
    wonkawillyW

    @guy038

    You are right: it was my copy-paste mistake. I’m sorry for that. But please notice the original screenshots are actually correct, in fact in my answer are removed the lines 1 and 3 and in fact in screenshots are present the lines 2 and 4 but not 1 and 3:

    b6a294af-5c71-41b9-8937-9bb06677e407-image.png

    Probably I might have screenshotted the right file but copy-pasted from the wrong one of those I was experimenting with. Sorry again.

    So I suppose that both methods work well after all.

    ;30-10000010-9;86;0;0;0;1;230178;17/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;86;0;0;0;1;230133;17/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;86;0;0;0;1;770772;17/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;9072;0;0;0;1;420302;17/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;86;0;0;0;1;770192;17/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;86;0;0;0;1;770902;17/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;86;0;0;0;1;770412;17/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;705;0;0;0;1;177141;17/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;86;0;0;0;1;770171;17/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;86;0;0;0;1;770546;17/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;10;0;0;0;1;347211;17/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;9072;0;0;0;1;420302;18/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;9072;0;0;0;1;420302;19/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;9072;0;0;0;1;420302;20/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;10;0;0;0;1;770192;21/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;10;0;0;0;1;770902;21/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;10;0;0;0;1;770546;21/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;10;0;0;0;1;770412;21/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;10;0;0;0;1;230178;21/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;9072;0;0;0;1;420302;21/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;10;0;0;0;1;230133;21/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;10;0;0;0;1;770711;21/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;9072;0;0;0;1;420302;22/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;9072;0;0;0;1;420302;23/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;86;0;0;0;1;770902;24/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;86;0;0;0;1;770412;24/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;86;0;0;0;1;770546;24/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;86;0;0;0;1;230178;24/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;86;0;0;0;1;770711;24/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;86;0;0;0;1;770192;24/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;9072;0;0;0;1;420302;24/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;86;0;0;0;1;230133;24/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;9072;0;0;0;1;420302;25/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;9072;0;0;0;1;420302;26/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;9072;0;0;0;1;420302;27/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;9072;0;0;0;1;420302;28/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;10;0;0;0;1;170175;29/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;9072;0;0;0;1;420302;29/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;11175;0;0;0;1;347211;29/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;4066;0;0;0;1;121012;29/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;86;0;0;0;1;230133;30/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;86;0;0;0;1;230178;30/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;86;0;0;0;1;770192;30/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;86;0;0;0;1;770412;30/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;86;0;0;0;1;770546;30/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;86;0;0;0;1;770711;30/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;86;0;0;0;1;770902;30/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;9072;0;0;0;1;420302;30/05/2023 12:00;1;1;S72.3;1; ;30-10000010-9;9072;0;0;0;1;420302;31/05/2023 12:00;1;1;S72.3;1;
  • Remove forced 70-80 char line limit from multiple text files

    5
    0 Votes
    5 Posts
    858 Views
    FreshensteinF

    That is EXACTLY what I was wanting. Thanks so much!

  • Pythonscript plugin: how to end the script but not quit Notepad++

    13
    1 Votes
    13 Posts
    2k Views
    Victorel PetrovichV

    @Mark-Olson
    Well, when I get to the point that functions won’t suffice, I’ll consider classes.

  • VTT - How to convert?

    4
    0 Votes
    4 Posts
    785 Views
    Terry RT

    @BLU-APPLE

    Understand that Notepad++ will open any file, even if it’s a binary file (executable is one type of binary file). That’s not to say that Notepad++ is the most appropriate application to view every file with.

    Understanding what a file is using the file extension is just a first step. You should also try to figure out where the file came from as that can have a bearing on the content. As I said before the extension can often give you some information (Google search), but isn’t a 100% reliable means to identify the file type.

    Terry

  • 0 Votes
    3 Posts
    431 Views
    Cr8zy_IvanC

    @Alan-Kilborn Very interesting take. Not everyone takes the time to detail their thought process as you have, which is clear and comprehensive. Rarely is feedback online this constructive. It is very appreciated. Thank you!

  • Macro shortcut breaks after update

    7
    0 Votes
    7 Posts
    804 Views
    deleeleeD

    @PeterJones said in Macro shortcut breaks after update:

    Good News

    I ran some experiments: the following macro works the same in v8.5.2 (the last version before the macro change) and v8.5.3 and v8.5.4.

    This means that the five predefined XML named entities all work, as do the two-hex-digit entities for CR and LF (and, not shown, a test of all the two-hex-digit entities for visible ASCII characters from through ~ all work as well). So this is going to make your job even simpler: to include a quote mark inside the sParam, you can encode it as sParam=""" or as sParam=""" . I wil be updating the FAQ shortly.

    Thanks Peter 🙂

  • How to preview HTML & Highlight words

    1
    0 Votes
    1 Posts
    287 Views
    No one has replied
  • Skip Large files in search.

    3
    0 Votes
    3 Posts
    663 Views
    Terry RT

    @Jim-Welch said in Skip Large files in search.:

    I want to skip ALL large files

    Whilst I somewhat agree with @Mark-Olson that it won’t be implemented I think that it’s a reasonable request to make. Firstly NPP is offering up a msg so the user can elect to NOT open a large file, that suggests the developer wants to offer an alternative just in case the user selected a big file without realising it. Could that msg also offer up a tick box to say “for all large files”?

    As there are other apps which already offer this option, that works 2 ways. Firstly another app which does offer the option, so use it. But then if another app does offer the option, maybe it has been a reasonable request after all (for that app’s developer), so maybe NPP’s developers should consider it also.

    In terms of actually getting your request before the developers nose, this isn’t the place. In our FAQ section, read the document called Feature Request or Bug Report which refers you to GitHub.

    If you do decide to load the request onto GitHub (checking that none already exist first) please do add another post here linking to that request.

    Terry