• Style Configuration

    2
    0 Votes
    2 Posts
    343 Views
    PeterJonesP

    @sebastian-alvarez-brandon ,

    The themes go in %AppData%\Notepad++\themes for normal installations, or in the themes subfolder of your cloud folder if you’ve set Settings > Preferences > Cloud, or in the themes subfolder below your notepad++.exe’s folder in a portable/zip edition.

    If you need help determining which setup you have, showing us the contents of the ? menu’s Debug Info (copy to clipboard and paste here), as well as the cloud preferences tab (Alt+PrintScreen and paste the image into your reply)

    If the installer didn’t have permission to write the themes to the appropriate location, or if you installed the “minimalist” zip edition (which doesn’t contain the fancy stuff), then those files might not be there. If they aren’t there, see if you can manually put them in that correct location. If they aren’t readable (or writeable) due to security policy, then there’s not much we can do for you, and you’ll have to talk with your I.T.

  • is there a color picker for the 64bit version 7.8.6?

    12
    1 Votes
    12 Posts
    8k Views
    guy038G

    Hi, @michael-vincent and All,

    Michael, don’t bother about it ! So, I first thought about using the old v2.0.0.0 version, where this displaying bug does not occur !

    Finally, after a few tries and a little bit of practice, despite this bug, it is still possible to select a color, with the color picker feature, using your last enhanced v2.1.0.2 version !

    I just need to move the mouse carefully, to prevent any premature soiling of the screen, in the desired area ;-))

    Cheers,

    guy038

  • How to make one empty line out of two?

    5
    0 Votes
    5 Posts
    410 Views
    EkopalypseE

    @Makwana-Prahlad

    I don’t think this helps as it does exactly the opposite from what
    I think the OP wants to have.

    @Claudia-Svenson

    No, the menu entry “Windows (CR LF)” is disabled/greyed out

    switch to UNIX line endings and back to Windows.
    To verify that you have windows eol only, press the ¶ from the toolbar or goto view->show symbol->show all characters

  • Find (+n) and replace

    4
    0 Votes
    4 Posts
    324 Views
    EkopalypseE

    @alexarda

    search_string = r “Bob’s Brilliant Blog”
    re_search_for = r"(?<={0}).*(?=</p>)".format(search_string)
    editor.rereplace(re_search_for, lambda m: ‘{0:<13}1’.format(m.group())

    search_string is only intended for easier editing if you use also want to search for other strings that follow the same pattern.

    re_search_for is then the actual search_string which contains a regex string assembled from 3 parts

    (?<={0}) the placeholder {0} is filled via the format function
    result is (?<=Bob’s Brilliant Blog) .* I’m sure you know what that means, match all or nothing, greedy (?=</p>) which means that a previous match only occures if this follows.

    All in all that means, look for anything with Bob’s Brilliant Blog
    begins and ends with </p>.

    editor.rereplace now searches via the regex pattern and forwards every match to
    a function that expects a match object as a parameter and is defined here with lambda.

    ‘{0:<13}1’.format(m.group()) finally means
    0 = what is contained in m.group() and :<13 means the strings of m.group
    is filled up with blanks of up to 13 characters if necessary.
    The 1 after it is simply appended.

    That’s it. :-)

    Now that I wrote it I think a safer search would be in a non-greedy manner.

    replace this

    r"(?<={0}).*(?=</p>)"

    with that

    r"(?<={0}).+?(?=</p>)"

    The changes means, there must be anything and the regex matches as less as possible to meat the requirement.

  • Copy, search and replace between 2 HTML files

    15
    0 Votes
    15 Posts
    1k Views
    Kosmos HuynhK

    Dear @guy038 ,

    I got the solution by correct quotations as the followings:

    gawk ‘BEGIN {n=0} NF {print > “File_“n”.txt”} !NF {n++}’ File_A.txt

    Best regards,
    Kosmos.

  • Bulk editing in Notepad ++ program?

    4
    0 Votes
    4 Posts
    6k Views
    PeterJonesP

    @darkenb ,

    I asked for text, you gave an image. I asked for “before” and “after” data separately; you put the “before” and “after” in the same screenshot – and even on second reading, I didn’t realize that the to in your image was the change from X to Y indicator rather than part of your text.

    The rest of what I wrote is to help you learn and to help you get better help. The help you receive will only be as good as the effort you put into asking for help.

    For your actual problem:

    FIND = <category>TEXT (\d)</category> REPLACE = <category>TEXT $1$1</category> Search Mode = regular expression

    (untested)

    I recommend you backup any files you try this on, and only try it on one file until everything is working.

    There are obvious assumptions in my example – that your text is literally TEXT every time, and that you’ll always only have one digit after text before </category> – but if my answer is not sufficient for your needs, you are going to have to do a better job of providing data that represents your data, and showing a willingness to learn.

  • Applying multiple commands on folder

    4
    0 Votes
    4 Posts
    362 Views
    Alan KilbornA

    @Anass-Chawki

    like running multiple shortcuts at a time

    Ah, you mean like multi-threading? I’m afraid not.

  • UDL Operators - unicode support?

    3
    0 Votes
    3 Posts
    438 Views
    moon6969M

    @PeterJones Thanks.
    I was hoping to use operators since they “glue” - my initial testing indicates that keywords need spaces to be recognised which is difficult to ensure in my case.

    I’ll check out the suggested script - might be a quick win if it’s fast enough on some of the decrepit hardware I need to support!

  • What ever happened to the plugin manager?

    2
    0 Votes
    2 Posts
    193 Views
    EkopalypseE

    @Kephri-13

    It was replaced by the Plugin Admin

  • Text Blocks without end

    5
    0 Votes
    5 Posts
    1k Views
    RailienR

    Thank you PeterJones,

    that’s it.
    I’ve even tried that, but somehow did’t see the functionality.

  • 1 Votes
    11 Posts
    2k Views
    EkopalypseE

    @MK-Digital
    Whether it is in appdata or not depends on how you installed npp and
    whether you are using the doLocalConf.xml or not.

  • I have problem

    2
    0 Votes
    2 Posts
    151 Views
    PeterJonesP

    @Abdul-Basit ,

    This FAQ might help you get started. Good luck.

  • Please help me a with a regex replacement formula

    12
    0 Votes
    12 Posts
    709 Views
    Mantelis TelisM

    @guy038 hello :)

    okay first since I tried to replace tabulation character - \t - but the notepad++ does not register the find so I had to leave it as it was.

    Regarding the remark - its okay the stuff I’m fixing is not in English language so I simply translated this small part to english in case it would be easier to understand for everyone though it bears no meaning withtout more context. :)

    I think this thing worked for me in the end. I see no errors on the database so far.

    Will get into youtube video code embedding replacement next which is a bit different than this query. Will ask for help later. :) Thanks for everybody involved.

  • Crashing when accessing Files browser

    2
    0 Votes
    2 Posts
    598 Views
    cmeriauxC

    @IgnorantKnight debug info please ?
    Try out with latest version
    Try out with portable version
    Try out without plugins

  • convert lower to upper and upper to lower aftert colon

    12
    1 Votes
    12 Posts
    3k Views
    guy038G

    Hi, @real_1bx, and All,

    This time, due to the simultaneous search of an entire line, with its line-break, when a digit follows the colon char, we need, again, two groups, leading up to that regex S/R :

    SEARCH (?-is)^.+:\d.+\R|((:[A-Z])|:[a-z])

    REPLACE ?1(?2\L:\U)\1

    For instance, the input text, below :

    john:abC232 john:13kkmsd smith:SnLf1999

    would be modified as :

    john:AbC232 smith:snLf1999

    Best regards,

    guy038

  • Delete all duplicates words in the text

    3
    0 Votes
    3 Posts
    852 Views
    guy038G

    Hi, @сергій-бородін and All,

    Thinking back on your problem, here is a second method, requiring fewer steps, but which will classify each non-duplicated tag, according to a different layout !

    So, assuming the same initial text, below :

    filename1.eps,tag1;tag2;tag3 filename2.eps,tag4;tag1;tag5 filename3.eps,tag6;tag2;tag9 filename3.eps,tag7;tag2;tag3;tag8 filename4.eps,tag1;tag9;tag5 filename5.eps,tag4;tag6;tag10;tag12 filename5.eps,tag8;tag2;tag1;tag6;tag11 filename6.eps,tag3;tag2;tag3;tag10;tag14 filename7.eps,tag5;tag7;tag15 filename8.eps,tag4;tag5;tag15;tag16 filename8.eps,tag3;tag14;tag9;tag7 filename8.eps,tag7;tag2;tag3;tag8 filename9.eps,tag2;tag10;tag17 filename10.eps,tag5;tag1;tag13 filename10.eps,tag7;tag6;tag9;tag10 filename11.eps,tag7;tag2;tag3;tag8;tag18 filename11.eps,tag10;tag12;tag13;tag20 filename12.eps,tag4;tag8;tag3;tag19 filename13.eps,tag6;tag15;tag9;tag11 filename14.eps,tag7;tag2;tag3;tag17;tag12;tag4 filename15.eps,tag0;tag9,tag20

    First this simple regex S/R, changes all this list in a one-line list :

    Open the Replace dialog ( Ctrl + H )

    SEARCH \R

    REPLACE # ( Any symbol, not used yet, can be chosen )

    Select the Regular expression search mode

    Click on the Replace All button

    Which gives the single line, below :

    filename1.eps,tag1;tag2;tag3#filename2.eps,tag4;tag1;tag5#filename3.eps,tag6;tag2;tag9#filename3.eps,tag7;tag2;tag3;tag8#filename4.eps,tag1;tag9;tag5#filename5.eps,tag4;tag6;tag10;tag12#filename5.eps,tag8;tag2;tag1;tag6;tag11#filename6.eps,tag3;tag2;tag3;tag10;tag14#filename7.eps,tag5;tag7;tag15#filename8.eps,tag4;tag5;tag15;tag16#filename8.eps,tag3;tag14;tag9;tag7#filename8.eps,tag7;tag2;tag3;tag8#filename9.eps,tag2;tag10;tag17#filename10.eps,tag5;tag1;tag13#filename10.eps,tag7;tag6;tag9;tag10#filename11.eps,tag7;tag2;tag3;tag8;tag18#filename11.eps,tag10;tag12;tag13;tag20#filename12.eps,tag4;tag8;tag3;tag19#filename13.eps,tag6;tag15;tag9;tag11#filename14.eps,tag7;tag2;tag3;tag17;tag12;tag4#filename15.eps,tag0;tag9,tag20

    Now, here is the regex S/R, which deletes any duplicated tag ( The same regex, described in my previous post ) :

    SEARCH (?-is)[,;](\w+)(?=[,;#].*?[,;]\1([,;#]|\R|\z))

    REPLACE Leave the zone EMPTY

    Your text should be shortened as below :

    filename1.eps#filename2.eps#filename3.eps#filename3.eps#filename4.eps#filename5.eps#filename5.eps#filename6.eps#filename7.eps#filename8.eps;tag16#filename8.eps;tag14#filename8.eps#filename9.eps#filename10.eps,tag5;tag1#filename10.eps#filename11.eps;tag18#filename11.eps,tag10;tag13#filename12.eps;tag8;tag19#filename13.eps,tag6;tag15;tag11#filename14.eps,tag7;tag2;tag3;tag17;tag12;tag4#filename15.eps,tag0;tag9,tag20

    Finally, this regex S/R, below :

    Replaces any semi-colon, right after the string eps with a comma

    Replaces any # symbol with a line-break ( \r\n or \n )

    SEARCH eps;|(#)

    REPLACE ?1\r\n:eps,    OR    ?1\n:eps, if you works with an Unix file

    And we obtain the final output :

    filename1.eps filename2.eps filename3.eps filename3.eps filename4.eps filename5.eps filename5.eps filename6.eps filename7.eps filename8.eps,tag16 filename8.eps,tag14 filename8.eps filename9.eps filename10.eps,tag5;tag1 filename10.eps filename11.eps,tag18 filename11.eps,tag10;tag13 filename12.eps,tag8;tag19 filename13.eps,tag6;tag15;tag11 filename14.eps,tag7;tag2;tag3;tag17;tag12;tag4 filename15.eps,tag0;tag9,tag20

    As you can see, the 21 non-duplicated tags ( From tag0 to tag20 ) are arranged differently, with many lines without tag, at beginning of the list !

    Best Regards,

    guy038

  • Function list for user defined language

    7
    0 Votes
    7 Posts
    2k Views
    MAPJe71M

    Maybe FAQ Desk: Function List Basics will give you some ideas.

  • File Type issue

    6
    0 Votes
    6 Posts
    5k Views
    RunkelikunkkuR

    @Jeffrey-Snively said in File Type issue:

    Now I have a different problem. With some file types (including .txt), when I go Right-click>Open With>Choose Default Program, it gives me the option to select NPP. I select it and check the “Always use this program” box. Then when I look in Windows explorer, it shows the file type for all my .txt documents as “Notepad++ Document” instead of “.txt file” or something.

    Old thread but I had same issue and this was the top google result so maybe this will help someone in future. Open regedit, go to “HKEY_CLASSES_ROOT\Notepad++_file”, instead of “Notepad++ Document” leave the description empty and reboot your PC. Thanks for someone over at SU providing this.

  • I need help to remove a string

    3
    0 Votes
    3 Posts
    298 Views
    PeterJonesP

    On re-reading, I saw a fine point I may have missed: if you only want to delete parenthesized items when it starts with (tstamp, then slight change:

    FIND = \(tstamp.*?\)

    The rest remains the same.

    With this,

    (blah keep this) (tstamp blah blah) (blah keep this)

    will become

    (blah keep this) (blah keep this)

    If you have more requirements (the paren must start at the beginning of the line and/or end at the end of the line, or other such modifications), those refined requirements can be met. However, you will need to be more explicit.

    ----

    Do you want regex search/replace help? Then please be patient and polite, show some effort, and be willing to learn; answer questions and requests for clarification that are made of you. All example text should be marked as plain text using the </> toolbar button or manual Markdown syntax. Screenshots can be pasted from the clipbpard to your post using Ctrl+V to show graphical items, but any text should be included as literal text in your post so we can easily copy/paste your data. Show the data you have and the text you want to get from that data; include examples of things that should match and be transformed, and things that don’t match and should be left alone; show edge cases and make sure you examples are as varied as your real data. Show the regex you already tried, and why you thought it should work; tell us what’s wrong with what you do get… Read the official NPP Searching / Regex docs and the forum’s Regular Expression FAQ. If you follow these guidelines, you’re much more likely to get helpful replies that solve your problem in the shortest number of tries.

  • Removing punctuation before a line

    13
    0 Votes
    13 Posts
    2k Views
    УменяМодем ОграниченныйТрафикУ

    Yes, everything worked out, thank you!
    The first time I didn’t understand anything… the second time I didn’t notice my mistake…
    And the third time you read that I understood everything! :)