• 0 Votes
    2 Posts
    1k Views

    I don’t understand your description but one way to lose the UNDO history is when file is updated by external app and NPP reloads it.

  • Plugin manager

    Locked Jan 11, 2017, 6:45 PM
    0 Votes
    2 Posts
    2k Views

    @Armaan-Bali

    maybe here.

    Cheers
    Claudia

  • 0 Votes
    15 Posts
    42k Views

    Hi Vijay,

    that’s what i feared.
    As AdrianHHH already pointed out (btw. thanks for jumping in) Excel is producing
    this message. The reason is simple, when you have a normal Excel file the file
    contants formatting informations as well as the text which you see in Excel.
    When converting this format to csv all the formatting stuff gets deleted because
    a csv is a plain text file format.
    So you have to decide either using the Excel format, but then you cannot
    edit it by notepad++ safely or converting to csv and loosing all formatted stuff.

    Cheers
    Claudia

  • 0 Votes
    2 Posts
    2k Views

    @ng-khanh

    I’m not sure if this is what you mean by “UAC” or not, but what I experienced was a pop-up upon running the notepad++ executable that said something like this: “…is an application downloaded from the internet…are you sure you want to run it?” That’s not very accurate as it has been a long time since I saw the message…

    What worked for me to get rid of it was downloading the portable install archive file to a USB flash drive and then unzipping it from there to the desired location. I’m not sure of the technical details, but I believe the hard drive file system format used by most Windows installations has extra fields for keeping track of “important” details like that so it can warn/bother you. :-)

    USB flash memory drives typically don’t have those “extra fields”, so the OS really doesn’t know where a file came from, thus it doesn’t bother you about it when you run the file.

    If this isn’t what you meant by UAC, please ignore my ramblings…or maybe this will help someone else…

  • 0 Votes
    6 Posts
    4k Views

    Escape would be of little help since ctrl-esc opens Windows’ start menu. It would work in Linux over wine however.
    I think that sorting is a bad idea. You have to keep pressing ctrl while navigating with the mouse. It sounds cumbersome and I prefer task switcher to be very light.
    I do recommend NavigateTo plugin for finding files by name.

    Another issue is that task switcher should close when losing focus. Currently if you click on another window it remains open.

    If you want, here is a patch for closing task switcher on ctrl-esc or ctrl-~.
    Here are compiled binaries.

  • 0 Votes
    3 Posts
    17k Views

    Perfect, thank you!

  • 0 Votes
    3 Posts
    8k Views

    Similar to this post, are you certain the font you have selected for NPP has the Korean characters? Preferences > Style Configurator > Global Styles > Default Style > Font Style will tell you what font is chosen for NPP as default.

    To see whether that font has the Korean characters, WIN+R (windows button and R at the same time) > charmap, select that same font from the pulldown; select Group By = Unicode Subrange, and in the Group By popup window, select the appropriate Korean group (Korean Hangul, I assume). Note that the DejaVu Mono that I recommended in the Greek post doesn’t have any characters in the Korean Hangul group; however, Source Code Pro does have some characters in that group, though I cannot say whether it’s all that you need or not.

    Hmm, actually, when I copy your " 너에게 닿기를" into my NPP with DejaVu Mono font, those characters do show up, so maybe that’s not the right Unicode Subrange to look at (I know nothing about Korean characters). I looked at my windows notepad.exe font setting, and it’s Lucida Console, so if you don’t have (or don’t want) DejaVu Mono or Source Code Pro, you might try Lucida Console (or whatever your notepad > format > font is set to).

  • 0 Votes
    4 Posts
    2k Views

    Thank you @Claudia-Frank That is what I needed.

  • PowerShell Language Woes

    Nov 15, 2016, 8:53 AM
    0 Votes
    6 Posts
    12k Views

    @Roman-Revell,

    Although, now there is just one long menu instead of the multi-tiered menu, which is fine.

    Preferences > Language > Language Menu > ☑ Make language menu compact

  • 0 Votes
    2 Posts
    2k Views
  • 0 Votes
    3 Posts
    4k Views

    Thanks so much, I was using BitStream Mono, DejaVu Mono fixed it.

  • 0 Votes
    10 Posts
    8k Views

    Hi Guy,

    I would still use the more descriptive version of (?-s) because there isn’t really a difference

    (?-s)^Dialogue(?=.+Song - (Romaji|Translation)) -> took 14.708000 seconds (?-s)^Dialogue(?=.*Song - (Romaji|Translation)) -> took 14.631000 seconds ^Dialogue(?=.+Song - (Romaji|Translation)) -> took 14.635000 seconds ^Dialogue(?=.*Song - (Romaji|Translation)) -> took 14.697000 seconds

    but has the advantage of settings the s switch explicitly - so you’re sure about what should be done.

    Cheers
    Claudia

  • 0 Votes
    5 Posts
    2k Views

    @Scott-Sumner said:

    (?s).{500}\K.*

    checked, it works!
    Thank you

  • 0 Votes
    5 Posts
    3k Views

    You’re welcome.

  • 0 Votes
    4 Posts
    2k Views

    I do maintain that it is not a Notepad++ question. It is a question about the CONTENT of a file you can create with any text editor. But, in the spirit of trying to be helpful, there might be something of use at the link below (don’t really know, I’m not into HTML/CSS):

    http://lmgtfy.com/?q=html+and+css+in+same+file

  • 0 Votes
    3 Posts
    5k Views

    Thank you for your help.

  • Delete most of the text of the file

    Jan 4, 2017, 9:35 AM
    0 Votes
    5 Posts
    2k Views

    Hi, Vincent,

    Do you mean that your file may contain lines, as below, that you would like to delete ?

    1 Elevator de chantier 1L01522838425 1 Housse de couette Bibi 1L01522838521

    If so, a possible regex syntax, for that S/R, would be :

    SEARCH (?-s)^.+ (.+) €.*|^(?!.+€).*\R , with a space, before the first opening parenthesis an a second space character, after the first closing one !

    REPLACE ?1\1

    Notes :

    From beginning of the line, ^ :

    The first alternative is almost identical to the search regex of my previous post. I just added the syntax .* at the end of the first branch, in order to match all subsequent characters, after the last character

    The first part of the second branch of the alternative, (?!.+€) is a condition, called a negative look-behind, which means “NO Euro sign, exists, further on, in the current line ?”

    If this condition is TRUE, then, the regex engine matches the second, and main, part, of the second branch, .*\R. In other words, all the contents, even empty, of the current line, with its EOL characters

    In replacement, IF group 1 ( the price ) exists, we just rewrite that group 1 ( the value), ELSE we do not rewrite anything => All the current line, with the EOL character(s), included, is deleted

    So, from the original text, below :

    A Elevator de chantier 1L01522838425 110,30 € 110,30 € C Elevator de chantier 1L01522838425 D Oreillet bleu 1L01522839954 51.26 € 51.26 € F Housse de couette Bibi 1L01522838521 G Housse de couette Bibi 1L01522838521 86.20 € 86.20 € I Elevator de chantier 1L01522838425 27,10 € J Oreillet bleu 1L01522839954 734.56 € K Housse de couette Bibi 1L01522838521 0,99 € M Elevator de chantier 1L01522838425 1.00 € Test N Oreillet bleu 1L01522839954 99,99 € small test O Housse de couette Bibi 1L01522838521 57.34 € A Test

    The regex S/R, above, would get the final text, below :

    110,30 51.26 86.20 27,10 734.56 0,99 1.00 99,99 57.34

    REMARKS :

    If the price is present, only once, it doesn’t matter : The price will be displayed

    If some text is present, after the last Euro character , it will be deleted, too

    If you prefer to keep the pure blank lines, use, instead :

    SEARCH (?-s)^.+ (.+) €.*|^(?!.+€).+\R

    REPLACE ?1\1

    And you’ll obtain the changed text, below :

    110,30 51.26 86.20 27,10 734.56 0,99 1.00 99,99 57.34

    Cheers,

    guy038

  • Regex search/replace wildcard

    Jan 4, 2017, 4:32 PM
    0 Votes
    8 Posts
    30k Views

    Hello, Ryan, Claudia, AdrianHHH and All,

    Ryan, see the main differences, between the four simple regexes, below ( I suppose a sensitive search ) :

    a.*z matches a lowercase letter a, followed by the LONGEST range of characters, even EMPTY, till a lowercase letter z a.*?z matches a lowe-case letter a, followed by the SHORTEST range of characters, even EMPTY, till a lowercase letter z a.+z matches a lowercase letter a, followed by the LONGEST range of characters, NON empty, till a lowercase letter z a.+?z matches a lowercase letter a, followed by the SHORTEST range of characters, NON empty, till a lowercase letter z

    Just try these four regexes, with the subject text : az abcxyz az abz abxz abcxyz az ab bcxz abcx, in a new tab. The differences are quite obvious !

    AdrianHHH, you shouldn’t be annoyed, about choosing between the two syntaxes, below, as they are strictly identical !

    (?-s)alignment=".*?"

    alignment="[^"\r\n]*"

    Similarly, the two syntaxes, below, are strictly identical, too :

    (?s)alignment=".*?"

    alignment="[^"]*"

    The reason is that you reach a final UNIQUE character ( a quote mark ) "

    Now, I’m speaking to everybody ! For instance, do NOT confuse these two regexes :

    The regex 123.+?5, that means : A string 123 followed by the SHORTEST, NON-empty, range of characters, till a digit 5

    And the regex, almost identical, 123.+?56, which

    Does NOT mean : A string 123 followed by the shortest, NON-empty, range of characters, till a digit 5, then the 6 digit

    But means : A string 123 followed by the SHORTEST, NON-empty, range of characters, till the string 56

    So, against the subject text 012345789 0123456789 012345789 0123456789, the first regex 123.+?5 finds four occurrences, whereas the the second regex 123.+?56 would, only, find two occurrences !

    Here is a summary example :

    Let’s imagine the text, below, where the string abcdlmpqrst is repeated, 10 times, with, sometimes, the lack of the letters p and/or q :

    q missing q missing pq missing p missing p missing pq missing q missing p missing abcdlmprst abcdlmprst abcdlmrst abcdlmpqrst abcdlmqrst abcdlmqrst abcdlmrst abcdlmpqrst abcdlmprst abcdlmqrst

    Against this text, let’s try, successively, the 20 regexes, below, where the last fourteen contains the [^...] structure :

    Regex A : (?-s)ab.+p
    Regex B : (?-s)ab.+q
    Regex C : (?-s)ab.+pq

    Regex D : (?-s)ab.+?p
    Regex E : (?-s)ab.+?q
    Regex F : (?-s)ab.+?pq

    Regex G : ab[^p\r\n]+p
    Regex H : ab[^q\r\n]+q

    Regex I : ab[^p\r\n]+?p
    Regex J : ab[^q\r\n]+?q

    Regex K : ab[^q\r\n]+p
    Regex L : ab[^p\r\n]+q

    Regex M : ab[^q\r\n]+?p
    Regex N : ab[^p\r\n]+?q

    Regex O : ab[^p\r\n]+pq
    Regex P : ab[^q\r\n]+pq
    Regex Q : ab[^pq\r\n]+pq

    Regex R : ab[^p\r\n]+?pq
    Regex S : ab[^q\r\n]+?pq
    Regex T : ab[^pq\r\n]+?pq

    Here are the results, where each match is indicated by a range of dashes

    q missing q missing pq missing p missing p missing pq missing q missing p missing abcdlmprst abcdlmprst abcdlmrst abcdlmpqrst abcdlmqrst abcdlmqrst abcdlmrst abcdlmpqrst abcdlmprst abcdlmqrst A --------------------------------------------------------------------------------------------------------------- B ---------------------------------------------------------------------------------------------------------------------------- C -------------------------------------------------------------------------------------------------- D , G , I ------- ------- ------------------- --------------------------------------------- ------- E , H , J ---------------------------------------------- ------- ------- -------------------- -------------------- F ---------------------------------------------- ---------------------------------------------- K --------------------------------------------- ------------------- ------- L -------------------- ------- M ------- ------- ------------------- ------------------- ------- N ------- ------- ------- O , R -------------------- ---------------------------------------------- P , S ---------------------------------------------- -------------------- Q , T -------------------- --------------------

    Just notice that, as I said, above :

    The regex D, (?-s)ab.+?p, DOES have an equivalent regex G, ab[^p\r\n]+p, with the [^.....] structure

    The regex E, (?-s)ab.+?q, DOES have an equivalent regex H, ab[^q\r\n]+q, with the [^.....] structure

    but :

    The regex F, (?-s)ab.+?pq, does NOT have an equivalent regex, containing the [^.....] structure

    Note, also, that :

    The regexes O, ab[^p\r\n]+pq, and R, ab[^p\r\n]+?pq are equivalent

    The regexes P, ab[^q\r\n]+pq, and S, ab[^q\r\n]+?pq are equivalent

    The regexes Q, ab[^pq\r\n]+pq, and T, ab[^pq\r\n]+?pq are equivalent

    Why ? Just because the range of characters, after the string ab, must NOT contain a part or the totality of the string pq. In other words, theses six regexes, from O to T, always look for the shortest range of characters, between the string ab and the string pq !

    Best Regards,

    guy038

    P.S. : Ryan, for your regex “education”, just begin with that article, in N++ Wiki :

    http://docs.notepad-plus-plus.org/index.php/Regular_Expressions

    In addition, you’ll find good documentation, about the new Boost C++ Regex library, v1.55.0 ( similar to the PERL Regular Common Expressions, v1.48.0 ), used by Notepad++, since its 6.0 version, at the TWO addresses below :

    http://www.boost.org/doc/libs/1_48_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html

    http://www.boost.org/doc/libs/1_48_0/libs/regex/doc/html/boost_regex/format/boost_format_syntax.html

    The FIRST link explains the syntax, of regular expressions, in the SEARCH part

    The SECOND link explains the syntax, of regular expressions, in the REPLACEMENT part

    You may, also, look for valuable informations, on the sites, below :

    http://www.regular-expressions.info

    http://www.rexegg.com

    http://perldoc.perl.org/perlre.html

  • 0 Votes
    3 Posts
    3k Views

    Hello Max,

    So, from you example, below, I suppose that you would like to change the value 625 of the tag size, for an other one, whatever the contents of the two previous lines are ?

    officers = { culture = pashtun #This doesnt matter, they vary. religion = sunni #This doesnt matter either, they vary. size = 625 #I want to change this. }

    Well, I think that a good search/replacement, using regular expressions, could be :

    SEARCH (?s-i)^officers.+?size = \K\d+

    REPLACE <some digits> ( The new value of the tag size )

    So :

    Open your file, in Notepad++

    Open the Replace dialog ( Ctrl + H )

    Fill the Find what field with the above regex

    Fill the Replace with field with a new integer value, for the tag size

    Uncheck, preferably, the Wrap around option

    Click, EXCLUSIVELY, on the Replace All button ( DON’T use the Replace button, for a step by step replacement. Indeed, nothing is changed, in that case ! )

    Et voilà !

    If you’re a newby, about regular expressions concept and syntax, begin with that article, in N++ Wiki :

    http://docs.notepad-plus-plus.org/index.php/Regular_Expressions

    In addition, you’ll find good documentation, about the new Boost C++ Regex library, v1.55.0 ( similar to the PERL Regular Common Expressions, v1.48.0 ), used by Notepad++, since its 6.0 version, at the TWO addresses below :

    http://www.boost.org/doc/libs/1_48_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html

    http://www.boost.org/doc/libs/1_48_0/libs/regex/doc/html/boost_regex/format/boost_format_syntax.html

    The FIRST link explains the syntax, of regular expressions, in the SEARCH part

    The SECOND link explains the syntax, of regular expressions, in the REPLACEMENT part

    You may, also, look for valuable informations, on the sites, below :

    http://www.regular-expressions.info

    http://www.rexegg.com

    http://perldoc.perl.org/perlre.html

    If you’re, already, fairly acquainted with regexes, here are, below, some notes about this specific regex :

    The first part (?s-i), of the **search regex, are two modifiers :

    The first one, (?s), forces the dot special character to represent any single character ( a standard character or an EOL character )

    The second one, (?-i), forces the regex engine to do this search/replacement, in a sensitive case way

    The part ^officiers, looks, for beginning of the line, ^, for the string officiers, in that exact case

    Then, the part .+?size = , tries to match the shortest, non-null, range of any character, till the string size =, with a space character, after the equal sign ( Why the shortest ? Because it must be located inside the officiers {......} block ! )

    Now, the \K form, forces the regex engine to forget everything that was previously matched and resets the caret location to the position between the space character, after the equal sign, and the first digit of the size value

    Finally, the part \d+ matches all the digits of the size’s value

    In replacement, just type the new value of the size tag, which will replace the old value

    But, I guess that you showed your example, split, in several lines, in order to tell us, about the right zone to be changed ! So your text would rather be written, as below :

    officers = { culture = pashtun religion = sunni size = 625 }

    In that case, the search regex should be, simply re-written, as below :

    (?-si)^officers.+size = \K\d+

    This time, the part .+ represents the longest range of standard characters only, of the current line ( due to the (?-s) modifier ), till the string size =, with a space character after the equal sign

    Best Regards,

    guy038

  • Kind of autocomplete?

    Locked Jan 4, 2017, 5:13 PM
    0 Votes
    3 Posts
    2k Views

    I will definitely check this, thanks for answering and taking your time to write this.

    Cheers,
    Gokalp