• Ciao a tutti, ho una domanda credo facile

    2
    0 Votes
    2 Posts
    153 Views
    Alan KilbornA

    @Livio-Panuello said in Ciao a tutti, ho una domanda credo facile:

    I have a text file:
    ‘723’,
    ‘722’,
    ‘721’,
    ‘720’,
    ‘719’,
    ‘718’,
    ‘717’,
    I can quickly get a format like this:
    ‘723’,‘722’,‘721’,
    ‘720’,‘719’,‘718’,
    ‘717’,
    Thanks
    Hello

    I might try it like this:

    find: ^(.\d+.,)\R(.\d+.,)\R(.\d+.,\R)
    repl: \1 \2 \3
    search mode: regular expression

    I used a . for the single quote, since it could truly be one of several types of single-quote characters.

  • i want new option

    4
    0 Votes
    4 Posts
    173 Views
    Alan KilbornA

    @carypt

    Maybe a reasonable supposition.
    But why not let the OP say more?
    Replying to such a post only encourages questioners to put the minimum effort in.
    Instead it should be if GI then GO.

  • NP++ does not show me the message on the console

    2
    0 Votes
    2 Posts
    268 Views
    dinkumoilD

    @Alejandra-Bernal

    I don’t know how to use g++ from the command line, but I guess if you call it like you did it will create an executable file with some kind of default name and then terminates. Thus, the message regarding the started process with PID 5744 from your screenshot is about g++ itself and not about the created executable.

    Try to add the following as the last line of your NppExec script:

    $(CURRENT_DIRECTORY)\$(NAME_PART).exe

    If this doesn’t work, add some command line options to the line where g++ is called to tell the compiler where to create the output file and which name to use.

  • Invisible spaces

    10
    0 Votes
    10 Posts
    7k Views
    caryptC

    @Alan-Kilborn oh yes , i see , i forgot that i made that special setting for my npp-search, thus ctrl-f couldnt work as intended . sry for trouble . on the other hand i want to say that i might have not the time or knowledge to pile up a fully complete solution for a problem , but still wanting to share the results of my research (time consuming too) as "hints"even if it might need tweaking . thats why its called unprooven , to not cause messing up the tidyness of thoughts

  • My Notepad++ can't read style correctly

    2
    0 Votes
    2 Posts
    2k Views
    PeterJonesP

    @Huanying04 ,

    Your JSON is showing as styled, so Notepad++ is properly behaving as designed, and styling the JSON correctly.

    However, I think what you’re commenting on is that stylers.model.xml lists 14 different styles, but your Style Configurator only shows 6.

    That’s because a default installation of Notepad++ uses %AppData%\Notepad++\stylers.xml as the Style Configurator config file. The stylers.model.xml you found in the Notepad++ program directory is what Notepad++ uses to re-create %AppData%\Notepad++\stylers.xml if there isn’t one found. So, my guess is that you’ve updated Notepad++ on this computer, so that its stylers.model.xml is newer than your %AppData%\Notepad++\stylers.xml. If you opened %AppData%\Notepad++\stylers.xml (File | Open, and paste that string in), I believe it would only show the 6 styles that you can see.

    To fix this, you have two options:

    Delete and Re-create stylers.xml: WARNING: if you had customized any of your colors in the style configurator, this method will delete those customizations and you will have to redo them. I do not recommend this method if you want to keep your custom colors; try method#2 instead. Close all open Notepad++ windows Go to %AppData%\Notepad++\ and delete the stylers.xml file Open Notepad++. It will re-create %AppData%\Notepad++\stylers.xml Style Configurator > JSON should show all 14 styles now. Manually merge the two WARNING: Do not change any Notepad++ settings until after step #6. Close all open Notepad++ windows. Open a single Notepad++ window. Open the files stylers.model.xml in one view, and %AppData%\Notepad++\stylers.xml in the other If you have the Compare plugin, you can compare the two files to find where differences are; otherwise, you can just manually compare the two, and copy rows from stylers.model.xml to stylers.xml that were missing in stylers.xml. Close Notepad++ without changing any other settings Open Notepad++. Style Configurator > JSON should show all 14 styles now.


    PS: For more on %AppData%\Notepad++ folder, see “FAQ Desk: What is %AppData%”

  • 1 Votes
    6 Posts
    1k Views
    PeterJonesP

    Tangent:

    I was curious what SCI_DELETEBACKNOTLINE did differently than the normal backspace behavior, so since I had it mapped in that fresh portable, I tried it. If you have text on the line you are editing, that command will erase normally. But if you are at the first character of the line, where a normal backspace would delete the previous line’s EOL characters and take you to the end of the previous line, the SCI_DELETEBACKNOTLINE will not erase the EOL characters or take you to the end of the previous line – it will just stop at the beginning of the line you’re at.

    Interesting. I don’t know that I’ve ever had a desire for the editor to stop me from accidentally backspacing to the previous line… but I guess it’s good to know such a feature exists. :-)

  • All versions crash at startup

    13
    0 Votes
    13 Posts
    2k Views
    github4mosesG

    @github4moses Here I am again, having swapped the motherboard into one with a better CPU that can SSE2 now. The board takes all Windows Updates (that the previous one crashed upon) and runs even the most recent Notepad++ now. So I’m happy with the working tool and have to thank all the contributors having tried to help me.

  • How can I see the "Replaced files" after search and replace?

    11
    0 Votes
    11 Posts
    660 Views
    Alan KilbornA

    And, of course, the above advice was totally ignored. :-)

    https://github.com/notepad-plus-plus/notepad-plus-plus/issues/9275

  • Notepad++ can't find the words that still exist

    3
    0 Votes
    3 Posts
    225 Views
    Robin CruiseR

    I made something about it. I put the cursor somewhere else, then I check and search “Backward direction” Seems that my search was forward, that is why.

    thanks

  • JSON Styles Broken on v7.9.1

    4
    0 Votes
    4 Posts
    2k Views
    Daniel FuchsD

    Just to add to that, JSON by design does not have comments. It is a data only file type. Some if not most parsers error upon finding comments, so I guess Notepad++ is right here.

    See also https://stackoverflow.com/questions/244777/can-comments-be-used-in-json

  • can a wordpress website coding reaten in Notepad++?

    3
    -1 Votes
    3 Posts
    253 Views
    satta king balckS

    yes you can do. I also write the code of my website. After modification, i have again posted in wordpress files.

  • Macro for a game

    Locked
    5
    -1 Votes
    5 Posts
    404 Views
    Michael VincentM

    @Noah-Thornquest said in Macro for a game:

    setup a macro to farm this game for me overnight

    Sounds like you want a script, not a text editor. Learn the API for your game and find a scripting language that has support for it.

    Cheers.

  • Delete ";" in a description column

    5
    0 Votes
    5 Posts
    496 Views
    Jose Emilio OsorioJ

    @PeterJones
    Hi Peter,
    After a lot of tries, it works with the following expression:

    (^[^;];[^;];|\G)[^;]\K;(?=.;[^;];[^;]$)

    Thank you very much.

  • Line break brainstorming (×_×)

    8
    -1 Votes
    8 Posts
    375 Views
    Neil SchipperN

    Faisal,

    It is almost certainly true that the text you want to modify came from a spreadsheet or database. If you have access to the original document(s), or their legitimate owner, then this is more an issue of how the data was exported. All modern tools allow exports that that use field separation by tabs or commas.

  • Replace certain characters when typing (YAML)

    11
    0 Votes
    11 Posts
    877 Views
    EkopalypseE

    @PeterJones

    That was quite a lengthy process.
    First I read through the question.
    Then I tried to understand the question and what a possible solution might look like.
    Then I had coffee and cake and had to start all over again.
    In no time at all, 2 hours went by :-D
    In the end I did a copy and paste so as not to miss dinner.

    :-D

  • ReplaceAll InSelection keeps selection...sometimes!

    8
    3 Votes
    8 Posts
    382 Views
    Alan KilbornA

    BTW, during some of the testing for this, I got into weird situations (one mentioned above) where definitely the In selection checkbox was “out of sync” with how Notepad++ normally handles it.

    As another example, I had selected text, and the In selection checkbox was not ticked, but when I did a Find All in Current Document, the Find result window said:

    (0 hits in 0 selections of 1 searched)

    instead of:

    (0 hits in 0 files of 1 searched)

    So something funky is up with that.

    I remember a recent poster in another thread had said that even though he had selected-text, the In selection box would not “enable” for him so that he could tick it. I tend to take that poster a whole lot more seriously now. :-)

  • How can I mark multiples selected lines (to use with F2 after)

    6
    0 Votes
    6 Posts
    5k Views
    OverlordBRO

    @Alan-Kilborn said in How can I mark multiples selected lines (to use with F2 after):

    BTW, the @PeterJones solution is one that cries out for a macro to be recorded for it, so that it appears as a nice command in the Macro menu and can optionally be tied to a keycombo for quick usage.

    Thanks for you extended explanation abou the problem, Alan!

    I will put both solutions on macros tu use with a key combo.

  • How to join these two lines

    5
    -1 Votes
    5 Posts
    285 Views
    Terry RT

    @carypt said in How to join these two lines:

    (! you will have to add end of line characters to the replace string)

    Please read this as constructive criticism, I mean no offence.

    A trick you will learn is that since you have captured the line ending in the search code (\R), then you can use that in the replacement field by including the group number (\2) in your case. So it doesn’t matter what type of line ending the file uses, you have captured it and can use it in the replacement.

    Also, you may want to format your answers a bit better. Just one long paragraph makes it a bit hard to understand. And with the s: and r: I know what they are, but sometimes newbies won’t, so consider writing things in full.

    Just take your cue from some of the seasoned forum members in how to write “lovely” prose.

    Cheers
    Terry

  • how to append the numbers with specific string ??

    14
    0 Votes
    14 Posts
    1k Views
    Terry RT

    @kamal-lochan said in how to append the numbers with specific string ??:

    Wherever Kamal string is there i wants to append some number to it .

    Here is an alternative option which ONLY involves regular expressions (and the column editor function).

    replace all CRLF with @@
    Place cursor in the first position of the file. Using the Replace function we have
    Find What:\R
    Replace With:@@
    Search mode is “regular expression”, click on “replace all”

    insert CR & LF before every “kamal” text
    Place cursor in the first position of the file. Using the Replace function we have
    Find What:(([a-z]+)?kamal)
    Replace With:\r\n\1
    Search mode is “regular expression”, click on “replace all”

    insert line numbers and move to behind the “kamal” text
    Check if the first line has the “kamal” text, if not position the cursor in the first position of the second line (which does have the “kamal” text). Use column editor and use “number to insert”, starting 1, increase 1 and repeat 1, click OK.

    Now to move the number behind the “kamal” text.
    Using the Replace function we have
    Find What:^(\d+)[a-z]+)
    Replace With:\2 \1

    recreate the original CRLF and remove the previously inserted ones
    Using the Replace function we have
    Find What:(@@)|\R
    Replace With:?1(\r\n)

    I’n not proposing that you use this method as it seems you are well on the way to solving it the “pythonscript” way which is far more sensible. I’m showing you another method which is very simple to understand but as a consequence has a few steps to it.

    Terry

  • need help guys

    5
    0 Votes
    5 Posts
    276 Views
    Nightcore AMVN

    @Alan-Kilborn Thanks Bro
    alt text