• Login
Community
  • Login

N++ 7.7 new feature: Count in Selection

Scheduled Pinned Locked Moved General Discussion
4 Posts 3 Posters 728 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
    Alan Kilborn
    last edited by May 23, 2019, 1:57 PM

    Has anyone experimented with “Count in Selection”?:

    Imgur

    I’ve experimented…and it works…but I can’t really think of any (non-contrived) situation in which I’d use it. I can’t recall ever having wanted to do this kind of “search” in the past, ever.

    Well…maybe as a binary found-it-one-or-more-times, or didn’t-find-it thing…maybe…but never as a oh, there’s 7 in that selection, without then wanting to know where those 7 matches actually are located in that selection, which currently can’t be done.

    What do others think? Is this a valuable feature addition and I am just not seeing why?

    D M 2 Replies Last reply May 23, 2019, 2:29 PM Reply Quote 2
    • D
      dinkumoil @Alan Kilborn
      last edited by dinkumoil May 23, 2019, 2:33 PM May 23, 2019, 2:29 PM

      @Alan-Kilborn

      It can be useful when you search in a source code with many sub routines, where the same variable name might be used in different sub routines, but you only want to know if a variable is used in a certain sub routine (maybe you want to check whether you renamed all instances of that variable, so 0 would be the expected result).

      You can select the code of this routine (this might be possible even with keyboard shortcuts when using Begin/End select and the YEtc plugin which is able to jump between fold points) and use the Count in selection feature of the Find dialog.

      1 Reply Last reply Reply Quote 4
      • M
        Meta Chuh moderator @Alan Kilborn
        last edited by May 23, 2019, 4:00 PM

        @Alan-Kilborn

        closing and rejecting feature request #722 lead to a follow up post by @Scott-Sumner, and this in turn has lead to it’s implementation.

        A 1 Reply Last reply May 23, 2019, 5:37 PM Reply Quote 1
        • A
          Alan Kilborn @Meta Chuh
          last edited by May 23, 2019, 5:37 PM

          @Meta-Chuh said:

          closing and rejecting feature request #722 led to…

          I see.

          In that issue comment thread it is said “it’s hard for making a consistent UI if we want ‘in selection’ for every find command”. To that I’d say, why not just remove the little border that boxes in the In Selection checkbox and the Count button?

          ;)

          Seriously, though, I’d guess that the code to do, for example, Find All in Current Document with In Selection as a qualifier is much harder than the Count version, otherwise why not include it? I’d use that variant quite often.

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