Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Set focus on an specific folder in explorer. #28905

Closed
renatomattos2912 opened this issue Jun 16, 2017 · 29 comments
Closed

Feature request: Set focus on an specific folder in explorer. #28905

renatomattos2912 opened this issue Jun 16, 2017 · 29 comments
Labels
feature-request Request for new features or functionality file-explorer Explorer widget issues *out-of-scope Posted issue is not in scope of VS Code

Comments

@renatomattos2912
Copy link

This is a feature suggestion.

It will be great if i can mark an folder in explorer to be the only folder appearing visually, so all the other folders will be invisible until i toggle this behavior.

Example: i have a lot of folders in my project, but i want to focus on the "src/" folder for now, so i can click with the right button on this folder and set this to root and when i want to see all the folders again, i can toggle show folders.

I know that i can get this by opening the vscode inside this folder that i want, but this is not practical when i want to access files outside of this folder, so i want something that only affect the explorer without affecting the entire vscode behavior like terminal context and etc, it needs to be only something like toggling a display: none on the file explorer.

@renatomattos2912 renatomattos2912 changed the title Set focus on an specific folder in explorer temporarily Feature request: Set focus on an specific folder in explorer. Jun 16, 2017
@ramya-rao-a ramya-rao-a added the file-explorer Explorer widget issues label Jun 17, 2017
@bpasero bpasero added the feature-request Request for new features or functionality label Jun 17, 2017
@bpasero bpasero removed their assignment Jun 17, 2017
@ramya-rao-a
Copy link
Contributor

@renatomattos2912 How about using the new multi-root/folder workspace feature to create a workspace with 2 folders? 1 the main parent folder, the other would be the folder you want to focus on.

See https://code.visualstudio.com/updates/v1_14#_preview-multi-root-workspaces

@renatomattos2912
Copy link
Author

@ramya-rao-a sorry, i just see your response now. I will try this feature, thanks for your reply.

@tqwewe
Copy link

tqwewe commented Jul 5, 2018

Still would like to see this feature honestly, sounds awesome, especially when working in a multi-project repository.. the folder structure goes too deep just to get to src.

@jcrben
Copy link

jcrben commented Aug 17, 2018

Possibly the Workspace API could allow an extension to provide this...?

@isidorn isidorn added the *out-of-scope Posted issue is not in scope of VS Code label Sep 21, 2018
@vscodebot
Copy link

vscodebot bot commented Sep 21, 2018

This iteration we focus on issue grooming. This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.

If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

Thanks for your understanding and happy coding!

@vscodebot vscodebot bot closed this as completed Sep 21, 2018
@Aaron-Pool
Copy link

I'd like to see this issue reopened. I find that multi-root/folder workspaces struggle to hand js auto imports as well as having a single root with a .jsconfig file. But I'd still like to have a view where I can trim the fat of my workspace down to just what I'm working on that day.

@barelyfitz
Copy link

Having swtiched to vscode recently, I was also looking for this feature, something like "right-click on the folder to focus the workspace on just those files".

In the meantime, I noticed the breadcrumbs feature provides some of the same functionality: click the directory name in the breadcrumb, and you get a dropdown of just the files in that directory. Not quite what I'm hoping for, but better than nothing.

@tenbits
Copy link

tenbits commented Mar 27, 2020

Has anybody found a solution/addon for this? It is pity to see, that the feature is out of the scope. Workspaces are not quite helpful in the use case, @Aaron-Pool has also mentioned, - temporary hide away all folders around when working on some module/component.

@pwkip
Copy link

pwkip commented Apr 2, 2020

Being able to quickly switch between folders is a must have for WordPress development, where you might simultaneously be working on a theme and on 1 or more plugins. The most obvious way to achieve this seems the ability to pin folders, or create shortcuts to these folders.

Actually @ramya-rao-a's workaround seems te be doing exactly this. So what I do now: Open my wp-root folder as a project. Then Click File > Add Folder to Workspace, and select my theme folder. Then repeat the same for any plugin folders.

My workspace now looks like this:

-- wordpress-root (folder)
-- my-first-plugin (folder)
-- my-theme (folder)

Making changes in my-first-plugin will obviously also reflect in wordpress-root/wp-content/plugins/my-first-plugin

It's pretty simple, as you can see here:
https://www.youtube.com/watch?v=xYyPAUukFfg&t=35s

@Aaron-Pool
Copy link

Being able to quickly switch between folders is a must have for WordPress development, where you might simultaneously be working on a theme and on 1 or more plugins. The most obvious way to achieve this seems the ability to pin folders, or create shortcuts to these folders.

Actually @ramya-rao-a's workaround seems te be doing exactly this. So what I do now: Open my wp-root folder as a project. Then Click File > Add Folder to Workspace, and select my theme folder. Then repeat the same for any plugin folders.

My workspace now looks like this:

-- wordpress-root (folder)
-- my-first-plugin (folder)
-- my-theme (folder)

