Visual Code Studio

@erock4 I’m not aware of any scripts just yet, but here’s their URI schema:

  • vscode://file/{PATH TO FILE}:{LINE_NO}:{COL_NO} will open the file in a new tab in an existing window at that cursor location. You can omit the :line:col bit.
    • Example: vscode://file/Users/oliver/Documents/script.py:10:5
  • vscode://file/{PATH TO FOLDER} will open a folder (and if there’s a .code-workspace inside it’ll use the workspace config)
    • Unfortunately if there’s an existing window, it opens the folder/workspace in that, replacing the existing workspace.
    • If you don’t want to clobber existing windows, you can run the terminal command code -n {PATH TO FOLDER}. I’m not sure how to make a URL that runs a command though.

I don’t have the AppleScript skills to make a script, but that should be a start!

(URI schema is only documented here: Support opening files through URL handling · Issue #4883 · microsoft/vscode · GitHub)