|
| 1 | +Using VSCode as your primary Python editor |
| 2 | +=========================================== |
| 3 | + |
| 4 | +If you have reached upton this chapter in the book, then I think you step up |
| 5 | +into programming world by using a new editor which has a lot more features |
| 6 | +than our starting editor (mu). |
| 7 | + |
| 8 | +`VSCode <https://code.visualstudio.com/>`_ is an Open Source multi-platform |
| 9 | +code editor from Microsoft which I personally like a lot. In this chapter, I |
| 10 | +am going to show you how you can start using it. |
| 11 | + |
| 12 | + |
| 13 | +Installing VSCode |
| 14 | +------------------ |
| 15 | + |
| 16 | +Download and install VSCode in your Linux distribution following `the official |
| 17 | +guidelines <https://code.visualstudio.com/docs/setup/linux>`_. Please make |
| 18 | +sure that you are following all the steps given in that page. You should add |
| 19 | +the project repository properly (either deb or rpm repo) and always verify the |
| 20 | +package (the gpg signed packages in the repo makes it easier). |
| 21 | + |
| 22 | +Remember that VSCode ships monthly, means every month you will get update of |
| 23 | +this editor with many new features and bug fixes as required. |
| 24 | + |
| 25 | + |
| 26 | +Using VSCode |
| 27 | +------------- |
| 28 | + |
| 29 | + |
| 30 | +.. figure:: img/code_welcome.png |
| 31 | + |
| 32 | +The above is the starting screen of VSCode, you should notice the small |
| 33 | +information box in the right hand corner. |
| 34 | + |
| 35 | +You can disable ``telemetry`` and thus sending the key presses and other |
| 36 | +information goes back to the Microsoft collects. Go to the settings page by |
| 37 | +using ``File->Preference->Settings`` in the menu. |
| 38 | + |
| 39 | + |
| 40 | +.. figure:: img/code_disable_telemetry.png |
| 41 | + |
| 42 | + |
| 43 | +Install the Python extension |
| 44 | +----------------------------- |
| 45 | + |
| 46 | +The next step would be to install ``Python extension`` in the VSCode. |
| 47 | +Go to the extensions from the left hand side bar, and install the Python |
| 48 | +extension. |
| 49 | + |
| 50 | +.. figure:: img/code_install_python.png |
| 51 | + |
| 52 | + |
| 53 | +Start working on your code |
| 54 | +--------------------------- |
| 55 | + |
| 56 | +Now, you can start working on your favorite project. Open up the directory in |
| 57 | +VSCode, and start editing. |
| 58 | + |
| 59 | +Feel free to go through the `VSCode documentation |
| 60 | +<https://code.visualstudio.com/docs/getstarted/tips-and-tricks>`_ to learn more about the editor. |
| 61 | + |
| 62 | +We will add a few more things in this chapter later. |
0 commit comments