• 0 Votes
    9 Posts
    3k Views
    mkupperM

    Thank you @Ekopalypse for the explanation of styles vs. indicators. After a few days of using npp with the python script modified indicators I’m quite happy with the results.

  • Using RegEx in Notepad++ to delete all lines contain certain keywords?

    3
    0 Votes
    3 Posts
    592 Views
    Terry RT

    @Terry-R said in Using RegEx in Notepad++ to delete all lines contain certain keywords?:

    if the word cat or fish is part of a larger word it will still be removed

    A slightly revised regex would be
    Find What:^(.+)?(\bcat\b|\bfish\b)(.+)?\R?

    This expects non word characters (boundaries) to exist around the words cat and fish, thus cat-2 is still caught.

    Terry

  • RegEx... Exchange

    7
    0 Votes
    7 Posts
    310 Views
    astrosofistaA

    @Pan-Jan said in RegEx... Exchange:

    I don’t have a \R

    Try \v for vertical whitespace. Perhaps it works in that editor.

  • 0 Votes
    4 Posts
    329 Views
    Batuhan HınçalB

    @PeterJones it worked, you’re a big man with big heart you saved me precious hours of my time

    I wish a lot of people help you in your life, god bless you.

  • Default save as option

    4
    0 Votes
    4 Posts
    996 Views
    EkopalypseE

    @Makwana-Prahlad,

    current versions, like 7.8.9, append an extension to the name if possible.

  • Inserting g code using replace

    5
    0 Votes
    5 Posts
    892 Views
    guy038G

    Hi, @crafty-crafty, @ekopalypse, and All,

    From the @ekopalypse macro solution, here is an similar solution which can be generalized to :

    Any number of lines which are to be replaced, in the limit of 2,048 characters

    Any number of lines which are to be inserted, during the replacement

    But, first, let’s suppose that you simply have a specific line, repeated many times in your file, which must be replaced with a specific block of lines. Assuming that this line is named #Line# :

    Open a new tab ( Ctrl+ N )

    Type in the specific line #Line# line, followed with a line-break

    Select the entire line #Line#, with its line-break

    Open the Find dialog ( CTRL + F )

    Select, if necessary, the Normal search mode

    Leave all the other options unchecked

    Click on the Find Next button ( Of course, no other occurrence is found, but it does not matter ! )

    Close the Find dialog ( Esc )

    Run the option Macro > Start Recording

    Hit the F3 key ( Whatever an occurrence is found, or not, does not matter ! )

    Hit the Ctrl + V shortcut ( The present contents of clipboard do not matter, too ! )

    Run the option Macro > Stop Recording

    Then, run the option Macro > Save Currently Recorded Macro...

    Type in Replace Next Occurrence with Clipboard Contents, in the Name zone

    Preferably, create a shortcut for this macro

    Click on the OK button to valid the dialog

    Create or select the block of lines, in any file, which must replace the #Line# line

    Copy this block of lines in the clipboard ( Ctrl + C )

    Now, open or select your specific file

    If necessary, move to the very beginning of file ( Ctrl + Home )

    Run the option Macro > Run a Macro Multiple Times...

    Select the Replace Next Occurrence with Clipboard Contents macro

    Tick the Run until the end of file option

    Click on the Run button

    Voila ;-))

    Remark :

    After finding all the occurrences of the specific line, a last search operation is carried on, without success. So, the last #Line# line is replaced by two or more consecutive contents of the clipboard. Thus, a last task has to be done :

    Delete the few extra blocks of text that have been wrongly inserted, after the last match !

    As said above, this macro is not specific and can be used to insert any contents of the clipboard, in replacement of any specific text, even split on several lines, as long as the total amount of text is smaller than 2,048 characters ( Max size of the Find what: zone )

    So, now that the macro Replace Next Occurrence with Clipboard Contents has been created, the road map becomes :

    Create and select the text range which is to be replaced

    Open the Find dialog ( CTRL + F )

    Select, if necessary, the Normal search mode

    Leave all the other options unchecked

    Click on the Find Next button ( Whatever an occurrence of the range is found or not does not matter ! )

    Close the Find dialog ( Esc )

    Create and select the text range, in any file, even split on several lines, which will replace the initial range

    Copy this text range in the clipboard ( Ctrl + C )

    Now, open or select the specific file, where the replacements must occur

    If necessary, move to the very beginning of the file ( Ctrl + Home )

    Run the option Macro > Run a Macro Multiple Times...

    Select the Replace Next Occurrence with Clipboard Contents macro

    Tick the Run until the end of file option

    Click on the Run button

    Finally, delete the few extra range of text that have been wrongly inserted, after the last matched range !

    Best Regards

    guy038

  • How to insert text into the second line with RegEx in Notepad ++ ?

    21
    0 Votes
    21 Posts
    5k Views
    Thomas 2020T

    Schowek01.jpg

  • Add the Icon to the toolbar

    32
    0 Votes
    32 Posts
    8k Views
    Thomas 2020T

    Here some even write in Italian.

    The problem is to explain what problem I have with Notepad.
    Even the English don’t always understand each other.
    How I am trying to explain in short sentences
    some write that I am rude or arrogant.

    Today I figured out how to use
    Google translator.
    Dzisiaj wpadłem na pomysł jak używać Google translatora,
    aby tłumaczenie było jak najlepsze.

  • Problem with converting lowercase to uppercase

    12
    0 Votes
    12 Posts
    821 Views
    Thomas 2020T

    @mkupper said in Problem with converting lowercase to uppercase:

    as there are people who have Mc… style surnames where the third character is not upper-case

    e.g?

  • How do I sort words differently?

    7
    0 Votes
    7 Posts
    360 Views
    Thomas 2020T

    Briefly and succinctly.

    Schowek01.jpg
    there are over 1000 words

  • LaTeX delimiters

    2
    0 Votes
    2 Posts
    233 Views
    EkopalypseE

    If you are talking about the LaTeX lexer from Scintilla, it makes sense to make the request there,
    but if you are using a UDL, then we need more information about what exactly you do.

  • 7.8.8 problems with open files (on a network drive)

    3
    0 Votes
    3 Posts
    256 Views
    tseGITT

    just tested new 7.8.9 32bit --> same problem.
    But my special one can be solved. Instead of using .LOG als “SQL” i assigned “LOG” to VB / VB5 in stylers.xml. Now syntax highlighting is OK and the freeze is gone.

  • .bat file auto path updater

    4
    0 Votes
    4 Posts
    873 Views
    Michael VincentM

    @Alexander-Brkljac

    set file=%~dp0\OUTPUT.txt

    Cheers.

  • 0 Votes
    8 Posts
    369 Views
    astrosofistaA

    @Ekopalypse said in possibile creare una regola dal momento in cui si riceve file txt senza aprire il file?:

    wasn’t intended.

    OK, good to know that :)

    Just trying to be helpfull beyond service

    Which you do very well. Keep up the good work. :-)

    Sure, I always try to do my best, and as I understand, you do as well!

    Take care.

  • 0 Votes
    5 Posts
    290 Views
    PeterJonesP

    @guy038 said in Can we use "Copy Bookmarked Line" and "Paste in ReplaceWith" field in Macro:

    Hello, @b-sethi24, @alan-kilborn and All,

    Strange ! No answer regarding my assertion / question !

    Cheers,

    guy038

    I think you may have understood the original question differently than @Alan-Kilborn did. I made a similar interpretation at first, until I tried to figure out why Alan thought it wasn’t doable, when I original did. Re-reading the original post, I determined the key point was “Pasting in ReplaceWith field”.

    At first, like you, I thought @B-Sethi24 just wanted to paste the bookmarked lines in the document – in which case, the macro you showed would work.

    But if they really want to paste it into the REPLACE WITH field, with all the options available in the dialog box (including regex processing on the REPLACE WITH value), that cannot be done. (For example, if the line ${1} to ${10} were bookmarked, and they wanted to use that as the REPLACE WITH in a regex replacement.)

    Since @B-Sethi24 hasn’t come back since, I doubt we’ll get clarification anytime soon.

  • Refining smart highlighting to make current selection more obvious

    4
    1 Votes
    4 Posts
    341 Views
    EkopalypseE

    @James-Martin-0

    ahh I see, sorry I misunderstood.
    In that case it is the Selected text colour attribute.

  • same freeze but not on start up

    7
    0 Votes
    7 Posts
    2k Views
    tseGITT

    same problem. The problem is not the “line wrap” - option. Long lines are the problem.
    For better reading of my logfile i assigned extension LOG to type SQL in %appdata%\notepad++\stylers.xml.
    After Deassigning LOG works fine, so that will be my workaround until this problem is fixed by a future notepad version. No colored keywords but freezing the editor ist gone.

  • What command lets you copy cmd and save it in a new document?

    3
    0 Votes
    3 Posts
    290 Views
    Terry RT

    @Alexander-Brkljac said in What command lets you copy cmd and save it in a new document?:

    lets me copy the contents that is in cmd

    Try this link. It’s hardly NPP specific, but the paste portion should work in most apps, once the clipboard has received the marked area or piped output.

    https://www.labnol.org/software/copy-command-output-to-clipboard/2506/

    Terry

  • on clickable links - mouse cursor is flickering

    4
    0 Votes
    4 Posts
    306 Views
    mkupperM

    My cursor is not flickering when the mouse is over it but it flickers as I move the mouse left/right over a link. It’s possible your system is making npp think the mouse is moving.

    Try disabling and re-enabling clickable links to see if the flickering problem goes away until you exit/restart npp. The enable flag is in Settings / preferences / MISC. / Clickable Link Settings

  • Wildcard in replace field

    24
    1 Votes
    24 Posts
    8k Views
    Thomas 2020T
    (^| )(\d{1,2}:\d\d):(?=\d\d([ ,'!\.\?"”\)]|$))