Making changes in my-first-plugin will obviously also reflect in wordpress-root/wp-content/plugins/my-first-plugin

It's pretty simple, as you can see here:
https://www.youtube.com/watch?v=xYyPAUukFfg&t=35s

Unfortunately, this approach still plays havoc with typescript intellisense because there's no true "root" of the workspace to look for the tsconfig or jsconfig file.

@snwfdhmp
Copy link

snwfdhmp commented Jun 10, 2020

I use vscode to open a "root project" with multiple git submodules in it.

It's a pain having to re-open a new window for the plugins to load properly.

Can we expect a solution in a foreseeable future ?

@bpasero @jrieken @joaomoreno

@mhzokaii
Copy link

Example: i have a lot of folders in my project, but i want to focus on the "src/" folder for now, so i can click with the right button on this folder and set this to root and when i want to see all the folders again, i can toggle show folders.

It can also be implemented by using double-click in order to simulate entering a folder, like what is done in a system file browser (e.g. nautilus or windows explorer) and have back and up buttons shown after entering a folder.

@munael
Copy link

munael commented Jul 5, 2020

There's "perspectives" which has made it to the backlog:
#95182

Here's hoping we get something like this sooner rather than later. It's a sorely missing productivity function. Large projects are just extremely painful right now.

@fpeterdev
Copy link

I've just found this little extension: https://marketplace.visualstudio.com/items?itemName=saekiraku.pin-up
You can pin folders and files with it. Might be helpful

@aakarim
Copy link

aakarim commented Feb 26, 2021

The Nuclide project used to have this feature called 'Working Sets' for Atom. I loved that, you could pre-create sets of folders (say I want to work on one service, or groups of services under a tag), and I could assign hotkeys to each one and switch through really quickly. Could we get something like that?

https://nuclide.io/docs/features/working-sets/

@skuridin
Copy link

skuridin commented Mar 9, 2021

Another good extension: https://marketplace.visualstudio.com/items?itemName=rslfrkndmrky.rsl-vsc-focused-folder

@ItsCubeTime
Copy link

I've just found this little extension: https://marketplace.visualstudio.com/items?itemName=saekiraku.pin-up
You can pin folders and files with it. Might be helpful

This should come pre-installed with VS Code. It took me like 2-3 hours of search to find my way here.

@ghost
Copy link

ghost commented May 24, 2021

I don't get how this is still not a feature. Developers don't work on all files simultaneously and is annoying to have listed configuration, assets, etc. files in the explorer all the time. While working on some new feature or bug, we usually focus on specific files or folders. Hope this get released anytime soon.

I've just found this little extension: https://marketplace.visualstudio.com/items?itemName=saekiraku.pin-up
You can pin folders and files with it. Might be helpful

This can do the workaround for a while, though one cannot use right-click extensions on the Pin tab, and when a new file is created in the Explorer on a pinned folder, there's no way to update the Pin tab more than unpin and pin again.

@iamkhalidbashir
Copy link

I've just found this little extension: https://marketplace.visualstudio.com/items?itemName=saekiraku.pin-up
You can pin folders and files with it. Might be helpful

One more https://marketplace.visualstudio.com/items?itemName=rslfrkndmrky.rsl-vsc-focused-folder

@byerun
Copy link

byerun commented Sep 18, 2021

I'd like a least a folder context menu item whose action would open a new vscode window with just that folder opened.

@renatomattos2912
Copy link
Author

I'd like a least a folder context menu item whose action would open a new vscode window with just that folder opened.

Is possible to do something close to it using a plugin called project manager

@byerun
Copy link

byerun commented Dec 8, 2021

Thanks @renatomattos2912. I just installed Project Manager and it works great!

@martinszeltins
Copy link

I've just found this little extension: marketplace.visualstudio.com/items?itemName=saekiraku.pin-up You can pin folders and files with it. Might be helpful

Works like a charm, thank you!

@reneetse
Copy link

reneetse commented Sep 9, 2022

I've just found this little extension: https://marketplace.visualstudio.com/items?itemName=saekiraku.pin-up You can pin folders and files with it. Might be helpful

awesome ! This should built-in with VS Code

@Poylar
Copy link

Poylar commented Oct 3, 2022

it may be closed. Workspace is now working well
#28905 (comment)

@munael
Copy link

munael commented Oct 17, 2022

@Poylar

it may be closed. Workspace is now working well #28905 (comment)

Workspace allows including multiple directories/sub-projects in one view (the workspace), but does not enable focusing on a sub-project or sub-directory in the explorer view and for extensions.

@locurasleal
Copy link

Dont know if this is still an issue, but I found an extension called: Focused Folder which works perfect for this!

@ivanignatiev
Copy link

Scope to This extension is good

@necrodome
Copy link

Scope to This extension is good

Link for lazy: https://marketplace.visualstudio.com/items?itemName=rhalaly.scope-to-this&ssr=false#overview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality file-explorer Explorer widget issues *out-of-scope Posted issue is not in scope of VS Code
Projects
None yet
Development

No branches or pull requests