• Commandline -quickPrint ignores Print Preferences

    2
    0 Votes
    2 Posts
    351 Views
    PeterJonesP

    @Psotny-Chochlik ,

    I am sorry, I cannot replicate the problem. When I have Notepad++ closed, and run notepad++ -quickPrint filename.txt from the command line, it prints with margins, line numbers, headers, etc.

    Could you share the contents of your ? menu’s Debug Info and paste in your reply? Could you Alt+PrintScreen the Print Preferences page and paste in your reply? Could you show us exactly the command line that you use to run the -quickPrint?

  • 0 Votes
    4 Posts
    6k Views
    PeterJonesP

    @Alan-Kilborn said in How can I prevent showing the "reload the document?" message, when I close npp!?:

    Doing that immediately closes N++ with no reloading prompts, for me.

    Weird.

    Enabled

    Disabled

  • I think I found a bug in the JSON parser regarding property keys

    2
    0 Votes
    2 Posts
    189 Views
  • Every word underlined in red

    7
    0 Votes
    7 Posts
    911 Views
    Stephen AustinS

    OK. Seems to have fixed it. Thanks for the time and trouble taken to reply.

  • Functions list showing nothing in 7.9.1 (64b), working fine in 7.9

    2
    0 Votes
    2 Posts
    204 Views
    Alan KilbornA

    @Philippe-Malacher

    The function list has undergone a major change between 7.9 and 7.9.1.
    Suggest reading the documentation.
    Some further info is HERE in a post I made about my experience with function-list. It isn’t related to a UDL, though.

  • Find number betwen commans

    2
    0 Votes
    2 Posts
    152 Views
    Alan KilbornA

    @Toze-Cerdeira

    You would have to script a solution to that.
    A similar discussion that would show you how to do it is HERE.

    In your case your “find” expression could be: p2,(\d+), and you could replace with 'p2,' + str(int(m.group(1)) - 1) + ',' or something close to that; there are a few different ways to write these expressions.

  • Setting Default Character Set

    3
    0 Votes
    3 Posts
    264 Views
    Jack HortonJ

    @Alan-Kilborn Sweet - thanks for that! 🙂

  • nppftp profiles gone everytime restart

    2
    0 Votes
    2 Posts
    267 Views
    PeterJonesP

    @Faizal-S ,

    I’ve never seen that behavior, but I’m having trouble understanding exactly your circumstances. If you provide us with more information about your configuration , it might help us understand what you’re asking about:

    go to the ? menu, Debug Info, and Copy Debug info into clipboard, then paste that into your reply if you have config settings (like “my own global cache”), you might screenshot that setting dialog, because I don’t understand what you’re asking, just paste them in the forum reply are there other screenshots to help us understand
  • Notepad++ Website

    5
    -2 Votes
    5 Posts
    491 Views
    PeterJonesP

    @ToastyBread3736 ,

    simply linking me to that article is of no use to me.

    Of course not. You have to read and comprehend what’s on the other end of the link.

    you could tell me that this post doesn’t belong here

    That’s what the FAQ article does. It tells you that your post was off-topic for the Notepad++ forum.

    link me to another [forum] where I can ask this question and get a better response

    We in the Notepad++ Forum cannot be expected to know every other forum on the internet, and what would be the best forum to answer your question. Especially since your question showed such a lack of understanding about the subject – both from a technical standpoint, and where to ask it. (From a technical standpoint, you don’t “put [your website] on Google”. You upload your website to your webhost, and then if people link to your website, it may someday show up in Google searches; or you can pay someone for SEO and services to get Google to see it sooner.) But, in general, if you don’t know the specific forum where a question should be asked, you could Google for “forum for website development” (or whatever your question actually relates to), or for virtually any technical question, assume that somewhere in the Stack Overflow family of forums, there’s probably one on-topic for your specific question.

    neither you or the article you sent me advances my knowledge of coding

    This is not a coding forum, so this is not a forum whose purpose is to advance your knowledge of coding. This is a forum on how to use the Notepad++ editor. The only on-topic reply for your question in this forum is to “use Notepad++ to type the code, then publish your code to your website.”

    We point people to the FAQ, because it tells you everything you should need in order to figure out that you’ve asked the question in the wrong Forum, and it saves us the time of responding in detail to every coding question that pops up incorrectly in this forum. Unfortunately, replies like yours then require us to say the same thing in a different way, because you apparently didn’t understand the point.

  • 0 Votes
    2 Posts
    192 Views
    Alan KilbornA

    @Trey-Hargrove-0

    Fairly easy, however you’ll need to use Notepad++ 7.9.1 or later (earlier versions will not handle the \A construct correctly) to do this:

    Use Replace in Files.

    find: \A(?s).*?~
    repl: ~

    Suggest making a backup of your whole fileset first; delete only after you’ve decided it works as intended.

  • UDL to change font color of a character at a specific character count

    2
    0 Votes
    2 Posts
    234 Views
    PeterJonesP

    @All-Rfriends ,

    There’s nothing native to Notepad++ that does that out of the box.

    However, Notepad++ has plugins, including scripting languages.

    You can add extra highlighting to a builtin lexer (like the HTML lexer) or to a User Defined Language (UDL) using regexes via the script EnhanceAnyLexer.py that @Ekopalypse shares in his github repo.

    The regex would be something like (?-s)^.{11}\K(.) – I haven’t tried it, but that would be the first regex I would try = it finds first 11 characters .{11}, throws that out with \K, and then captures the single character (.). I believe that would do what you want.

  • Newbie question - search and replace with wildcard

    6
    0 Votes
    6 Posts
    304 Views
    Fredrik KonradssonF

    @Alan-Kilborn said in Newbie question - search and replace with wildcard:

    find: (?-s)(“1”.*?)“1”
    repl: ${1}“6”

    Many thanks! I really appriciate your help.

  • Extract eMail and Telephone Nr.

    6
    0 Votes
    6 Posts
    719 Views
    guy038G

    Hello @ahmed-izler and All,

    Here is my solution… with regexes, of course ;-))

    So, given this example, below, where :

    Three sections, out of five, end with Option 2

    A variable amount of empty lines, even 0, exists between sections

    Two sections are preceded with leadings space and tabulation characters

    vorname: Alfred nachname: Weber geburtsdatum: 17.01.1981 Strasse: Wolfgangstraße HausNr: 12 PLZ: 45598 Wohnort: Essen Etage: EG Lage: links Tel: 0176048784263 email: richardweber1m@yahoo.com IBAN: DE4XXXXXXXXXXXXXXXXX5 XXXXXXXXXX Option 2 vorname: Alfred nachname: Weber geburtsdatum: 17.01.1981 Strasse: Wolfgangstraße HausNr: 12 PLZ: 45598 Wohnort: Essen Etage: EG Lage: links Tel: 0176048784263 email: richardweber1m@yahoo.com IBAN: DE4XXXXXXXXXXXXXXXXX5 XXXXXXXXXX vorname: Alfred nachname: Weber geburtsdatum: 17.01.1981 Strasse: Wolfgangstraße HausNr: 12 PLZ: 45598 Wohnort: Essen Etage: EG Lage: links Tel: 0176048784263 email: richardweber1m@yahoo.com IBAN: DE4XXXXXXXXXXXXXXXXX5 XXXXXXXXXX Option 2 vorname: Alfred nachname: Weber geburtsdatum: 17.01.1981 Strasse: Wolfgangstraße HausNr: 12 PLZ: 45598 Wohnort: Essen Etage: EG Lage: links Tel: 0176048784263 email: richardweber1m@yahoo.com IBAN: DE4XXXXXXXXXXXXXXXXX5 XXXXXXXXXX vorname: Alfred nachname: Weber geburtsdatum: 17.01.1981 Strasse: Wolfgangstraße HausNr: 12 PLZ: 45598 Wohnort: Essen Etage: EG Lage: links Tel: 0176048784263 email: richardweber1m@yahoo.com IBAN: DE4XXXXXXXXXXXXXXXXX5 XXXXXXXXXX Option 2

    Open the Replace dialog ( Ctrl + H )

    SEARCH (?s)^\h*vorname:.+?(\R)(\h*Tel:\h+.+?\R\h*email:\h+.+?\R).+?\R(\h*Option 2\R*)?(?=\h*vorname:|\z)

    REPLACE ?3\2\1

    Tick the Wrap aroud option, if necessary

    Select the Regular expression search mode

    Click on the Replace All button, or several times on the Replace button

    You’ll get this output, with the indentation kept :

    Tel: 0176048784263 email: richardweber1m@yahoo.com Tel: 0176048784263 email: richardweber1m@yahoo.com Tel: 0176048784263 email: richardweber1m@yahoo.com

    So, @ahmed-izler, if this result is the one that you expect to, I’ll give you some hints on the regex S/R, next time !

    Best Regards

    guy038

  • Macro to clear RO and Format XML

    3
    0 Votes
    3 Posts
    934 Views
    PeterJonesP

    I said,

    For me, the Pretty Print command is ID=22137

    Sorry, I forgot, I was going to explain how I found that: I have the plugin NppUISpy installed; using its interface, I was able to find that ID number.

    Note: many of the same points regarding plugin commands in macros were brought up in this discussion from Jun 2020.

  • How notepad ++ recover file information from an 'web' exploreur?

    5
    0 Votes
    5 Posts
    276 Views
    Noemie MalgogneN

    @PeterJones Thanks for your detailed answer. I feel like a beginner and you’re right, I probably misunterstand the differences between web and desktop developpment. Thanks a lot for the links, whose I will read with attention and I hope that will help me to find the solution!
    ( for the joke, I,ve tried to find what I want in the code source but I’m not gifted apparently :D)

  • HyperLink

    2
    0 Votes
    2 Posts
    206 Views
    Alan KilbornA

    @sadicus

    Not sure at all what you mean.

    But… the way hyperlinks work has undergone revision in recent versions in order to work better.

    Probably some “side effect” with the way the old stuff worked allowed you to do whatever it is you liked.

    I would not count on any of that old behavior making a return appearance.

  • "Special characters" in Search Results window (encoding issues?)

    19
    2 Votes
    19 Posts
    2k Views
    Alan KilbornA

    @PeterJones said in "Special characters" in Search Results window (encoding issues?):

    If you added

    First, I’m a bit surprised that after adding that line manually, that Notepad++ allows it to remain (after recording a new macro, forcing N++ to rewrite shortcuts.xml).

    Second, it was a good idea, but sadly, after trying it, I get the same result as earlier, specifically, “garbage” characters in the Find result window text.

    Third, thanks for the interest, @PeterJones

  • Find and Replace: Multiple Replacements in Part of a String

    11
    1 Votes
    11 Posts
    752 Views
    guy038G

    Hello, @anos, @terry-r, @alan-kilborn, @peterjones and All,

    And here is my solution !

    If we use the FREE-SPACING mode (?x), for the SEARCH part : SEARCH (?x-s) (?: ( \+A (\*)? ) | ( \+B (\*)? ) | (2) ) (?!.*,) Groups --> No 1 2 3 4 5 Look-Ahead REPLACE (?1(?{2}1:a))(?3(?{4}2:b))?5X BEWARE that, in the REPLACE part, the FREE-SPACING mode is FORBIDDEN. So, ONLY for INFO : REPLACE ( ?1 ( ?{2} 1 : a ) ) ( ?3 ( ?{4} 2 : b ) ) ?5 X

    and given the data :

    12345-01, A+A*2B+B*+A 12345-02, A+AB+B*+AA

    it would return :

    12345-01, A1XB2a 12345-02, AaB2aA

    Notes :

    The first part (?x-s) of the regex search means that :

    The free-spacing mode is set ( Spaces are not taken in account, except for the [ ] syntax or an escaped space char )

    Due to (?-s) syntax, the dot regex symbol matches a single standard char only ( not an EOL char )

    Then, the (?:......) syntax defines a non-capturing group

    Now, in this non-capturing group, we have 3 alternatives and the first two contain an optional inner group (\*)? ( Remember that the ? is an other form of the {0,1} quantifier )

    To end, all this regex , so far, will match ONLY IF the final negative look-ahead structure (?!.*,) is verified, that is to say if at current position, reached by the regex engine, there is never a comma, at any further position, in current line

    Now, in the replacement regex :

    The (?1(?{2}1:a)) syntax means that if  group 1 exists, then if  group 2 exists, then  write 1 else  write a

    The (?3(?{4}2:b)) syntax means that if  group 3 exists, then if  group 4 exists, then  write 2 else  write b

    Finally, the ?5X means that if  group 5 exists, then  write an X ( The parentheses are not mandatory as this part ends the regex

    Note also that it’s not necessary to surround the groups 1, 3 and 5 with braces as these groups are not immediately followed with a digit !

    Best Regards,

    guy038

  • Find/Replace number with Increment Value

    12
    0 Votes
    12 Posts
    2k Views
    guy038G

    Hello @peterjones, @DJSpirosG and All,

    I suppose that the regex, in the Python script, is r'^(\\[#)(\d+)(\\])' and NOT r'^(\[#)(\d+)(\])' !!

    If so, Peter, I can edit your post and make the corrections. Just tell me !

    Remark : To explicitly write the literal strings \\[ and \\], in our forum, you need to write them as \\\[ and \\\]

    Note also that, unfortunately, the Preview panel does not show the right layout :-(( Things are OK when you click on the Submit button, only !

    BR

    guy038

    P.S. :

    To write the text, of the Remark line, just above, I needed to write :

    First, 2 consecutive \ before each square bracket !

    Second, 3 consecutive \ before each square bracket !

  • How do I install the emmet plugin in the portable version of notepad ++?

    4