/2018-vsc-editor

Visual Studio Code workshop (Dec 2018)

Primary LanguagePython

Visual Studio Code (VSC) Editor Workshop

Presenters (your NYC PyLadies organizers)

Logistics: PyLadies & Dropbox

  • Introductions
  • Bathroom, wifi
  • Code of Conduct
  • Tweet about event: @NYCPyLadies and also @Dropbox
  • Thank you to Dropbox for hosting!
  • Dan Crosta talks about Dropbox

Workshop Introduction

  • Attendee intros
  • Use this document to let us know when you are finished with installs / exercises.

Intro & Installing VSC



Set-up

  • 1_setup
  • Install extensions
    • Python
    • Shell Command

Gettings some code to work with

Let's practice using some VSC shortcuts and features!

  • We'll work with this small Django blog
    • use git clone or Download manually (GH account not required to download the repo)

Navigating the codebase

Important keyboard shortcuts

Linting and Formatting

  • Install extensions for a linter (code style guide)
    • PEP8 linting, autopep8 extension
  • Try a short linting exercise
  • If you install autopep8, you can then type “format document” in the Command Palette to run the linter on your file.

Git Integration

  • VSC provides great Git integration. If you make a change to a file, you will see a blue vertical bar.
  • Click on it, and it will show a small inline diff.
  • You can also click on the "version control" icon on the left sidebar. (3rd icon down, after magnifying glass icon). That shows differences, just like it would show on GitHub
  • Click on top icon (two files) to get back to the code



Explore on your own

More git

  • You can access git options from the command palette: F1 , type "stage"
  • Git plugins to explore:
    • git lens plugin
    • integration with GitHub pull requests
  • Can click on last icon on left sidebar for Extensions
  • Can search for "github pull request", click on install and then reload to activate it

Terminal and Debugging with VSC

Virtual Environments in VSC