Open chroberino opened 2 weeks ago
Sounds like a duplicate of https://github.com/eclipse-theia/theia/issues/11255. Would you be interested in contributing a PR?
Sounds like a duplicate of #11255.
Kind of. But it goes a bit beyond that. VS Code offers two CLI options to open files:
--goto
argument --> https://code.visualstudio.com/docs/editor/command-line#_core-cli-optionsfile:line[:character]
argument --> https://code.visualstudio.com/docs/editor/command-line#_opening-files-and-foldersThe second option has been described by @kenneth-marut-work in https://github.com/eclipse-theia/theia/issues/11255. Especially in the context of invoking it from a terminal inside VS Code.
I have tried something like code myfile.txt
as well (from a command prompt outside of VS Code), but without telling it what's the workspace it seems to open the last active workspace and if the given file is not within this workspace it does not even open the file. So I'd really prefer something similar to
code path/to/my-workspace --goto path/to/desired-file-within-my-workspace:<line>:<col>
Would you be interested in contributing a PR?
Not sure if my skills and capacities will suffice. Let me think twice about it.
Feature Description:
Similar to what VS Code supports with its
--goto
CLI argument (https://code.visualstudio.com/docs/editor/command-line#_core-cli-options) it would be great if the Theia Electron app would also support opening a file specified via a command line argument (with optionally allowing line number and character position within that file to be specified).In combination with Theia's already existing
app-project-path
CLI argument, this would be very powerful.In addition, VS Code offers the CLI arguments
--new-window
and--reuse-window
(https://code.visualstudio.com/docs/editor/command-line#_core-cli-options). These will also make make sense for Theia/Electron when opening it via a command line call.