Home > Software engineering >  How to remove irrelevant lines when opening search result in editor in VSCode
How to remove irrelevant lines when opening search result in editor in VSCode

Time:10-04

I press Ctrl Shift F to search across files. The result appears on the side bar and I want to open it in an editor. However, the result in the editor displays some irrelevant lines to my search, how should I remove them?

In my case, I want to display 5 lines only (14, 25, 27, 38, 41) in the editor.

enter image description here

CodePudding user response:

There is an option to filter context lines (Toggle Contex Lines) on the right side of the search box or you can use the shortcut key combination as (Alt L).

enter image description here

  • Related