Visual studio code - how to copy search results?

前端 未结 4 1825
梦如初夏
梦如初夏 2020-12-13 03:25

Does Visual Studio Code have any way to copy the results of a search into a new window?

As a bonus, I\'d really like to be able to drop the file name and just copy

相关标签:
4条回答
  • 2020-12-13 04:03

    This will work for a single file, assuming each line you care about begins with the search text: 1. Highlight your search string 2. CTRL + SHIFT + L to select all occurrences found 3. SHIFT + ↓ to select all of those lines 4. CTRL + C 5. Open a new file 6. CTRL + V

    0 讨论(0)
  • 2020-12-13 04:12

    Select all occurrences of current selection

    CTRL+SHIFT+L

    https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf

    0 讨论(0)
  • 2020-12-13 04:20

    The following works for a single file:

    1. CTRL + F
    2. Type your search string
    3. CTRL + SHIFT + L to select all occurrences found (max. 999)
    4. ESC (or close search dialog with top-right X)
    5. CTRL + I to select whole lines
    6. CTRL + C
    7. Open new file
    8. CTRL + V
    0 讨论(0)
  • 2020-12-13 04:21

    VSCode 1.23 added the ability to copy your search results, see release notes: copy search results.

    The search results tree context menu includes three new options: Copy, Copy Path, and Copy All. This was a highly

    0 讨论(0)
提交回复
热议问题