• Incorporating SaveAsAdmin's handling into N++'s

    Locked
    8
  • 0 Votes
    2 Posts
    1k Views
    Claudia FrankC

    @Mehanik511

    afaik, nothing builtin so far.
    A possible solution might be using a scripting language plugin as shown here.

    Cheers
    Claudia

  • HELP: NP++ Portable does not save its settings!

    Locked
    3
    0 Votes
    3 Posts
    2k Views
    Enkidu0815E

    Oh… Tnx. I was not aware that it is so easy. :)
    I downloaded ZIP version and it is working as expected.
    Tnx!

  • Is there a plugin for deleting spaces in blocks of data?

    Locked
    14
    0 Votes
    14 Posts
    4k Views
    osg174O

    Hi all!
    Thank you very much for your support on this. I really appreciate your effort during the weekend.
    I already tested with the Claudia’s script, and adding as well the start = 0 changes and deleting the [1:] and it works really great.
    I just placed the { character at the beginning for sharing the content. No need to take it in consideration.
    I have never worked with Python [I’m a PL/SQL and database developer], and now I’d like to try to make magic with it. The Claudia’s support was awesome to make the script work in Notepad++.
    Thank you really so much again to you two, and happy coding!
    =)

  • move * before

    Locked
    13
    0 Votes
    13 Posts
    3k Views
    Pouemes44P

    @guy038 said:

    (?-s)

    hello thanks for answer
    i try also to learn
    for claudia solution i have no error if i add (?-s)

    like this
    (?-s)(<a.?>)(*\x20)(.?</a>)

    $1$3

    without (?-s) or with (?s) i get errors in results

  • Minimalistic core for UDL description?

    Locked
    1
    0 Votes
    1 Posts
    737 Views
    No one has replied
  • lag experience of typing.

    Locked
    8
    0 Votes
    8 Posts
    6k Views
    Scott SumnerS

    @guy038

    I think the most important thing was the diagnosis, which you provided. [I had no idea from the original posting that it was going to end up being a typematic rate problem]. My addition was just a different way of doing it–I think most can adapt what I was saying into their own specific languages, regardless of what the exact text is.

  • Does not save the files I need to use

    18
    0 Votes
    18 Posts
    6k Views
    Claudia FrankC

    Concerning the wrongly shown file extensions.
    The above screenshots about .bat registered but dialog
    shows additional extensions being registered.

    This drove me some nuts.
    Whenever I tried to do the same with python and ctypes it worked but
    npp showed clearly it isn’t.

    I assume I finally understood what the issue is,
    it is within RegExtDlg::getRegisteredExts()

    There is no check if RegOpenKeyEx or RegQueryValueEx succeeded or failed but
    one could assume that it isn’t necessary as the next if clause checks the previously
    generated variables valType and valData and if the two reg calls fail then
    those two variables are invalid.

    Well, I don’t think this is the case. If I understood correctly what I read it happens
    that those variables hold the state from the last successful registry calls
    and I guess this explains very well why we see what we see.

    So in theory a modification like

    ... TCHAR valData[extNameLen]{'\0'}; ... int valType = 0;

    should do the trick.

    Can someone with a more solid c++ knowledge confirm if this is the case?

    Thank you and cheers
    Claudia

  • Notepad doesn't recognize my syntax as python. Please help

    Locked
    5
    0 Votes
    5 Posts
    2k Views
    Michael DeaneM

    @Claudia-Frank Thank you. Danke. Gracias. I’ll let you know how it works out.

    MD

  • 0 Votes
    2 Posts
    1k Views
    Claudia FrankC

    @Sepehr-E

    I know Notepad++ is very complex. Is there any way to do this?

    Yes, a script, e.g. python script, could do this BUT can we rely on your example data?
    I mean, it is relatively easy to identify an url but getting the name part
    of subdomain isn’t that easy.

    So, does every subdomain follow your example?
    This is hostname.sub.domain like www.translate.com?
    Or could it be that you have also something like
    http://x15w.sub.text.org/
    If the latter is the case, what should be used as the filename?
    sub or text or sub.text or subtext or …

    Cheers
    Claudia

  • Search multiple terms or search file import

    Locked
    4
    0 Votes
    4 Posts
    2k Views
    Claudia FrankC

    @Scott-Sumner

    good point, deserves an upvote :-)

    Cheers
    Claudia

  • Want to delete the first paragraph of each line?

    Locked
    9
    0 Votes
    9 Posts
    4k Views
    guy038G

    Hello, @ty-ty,

    Seemingly, Ty-Ty, you’re asking for three different points :

    A : How to delete some structured data, located at each beginning of line ?

    B : How to delete some structured data, located at each end of line ?

    C : How to add a string at each end of line ?

    Just note that the points B and C may be replaced with :

    D : How to replace some structured data, at each end of line, by a literal string

    So, let’s imagine your initial list, opened in Notepad++ :

    *363780 willtall@gmail.com:xenogears *363781 kaansoulp@gmail.com:kaan1976 *363782 angelica.valila@gmail.com:pissis69 *363782 angelica.valila@gmail.com:pissis69 *363784 twsnyderman@yahoo.com:sdchbltmvp *363785 shaunamiekley@gmail.com:lfhs929 *363786 kynajo@gmail.com:jehovah1 *363787 stynrynn@gmail.com:satya96 *363788 haleyottley@gmail.com:haley0ttley *363789 pandemonium.jones@gmail.com:odder7471 *363790 marielle_koudijs@hotmail.com:Larissa18 *363791 robnoice@gmail.com:robtb303 *363792 willtall@gmail.com:xenogears *363793 kaansoulp@gmail.com:kaan1976 *363794 angelica.valila@gmail.com:pissis69 *363795 megsellig@gmail.com:bhyc9999 *363796 twsnyderman@yahoo.com:sdchbltmvp *363797 shaunamiekley@gmail.com:lfhs929 *363798 kynajo@gmail.com:jehovah1 *363799 stynrynn@gmail.com:satya96

    Obviously, we can deduce that :

    The part to delete, at the beginning, of each line ( Case A ) :

    Begin by possible space characters, followed by a * symbol

    Then followed by some digits ( 6 in our example ) and ends with possible space characters

    The part to delete, at the end, of eech line ( Case B ) :

    Begin with the unique colon of each line, followed by all the remaining characters of each line

    So, to achieve point A :

    Open the Replace dialog ( Ctrl + H )

    Type in the regex ^\x20*\*\d+\x20*, in the Find what: zone

    Leave the Replace with: zone EMPTY

    Check the Wrap around and Regular expression options

    Click on the Replace All button

    Notes :

    The ^ symbol means the beginning of line location

    Then, the syntax \x20* represents a string, possibly empty, of space characters

    The form \* try to match a literal star character. It must be escaped, due to its special meaning in regexes

    And \d+ stands for a non-empty range of consecutive digits

    Again, \x20* matches a string, possibly empty, of space characters, before each e-mail address

    To achieve point B :

    Open the Replace dialog ( Ctrl + H )

    Type in the regex :.+, in the Find what: zone

    Leave the Replace with: zone EMPTY

    Check the Wrap around and Regular expression options

    Click on the Replace All button

    Notes :

    First, the : matches a literal colon symbol

    Then the syntax .+ represents any non-empty range of characters, located after the colon, till the end of each line

    But, you may combine all these search-replacements, in an unique regex

    Therefore, to achieve points A and D, at the same time, use the regexes, below :

    SEARCH ^\x20*\*\d+\x20*|(:.+)

    REPLACE ?1\x20\x20\x20\x20\x20\x20Love

    Notes :

    The search regex is just an alternative between the two regexes, discussed above

    The second regex (:.+) is surrounded by round parentheses, to be stored as group 1

    In replacement, the form ?1....... means :

    If group 1 exists, just replace the colon and all text, located after, by six space characters, followed by Love

    If group 1 does not exist, delete all text, before each e-mail address, as the ELSE part of this conditional replacement is absent !

    So, after a click on the Replace All button, you should get the text below :

    willtall@gmail.com Love kaansoulp@gmail.com Love angelica.valila@gmail.com Love angelica.valila@gmail.com Love twsnyderman@yahoo.com Love shaunamiekley@gmail.com Love kynajo@gmail.com Love stynrynn@gmail.com Love haleyottley@gmail.com Love pandemonium.jones@gmail.com Love marielle_koudijs@hotmail.com Love robnoice@gmail.com Love willtall@gmail.com Love kaansoulp@gmail.com Love angelica.valila@gmail.com Love megsellig@gmail.com Love twsnyderman@yahoo.com Love shaunamiekley@gmail.com Love kynajo@gmail.com Love stynrynn@gmail.com Love

    Remark : In the regexes, you may type a single space character, instead of the \x20 syntax ! But, that later form just suppresses any ambiguity !

    Best Regards,

    guy038

  • Removal of Blank Lines in a large number of files

    8
    0 Votes
    8 Posts
    13k Views
    Nguyễn Huy HảiN

    Hi @Scott-Sumner
    Thanks for your reply!

    I had my doubt so I went to turn on Show white space and TAB but nothing shown (in pix below)
    https://cdn.discordapp.com/attachments/311547963883388938/406663528154529823/unknown.png

    I used echo command to add the last line to the text file but that commands also generates another empty line that follows. That’s why I need to remove it.

    After a bit of googling, I found that [\n\r]+$ works. I’m happy but still curious about the differences between multiple regex.

  • Notepad ++ crashes when using Babylon Translator

    Locked
    15
    0 Votes
    15 Posts
    5k Views
    chcgC

    You could also use the plugin https://sourceforge.net/projects/npptranslate/files/bin/Translate_3.1.1.0.zip, if getting translations from within N++ is your main focus.

    Just tested it with some simple testfile. Works ok, if it is UTF-8, but after change of encoding to ANSI babylon causes a crash. I think this is not caused by N++ itself.

    Also happens for the x64 version of N++:

    gdi32.dll!IsCreateFontIndirectAPresent() Unbekannt Nichtbenutzercode. Symbole wurden geladen.
    gdi32.dll!TranslateCharsetInfoStub() Unbekannt Nichtbenutzercode. Symbole wurden geladen.
    captlib64.dll!00007ffb47446d53() Unbekannt Es wurden keine Symbole geladen.
    captlib64.dll!00007ffb474455d6() Unbekannt Es wurden keine Symbole geladen.
    captlib64.dll!00007ffb47445cf8() Unbekannt Es wurden keine Symbole geladen.
    SciLexer.dll!00007ffb2d531b4e() Unbekannt Es wurden keine Symbole geladen.
    SciLexer.dll!00007ffb2d531dae() Unbekannt Es wurden keine Symbole geladen.
    SciLexer.dll!00007ffb2d5242e7() Unbekannt Es wurden keine Symbole geladen.
    SciLexer.dll!00007ffb2d52dfb2() Unbekannt Es wurden keine Symbole geladen.
    SciLexer.dll!00007ffb2d5131d7() Unbekannt Es wurden keine Symbole geladen.
    SciLexer.dll!00007ffb2d513731() Unbekannt Es wurden keine Symbole geladen.
    SciLexer.dll!00007ffb2d545835() Unbekannt Es wurden keine Symbole geladen.
    SciLexer.dll!00007ffb2d5472f8() Unbekannt Es wurden keine Symbole geladen.
    SciLexer.dll!00007ffb2d54b774() Unbekannt Es wurden keine Symbole geladen.
    [Externer Code] Frame mit Anmerkungen
    notepad++.exe!00007ff71f645c39() Unbekannt Es wurden keine Symbole geladen.
    notepad++.exe!00007ff71f645e06() Unbekannt Es wurden keine Symbole geladen.
    [Externer Code] Frame mit Anmerkungen
    notepad++.exe!00007ff71f67c008() Unbekannt Es wurden keine Symbole geladen.

  • Change color/appearance of whitespace characters

    Locked
    3
    1 Votes
    3 Posts
    2k Views
    Waqas IlyasW

    I didn’t know we could choose to just show the whitespaces other than EOL characters. Solves half of my problem. Better than nothing.
    “View Menu > Show Symbols > Show Whitespace and TAB”

    Thanks a lot!

  • Add delimiter - simple but not for begginer

    Locked
    3
    1 Votes
    3 Posts
    956 Views
    Alec TellA

    Thank you, looks so simple and elegant that makes me think where my “open minded” has gone.
    Will try it.

  • Default remove all empty lines?

    Locked
    3
    1 Votes
    3 Posts
    1k Views
    frederick22F

    Thanks Scott Sumner, that’s doing it fine.

  • highlighting for prolog does not work

    Locked
    3
    0 Votes
    3 Posts
    2k Views
    Jim DaileyJ

    @Doug-Skuce

    I assume by “this” you mean a user-defined language definition for prolog. If that is correct, all you should need to do is select prolog from the language menu.

    Once the user-defined language has been imported (or defined), then whenever you open a file in the editor having the file extension specified in the language’s definition, the file should be syntax highlighted automatically.

  • begining and end of line

    Locked
    3
    0 Votes
    3 Posts
    1k Views
    Pouemes44P

    @Scott-Sumner said:

    Find what zone: (?-s)^word1.*\R
    Replace with zone: $0word2\r\n
    Match case checkbox: your choice if you need it ticked or not
    Search mode: Regular expression

    thanks scott works perfectly

  • Rare Null Write Glitch

    19
    1 Votes
    19 Posts
    10k Views
    chcgC

    See https://github.com/notepad-plus-plus/notepad-plus-plus/issues/2883#issuecomment-360502864 might be interesting:

    After a Notepad++ crash with nullified file(mostly after save the file), you can try to restart notepad++! by executing the .exe directly. It comes up with a message that ‘another program changed your nullified file’ and it will ask to reload the file. DON’t reload (it is nullified in the original map) but after give your answer (DON’t reload) Notepad++ comes up with the nullified file: magical is not? Somewhere in memory it is keep alive!!
    Hopefully this saved other people some headaches!! It was for me.