• 0 Votes
    5 Posts
    841 Views
    guy038G

    Hi, @garbage-gold, @astrosofista, @alan-kilborn and All,

    Again, I would use a combination of regex S/R and the column Editor feature !

    So, from the input text, below :

    358 293 866 511 58 767 562 644 163 569 414 305 973 16 692 128 353 1000 870 58 535

    Using the following regex S/R :

    SEARCH (?-s)^(.+)\R(.+)\R(.+)

    REPLACE @@@@\1\t\2\t\3

    we get the text, with words separated by a TAB char :

    @@@@358 293 866 @@@@511 58 767 @@@@562 644 163 @@@@569 414 305 @@@@973 16 692 @@@@128 353 1000 @@@@870 58 535

    Now, place the caret after the two first @ characters of the first line

    And using the column editor ( Alt + C ) and inserting a list of numbers, beginning with 1, we obtain :

    @@1@@358 293 866 @@2@@511 58 767 @@3@@562 644 163 @@4@@569 414 305 @@5@@973 16 692 @@6@@128 353 1000 @@7@@870 58 535

    Finally, using the simple S/R :

    SEARCH \t

    REPLACE \r\n ( or \n only for Unix files )

    You’ll have your expected text :

    @@1@@358 293 866 @@2@@511 58 767 @@3@@562 644 163 @@4@@569 414 305 @@5@@973 16 692 @@6@@128 353 1000 @@7@@870 58 535

    Best Regards,

    guy038

  • How to add the numbers in sequence to specific text;

    3
    0 Votes
    3 Posts
    602 Views
    guy038G

    Hello, @garbage-gold, @astrosofista and All,

    Of course, regexes cannot perform, generally, mathematical operations, but we can cheat a bit !

    First, open the Replace dialog

    SEARCH (?<=\d)\R ( or (?<=\w)\R if your text contains words instead of numbers )

    REPLACE \t

    If necessary, tick the Wrap around option

    Select the Regular expression search mode

    Click on the Replace All button

    => Your text in changed as below, with a TAB char between each word :

    358 293 commit; 866 511 commit; 58 767 commit; 562 644 commit; 163 569 commit; 414 305 commit;

    Notes

    This regex S/R looks for any EOL character(s), which is/are preceded with a number ( (?<=\d) ) ( or a word if (?<=\w) )

    And replaces it with a tabulation character ( \t )

    Now, put the caret at the end of the first line

    Open the column editor ( Alt + C )

    Select Number to Insert

    Type in 1 in all the zones

    If necessary, tick the Leading zeros option

    Click on the OK button

    Remove additional numbers on possible empty lines, at the end of the list

    You should get :

    358 293 commit;1 866 511 commit;2 58 767 commit;3 562 644 commit;4 163 569 commit;5 414 305 commit;6

    Finally, perform the last regex S/R, below :

    SEARCH \t

    REPLACE \r\n ( or \n only for Unix files )

    Here is your expected text :

    358 293 commit;1 866 511 commit;2 58 767 commit;3 562 644 commit;4 163 569 commit;5 414 305 commit;6

    Et voilà !

    Best Regards,

    guy038

  • 0 Votes
    5 Posts
    302 Views
    Rarder RR

    @Terry-R Thank you. I tried the way you suggested and it worked.

  • Regex plese help - how to remove every 2nd and 3rd

    11
    0 Votes
    11 Posts
    2k Views
    Terry RT

    @Martin-X said in Regex plese help - how to remove every 2nd and 3rd:

    So i want to use one regex command to delete second and third line and “Login:”

    I will give you some guidance. If you look at @Alan-Kilborn regex you will see the line that is written back is enclosed in brackets in the Find What line. The replace with line is \1 which is how we write back that information within the bracket. By changing the contents of the bracket (essentially moving the bracket to the right) you will change what the regex keeps.
    Also note that you may have overlooked the space in the line you want to keep, now removing the front portion, so keep that in mind when editing his regex.

    Terry

  • Where does autoupdator stores download install file?

    3
    0 Votes
    3 Posts
    181 Views
    EkopalypseE

    @vsrawat said in Where does autoupdator stores download install file?:

    Anything wrong in the question?

    Well, I ASSUME, that it is hard to answer this question
    Why didn’t it install automatically?

    Where did it store the downloaded installation file

    According to the source in your TEMP directory.

  • Far from complete in autocomplete many instructions miss

    2
    0 Votes
    2 Posts
    162 Views
    dailD

    Please be more specific, give clear examples, provide screenshots. There is no information to even try to guess what the issue is that you are having.

  • Different indicator for unsaved Tabs

    18
    2 Votes
    18 Posts
    2k Views
    Alan KilbornA

    @richlux said in Different indicator for unsaved Tabs:

    I would need to make the changes every time I upgraded Notepad++.

    True; it’s called “patching”. :-)
    But unlike most patching, it doesn’t require rebuilding the source code.
    Plus AFAIK Resource Hacker has a command line way of doing things, in addition to its GUI, so it could be relatively painless to have truly personalized tab bar icons!

    I might try it just to see what it would look like.

    Additional prototypes of acceptable solutions would be good I’m sure.

  • Zen coding plugin installed but not working

    2
    0 Votes
    2 Posts
    408 Views
    Steve MullockS

    I feel stupid now!
    I had this problem a few weeks ago, noted I had the problem and couldn’t fix it, but didn’t note the solution I eventually found until somewhat later in my notes. So just in case anyone else has the same issue:

    I copied the “c:\Program Files (x86)\Notepad++\plugins\ZenCoding-Python\ZenCodingPython” directory to “c:\Users\Steve\AppData\Roaming\Notepad++\plugins\Config” I think I must have found the clue in one of the installation instructions I found via Google. I guess in an ideal world the plugin manager would have done that for me of given me a hint, but I got there in the end.

  • Open Modelica user language

    3
    0 Votes
    3 Posts
    602 Views
    PeterJonesP

    I said,

    have parentheses (acos(x)), you need Prefix Mode enabled

    Sorry; something felt odd about that, so I did more experimenting. If you followed that advice, and had a third function defined multiarg, which would be used like multiarg(a, b, c) in your code, only the multiarg(a, would be highlighted, which would be just weird. The right way to handle parentheses: turn off the Prefix Mode (don’t need it anymore); go to the Operators & Delimiters; here, you have two choices:

    if you want the parens highlighted, but the stuff between not highlighted, then put ( and ) inside the Operators 1 box (space-separated list). It would then render like the following (where I chose green as the style):
    95c0cf03-2de4-4f73-a188-085120836cbc-image.png
    See that the function names are red, the parens are green, and the args are default (black) if you want the parens and the stuff between highlighted instead, then choose an unused Delimiter # style (I chose #1 and set it to Blue), with Open = ( and Close = ). This will show up as:
    24deabab-0fd6-42a7-a28c-804da559dfcb-image.png
    See that the function name is still red, the parens and arguments and commas are blue.

    The Prefix Mode setting would allow you to write something like open in the list, and every function that started with open, like openFile, openDoor, and openSesame would all be highlighted with that one entry of open.

  • Collapsing uncollapsing parts of code

    4
    0 Votes
    4 Posts
    269 Views
    Alan KilbornA

    @Jose-Manuel-Vericat-Della said in Collapsing uncollapsing parts of code:

    convoluted and not very practical

    Don’t knock it until you try it. At least 3 people have upvoted my suggestion. It can’t be that bad. :-)

    do not know if the development team can introduce a new setting as “stop uncollapsing” or something similar per every instance

    This seems to be where you are placing your hopes.
    That’s probably not the best plan.
    One-off needs are not usually put into a general-purpose product.
    But, if you’d like, you can make a feature request by following the instructions here: https://community.notepad-plus-plus.org/topic/15741/faq-desk-feature-request-or-bug-report

    I’ll continue to put up with the full uncollapsed code in the second…

    That seems silly, unless you’ve actually tried my proposal and it doesn’t work, or you’ve tried it and you don’t like it for some other reason.
    It’s your life. :-)

  • Function-List-Parser for User-Defined-Language "Velocity"

    4
    0 Votes
    4 Posts
    1k Views
    Martin1975M

    @MAPJe71

    Dear MAPJe71,

    thank you for the excellent solution.
    It worked perfectly right out-of-the-box and does exactly what I was looking for.

    Thanks again and best regards
    Martin

  • Toolbar Wrapping and Multiple Extras After Update Today

    2
    0 Votes
    2 Posts
    221 Views
    andrecool-68A

    Delete the file CustomizeToolbar.dat, it is located in the Config directory. And then make the plugin settings CustomizeToolbar

  • Upgrade and roaming app configuration

    2
    0 Votes
    2 Posts
    151 Views
    andrecool-68A

    Use the portable version of the program, in it we can make our own independent settings.

  • Why the comparing takes so many hours??

    2
    1 Votes
    2 Posts
    2k Views
    pnedevP

    @Martin-X ,

    Hi Martin,

    Unfortunately Compare plugin takes A LOT OF TIME comparing some kind of files (that is because of their content, not their type). I suppose your files are falling in that group.
    It also doesn’t show a meaningful progress in that case because the compare process is not linear and there are several compare stages. Your comparison is having troubles in the early stages (because of the file contents specifics) but it is very possible once that stage is over the other stages to go almost instantly.
    I’m pretty sure it is still comparing, it hasn’t crashed but there is no way to check how much time it will take it to finish.

    Having said that leads to the conclusion that Compare plugin is pretty useless in your case.
    You’ll need to kill the running Notepad++ instance from the Windows Task Manager because the progress Cancel button won’t work in that situation.

    I suppose it’s not the case but if it happens that your files are not confidential I’ll appreciate it if you send them to me so I can further check what’s happening.

    BR

  • Indentation of XML Causing Crashing of Notepad++

    1
    0 Votes
    1 Posts
    136 Views
    No one has replied
  • Python 3 f-strings not colourizing correctly

    4
    1 Votes
    4 Posts
    1k Views
    Peter LP

    Yes! That’s it. All working perfectly now.
    Yes, you’re quite correct, I have customised the settings (quite a bit), so that’s what’s happening.
    I’ll be aware of that for future issues.
    It may well be simpler for me to keep a track of my customisations, then uninstall and reinstall Notepad++ for a new upgrade, along the lines of what @Alan-Kilborn does with his portable version.
    And thank you @PeterJones for your kind comments.

  • Replace text

    8
    0 Votes
    8 Posts
    315 Views
    astrosofistaA

    @Craig-McFarlane

    Glad it worked. Thank you for report it back.

  • Insert Text at tge beginning of found documents

    3
    0 Votes
    3 Posts
    169 Views
    digidaxD

    Thanks, have used not the right words for the search here but it solves my problem.

  • 0 Votes
    9 Posts
    1k Views
    PeterJonesP

    @Alan-Kilborn said ,

    I downloaded Notepad ++

    You mean we weren’t actually starting with a Notepad++ related problem from the very beginning

    I chose to interpret that statement as “I re-downloaded and re-installed Notepad++” (which could have had the effect of fixing the .txt file association back to Notepad++, so that they were properly icon’d for Notepad++ rather than Excel). Otherwise, … yeah, that statement gave me pause, too. :-)

    But ignoring that, I don’t often have my OneDrive folders showing files that it hasn’t downloaded to my machine, so I don’t remember how seamlessly that feature of OneDrive works; but maybe Notepad++ requests to open the file differently than some other common applications, so OneDrive doesn’t recognize the request and download the file promptly enough; or maybe Notepad++ isn’t patient enough while OneDrive processes the request, and if the OP tried to open the file a second time, it would be there. But i think “Always keep on this device”, and being patient once, should help the OP’s current problem.

  • Character counter!

    2
    0 Votes
    2 Posts
    130 Views
    Alan KilbornA

    @Ricardo-0 said in Character counter!:

    I wonder if it is possible to count characters in Notepad ++?

    View (menu) > Summary…

    I need to know why I use forums where the limit is 1000 characters.

    Can’t help you with that one!