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: newFile.relativeTo: 'selectedTreeFolder' #18

Closed
patrickhulce opened this issue Apr 3, 2017 · 5 comments
Closed

Feature: newFile.relativeTo: 'selectedTreeFolder' #18

patrickhulce opened this issue Apr 3, 2017 · 5 comments

Comments

@patrickhulce
Copy link
Contributor

It'd be awesome to be able to highlight a particular folder in the tree view and have the shortcut queue up a new file in the selected folder.

@dkundel
Copy link
Owner

dkundel commented Apr 21, 2017

I'm not sure if i fully understand this request. Can you give a bit more details on your idea?

@patrickhulce
Copy link
Contributor Author

Sure @dkundel! Basically here's my desired flow.

Let's say I have a file test/deeply/nested/file-test.js currently open in my editor, I want to add a new file in another location like test/fixtures/my-fixture.json, I have the test/fixtures folder expanded and selected in my file explorer on the left-hand side, and the file explorer has focus (not the editor). I want my keyboard shortcut to default the path to the new file to test/fixtures rather than test/deeply/nested. Does that make sense?

@dkundel
Copy link
Owner

dkundel commented Apr 27, 2017

Sounds interesting. I currently can't find anything in the VS Code API that allows me to get that information of the selected folder though. Did you come across an API like that? Or any extension that does something along these lines?
I could probably add an entry to the right-click menu that has an activation point for the menu with this behavior. Does that sound useful to you?

@patrickhulce
Copy link
Contributor Author

Yeah looks like it's an open issue :/ microsoft/vscode#3553
I'm mostly just trying to recreate a lot of the conveniences I had with Atom :) context menu support would be a great close second!

dkundel added a commit that referenced this issue May 18, 2017
@dkundel
Copy link
Owner

dkundel commented May 18, 2017

Hey @patrickhulce I just shipped v3.0.0 that implements an explorer menu entry that allows you to create files relative to that folder or file regardless of your remaining config.

Let me know if this works for or if you want anything else :)

Cheers,
Dominik

@dkundel dkundel closed this as completed May 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants