Skip to content
Visual Studio Code workshop (Dec 2018)
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
images
0_intro_install.md
1_setup.md
2_1_vsc_editor_shortcuts.md
2_2_editor_shortcuts.md
3_references.md
4_1_navigation_walkthrough.md
4_2_navigation_exercise.md
4_3_navigation_exercises_solutions.md
5_1_linting_exercise.md
5_2_linting_example_1.py
5_3_linting_example_2.py
6_vsc_with_python.md
7_faqs.md
README.md

README.md

Visual Studio Code (VSC) Editor Workshop

Presenters (your NYC PyLadies organizers)

Logistics: PyLadies & 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

Getting 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



Fun / and for stress reduction

  • Stressed after coding for hours? Need a break? Perhaps an inspiration? Something to calm your nerves after almost pushing that fatal git commit? It's Kitty Time! =(^● ⋏ ●^)= ෆ
  • Kitty extension on VSC


Explore on your own

Watch these 2 videos:

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

  • covered in Dan Taylor's video
You can’t perform that action at this time.