• New (incomplete) LSP client plugin

    Notepad++ & Plugin Development
    58
    4 Votes
    58 Posts
    7k Views
    PeterJonesP

    However, that same theme is applied to ALL other languages, I thought that the theme should be specific to a particular language, not a “global” language.
    Any thoughts?
    Murray

    The “theme” is for Notepad++ as a whole. Inside any theme, there are settings for each language and each of the styles within that language, and if you don’t like the colors for a given language, you can customize them – but it’s still saved as part of your active theme.

    The purpose of a pre-built theme is to give you a starting point that’s reasonably-consistent among all the languages within a given theme, so that you just have to choose the theme once, and then all languages will use similar colors.

    https://npp-user-manual.org/docs/themes/

  • How to Upload/Change Avatar

    General Discussion
    7
    1 Votes
    7 Posts
    49 Views
    PeterJonesP

    @Almighty1 said in How to Upload/Change Avatar:

    @PeterJones - Thanks! When I posted the message as I used the instructions from link text, I did get up to the pick Edit except it did not have the Change Picture, only the following: …

    Changing your avatar is a privilege earned once you have a small amount of upvotes – probably, at the time, no one had upvoted any of your posts yet, but since then, you have received upvotes. (However, if your Google account had an avatar when you created your Community account, I believe it does allow it to be immediately set from that one, though it’s still not changeable until you have sufficient reputation/upvotes)

    I thought that function had been removed/disabled or it was because I am a new user.

    New user

    Is there a trick to get the entire image to be within the inside dimensions of the circle?

    The image is a square that’s 128x128, but the forum only shows the circle centered on the middle of that. So, any pixels that you want to be visible need to be within a circle that’s diameter=128 or radius=64 centered at (63,63) in the image. (So, for example, the pixel at (15,113) [which is part of your Avatar’s “tail” that is not shown] is 48 in the X direction and 48 in the Y direction from the center, so a distance of √(48²+48²) = 67.9 pixels, which is more than 64 units from the center. [Also proving that anyone who said during algebra class that you’d never use Pythagoras in “real life” was lying to you.])

  • 0 Votes
    2 Posts
    15 Views
    PeterJonesP

    @Almighty1 ,

    You click on the user’s profile, click their triple-dot, and “Start Chat With”

    Or you click on the main chat icon, go to “all chats”, and click on “create chat room”, and just add the one person.

    Either way are identical, as all chats in this forum take place in chat room, even if it’s just with one person.

  • 0 Votes
    3 Posts
    15 Views
    Robert JablkoR

    @Alan-Kilborn

    Thank you so much. It works.

    If anybody is interested, here is the full python script. It’s NOT python standard, but it really helps me read code.

    text=editor.getText() ################################################################################ ''' compress operators, removes trailing and following space from operators ''' operators=[ '+', '-', '*', ':', '/' '//', '%', '**', ] assigners=[ '=', '+=', '-=', '*=', ':=', ] comparators=[ '==', '!=', '<', '>', '<=', '>=', ] for character in operators+assigners+comparators: if ' '+character+' ' in text: editor.replace( ' '+character+' ', character ) ################################################################################ ''' padd brackets, adds space to brackets right of open, left of close ''' brackets_open='([{' brackets_close=')]}' for index, character in enumerate( text ): ''' searching edge cases ''' if index==0: # first character trailing_character=" " if len( text )>1: following_character=text[ index+1 ] else: following_character=" " elif index==len( text )-1: # last character trailing_character=text[ index-1 ] following_character=" " else: trailing_character=text[ index-1 ] following_character=text[ index+1 ] ''' replacing ''' if character in brackets_open and following_character!=' ': if character=='(': editor.replace( character, '\('+' ' ) # '(' needs escape '\(' else: editor.replace( character, character+' ' ) elif character in brackets_close and trailing_character!=' ': if character=='\)': editor.replace( character, ' '+'\)' ) # '(' needs escape '\)' else: editor.replace( character, ' '+character ) ################################################################################
  • 0 Votes
    7 Posts
    756 Views
    Vladimír KordíkV

    @xomx
    Thanks for the advice, I’ll try it.

  • 1 Votes
    3 Posts
    38 Views
    Almighty1A

    @PeterJones - Thanks for the assistance!

    You are right, some of the parts are obvious but I didn’t want to mess up the template by deleting things that don’t apply in case it is needed to produce the correct output in the post itself. Same reason, I didn’t delete the “To accomplish this,” section because while I knew from searching that \r\n meant carriage return, in the before data, I wasn’t sure what to use because as you can see, I knew one had to look for "<setting " but then I looked at it and noticed that there are two versions of "<setting ", one being "<setting " with the second one being “<setting name=”, and obviously, nothing needed to be done for “<setting name=” so my thought was I thought, I needed to make it ignore the “<setting name=” lines as part of the find which was really what made it more difficult in the search part.

  • 0 Votes
    4 Posts
    68 Views
    mkupperM

    @Propono-Web-Hosting

    At first I thought I could replicate your issue but in then when trying to carefully to repeat my steps so I could document the reproduction steps I discovered that a pinned portable worked fine…

    What I would do is to first unpin Notepad++, make sure no instances of Notepad++ are running, and then start a portable copy using however you normally start portable copies.

    Once the portable copy is running then save a copy of Notepad++'s debug info in Microsoft Notepad. Then right on the Notepad++ on the task bar, pin it, and close/exit Notepad++ to have just the pin showing.

    Do not start Notepad++ using the pin just yet. Instead, right click on the pin for Notepad++ in the task bar and right click the “Notepad++” at the top of the menu that shows up, and then left click on Properties. It defaults to the Shortcut tab of the properties and is in the Target field. I don’t see an obvious way to add the command line and so appended the command line parameters I wanted to the end of the Target field.

    Save that to the shortcut and start Notepad++ using the pin. Get the debug info again and verify that the path and command line exactly match what you saved when you had first started the portable copy.

    I had two strange things happen when I was trying to replicate. One of that was when copy/pasting the command line parameters I needed that the “quotes” around became unbalanced. It caused Notepad++ to try to create a file named “-multiInst” which I declined. I don’t know if I made a mistake or Windows did did something to unbalance the quotes. The result was when started Notepad++ that I got some odd behavior that seems much like what you saw. That’s why I’m suggesting to first get the debug info, then to fix up the Target, and them to re-verify the debug info once I have started Notepad++ using the pin.

    The other strange thing is that I normally use an installed copy of Notepad++. In the process of testing pins all of the session/tabs from my portable copy ended up getting appended to the tabs/files for the installed copy. My installed copy is single instance and the portable copies are normally run with -multiInst. As pinning does not transfer the command line I had first accidentally started a portable copy using my new pin without command line parameters. That started the portable copy in single instance mode and I suspect Notepad++ has some instance sharing stuff that resulted in my portable tabs/files getting appended to the tabs used by the installed copy.

  • 0 Votes
    5 Posts
    53 Views
    dr ramaanandD

    @Terry-R Using {Delay 0.05}\2\1\2\3 in the Replace field will be more accurate

  • Workflow: Number of open tabs

    General Discussion
    21
    0 Votes
    21 Posts
    324 Views
    Alan KilbornA

    It appears that those that like a less-streamlined UI are about to get their dream feature:

    6f5e9150-f95a-446e-877c-b76a66384644-image.png

    I’ll say no more.

  • Lost session after update

    Boycott Notepad++
    2
    1 Votes
    2 Posts
    345 Views
    Fortunato Henrique CavalcantiF

    I just came across the same issue a few minutes ago. Tried exploring the options but still couldn’t get my unsaved but open texts after the latest update from January 13th 2025…

  • 0 Votes
    3 Posts
    35 Views
    deleeleeD

    @Terry-R said in Find line containing word and the next line below it:

    I’d go for a “Mark” with bookmark lines selected.

    Use:(?-s)^(?=.*tweak:)(.+\R.+\R) and click Mark All. All the tweak lines and corresponding following lines are bookmarked. Then you’d just copy the bookmarked lines to another tab.

    Thanks, Terry, perfect!!

  • 0 Votes
    6 Posts
    76 Views
    PeterJonesP

    @Wicke2d said in Is it possible to enable autoscroll? (Scrollclick):

    Just because?

    @xomx gave you the reason in the reply to your issue: the Scintilla library (used as the underlying editor component of Notepad++) doesn’t expose access to the middle-mouse-button click (ie, scrollwheel click on modern mouse architecture). Until they do, Notepad++ cannot know that the MMB was clicked in the text-editing components of Notepad++.

  • MacroInspect which comments macros

    General Discussion
    36
    8 Votes
    36 Posts
    734 Views
    mpheathM

    To All, I have updated the gist with revision 8.

    Replace constant IDF_WHICH_DIRECTION with alternative IDF_FORWARD_DIRECTION to make it more meaningful with the action. Use html.unescape() on type2 values to resolve entities. Example &amp; will change to &.

    @Alan-Kilborn OK, XML comments do not require escapes with entities. -- can be a problem with XML comments so will be reduced to single - if exist.

    Replacing IDF_WHICH_DIRECTION is OK so as to avoid user confusion with which direction. The json will inherit the change so the file needs to be removed to get the alternative value of IDF_FORWARD_DIRECTION. Or, just edit the values in the json file to your liking.

  • 2 Votes
    10 Posts
    397 Views
    K

    Not many more topics came up meanwhile. Two little things:

    “TPopupMenu” won’t be drawn well in dark mode (thick light border; separators unnicely drawn). I’d assume this belongs to the amount of gui elements not yet individually handled by the code as mentioned above, right?
    For the separator a quick hack could be to set it’s caption to spaces, and to disable the item. Looks better.
    Did i miss something about the TPopupMenu? How does it behave in Delphi?

    I have a sub-dialog (sub form) invoked from the docking form (via tool button here) and noticed it stayed light. I learnt it has to be exposed in the app-plugin as exposed func for to be subjected by the NPP theme layer. Then i call this sub-dialog via invocaton of the plugin func. Did so, and it worked fine.
    But now iz’s callable from the plugin’s menu too - what might not be wanted always. Sometimes the exposure of functionality depends on a config setting though.
    In short: is it possible, and how, to disable items from the plugin’s menu conditionally?

  • 1 Votes
    3 Posts
    54 Views
    drippingwaxD

    @PeterJones Thanks. Also, I forgot to turn on Regular expression. Can you believe it?! What a noob! :D

    It works now! Thanks!

  • remove hyperlink

    General Discussion
    35
    0 Votes
    35 Posts
    24k Views
    nils svejgaardN

    @Lê-Thanh-Bảo said in remove hyperlink:

    2021-02-18_3-11-36.png

    Step 1: - Open Notepad++ and go to Settings.
    Step 2: - Select Preferences.
    Step 3: - After opening preferences window, Click on ‘Cloud & Link’ tab.
    Step 4: - Click under the ‘Clickable Link Settings’ section in uncheck the ‘Enable’ checkbox.

    This. just straight up saved so much frustration :D.
    Much love sir. many thanks from random person who registered ONLY to say thanks :D

  • Unicode Normalization

    Help wanted · · · – – – · · ·
    9
    1 Votes
    9 Posts
    1k Views
    J

    @guy038 Reacting late to this thread, but I think in many case when you want to normalise a unicode text, NFC isn’t enough because it doesn’t handle ligatures.
    So for many people, a longer table than the one here, including all the decomposition in NFKC, will be needed.

    To make this more concrete : NFC won’t normalise the ffi_ligature (U+FB03).
    So “A\uFB03n” will stay “A\uFB03n” if normalized with NFC, but will change to “Affin” if normalized with NFKC which is much more useful for many people.

  • 0 Votes
    3 Posts
    464 Views
    PeterJonesP

    @Säbelzahn-Tiger said in Can't drag and drop files into existing Notepad++ window:

    have done anything what I have found in the internet without any success.

    We cannot know what instructions you did or did not try. If we don’t know what you’ve tried, how can we know what we should or should not suggest? If we try to suggest anything, you would likely come back and say “I already tried that”, but there was no way for us to know.

    If you want help, explain the exact circumstances of what’s causing the problem, share your ?-menu’s Debug Info, and let us know what you tried. Don’t make us guess.

  • Regarding 'Notepad++ v8.4.3 - Unhappy Users' Edition'

    Boycott Notepad++
    12
    8 Votes
    12 Posts
    2k Views
    M

    @Coises
    @rdipardo

    Yeah, notionally plugins have to follow all these licensing rules. But in practice, there are plenty of closed-source plugins out there, and it doesn’t seem like they’ve faced any consequences for doing that.

  • 0 Votes
    4 Posts
    61 Views
    Terry RT

    @Jacob-Holmes said in Capitalization challenge with srt subtitle file - ignoring strings of text possible?:

    Otherwise, is there maybe a way to accomplish this with RegEx?

    So given the single example it might not be a good solution, but:
    Using the Replace function:
    Find What:(?-is)^Speaker\s*\d*:\s*\K(.)
    Replace With:\U\1

    Of course the search mode is Regular Expression and you need to click on the “Replace All” button. Best if the cursor is at the start of the file.

    The \K will cause issues if you want to detect and replace one line at a time, hence the need for the “Replace All”. So obviously you’d consider working on a copy of the file, just in case it caused more problems. If you did try this and it failed we’d need to know more about the issues. Then either we adjust this solution or start with a new idea.

    Terry