Skip to content

Possible to open file from terminal #1264

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

Closed
InsOpDe opened this issue Jan 8, 2020 · 3 comments
Closed

Possible to open file from terminal #1264

InsOpDe opened this issue Jan 8, 2020 · 3 comments

Comments

@InsOpDe
Copy link

InsOpDe commented Jan 8, 2020

Description

Id like to have a command with which I can open a file from the vs code terminal. The file should then open with vs code.

Edit: Something like this: https://stackoverflow.com/questions/41377489/how-to-open-a-file-from-the-integrated-terminal-in-visual-studio-code

@sr229
Copy link
Contributor

sr229 commented Jan 12, 2020

We pass the regular vscode command line so try to use the same flags.

@code-asher
Copy link
Member

This isn't currently possible but eventually it will be. Tracking for the feature can be found here: #164

We'll most likely detect if code-server is already running and if so we'll open the file in the existing instance.

@MacDada
Copy link

MacDada commented Dec 8, 2022

I came here from a search engine, but I have already found the answer, so I will share it: code -r filename already works.

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

4 participants