Action on current selection



  • Please refer to the screenshot:

    78585a51-ab85-4f08-aa7f-24967c77a368-image.png

    When I select the word “applications”, other instances get highlighted.
    Now, how do I perform an action on the current selection?

    I would imagine the following options:

    1. Create multiple cursors and allow user to edit interactively (JetBrains style)
    2. Use a shortcut that replaces selection with an input.

    For the second option, I have checked the “Shortcut mapper” and nothing was found.



  • @asvc

    The light green is NOT a selection.
    It is an “indicator” used by the Smart Highlighting feature.
    It happens when you double-click a “word”; the original “word” is selected, but not any of the other highlighted instances.
    It is visual only; you can’t manipulate it.



  • Your 1 and 2 sound very similar to me, but you probably have something very different in mind.
    There are some active discussions on the “multiple cursors” and “edit interactively” aspects:



  • @Alan-Kilborn , good links. This deserves an attention:

    …when Notepad++ updates to a newer version of Scintilla this capability will be built-in by default.

    Post is back from 2016. 4 years later, it probably would be safe to assume that Scintilla was updated.

    I see some Python suggestions, however I would rather not expose Python anywhere close to the text editor (despite the admiration for the language itself)

    GitHub issue yields some hope. Now, how to get @donho 's attention to that and probably this post? :)



  • @asvc

    My quote from that long ago was a bit optimistic. The functionality is added by Scintilla but it needs “wired up” so that Notepad++ can use it correctly (this is the tedious part)

    And as an FYI the updated scintilla doesnt really make anything new possible, it just makes it a bit more convenient. I’ve had this functionality myself in Notepad++ for quite a while using Luascript



  • @asvc said in Action on current selection:

    it probably would be safe to assume that Scintilla was updated.

    Yes, exactly ONCE in this timeframe, I believe.

    I would rather not expose Python anywhere close to the text editor

    Given some of your other posts, with some of your desires, this seems an inflexible position.
    Of course, if you’re goal is to just point out what you perceive as “deficiencies” in Notepad++, that’s fine and that’s one thing.
    Quite another thing is to do/use a bit of scripting and have what you want RIGHT NOW, and not have to wait (perhaps forever) for your desires to be met by stock Notepad++.
    As @dail said, he’s been doing the “multiselect thing” that N++ currently can’t do, for YEARS with a bit of scripting.
    Your choice. :-)

    how to get @donho 's attention

    I think some people have been wondering about this very thing for a very long time. :-)



  • This post is deleted!


  • @Alan-Kilborn said in Action on current selection:

    Given some of your other posts, with some of your desires, this seems an inflexible position.
    Of course, if you’re goal is to just point out what you perceive as “deficiencies” in Notepad++, that’s fine and that’s one thing.
    Quite another thing is to do/use a bit of scripting and have what you want RIGHT NOW, and not have to wait (perhaps forever) for your desires to be met by stock Notepad++.
    As @dail said, he’s been doing the “multiselect thing” that N++ currently can’t do, for YEARS with a bit of scripting.
    Your choice. :-)

    Please let me explain the premise.

    Notepad++ is the native NT application that is using set of Win32 APIs and currently benefits from DEP/ASLR.

    With a bit of luck, we might get GUARD:CF as well.Who knows, maybe one day Notepad++ will be running in the AppContainer like Adobe Reader, MS Edge, etc.

    Adding full Python interpreter surely gives user a significant freedom (context of stdlib would be enough) but also increases attack surface which is already large enough.

    And as history proves, even minuscule notepad.exe can present some interesting opportunities



  • @asvc

    Security is indeed an important concern in current and future times.
    Perhaps you should not use Notepad++ at all, unless/until all possible holes in Notepad++ and Windows are addressed.


Log in to reply