Is there any way that node_modules folder do not expand unecessarily when cmd+click on code in vscode?

Viewed 1900

When i do cmd+click on something in the code the node_modules folder gets expanded and in order to close it need to go all the way back to the top of that folder which is very annoying.Is there an way to avoid this?

2 Answers

What I usually do is hiding the node_modules from my sidebar..

Go to: File > Preferences > Settings

Search for files:exclude

And fill up the Exclude pattern with node_modules/ and hit OK

This way, I don't need to turn off the auto reveal functionality

In settings, look for Explorer: Auto Reveal

Controls whether the explorer should automatically reveal and select files when opening them.

You currently have it set true, which is the default value. Change the value to false.

Bring up settings with Control-, (comma) and then type reveal ex into the filter.

To scroll to the file that you are editing in the list of files, right-click on the file's tab, then select Reveal in side bar.

I wrote up more information on my blog.

Related