Select all occurrences of selected word in VSCode

前端 未结 8 1770
不思量自难忘°
不思量自难忘° 2020-12-12 08:21

Are there any trick or extension to select all instances of selected word in visual studio code, to facilitate editing or deleting those instances without search and replace

相关标签:
8条回答
  • 2020-12-12 09:17

    Select All Occurrences of Find Match editor.action.selectHighlights.

    Ctrl+Shift+L

    Cmd+Shift+L or Cmd+Ctrl+G on Mac

    0 讨论(0)
  • 2020-12-12 09:20

    I needed to extract all the matched search lines (using regex) in a file

    1. Ctrl+F Open find. Select regex icon and enter search pattern
    2. (optional) Enable select highlights by opening settings and search for selectHighlights (Ctrl+,, selectHighlights)
    3. Ctrl+L Select all search items
    4. Ctrl+C Copy all selected lines
    5. Ctrl+N Open new document
    6. Ctrl+V Paste all searched lines.
    0 讨论(0)
提交回复
热议问题