Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to select a VSCode folder in explorer view without expanding or collapsing it?

In Visual Studio Code, if you want to add a new file or folder under an existing folder, you need to first select it. However, selecting a folder will cause it to toggle between expanded and collapsed, which can be bothersome because it often makes you need to click the folder twice and because it can cause the file list to scroll around. Sometimes I want to select a folder which is already open without closing it, however I have yet to find a way to do so.

Example:

enter image description here <== I want to select pktest folder

enter image description here <== After selecting it, it gets collapsed and I need to open it again =(

Is it possible to select folders without collapsing or expanding them, or will I just need to live with this inconvenience? In any case, thanks for your time.

like image 673
Elijah Seed Arita Avatar asked Oct 07 '19 08:10

Elijah Seed Arita


2 Answers

Coming soon (possibly in v1.51?), there is a commit see https://github.com/microsoft/vscode/issues/71994 that allows the ability to turn off the toggling open/close of a folder when you click on it. But it isn't in the Insiders' Build yet. This would be the setting:

"workbench.tree.expandOnFolderClick": false
like image 153
Mark Avatar answered Sep 29 '22 02:09

Mark


Right click -> New File/New Folder

like image 41
InterIRL Avatar answered Sep 29 '22 01:09

InterIRL