Skip to content

Command to open a file from terminal in editor... #1586

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
Grimeton opened this issue May 1, 2020 · 2 comments
Closed

Command to open a file from terminal in editor... #1586

Grimeton opened this issue May 1, 2020 · 2 comments

Comments

@Grimeton
Copy link

Grimeton commented May 1, 2020

Hi,

I'm using the terminal a lot when testing shell functions and stuff. Every now and then it happens that I need to edit a file that is not open in the 834905809345 windows already open but I'm missing a command to tell CodeServer to open the file.

Right now I'm doing a realpath $file and then click on the file in the terminal while holding ctrl.

Having a command like csedit that tells CodeServer via the IPC socket to open the file in the editor would be awesome.

It would be even more awesome If I could pick the split pane where the file would be opened in, like counting from the left, having three split panes: 1,2,3

I'd write something like this:

[cse|csedit|cso|csopen] [1|2|3] filename

cse 2 lib.sh

and the file would be opened in the middle split pane.

What protocol is CodeServer talking on the IPC sockets? Is there documentation about that somewhere?

Cu

@code-asher
Copy link
Member

This would definitely be a handy feature, let's track it here: #164

@code-asher
Copy link
Member

About the sockets, those are all created and managed by VS Code and I'm not sure if they have documentation on the protocol used.

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