fregante / GhostText

👻 Use your text editor to write in your browser. Everything you type in the editor will be instantly updated in the browser (and vice versa).
https://GhostText.fregante.com
MIT License
3.25k stars 116 forks source link

Automatically open an editor when starting the extension #287

Open mybearworld opened 1 year ago

mybearworld commented 1 year ago

Setup

Browser: Edge Editor: VSCode

Description

I don't know if other editors have this, but VSCode has vscode:// URLs that can open VSCode. It would be a nice experience to automatically start the editor instead of showing an error message if the connection fails.

fregante commented 1 year ago

That’s not a bad idea, I’ll have to check how it works. My guess it’s that it’s more complicated than it sounds because opening VSCode isn’t instant, and extensions are delayed too. This means that it’s not enough to open VSCode and immediately connect to it, so GhostText would also need to enter a polling state that waits for the editor.