• "Replace" without "Find next"

    2
    0 Votes
    2 Posts
    155 Views
    Alan KilbornA

    @Tak-Li

    That is currently (where currently = up to and including 7.9.5) not possible.

    The workaround is to let it go “too far” and then press Ctrl+z and then Ctrl+Shift+z.
    This will “undo” the most recent replacement (the one you wanted to stop at) and then “redo” the replacement (and leave the caret at the location of the replacement).

  • A very slow typing experience...

    7
    0 Votes
    7 Posts
    3k Views
    guy038G

    Hello, @donniel-collera, @peterjones, @alan-kilborn and All,

    May be do this quick task, described in the post, below, just to verify if your keyboard parameters are OK ;-))

    https://community.notepad-plus-plus.org/post/29704

    Best Regards,

    guy038

  • Insert Carriage Return "CR" before "LF"

    3
    0 Votes
    3 Posts
    4k Views
    Alan KilbornA

    @Jose-Emilio-Osorio

    How to insert Carriage Return “CR” before “LF” at the end of each line ?

    They are probably already there and you need to do exactly nothing to insert them.

    If you are “unconfident” that Notepad++ is doing this for you, press the “Pilcrow” toolbar button…the one with this symbol on it:

    1096d341-751b-4d14-aa13-0890190fc3da-image.png

    In the Notepad++ toolbar, it is blue in color, not black.

    With that toolbar button in the depressed state, you will see the CR and LF in a Windows file, example:

    c1a3ed68-2955-43f0-98dd-669c5a52e220-image.png

  • 0 Votes
    10 Posts
    900 Views
    ludamo 0L

    Since experimenting further with the AutohotKey UDL I have found that this syntax “bleeding” can be limited / minimised / corrected by adding a space to the end of lines (I normally am a heavy user of tabs) especially those lines which seem to end a certain type of highlighting e.g. comments or lines with delimited strings in them.

    I also made another discovery, that a tab can be used as a delimiter in UDL. You can enter it by pressing Control+Tab between 2 spaces e.g. ((space tab space EOL)).

  • Find paragraph of X words containing multiple keywords ?

    22
    0 Votes
    22 Posts
    5k Views
    guy038G

    Hi, @n_antiyou and All,

    As I said in my previous post, you may mix some styles, from the 5 styles, available by default, to get other colors, in order to color all your keywords !

    Refer to this post by @Claudia-Frank, who, unfortunately, is no longer active on this forum ! Her contribution was quite important and she provided quantity of excellent Python scripts, too ! Let’s wish her the best and good coding moments ;-))

    https://community.notepad-plus-plus.org/post/27621

    With the help of the NppQCP plugin ( Quick Color Plugin ), I built up a Word image which recapitulates the main style combinations, with significant colors and their RGB coordinates

    3a6919c6-acd7-4a43-80fe-b56305397952-image.png

    Best Regards,

    guy038

  • Interface display boxes that I cant remove

    3
    0 Votes
    3 Posts
    780 Views
    Alan KilbornA

    It appears an issue on this was opened on github, but the author of Notepad++ closed it, citing not enough information. I’m not sure what more information people that this happens to could provide – I mean, you open the program and expect to see a reasonable UI, and you see…well, something like the above. Not sure what more there is to provide.

    Anyway, here’s the issue I mentioned: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/9760

  • File is saved, but it isn't saved

    2
    0 Votes
    2 Posts
    451 Views
    PeterJonesP

    @Paul-Huggins ,

    Nope. That is not happening at all.

    If you have saved the file, then close and re-open the file in Notepad++, and you see your changes, then the file has been written to disk in the path it claims it was saved to.

    I can think of two things that might be happening:

    You might be editing an INI file that lives within %Windir%\System or one of its equivalents, in which case you have likely hit the Windows OS’ File System Redirector After you save and write the file from Notepad++, maybe the original application was still open and re-wrote the INI file back to the way it thought it should be.
  • 0 Votes
    4 Posts
    218 Views
    guy038G

    Hi, @Cristian-tanasa, and All,

    I improved and generalized the process with these 8 new search regexes, in order to find part of a particular field n

    Of course, I assume that :

    Each row of the table contains the same number of fields

    The field delimiter is the double quote char ( " )

    The field separator is the semicolon ( ; )

    Any field is preceded and/or followed with a ;

    Any char, within a field, is different from, either, a " and a ; chars

    Here are these generic regexes :

    (?x) ^ (?: " ( [^";\r\n] )* " ; ) {n-1} " \K (?1)* # ALL chars, even NONE, of FIELD n (?x) ^ (?: " ( [^";\r\n] )* " ; ) {n-1} " (?1){#} \K (?1)* # ALL chars, even NONE, AFTER the #th char of FIELD n (?x) ^ (?: " ( [^";\r\n] )* " ; ) {n-1} " (?1){#} \K (?1){p} # p chars, AFTER the #th char of FIELD n (?x) ^ (?: " ( [^";\r\n] )* " ; ) {n-1} " \K (?1){p} # The p FIRST chars of FIELD n (?x) ^ (?: " ( [^";\r\n] )* " ; ) {n-1} " (?1)* \K (?1){p} (?=") # The p LAST chars of FIELD n (?x) ^ (?: " ( [^";\r\n] )* " ; ) {n-1} " \K # EMPTY string, at BEGINNING of FIELD n (?x) ^ (?: " ( [^";\r\n] )* " ; ) {n-1} " (?1){#} \K # EMPTY string, AFTER the #th char of FIELD n (?x) ^ (?: " ( [^";\r\n] )* " ; ) {n-1} " (?1)* \K # EMPTY string, at END of FIELD n

    Notes :

    Let f be the total number of fields and let m be the maximum number of characters of the field n. Then :

    The variable n is between the values 1 included and f included ( So n-1 is in range [0,f-1] )

    The variable # is between the values 0 included and m included

    The variable p is between the values 0 included and m included

    Let’s test these 8 real regexes, below :

    (?x) ^ (?: " ( [^";\r\n] )* " ; ) {5} " \K (?1)* # ALL chars, even NONE, of FIELD 6 (?x) ^ (?: " ( [^";\r\n] )* " ; ) {5} " (?1){10} \K (?1)* # ALL chars, even NONE, AFTER the 10th char of FIELD 6 (?x) ^ (?: " ( [^";\r\n] )* " ; ) {5} " (?1){10} \K (?1){3} # THREE chars, AFTER the 10th char of FIELD 6 (?x) ^ (?: " ( [^";\r\n] )* " ; ) {5} " \K (?1){5} # The 5 FIRST chars of FIELD 6 (?x) ^ (?: " ( [^";\r\n] )* " ; ) {5} " (?1)* \K (?1){7} (?=") # The 7 LAST chars of FIELD 6 (?x) ^ (?: " ( [^";\r\n] )* " ; ) {5} " \K # EMPTY string, at BEGINNING of FIELD 6 (?x) ^ (?: " ( [^";\r\n] )* " ; ) {5} " (?1){10} \K # EMPTY string, AFTER the 10th char of FIELD 6 (?x) ^ (?: " ( [^";\r\n] )* " ; ) {5} " (?1)* \K # EMPTY string, at END of FIELD 6

    Against the following sample text :

    Field 6 V "1000";"1";"1";"";"834600000";"";"1080668 / 13341845 This is technical";"1";"EN";"Call" "1000";"1";"1";"";"834600000";"1";"1080668 / 13341845 This is technical";"1";"EN";"Call" "1000";"1";"1";"";"834600000";"12";"1080668 / 13341845 This is technical";"1";"EN";"Call" "1000";"1";"1";"";"834600000";"123";"1080668 / 13341845 This is technical";"1";"EN";"Call" "1000";"1";"1";"";"834600000";"1234";"1080668 / 13341845 This is technical";"1";"EN";"Call" "1000";"1";"1";"";"834600000";"12345";"1080668 / 13341845 This is technical";"1";"EN";"Call" "1000";"1";"1";"";"834600000";"123456";"1080668 / 13341845 This is technical";"1";"EN";"Call" "1000";"1";"1";"";"834600000";"1234567";"1080668 / 13341845 This is technical";"1";"EN";"Call" "1000";"1";"1";"";"834600000";"12345678";"1080668 / 13341845 This is technical";"1";"EN";"Call" "1000";"1";"1";"";"834600000";"123456789";"1080668 / 13341845 This is technical";"1";"EN";"Call" "1000";"1";"1";"";"834600000";"1234567890";"1080668 / 13341845 This is technical";"1";"EN";"Call" "1000";"1";"1";"";"834600000";"12345678901";"1080668 / 13341845 This is technical";"1";"EN";"Call" "1000";"1";"1";"";"834600000";"123456789012";"1080668 / 13341845 This is technical";"1";"EN";"Call" "1000";"1";"1";"";"834600000";"1234567890123";"1080668 / 13341845 This is technical";"1";"EN";"Call" "1000";"1";"1";"";"834600000";"12345678901234";"1080668 / 13341845 This is technical";"1";"EN";"Call" "1000";"1";"1";"";"834600000";"123456789012345";"1080668 / 13341845 This is technical";"1";"EN";"Call" "1000";"1";"1";"";"834600000";"1234567890123456";"1080668 / 13341845 This is technical";"1";"EN";"Call" "1000";"1";"1";"";"834600000";"12345678901234567";"1080668 / 13341845 This is technical";"1";"EN";"Call"

    Super, isn’t it ?

    Best Regards,

    guy038

  • 0 Votes
    3 Posts
    276 Views
    PJP

    @guy038 thanks @guy038
    great solution :)

  • autocomplete for functions without ( )

    3
    1 Votes
    3 Posts
    193 Views
    Jonathan HolmgrenJ

    I was afraid that would be the case. Thanks for confirming.

  • Make Doc Switcher to display .ext

    9
    0 Votes
    9 Posts
    784 Views
    Alan KilbornA

    @Mayoares

    Doc Switcher panel doesn’t seem to get much love from the developers any more; just my observation. You probably won’t see any changes to its functionality, even if issues are opened about it. I could be wrong, though.

  • Bookmark sets of lines that does not meet criteria

    21
    0 Votes
    21 Posts
    5k Views
    guy038G

    Hello @alan-kilborn and All,

    I’ve found out a simple example of the advantage of the conditional feature !

    Let’s suppose that you have a particular tag <guy> and that you want :

    To delete the starting tag <guy> with, both, its leading and trailing space chars

    To delete the ending tag </guy> with its leading space char, only

    The simple and obvious solution is :

    SEARCH \x20<guy>\x20|\x20</guy>

    REPLACE Leave EMPTY

    Now, this shorter regex S/R, with a conditional expression, related to group 1, is :

    SEARCH \x20<(/)?guy>(?(1)|\x20)

    REPLACE Leave EMPTY

    I verified that the suppression of 500,000 starting tags and 500,000 ending tags, in one step, take the same time, whatever the regex syntax used !

    Best Regards,

    guy038

  • where can i find informations about all versions of notepad++ what's new?

    28
    0 Votes
    28 Posts
    7k Views
    zahra ayatZ

    @Alan-Kilborn said in where can i find informations about all versions of notepad++ what's new?:

    @PeterJones

    It would have more weight behind it if someone other than me were to make an official npp-usermanual request on github… especially a normal user like @zahra-ayat , rather than a frequent contributor to the forum.

    I think that request is this one?: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/9745

    yes, its correct.
    i asked such helpful informations on this issue.
    https://github.com/notepad-plus-plus/notepad-plus-plus/issues/9745

  • Underline a single word...

    6
    0 Votes
    6 Posts
    15k Views
    Antonio RoscianoA

    Thank you Mr. Jones, ecxellent explanation.
    Maybe someday I learn how to use Notepad ++…

  • RegEx Remove the Last Match Only

    3
    0 Votes
    3 Posts
    595 Views
    Alan KilbornA

    @NZ-Select :

    There’s a technique to find the last match in a file, presented HERE. You might give that a try.

  • find and replace automation in python

    3
    0 Votes
    3 Posts
    432 Views
    Ruben LaraR

    Peter, you are a legend, that is exactly what I needed, Thank you so much !!!

  • Disable AutoUpdate automation

    2
    0 Votes
    2 Posts
    341 Views
    PeterJonesP

    @Matthew-Weatherford ,

    There is no installer MSI option NSIS-based-installer option that influences Notepad++ settings

    I think you would have to roll your own – maybe start with the zipfile download, then edit the config files, then turn it into a self-extracting zip .exe or make your own MSI.


    moderator’s note: corrected Peter’s mistake of saying “installer MSI” when he meant “NSIS-based installer”, as Notepad++'s installer is an executable built with NSIS, not an MSI-based installer

  • Compare two files and Remove Duplicates from One

    2
    0 Votes
    2 Posts
    2k Views
    PeterJonesP

    @Husnain-Raza ,

    That sounds like a programming task to me.

    Anytime your problem statement is “look in file x to decide how to edit file y”, you have gone beyond the native skillset of text editors.

    If it were a small number of lines, the experts here would use a trick of copying some of the data from one file to another, and then use some super-fancy regex to remove the duplicates from N2 based on the data from N1. But since you’ve invoked “millions of rows” already, that might give you memory problems, depending on exactly how the regex capture groups are defined while doing that replacement. It wouldn’t surprise me if one of those experts jumped in and provided that solution, or linked you to a previous implementation in this forum. But my guess is that it might have problems with your “millions of rows”.

    That said, there is a Notepad++ plugin PythonScript (and similar LuaScript Plugin or jN Notepad++ Plugin, and my external Perl module) which allows you to automate things inside Notepad++ using Python (or Lua or JavaScript or Perl). But really, at the point that you invoke one of those for “millions of lines”, the Notepad++-specific nature of those plugins actually gets in your way and slows you down. It is easier (and faster) to do those edits just running the Python/Lua/JavaScript/Perl natively (ie, at the command line) and using the programming language’s file IO functions rather than using the language to drive Notepad++ to load and edit the file and write it back out.

    This is not a programming forum, and definitely not a free code-writing service, so it is beyond the scope of this Notepad++ forum for us to write a script to do that.

  • Is there anyway that I can quick replace a term with another term?

    8
    0 Votes
    8 Posts
    1k Views
    Alan KilbornA

    @Andrew-Gregg-0

    Well, for find and replace operations, if I were you, I’d just ignore whether the matched text is grey or green (just look for one or the other).

    Because the find function and the smart-highlight function both operate on “selected” text, there’s some functional overlap. But…since the setup for smart-highlight can be independent of find (as I pointed out earlier with whole-word, but also match-case can come into play), consistency can diverge.

    I would hazard to guess that if you tick the box for Use Find dialog settings, you may almost always see the light-green instead of the grey, when looking at find hits.

    A best use for smart-highlight is to double-click a word or make a text selection (independent of using the find function). This way all of the same words or text selection contents, get highlighted in the light-green.

    To really understand it, I’d suggest some experimentation by double-clicking some words that you can see are duplicated on your current view of your file. Or maybe even better, locate an occurrence of the letter a and select just that letter–all other a currently on your screen should go green.

  • To use Firefox on the current edited html file

    14
    0 Votes
    14 Posts
    491 Views
    PeterJonesP

    @Ekopalypse said in To use Firefox on the current edited html file:

    D:\whatever_path\firefox.exe $(FULL_CURRENT_PATH)

    Word of warning: if either D:\whatever path\firefox.exe or the value of $(FULL_CURRENT_PATH) have spaces in them, that will probably not work. As with all Windows paths that have (or might have) spaces, use quotes around them. So "D:\whatever path\firefox.exe" "$(FULL_CURRENT_PATH)" .

    Any time you are referring to a path inside Notepad++ config files, Run dialog, etc, I highly recommend putting quotes around the paths.