• External lexers - VirtualStore - and plugins config files in general

    7
    5 Votes
    7 Posts
    352 Views
    EkopalypseE

    @gstavi

    Nothing from Npp, probably as I’m using portable version always.

    Program Files: Oracle (virutalbox) and ImageMagick
    Program Files (x86): THQ, Steinberg, Power Tab, PDFCreator, Motorola, MetzUpdater, Cypheros, avicohh

  • Writing from right to left

    8
    0 Votes
    8 Posts
    1k Views
    Heidi HolappaH

    @Ekopalypse said in Writing from right to left:

    from Npp import editor, SCINTILLANOTIFICATION

    def on_char_added(args):
    if DO_REVERSE_TYPING:
    editor.gotoPos(editor.getCurrentPos()-1)

    try:
    DO_REVERSE_TYPING = not DO_REVERSE_TYPING
    except NameError:
    editor.callbackSync(on_char_added, [SCINTILLANOTIFICATION.CHARADDED])
    DO_REVERSE_TYPING = True

    Thank you SO much Ekopalypse, this is perfect for my needs at the moment! Does exactly what I was looking for.

    Also, thank you all for the very kind and warm replies. This was my first post here and this experience gave a very welcoming feel of the NotePad++ - community.

  • 0 Votes
    6 Posts
    2k Views
    prahladmifourP

    Hello,@dkseby7x
    Please try this code, To How to remove text except URLs maintaining the original line of the remove?

    search for:

    \h*<url\b.*?(http[^<]+).*?</url>|<.*?>\s*

    and replace with captured URL (captured in the first parenthesized group)

    \1

    \h matches any horizontal space, [^<]+ matches one or more characters, that are not <

    I hope this code will be useful to you.
    Thank you.

  • Page side by side preview/ feature request

    20
    0 Votes
    20 Posts
    1k Views
    overstopO

    When reading a book, you have lelf and right page open thus I was thinking in np++ this book view side by side would be a natural option to have.

  • UDL and Styles

    3
    0 Votes
    3 Posts
    493 Views
    David TylerD

    @Ekopalypse

    Thank you for the link, that explains things.

    I can see I’ve worded my question in a way that’s not too clear.

    Essentailly I found a nice dark theme which looks good with most of the built in languages. When I downloaded a new UDL for Oracle PLSQL, it’s overriding the font background and foreground colours in the theme so it ends up looking awful.

    Your suggestion of the colour style attribute makes a lot of sense so I’ll have a play with that and see if I can get what I need.

    Much appreciated

    David

  • 0 Votes
    9 Posts
    9k Views
    EkopalypseE

    @Alan-Kilborn

    I barely know what I ate yesterday, how am I supposed to know what I thought about something a year ago? :-D

    Links can be created as we see with url - based on that, I suppose I came up with this idea, but it looks like I never dug deeper since it wasn’t requested.

  • Removing plugin manager was a mistake

    10
    0 Votes
    10 Posts
    890 Views
    Alan KilbornA

    @PeterJones

    TL;DR :-)

  • Simple text replacement between two files

    5
    0 Votes
    5 Posts
    557 Views
    Valentina RoldósV

    Great! Thanks so much!

  • How I can convert urls in a text file to clickable links??

    4
    0 Votes
    4 Posts
    7k Views
    R kR

    @guy038 OP here! This is exactly what I was looking for. Thank You.

  • Find Dialog Flash Count

    4
    0 Votes
    4 Posts
    280 Views
    PeterJonesP

    @Alan-Kilborn ,

    <tongue style=“cheek: in; firmly: 1”>But why would anyone search for things that aren’t there? And why would you start searching from the middle instead of the beginning? </tongue>

  • Tab vs Space for .rs (Rust)

    13
    0 Votes
    13 Posts
    1k Views
    mere-humanM

    @snmnarum said in Tab vs Space for .rs (Rust):

    Perhaps the installer could detect a modified config and give us the option of A) use new, B) preserve user, or C) attempt a merge.

    You can create a feature request for this. Having at least A) and B) would be nice. However, C) will not be easy to implement.

  • Bug or problem with block comment in another block comment

    2
    0 Votes
    2 Posts
    354 Views
    PeterJonesP

    @Andrey ,

    What language lexer has block comments like that? Or are you using a UDL?

    And does that language actually allow nested comments? Some languages do, some don’t, and some leave it up to a compiler implementation decision.

    If the language really allows it, but the built-in lexer allows it, then technically, that’s a bug in the lexer. However, the lexers that ship with Notepad++ are part of the Scintilla code library that Notepad++ uses, so it would be a long, unlikely process to get it fixed (report the bug to Scintilla; wait for it to maybe get fixed; request Notepad++ update its Scintilla; wait for likely many years before Notepad++ does update its Scintilla, if ever)

    If you are using a UDL, that lexer uses a very simple algorithm, which was not built to handle nested comments (and even if you submitted an issue on it, the UDL lexer, even though technically controlled by Notepad++ unlike the other lexers, hasn’t had any significant improvements in years)

    You can add extra highlighting to a builtin lexer or to a User Defined Language (UDL) using regexes via the script EnhanceAnyLexer.py that @Ekopalypse shares in his github repo, but you might have to tweak his code to be able to handle nested comments.

    My general coding practice on nested comments: don’t.

  • find two letters between quotes in lang tag

    14
    0 Votes
    14 Posts
    3k Views
    Pouemes44P

    Hello Alan yes of course
    but when i must search and replace multi lines, its not very easy with a sow little windows and must always use regular expresions for lines break, so with and extension it will be super

  • How-To Backup to custom Sub-Directory?

    2
    0 Votes
    2 Posts
    294 Views
    Alan KilbornA

    @Gen-Utility said in How-To Backup to custom Sub-Directory?:

    Is there a clever alternative to get what i want?

    I don’t believe so.
    Developers designed the feature how they believed it would be most useful to users.
    In 5+ years of “watching” I don’t think I’ve ever seen a similar complaint/desire.
    But surely you can ask that your desired functionality be implemented.
    See the FAQ entry on making a feature request.

  • Hiding the line numbers column

    3
    0 Votes
    3 Posts
    12k Views
    Alan KilbornA

    I searched keyboard shortcuts… preferences

    I’m all about listening to complaints about a bad user interface, but not this time. This one is 100% PEBKAC.

  • How do I add a character ')' at a specific position?

    2
    0 Votes
    2 Posts
    555 Views
    guy038G

    Hello, @swarn-singh and All,

    I suppose that the key word RCONVERT is not concerned by the replacement. ONLY  the expression CONVERT(varchar(..), ..........) must be changed as RTRIM(CONVERT(varchar(..), ..........))

    If my assumption is not exact, just tell me about it !

    So, given, this sample :

    CONVERT(varchar(5), col$1) + '~' + CONVERT(varchar(8), col$2) + '~AD~' convert(varchar(10), dbo.ADDRESS_AD.AD_ALTER_DATE, 103) rconvert(varchar(10), dbo.ADDRESS_AD.AD_ALTER_DATE, 103) SELECT @ent_status = dbo.ORGANISATION_ORG.ORG_ENTITY_STATUS, @keystring = dbo.ORGANISATION_ORG.ORG_NAME + ', ' + convert(varchar(30), dbo.ORGANISATION_TYPE_CODES_OTC.OTC_DESCRIPTION) + ', ALTERd: ' + convert(varchar(10), dbo.ORGANISATION_ORG.ORG_ALTER_DATE, 103)

    The following regex S/R :

    SEARCH (?i-s)\b(CONVERT\(varchar\(\d+\).+?\))

    REPLACE RTRIM\($1\)

    Would output the expected text :

    RTRIM(CONVERT(varchar(5), col$1)) + '~' + RTRIM(CONVERT(varchar(8), col$2)) + '~AD~' RTRIM(convert(varchar(10), dbo.ADDRESS_AD.AD_ALTER_DATE, 103)) rconvert(varchar(10), dbo.ADDRESS_AD.AD_ALTER_DATE, 103) SELECT @ent_status = dbo.ORGANISATION_ORG.ORG_ENTITY_STATUS, @keystring = dbo.ORGANISATION_ORG.ORG_NAME + ', ' + RTRIM(convert(varchar(30), dbo.ORGANISATION_TYPE_CODES_OTC.OTC_DESCRIPTION)) + ', ALTERd: ' + RTRIM(convert(varchar(10), dbo.ORGANISATION_ORG.ORG_ALTER_DATE, 103))

    Of course, select the Regular expression search mode and tick, preferably, the Wrap around option

    Then, click, either, several times on the Replace button or once only on the Replace All button

    If OK, I could explain how this regex works, next time !

    Best Regards,

    guy038

  • i like notepad++

    1
    3 Votes
    1 Posts
    203 Views
    No one has replied
  • Upgrade Location

    2
    0 Votes
    2 Posts
    175 Views
    Alan KilbornA

    @Robert-Gilland

    I gave up in the end

    Can’t you just keep pointing the installer prompt to E: ?
    I mean, sure, it would be great if it could remember, but…
    Notepad++ has, what, 3 or 4 releases a year, so you’d have to do this fairly rarely, right?

    Of course, I’m out of my element, because I use the “portable” version and never have to deal with such a thing. I just unzip the portable into a folder, move that folder where I like, and done.

  • can't search backwards in regular expression mode

    7
    0 Votes
    7 Posts
    3k Views
    Alan KilbornA

    @gstavi said:

    I guess the sometimes surprising results mainly apply to the Find ALL and Replace ALL options rather than the Find.

    From my understanding it is the opposite of what you said.
    The “all” operations always move only forward through the text when doing their work, again AFAIK.
    Even “Replace All” with “backward” direction (in non regex search modes) moves forward when it does the replacement! You just don’t see how it is doing it because it does it all at once.

    Ah, when you said:

    since the user can’t tell the difference.

    you were considering this!

    There is absolutely no sense in Finding ALL with backward search.

    Seems true…

    “ALL” options should be grayed out when “backward” checkbox is selected.

    That gives the higher power to the checkbox rather than the buttons. I think the devs wanted it the other way. Just a guess.
    Good UI/UX design is really hard.

  • Notepad++ YouTube Video Tutorials

    1
    4 Votes
    1 Posts
    1k Views
    No one has replied