• Login
Community
  • Login

Find-in-files result list doesn't allow copying file names to clipboard

Scheduled Pinned Locked Moved General Discussion
5 Posts 3 Posters 6.7k 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.
  • L
    Les Ferguson
    last edited by Sep 14, 2016, 12:21 AM

    When I use find-in-files it would be very useful to be able to select a list of the file names from the results, but they do not get copied. You can Select All on the results panel and copy to clipboard, but this copies only the line matches and skips the file names.

    Has anybody got plans to change this?

    1 Reply Last reply Reply Quote 0
    • S
      Scott Sumner
      last edited by Sep 15, 2016, 12:10 PM

      This topic (and the solution you desire!) is discussed here:
      https://notepad-plus-plus.org/community/topic/10436/containing-line-numbers-from-find-window-not-copied-anymore

      1 Reply Last reply Reply Quote 0
      • J
        Jim Dailey
        last edited by Sep 15, 2016, 2:42 PM

        @Les-Ferguson

        It looks like you cannot get just the file names. If you use <Ctrl>+C to copy whatever is highlighted, then you will get the filenames and all the lines in those files including the line numbers (even if you have collapsed all the file hits so that only the file names are visible).

        1 Reply Last reply Reply Quote 0
        • S
          Scott Sumner
          last edited by Sep 15, 2016, 2:56 PM

          Jim is correct.

          However, one can apply a regular expression find and replace to derive that information:

          Find what: (?-is)(?:^(?:Search "|\t).+\R| (\d+ hits?)$)
          Replace with: (leave this box empty)

          This regex is attributable to an earlier post by guy038; apologies, at the moment I can’t find the link to that original posting.

          1 Reply Last reply Reply Quote 0
          • S
            Scott Sumner
            last edited by Sep 15, 2016, 2:59 PM

            Found the link! :
            https://notepad-plus-plus.org/community/topic/11637/collapse-function-how-to-copy-just-the-collapsed-results-from-results-window/2

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