|
| 1 | +.. _vsc_as_ide: |
| 2 | + |
| 3 | +########################################## |
| 4 | +Using Visual Studio Code as a lightweight Python IDE |
| 5 | +########################################## |
| 6 | + |
| 7 | +Visual Studio Code is an extensible and customizable text editor from Microsoft that provides a very minimal layout with additional tooling such as an excellent built-in terminal. |
| 8 | + |
| 9 | + |
| 10 | +Requirements |
| 11 | +============ |
| 12 | + |
| 13 | +Any IDE should ease your development experience by providing the following: |
| 14 | + |
| 15 | +* It should provide excellent, configurable syntax colorization. |
| 16 | +* It should allow for robust tab completion. |
| 17 | +* It should offer the ability to jump to the definition of symbols in other files. |
| 18 | +* It should perform automatic code linting to help avoid silly mistakes. |
| 19 | +* It should be able to interact with a Python interpreter such that when debugging, the editor will follow along with the debugger. |
| 20 | + |
| 21 | +Visual Studio Code requires that you perform some setup out of the box (see below for details). |
| 22 | + |
| 23 | + |
| 24 | +Which Version? |
| 25 | +============== |
| 26 | + |
| 27 | +There's just the latest version available to download. |
| 28 | + |
| 29 | +This ensures that all recent bug fixes and updates have been made. |
| 30 | + |
| 31 | +Visual Studio Code runs on Macs, Windows, and Linux flavors like Ubuntu, Debian, Red Hat, etc. |
| 32 | + |
| 33 | +Also, Visual Studio Code performs updates on itself, so there's no need to download newer versions of the app... you should already have it. |
| 34 | + |
| 35 | +Installation |
| 36 | +============ |
| 37 | + |
| 38 | +Check out this solid video_ that will walk you through the process of setting up Visual Studio Code for Python in detail. |
| 39 | + |
| 40 | +.. _video: https://www.youtube.com/watch?v=TILIcrrVABg/ |
| 41 | + |
| 42 | +Go to the Visual Studio Code website_. |
| 43 | + |
| 44 | +.. _website: https://code.visualstudio.com/ |
| 45 | + |
| 46 | +Scroll down to the bottom of the page and you'll see links for installers to all the major OS platforms. |
| 47 | + |
| 48 | +Download your flavor and run the installer. |
| 49 | + |
| 50 | + |
| 51 | +Basic Settings |
| 52 | +============== |
| 53 | + |
| 54 | +Visual Studio Code can be used out of the box with no setup as a text editor. It automatically |
| 55 | +recognizes file types and helpfully highlights text accordingly. To use in this manner, |
| 56 | +write your Python files in Visual Studio Code, then run them in your Python command prompt |
| 57 | +or Visual Studio Code's own built in terminal (Ctrl + \`) |
| 58 | + |
| 59 | + |
| 60 | +Extending the Editor |
| 61 | +==================== |
| 62 | + |
| 63 | +After you've install Visual Studio Code, there are many ways to extend it for working with Python. |
| 64 | + |
| 65 | +The video linked above goes into this much deeper. |
| 66 | + |
| 67 | +There is also a great tutorial for setting up Python here_. |
| 68 | + |
| 69 | +.. _here: https://code.visualstudio.com/docs/python/python-tutorial |
0 commit comments