Community
    • 登入

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

    已排程 已置頂 已鎖定 已移動 General Discussion
    5 貼文 3 Posters 6.7k 瀏覽
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • Les FergusonL
      Les Ferguson
      最後由 編輯

      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 條回覆 最後回覆 回覆 引用 0
      • Scott SumnerS
        Scott Sumner
        最後由 編輯

        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 條回覆 最後回覆 回覆 引用 0
        • Jim DaileyJ
          Jim Dailey
          最後由 編輯

          @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 條回覆 最後回覆 回覆 引用 0
          • Scott SumnerS
            Scott Sumner
            最後由 編輯

            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 條回覆 最後回覆 回覆 引用 0
            • Scott SumnerS
              Scott Sumner
              最後由 編輯

              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 條回覆 最後回覆 回覆 引用 0
              • 第一個貼文
                最後的貼文
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors