Skip to content

Open New Files in Workspace #2043

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

thecoolwinter
Copy link
Collaborator

Description

When a new file is opened, tries to open it in a nearby workspace. Right now new files are opened in their own window no matter what (eg using ⌘N or a file URL).

The workspace is chosen by proximity, so if a user has /User/Desktop and /User/Desktop/Project open. Opening the file /User/Desktop/Project/MAKEFILE will open it in the Project workspace.

Related Issues

  • Reported by @ BSM on Discord

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

(please ignore the messed up gutter, it's been fixed in CESE but not cut in a release)

Screen.Recording.2025-05-09.at.10.13.02.AM.mov

Files open to the nearest folder, and bring the window to front.

Screen.Recording.2025-05-09.at.10.24.02.AM.mov

Copy link
Member

@tom-ludwig tom-ludwig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG, just one small question.

@austincondiff
Copy link
Collaborator

austincondiff commented May 9, 2025

Sometimes users may want to open a file in single file mode. Just to be clear, is this only if the file being opened is in an already opened workspace? If this workspace is closed, I would assume it opens as a single file correct?

We may provide a path to drag a tab out of the workspace at some point.

@thecoolwinter
Copy link
Collaborator Author

Sometimes users may want to open a file in single file mode. Just to be clear, is this only if the file being opened is in an already opened workspace? If this workspace is closed, I would assume it opens as a single file correct?

We may provide a path to drag a tab out of the workspace at some point.

Yes. It only opens the new file in an open workspace if they share a common ancestor in their path.

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

Successfully merging this pull request may close these issues.

4 participants