Skip to content

Instantly share code, notes, and snippets.

@discdiver
Last active December 5, 2021 14:39
Show Gist options
  • Save discdiver/03e97cbc8528088ad57821e80fdc201c to your computer and use it in GitHub Desktop.
Save discdiver/03e97cbc8528088ad57821e80fdc201c to your computer and use it in GitHub Desktop.
How to set up Visual Studio Code
  1. See if you have Visual Studio Code installed by looking in your apps. If you don't, have it installed, install it from here
  2. Configure Visual Studio Code to be your editor for git. From the command line run: git config --global core.editor "code -w"
  3. Mac users: Set Visual Studio Code to open with code from the command line outside VS Code. Instructions here, press command + shift + p
  4. Select Shell Command: Install 'code' command in PATH. Windows users should have the functionality automatically.
  5. Install the Python extension for Visual Studio Code. Click on the Extensions icon in the left side bar and search for Python. Select and install it.
  6. Make black your autoformatter. In the top menu bar go Code -> Preferences -> Settings and type black. Select Under Python > Formating: Provider select black. You may need to pip install black on the command line at some point along the way. It must be installed in your active environment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment