Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove irrelevant lines when opening search result in editor in VSCode

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

like image 893
dustin2022 Avatar asked Nov 07 '25 01:11

dustin2022


1 Answers

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

like image 133
Bharat Vishe Avatar answered Nov 10 '25 04:11

Bharat Vishe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!