• nppftp profiles gone everytime restart

    2
    0 Votes
    2 Posts
    257 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
    451 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
    184 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
    225 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
    289 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
    691 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
    889 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
    251 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
    197 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
    692 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
  • How to set tab size for user defined language?

    3
    0 Votes
    3 Posts
    2k Views
    PeterJonesP

    @Mario-Valle ,

    As far as I know, there isn’t a native way in Notepad++ to change the tab setting on a per-UDL basis.

    That would be nice, and in theory, you could put in a feature request. Unfortunately, the UDL system doesn’t often get bug fixes, let alone feature requests.

    However, there may be a workaround; the underlying Scintilla library has a SCI_SETTABWIDTH message, which you can access through a variety of means, including the PythonScript plugin (editor.setTabWidth(2) will change it to two spaces per tab). With some logic, you could write a PythonScript that determines whether the active editor is editing a BiBTeX-UDL-based file, and if so, run that PythonScript setting. If you have PythonScript, or are willing to install it, someone here should be able to give you pointers on how to implement that logic.

    <edit> You might also need to change SCI_SETTABINDENTS, depending on your Settings > Preferences > Language > Tab Settings > [Default] settings </edit>

  • Is there a way to view in split screen the final outcome of my code?

    2
    0 Votes
    2 Posts
    301 Views
    PeterJonesP

    @Joshua-Barbour ,

    Notepad++ is a text editor. It is often used to edit underlying code, but you have to rely on something else (another application, or at least a plugin) to do something with that code.

    You don’t mention what kind of code it is. Is it something like a batch file or Python program which runs using an interpreter? Is it code like c/c++ that needs to be compiled? Is it HTML, which needs to be rendered using a browser? All of those would have a possible answer which might or might not make you happy, but since you give no clue as to which it is, your question is virtually impossible to answer.

  • XML FILE- FIND and REPLACE

    2
    0 Votes
    2 Posts
    167 Views
    Hüseyin Can CömertH

    I have managed to do it. :)
    Thanks anyway.

  • Question about Word wrap spec with tab indented line

    5
    0 Votes
    5 Posts
    390 Views
    S

    @litos81 said in Question about Word wrap spec with tab indented line:

    ExtSettings

    Thank you very much the information.
    I solved it.
    Regards,

  • Run tab question

    2
    0 Votes
    2 Posts
    163 Views
    Alan KilbornA

    @Sara-Uyehara

    You don’t. You use the View menu choices:

    Imgur

    If you have a more-specialized need (e.g., different browser?), post again.

  • Transpose multiple lines Horizontally in rows

    9
    0 Votes
    9 Posts
    1k Views
    Terry RT

    @Akruti-Clinic said in Transpose multiple lines Horizontally in rows:

    No data changed

    I am referring to this
    3027cd08-02f8-4d28-bf77-1c33c8fcc4a0-image.png

    The order of the lines changed and some text was missing, namely Price - which showed on the first line immediately behind chinttt.

    I am thinking that English is not your primary language as the last sentence you wrote i thinks its going more comple will find another, I do not understand. If you are still having issues, explain the problem. As you supplied some “real data” which allowed me to fix the previous problem, maybe you can show further examples where the process did not work and maybe it is still possible to update the solution to accommodate any other need.

    Terry

  • 0 Votes
    6 Posts
    321 Views
    Alan KilbornA

    @Alan-Kilborn said in Let result lines for text search pattern appear only once even if there are more occurrences?:

    change Find what to `foobar(?-s).*

    Bit of an error here, in formatting; THIS:

    Now, the workaround:

    change Find what to `foobar(?-s).* change _Search Mode to Regular expression

    SHOULD BE:

    Now, the workaround:

    change Find what to foobar(?-s).* change Search Mode to “Regular expression”