• 0 Votes
    3 Posts
    958 Views

    @golden000

    The transformations are:

    (skip 3 lines and) delete line 4 F: \A(^.*\R){3}\K^.*\R R: (empty) (skip 1st 67 lines and) delete lines 68-77 F: \A(^.*\R){67}\K(^.*\R){10} R: (empty) (skip 4 lines and) replace line 5 F: \A(^.*\R){4}\K^.* R: This is the replacement for the removed line

    Modify the {numbers} to fit your needs.

    To see how they work on the active tab, in each case, bring up the Replace dialog (Ctl-h) and set Search Mode to Reg expr, leaving the box to its right unchecked. Fill in the Find & Replace texts. With (empty) ensure there are no invisible spaces. In each case even though you maybe doing a single F&R you must use ‘Replace All’ and not ‘Replace’ (a requirement imposed by use of \K).

    Although I haven’t tested it, they should also be fine using Find in Files (or Projects). Observe good backup practices.

    If you want actual batching, so that one big operation performs all transformations in one go, you’d need a scipting language solution (that drives a sequence of regex actions from a list). Probably someone else will have a concrete suggestion.

  • 2 Votes
    9 Posts
    2k Views

    @alan-kilborn said in Edit > Blank operations > Tab to space ~ works on whole file but not only on selected text.:

    @demetrius said in Edit > Blank operations > Tab to space ~ works on whole file but not only on selected text.:

    Replace \t to four spaces is not always leads to same results.

    Well, I guess all sorts of people do all sorts of wacky things.
    Personally I would not like to be in a situation like I think you’re describing.

    There is rare cases when I have to paste code to some forum that incorrectly works with tab sizes. So I turn them to spaces.

    If you’re happy with the suggested workaround of copying some data to a second tab and reformatting it there, I’d advocate going with that idea.

    Yes, I know about this workaround. Even before I posted here.

  • How to see hex color on hover?

    Feb 2, 2022, 12:00 PM
    0 Votes
    15 Posts
    3k Views

    @ric12g said in How to see hex color on hover?:

    Where is 8.8.2?

    Assuming you mean 8.2.2 - it’s in release candidate testing with a “breaking change” (for many plugins) that will allow >2Gb file editing. I thought that’s what this was all about?

    I don’t think any of the solutions mentioned in the referenced thread “crash” 8.2.1 or lower Notepad++, they only affect Notepad 8.2.2 (upcoming) thus the scramble to “fix” them.

    NppQCP will potentially be fixed and when that’s done I’ll merge the changes into my QuickColorPicker which doesn’t exhibit the 8.2.2 crash behavior now, but may not be capable of dealing with >2Gb files (I’ve only tested on Notepad++ theme files and simple XML docs that have the various color representation schemes the plugin looks for).

    I apologize for sounding harsh in my previous comments. I didn’t think in the 15 minutes between @Alan-Kilborn 's first post to the previous thread and your first reply about “None of them works in 2022” there was sufficient time to read, explore and test any or all of the solutions offered. Add to that we didn’t find out what version of Notepad++ you were using - I just assumed it to be the 8.2.2 RC since that’s been top of mind all this week and you’re comment about them not working. I’ve been in a scramble to update plugins that I’ve forked and de-facto maintain as they were abandoned. Unlike you, I’m not a programmer, I just can tinker with existing code and make some fixes here and there. If you are indeed offering to help:

    " thank you that’s a good idea…"

    I’d be happy to accept pull requests on my fork - likewise, I’m sure @chcg would accept PRs on the NppQCP repo.

    Cheers.

  • 0 Votes
    5 Posts
    365 Views

    @neil-schipper

    @hellena-crainicu This exact problem was recently solved here.

    SUPER ANSWER. Your solution is great:

    FIND: (?<=[^\r\n])\R(?=[^\r\n])

    Also, the one made by @guy038 is super:

    FIND: (?<!\n|\r)\R(?!\R)

  • lost word completion

    Feb 2, 2022, 1:31 PM
    0 Votes
    3 Posts
    261 Views

    @michael-vincent Yes, very good. Shift+Enter seems to works too. Strange, but thanks a lot.

  • Everything showing in one column

    Feb 2, 2022, 12:05 PM
    0 Votes
    3 Posts
    224 Views

    @ryano

    On a one time basis, you could do this.

    Take some data (since, pet peeve, you didn’t provide anything textually) that I made up:

    aaaaaaaaaaa=bbbbbbbbbbbbbbbb aaaaaaaaaaaaaaaa=bbbbbbbbb aaaa=bbbbbbbb aaaaaaaaaaaaaaaa=bbbbbbb a=b

    Replace = with = plus a “good quantity” of spaces to get:

    aaaaaaaaaaa= bbbbbbbbbbbbbbbb aaaaaaaaaaaaaaaa= bbbbbbbbb aaaa= bbbbbbbb aaaaaaaaaaaaaaaa= bbbbbbb a= b

    Make a column selection (using Ctrl+Shift+arrows) like this:

    7f7d1e4f-3710-4d7d-9ad8-a1e618b03b17-image.png

    Press Ctrl+Delete to obtain:

    aaaaaaaaaaa= bbbbbbbbbbbbbbbb aaaaaaaaaaaaaaaa= bbbbbbbbb aaaa= bbbbbbbb aaaaaaaaaaaaaaaa= bbbbbbb a= b
  • CTRL multi-select not functioning

    Feb 2, 2022, 12:00 PM
    0 Votes
    3 Posts
    1k Views

    @alan-kilborn Thank you, I didn’t. Fixed.

  • Save as .md default

    Jan 27, 2022, 6:30 PM
    0 Votes
    11 Posts
    3k Views

    @peterjones said in Save as .md default:

    @patrick-danilevici ,

    I previously said,

    hardcoded SaveAs menu.

    Good news: there is at least a workaround in the Save As menu. It turns out that wasn’t as hardcoded as I thought.

    If you go to %AppData%\Notepad++\langs.xml, and edit it (following config-file-editing recommendations), adding

    <Language name="Fake" ext="fak fake false"/>

    … then save and restart, then File > Save As gets a new entry:
    b460b6af-85bc-42d4-9302-6a53b3b677fd-image.png

    Excellent! Thanks a lot!

  • Help wanted for beginner

    Jan 30, 2022, 7:39 PM
    0 Votes
    20 Posts
    2k Views

    @peterjones thank you for your response much appreciated.
    Yes I am a beginner at notepad++
    Regards
    Khalid 🙏🏾

  • 0 Votes
    4 Posts
    303 Views

    @guy038 said in Searching something for automatition:

    guy038

    Hi guy038,

    that’s pretty cool.

    Thank you very much

  • 0 Votes
    2 Posts
    2k Views

    @oa-klk ,

    Notepad++ is a text editor. It edits the whole text file.

    There is no linux command header. The actual command is head, and it only displays a part of a file, not edits the file. Notepad++ is for editing, not just for displaying to the console.

    If all you want is to keep just the first 10 lines in your file, then delete everything else and save (!!!but then the original file will be overwritten with just the 10 lines, and nothing else!!!).

    If all you care about editing is in the first 10 lines, then just load the whole file and only edit those first 10 lines. If it really bothers you to see the other lines, you can select the lines you want to hide, and then hit View > Hide Lines (or Alt+H)

  • 0 Votes
    4 Posts
    455 Views

    @sw-tool-designer ,

    Glad it worked for you. Just so you know, that first screenshot you showed was also showing it docked, and it just needed re-sizing, like you did in step 5.

    Because when it’s undocked, it looks different:

    undocked
    ef82fc2f-108a-4c89-bdeb-da21b8e49e7e-image.png

    docked
    32759d40-bf2c-446f-a57c-05d06d214650-image.png

    Do you notice how the window-closing red X (undocked) changed into the much smaller docked-panel X? That’s how I am certain you were docked properly before.

    Another thing to keep in mind when docking: if you are moving from TOP docking to RIGHT docking, you might try to drag your panel over to the upper-right half of the screen (the red arrow is meant to simulate your mouse cursor), and you want it to dock to the right (the magenta box):
    2a57e1fc-2494-4fdb-b4fe-c1dd0d72c70f-image.png

    Instead, it never shows the magenta box, and refuses to dock. But what you really have to do is go down into the editor portion of the window to drag the panel there, and it will show the docking box as indicated by the magenta:
    bd08ed3e-b727-4988-8f42-d4897c5a41a6-image.png

    Then, when you let go, it will vertically re-grow the editor panel and project panel both to the full height you expect:
    aa147161-33fe-46a7-8a75-9e3f5fb706cb-image.png

    When dragging the Project Panel (or other dockable panel), if you are having trouble, try to make sure you are going relative to the editor panel(s) – you cannot dock the panel to a new edge if your cursor when trying to hit that edge is still inside the original panel location. (If you already have a different panel on the destination edge, then just line up the cursor with the title bar of that existing panel.)

  • 0 Votes
    7 Posts
    400 Views

    Thanks everyone for the input. :)

  • JSON Plugin Does Not Work

    Jan 24, 2022, 9:29 PM
    0 Votes
    3 Posts
    4k Views

    @peterjones said in JSON Plugin Does Not Work:

    You might also make sure you don’t have I.T. department blocking the github download,

    Thanks for the reply. I don’t have any IT dept blocking downloads, yet I think you identified the problem. I believe my laptop downloads directory is a Teams folder (mirrored to my work cloud) and, when validating the checksum for NPPJSONViewer_x64.zip it is in fact different once it gets saved to my downloads folder.

    I found an alternate way to download the file and validated the checksum to confirm that it matched (using command prompt: CertUtil -hashfile <path to file> SHA256).

    Once the checksum was confirmed, I manually installed it (by using Settings>Import>Import Plugins).

    Now it works! Thanks.

  • Remove unwanted Carriage Return

    Jan 25, 2022, 5:11 AM
    0 Votes
    27 Posts
    8k Views

    @neil-schipper ,

    Reading the specs, \d and \R are “peers”,

    I disagree. But I do agree that maybe it could be explained better in the Notepad++ Searching document. However, that document does point you to the canonical Boost regex documentation, which is the official spec for the regex used by Notepad++; and, in my opinion, the Boost documents can only be interpreted to say that \R behaves differently than \d or \r or \n or even \h or \v or \s.

    In that document, you will see that \r, \n, \t, \v and others are listed under the sentence, “The following escape sequences are all synonyms for single characters:” – meaning that each of those sequences matches only a single character at a time. So \v might match any of the vertical spaces (CR, LF, and the weird ones), but a single \v in a regex will only match a single character at a time. So if you had the string AB\r\n and matched for \v, the first FIND would find just the \r.

    The \R is described in its own section called “Matching Line Endings”, which shows that it expands into (?>\x0D\x0A?|[\x0A-\x0C\x85\x{2028}\x{2029}]), which is an expression with parentheses around it and including an internal alternation | – searching for (?>), you find it’s the syntax for an independent sub-expression . This is different than all the single-character escapes listed previously. With the same string AB\r\n, searching for \R, the first FIND would match the two-character sequence \r\n. The \R behaves differently than all those other single-character escapes, because it can match multiple characters at once.

    Then if you back up a few paragraphs to Character sets, you will see the rules for character sets, including the sentence, “A bracket expression may contain any combination of the following:”. The sub-sections that follow underneath that are “Single characters”, “Character ranges”, “Negation”, “Character classes”, “Collating Elements”, “Collating Elements”, “Equivalence classes”, “Escaped Characters”, and “Combinations”. Note that none of those include “independent sub-expression”, or any other term that references a parentheses-based expression.

    The bracket[]-based character sets cannot contain parentheses()-based expressions. That is why \R does not work in a bracket[]-based class.

    An updated version of the usermanual mentions of \R can be found at https://github.com/pryrt/npp-usermanual/blob/backslashBigR/content/docs/searching.md (that temporary URL will be changed to the permanent URL by moderator power once the changes are merged into the main usermanual repository)

    First, it’s been moved out of the Control Characters section into its own special section: 9fe5e730-8a6e-4086-a0bf-07a317ee0e98-image.png Second, the Character Classes section has been improved to note that character classes cannot contain any parentheses-based group, including \R. 667dc9c3-3c5a-4d48-b84f-e1e56ece7d9e-image.png Third, in the Character Escape Sequences section, which contains the \h, \v, and \s (and thus people might assume that \R fits in there), it is clarified that being a group causes \R to be treated differently: 8cf239b3-bb64-4bdc-ae17-f5735e483916-image.png

    Hopefully, this is sufficient description in enough locations that it will prevent future confusion when users are looking up the meaning of \R and whether or not it can go inside a character class.

  • Notepad++ v8.2.1 Plugins

    Jan 31, 2022, 10:15 AM
    0 Votes
    3 Posts
    292 Views

    @shru-sd

    Could it be that you are still using the outdated Plugin Manager and not the new Plugin Admin?

  • Blank lines

    Jan 31, 2022, 3:16 AM
    0 Votes
    9 Posts
    1k Views

    @khai29382 Oops. I goofed. Link in step 1 is this!

  • Lost document list panel

    Aug 31, 2021, 10:48 PM
    0 Votes
    7 Posts
    2k Views

    @p-k said in Lost document list panel:

    if a user upgrades across multiple versions (skipping 8.1.3) he/she won’t see these release notes, but will see only the latest release notes.

    Then look for the older release notes as well. For example, the complete change history is stored at https://github.com/notepad-plus-plus/notepad-plus-plus/wiki/Changes , so you can look over nearly two decades of changes on about 3 pages. Enjoy.

    And anytime you see something change unexpectedly, and cannot find it in the most recent change list, you can try to look it up in the Online User Manual, which is linked from the ? (help) menu in Notepad++ as “Notepad++ Online User Manual”.

    For example, for this feature, since it used to be on the Settings > Preferences > General tab, you would go to npp-user-manual.org, click on Preferences, then in the jump list go to the General subcategory of the Preferences page, then read down until you come to the “Document List Panel”, which is the feature you were looking for.
    57a2633d-437b-4935-8df3-4506ba8cc3ab-image.png
    There, as you can now see, it specifically said “This section removed in v8.1.5.”, and in the “Show” checkbox section, it says that control was removed in v8.1.3, and says exactly where it is controlled now, and links to the appropriate section of the usermanual.

    But I wouldn’t call it entirely an improvement.

    You are entitled your opinions. Personally, I think that the Document List panel should have always been controlled in the same place that all the other Panels are controlled (that is, where they are now): so to me, it was a drastic improvement.

    If an application changes its expected behaviour after an upgrade, then it’s not an improvement.

    You cannot change software without changing the behavior. That’s the definition of change. If you don’t want change, don’t upgrade. (There’s even a toggle in the preferences which will turn off automatic upgrades, to help people who don’t want Notepad++ to change. You can find it documented in the User Manual.)

  • 0 Votes
    2 Posts
    183 Views

    This is no longer as much of a concern for me since I booted the HDD to save the files that only existed within the session and am gonna take my time organizing them all. Others in this situation would probably appreciate a solution if anybody knows one, though.

    For the record, saving a session composed of only saved files didn’t fix it. I’m guessing the file locations switching between the D and C drive depending on which one got booted is to blame.

  • 0 Votes
    3 Posts
    1k Views

    @pnedev

    I just used snip and sketch on my Windows to take screenshots of the differences. fortunately the comparison was not many pages

    it would be great if Notepad++ could add that as a feature to the compare plugin…

    Thanks
    Nick