• Login
Community
  • Login

Action on current selection

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
9 Posts 3 Posters 974 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A
    asvc
    last edited by May 6, 2020, 12:20 PM

    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.

    A 1 Reply Last reply May 6, 2020, 12:23 PM Reply Quote 1
    • A
      Alan Kilborn @asvc
      last edited by May 6, 2020, 12:23 PM

      @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.

      1 Reply Last reply Reply Quote 2
      • A
        Alan Kilborn
        last edited by May 6, 2020, 12:26 PM

        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:

        • https://community.notepad-plus-plus.org/topic/11360/multi-selection-and-multi-edit
        • https://github.com/notepad-plus-plus/notepad-plus-plus/issues/8203
        1 Reply Last reply Reply Quote 2
        • A
          asvc
          last edited by May 6, 2020, 12:39 PM

          @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 ? :)

          D A 2 Replies Last reply May 6, 2020, 12:46 PM Reply Quote 0
          • D
            dail @asvc
            last edited by dail May 6, 2020, 12:46 PM May 6, 2020, 12:46 PM

            @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

            1 Reply Last reply Reply Quote 2
            • A
              Alan Kilborn @asvc
              last edited by May 6, 2020, 12:52 PM

              @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. :-)

              1 Reply Last reply Reply Quote 3
              • A
                asvc
                last edited by May 6, 2020, 12:53 PM

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • A
                  asvc
                  last edited by May 6, 2020, 1:11 PM

                  @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 …

                  A 1 Reply Last reply May 6, 2020, 1:22 PM Reply Quote 0
                  • A
                    Alan Kilborn @asvc
                    last edited by May 6, 2020, 1:22 PM

                    @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.

                    1 Reply Last reply Reply Quote 0
                    9 out of 9
                    • First post
                      9/9
                      Last post
                    The Community of users of the Notepad++ text editor.
                    Powered by NodeBB | Contributors