• Find paragraph of X words containing multiple keywords ?

    22
    0 Votes
    22 Posts
    6k 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
    831 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
    495 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
    246 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
    317 Views
    PJP

    @guy038 thanks @guy038
    great solution :)

  • autocomplete for functions without ( )

    3
    1 Votes
    3 Posts
    221 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
    909 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
    6k 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
    9k 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
    17k 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
    646 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
    471 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
    365 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
    2k 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
    588 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.

  • Is there a distraction-free writing mode like Vimroom(a plugin of Vim)?

    15
    0 Votes
    15 Posts
    3k Views
    EkopalypseE

    @Alan-Kilborn

    :-( there is unfortunately no candy for me, as I am still on Windows7 :-(

  • Distraction-free mode

    4
    0 Votes
    4 Posts
    5k Views
    donhoD

    FYI:
    This feature will be in the next release (v7.9.6).

    5726c59e-2b26-4f74-a358-f242c2aa9092-image.png

  • How to create notepad++ log file to attach to issue report?

    2
    1 Votes
    2 Posts
    569 Views
    PeterJonesP

    @Oliver-Meyer said in How to create notepad++ log file to attach to issue report?:

    I assume it is related to the network location of the last closed file or something.

    That is a good guess. If Notepad++ cannot see the network location for files in the current session, or sometimes for files in the recent files history, then it can get confused.

    For the recent files history, there is a setting which influences it: Settings > Preferences > Recent Files History > ☑ Don’t check at launch time. By clicking that checkbox, Notepad++ will not try to verify whether or not the MRU files still exist.

    Is there a way to increase log level and create a useful log file to attach to an issue report?

    Not that I’ve ever seen or heard of.

  • 0 Votes
    9 Posts
    436 Views
    some oneS

    @Ekopalypse Thank you very much!