Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    N++ 7.7 new feature: Count in Selection

    General Discussion
    3
    4
    481
    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.
    • Alan Kilborn
      Alan Kilborn last edited by

      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?

      dinkumoil Meta Chuh 2 Replies Last reply Reply Quote 2
      • dinkumoil
        dinkumoil @Alan Kilborn last edited by dinkumoil

        @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
        • Meta Chuh
          Meta Chuh @Alan Kilborn last edited by

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

          Alan Kilborn 1 Reply Last reply Reply Quote 1
          • Alan Kilborn
            Alan Kilborn @Meta Chuh last edited by

            @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
            • First post
              Last post
            Copyright © 2014 NodeBB Forums | Contributors