Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to "scope to this" in Visual Studio Code?

I am working with Angular 2. The main project folder contains "./src/app" where most of the editing happens.

It is a bit cumbersome to always navigate down to this folder (after collapsing the folder structure, which happens often.).

Is there a way to "Scope to This" (just as in Visual Studio 2012+ Solution Explorer)?

like image 582
Wolfgang Avatar asked Jul 21 '17 08:07

Wolfgang


People also ask

What is scope to this in Visual Studio?

Visual Studio 2012 and later versions provide the "Scope To This" option. Using this option, we can select any project and then only this project will be visible in Solution Explorer. You can select a particular project or a folder from Solution Explorer.

How do you code navigate in VS Code?

VS Code provides two powerful commands to navigate in and across files with easy-to-use key bindings. Hold Ctrl and press Tab to view a list of all files open in an editor group. To open one of these files, use Tab again to pick the file you want to navigate to, then release Ctrl to open it.

How do I change the scope in Visual Studio?

In solution you can select particular project/folder/file and right click and click on “Scope to this” Menu. It will scope your solution explorer to that particular item. Now once you click on “Scope to this” It will scope your solution explorer to that particular item only.

How do you jump to a line in VS Code?

Go To Line dialog box To access this dialog box, open a document for editing, and then select Edit > Go To > Go To Line or press Ctrl+G.


1 Answers

There is a feature request for this in the vscode github project: https://github.com/Microsoft/vscode/issues/41860.

But in the mean time you can use this: https://marketplace.visualstudio.com/items?itemName=chrisdias.vscode-opennewinstance

the only problem is that you'll have two vscode windows open or a single one and you have to re-open the parent folder.

like image 172
Tim Glenn Avatar answered Oct 02 '22 19:10

Tim Glenn