Search code examples
visual-studio-codestartuprestart

VSCode open specific file on startup


Is it currently possible to set a specific file to open on startup in VSCode? I have the 'To Do Tasks' extension installed and I want to open my TODO file by default each time I load VSCode.

Using Version 1.12.1


Solution

  • Edit: I think the best way is to use extensions that can run commands on startup. Example is: Auto Run Command


    You can either create some shortcut for command code "path/to/file.todo" or change link's options.

    For example(windows):

    link => properties => shortcut => target => "C:\Program Files (x86)\Microsoft VS Code\Code.exe" "D:/howto.todo"

    VSCode CLI documentation


    Another way is to Pin editors. With setting "workbench.editor.pinnedTabSizing": "compact", they take very little space.