Search code examples
visual-studio-code

Is there a way to make Visual Studio Code `--goto` option the default?


I often open files in VSC, in the format filename:line.

In order to make VSC go to the line, the option --goto is used. Is it possible to make it the default (aside from using a shell alias)?


Solution

  • I think there's no other way, other than using an alias. That's because, as the VS Code docs say: "This argument is provided since some operating systems permit : in a file name."

    If you don't want to use alias, you can shorten --goto to -g.