• Find dialogbox

    3
    0 Votes
    3 Posts
    123 Views
    PeterJonesP

    @Eli-Khoury said in Find dialogbox:

    How to have the “Find” in the “Status bar”?

    Are you talking about Incremental Search, like in the following screenshot?

    bfea5405-6c6f-4304-a243-2cb55921399d-image.png

    Search > Incremental Search (default key binding = Ctrl+Alt+I) will show that extra search tool near the Status Bar. It’s not the full-featured Find dialog (because that obviously wouldn’t fit), but it provides normal (non-regex) searching

  • Regex Generation Program

    3
    0 Votes
    3 Posts
    164 Views
    RonR

    @PeterJones Thank you! That one did work (I thought I had tried it before I posted and it didn’t work.). But it worked when I tried it again!

  • Delete a numbered line..

    8
    0 Votes
    8 Posts
    238 Views
    Alan KilbornA

    @PeterJones said in Delete a numbered line..:

    I was going from memory, on my phone, just before bed.

    Bad plan. :-)

  • Save All and Save event support

    3
    0 Votes
    3 Posts
    174 Views
    Alan KilbornA

    The OP described his use case for the need he expressed here, on the github site. Although I wasn’t able to give him resolution on the question he asked here, I did come up with a sample script that might meet his need for solving his use case. Interested readers are directed to the github site, via the link in my previous posting.

  • 0 Votes
    11 Posts
    797 Views
    Alan KilbornA

    The problem has been solved and the fix will be in the upcoming 8.7.1 release. Details are HERE.

  • Same problem with Npp 8.7, no colors copied with Nppexport anymore

    5
    0 Votes
    5 Posts
    488 Views
    Ben SacheriB

    @PeterJones

    Thank you for making this post. I’ve been disappointed that I can’t paste with formatting into Outlook as I used to. After reading your description, I see that Outlook supports the same feature as Word does, so Paste “Keep Source Formatting” works perfectly.

    Note that in Outlook, you can press ALT, H, V, K to paste with formatting without using the mouse.

    -Ben

  • Replace bookmarked lines from one file to bookmarked lines in another file.

    18
    0 Votes
    18 Posts
    2k Views
    guy038G

    Hi, @larlei, @terry-R and All,

    However, @larlei, given the same INPUT text :

    01 01 <name>NAME-1</name> 02 <name>NAME 1</name> 03 10 <name>NAME-2</name> 04 <name>NAME 2</name> 05 19 <name>NAME-3</name> 06 <name>NAME 3</name>

    Then, the modified search regex of @terry-r, below, with an question mark, after the group 2 ([^<]+) :

    SEARCH (?-s)^\d+\h(\d+\h)([^<]+)?.+\R[^<]+(.+\R)

    REPLACE \1\2\3

    Does match and, after replacement, you get the expected OUTPUT text :

    01 <name>NAME 1</name> 10 <name>NAME 2</name> 19 <name>NAME 3</name>

    Let’s go back to the wrong syntax of the regex S/R, without the question mark. Why this regex does not find any match ? Well …

    From beginning of line, it searches for some digits, followed with one horizontal space character, and this twice ( the part ^\d+\h(\d+\h) )

    At this point, it tries to find some characters, all different from an opening tag delimiter <. But this case is impossible as an opening tag delimiter < follows, right before name>. So the overall search regex fails !

    Now, adding the exclamation mark, after the group 2, means that all the group contents are not mandatory. Thus, it can be ignored and the following part .+\R does match the remaining of the first line, including its like-break ( \R ) !

    And, indeed, I verified that, against our INPUT text, the optional group 2 ([^<]+)? is always EMPTY !

    In other words, you can simplify your regex S/R to this syntax :

    SEARCH (?-s)^\d+\h(\d+\h).+\R\d+\h(.+\R)

    REPLACE \1\2

    So, from the INPUT below :

    01 01 <name>NAME-1</name> 02 <name>NAME 1</name> 03 10 <name>NAME-2</name> 04 <name>NAME 2</name> 05 19 <name>NAME-3</name> 06 <name>NAME 3</name>

    With this new S/R , you would get the same OUTPUT as above, i.e :

    01 <name>NAME 1</name> 10 <name>NAME 2</name> 19 <name>NAME 3</name>

    BR

    guy038

  • Search with content exclusion

    19
    0 Votes
    19 Posts
    3k Views
    BeatBullzB

    @guy038 Haha, well this was really a bit unusual.
    Big big thanks for the help, it was exactly what i needed!
    Best wishes!

  • Pregunta de novato

    2
    0 Votes
    2 Posts
    117 Views
    Alan KilbornA

    @Diego-Vico

    Wouldn’t you just uncheckmark this checkbox?:

    5d2292a2-0b19-4aec-9444-b1a220e7f4f0-image.png

  • Notepad++Search and Replace Bat Operation ?

    3
    0 Votes
    3 Posts
    165 Views
    CoisesC

    @Daniel-Rafflenbeul said in Notepad++Search and Replace Bat Operation ?:

    is it possible to run Notepad++ in a batch to search and replace Strings ?!

    No. A good choice for that is sed from the GnuWin32 project (which is a Windows port of many of the command line GNU Linux tools).

  • I want change style token individually

    11
    1 Votes
    11 Posts
    484 Views
    PeterJonesP

    @gonyaliselim said in I want change style token individually:

    If i add highlights when someone open that txt on his computer would can he see my highlights as it

    Sorry, no. Text files have no way to store things like highlighting – they are literally saved as just the text characters in the file. Notepad++ is not going to add any new binary commands or metadata to the file to be able to store such information (if it did, it would cease to be a text editor and instead would be a rather primitive, 80s-style word processor). [see, for reference, FAQ: Notepad++ is a Text Editor, not a Word Processor]

    If you really needed to share the highlights, you could either print to PDF (if you don’t already have a print-to-PDF printer, you can search the internet to find a print-to-PDF driver that works for your needs), or you could use the Plugins > NppExport commands to export with the highlights to RTF or HTML (or put all formats into the clipboard, then paste into the Word Processor of your choice). But once you export to RTF or HTML or paste into a Word Processor, the file you are sending ceases to be a text file. We cannot decide for you whether or not that meets your needs.

  • How can I unmark any seperated word?

    18
    0 Votes
    18 Posts
    3k Views
    Alan KilbornA

    Similar topic HERE.

  • Windows 11 24H2 compability?

    2
    1 Votes
    2 Posts
    227 Views
    Snabel42S

    Hej!

    Have a look here , which in fairness just says “Current Version”.

    24H2 is new enough that likely the user base is somewhat limited.
    But people are running it and it looks like very few reports of actual explosions :)

  • Paste text without jumping to cursor

    8
    0 Votes
    8 Posts
    604 Views
    Alan KilbornA

    @Coises said:

    The necessary function already exists: SCI_INSERTTEXT

    Good eye.
    I would have thought that function also does things to “jolt the screen”, but apparently not.

    @PeterJones

    Very similar, but simpler and less “raw”:

    from Npp import * try: editor3h # third editor, hidden except NameError: editor3h = notepad.createScintilla() def get_stream_text_from_clipboard(): retval = '' editor3h.clearAll() editor3h.paste() if editor3h.getLength() > 0: retval = editor3h.getText() return retval editor.insertText(editor.getCurrentPos(), get_stream_text_from_clipboard())

    Note that the extra effort to get the clipboard text is because PythonScript doesn’t support a way to get current clipboard contents. It can paste the contents with editor.paste(), but if you want to avoid side effects from paste (as we do here) or you want to modify the clipboard text before inserting it, there’s no super simple (i.e. function call way to do it).

    Note also that my get_stream_text_from_clipboard() function only works with non-column block data (as its name implies).

    BTW, there was a PythonScript request that such a function be created, see HERE, but it seems to be an issue that isn’t going anywhere.

  • 0 Votes
    6 Posts
    416 Views
    guy038G

    Hello, @DSperber1, @mark-olson, @mkupper and All,

    @@DSperber1, I’m pleased that you’ve got the right program ( mrcdat2txt.exe ) to edit your .mrcdat log files :-))

    Now, before your last reply, I tried to guess the similarities between some parts of your .mrcdat file and, indeed, I’ve found some !

    As you can see on the picture below :

    Each row of your table seems to begin with the FFFE sequence

    Each row of your table seems to end with the db01 sequence

    A four zero-byte sequence occurs in middle of each section

    The Yellow sequence looks like a valid UTF 16 LE BOM sequence of characters. Thus, to my mind, I thought to get valid strings after suppression of all zero bytes, in these lines …

    … And bingo ! You can verify that each Mauve/Pale Violet line, below, correspond to the File Name part of each line of your table !

    97218bb2-d0e7-4fca-a0f9-b03c9b833074-Clipboard_10-16-2024_01.png

    Best Regards,

    guy038

  • Find & Replace

    8
    0 Votes
    8 Posts
    456 Views
    Terry RT

    @guy038 said in Find & Replace:

    When the Regular expression search mode is set, running the Boost regex engine :

    And
    Sixthly, you may use \Q$\E which allows any characters within the \Q and \E to be accepted as literals within a regular expression. In this example the $ is the literal character.

  • Full file Path to Clipboard with forward slash

    7
    0 Votes
    7 Posts
    1k Views
    mkupperM

    To closer-replicate what @keep2000 was asking for I took @Alan-Kilborn’s code and created a new scriptlet

    editor.copyText("file://" + str(notepad.getCurrentFilename().replace('\\', '/')))

    and then assigned the keyboard shortcut Alt+/ to it. Alt+/ now loads the current forward slash formatted file path into the copy/paste buffer.

    In my case also I wanted the file:// prefix as part of the results.

  • How do I disable this really annoying popup ?

    3
    0 Votes
    3 Posts
    173 Views
    Joey MammaJ

    @PeterJones Thank you so much !!! I found the plugin. It’s called Programmer’s Pal. I tried every setting I could think of and it wouldn’t disable. Once I uninstalled PP I’m golden. I appreciate the help !!!

  • Printing multiple pages per sheet? How???

    2
    0 Votes
    2 Posts
    246 Views
    CoisesC

    @Hans-J-Albertsson said in Printing multiple pages per sheet? How???:

    Even the lowly Windows Notepad can do that… so why can’t NPP do that???

    On Windows 10, with a Brother HL-L2395DW printer, I’m not seeing any difference between Notepad and Notepad++. In both programs, multiple page printing is controlled in the printer driver, not the program. So, click File | Print…, then select the correct printer/driver in the Windows Print dialog, then click the Preferences… button. From there on, the details are specific to your printer driver.

  • Does NPP have selective box editing?

    13
    0 Votes
    13 Posts
    463 Views
    Alan KilbornA

    @PeterJones

    Is it worth some additional text in the manual, e.g. …

    Normally the caret is confined to positions on its line to the left of the line-ending character(s) [side note: not sure even if line-ending stuff is defined adequately in the manual]. When virtual space is enabled, the caret is freed from its confinement and can be placed to the right of line-endings. This has no real effect unless it is followed by the typing of some character, at which point the virtual space is filled with actual space characters to the left of the caret, to fill from the existing line entry to the column of the caret. The new line-ending is then placed to the right of the character entered.

    …or…some…such. :-)

    I mean, well, I’m clear on the virtual space concept, but new users might not be, so maybe more treatment in the manual is justified.