How to set window size and position in Visual Studio Code?

in vscode, go to

settins=>windw=>new window => new window dimension

there you are able to choose the following option to set the default dimensions, if vscode is getting opened:

inherit || offset || maximized || fullscreen

I prefer to use "inherit", i.e. open vs-code always as large as the previous one.


Not...yet?

https://code.visualstudio.com/docs/getstarted/settings

The closest I can find is window.newWindowDimensions, which only takes a few strings that refer to predefined geometries, although 'inherit' could serve you well in the meantime if you prime the pump by closing al your existing sessions, opening one window, sizing it to your liking, then quitting. Then all your new windows should be that size, and Visual Studio Code seems to be very well behaved with respect to resizing, just never close a resized window last, or it becomes your new default!

As for position, there appears to be nothing at all.


If you're on a Mac, you can use this AppleScript snippet:

tell application "System Events" to tell process "Code"
    tell window 1
        set size to {1080, 720}
        set position to {0, 0}
    end tell
end tell

Not a general solution, but works well if you only need it when recording screencasts.


  1. Start Visual Studio Code.
  2. Click on "File"
  3. Click on "Preferences"
  4. Click on "Settings"
  5. Write " window.newWindowDimensions " in the search box.
  6. Select the value "inherit" from the drop down box.

That's it...!