VSCode Is a very useful editor ( perhaps IDE), Good scalability , It has powerful functions , The system resources occupied are also moderate , It starts faster , And it supports the whole platform , It's better to be Python For development IDE.
This paper aims at Linux( Mainly Ubuntu, Other distributions are similar ), Integrate some Python Development related configuration , Only for new entrants Linuxer Reference resources .
One 、VSCode With other editors ( or IDE) Comparison
(1)VSCode And Atom Comparison :
Atom Is a by github Create a very good editor that supports the full platform scalability , Basically VSCode Something that can be done ,Atom Can do it , and Atom There may be more and more powerful plug-ins , but Atom The operation efficiency of is not high , Occupy more system resources ;
(2)VSCode And Pycharm Compare :
Pycharm It's for Python To build the IDE, Powerful , But they are bloated , Slow start , Complicated functions , The professional edition needs to be activated ( Although it can be easily cracked ), However Python The philosophy of is itself “ Simplicity is better than complexity ”, Sometimes it is relatively complicated Pycharm It seems unnecessary ;
(3)VSCode And Sublime Compare :
Sublime It runs fast , Less resources , There are also rich plug-ins . but Sublime Only suitable for writing smaller Python Script , about Django project 、Flask Poor project support , and Sublime There is no good plug-in for integrating terminals , No debugging function ;
(4)VSCode and Vim Compare :
Vim By configuring , It can also be a useful IDE, And the force is relatively high , But use it skillfully vi command , It takes a lot of time , The cost of learning is relatively high , And for some big projects , The efficiency is not very high ;
(5)VSCode and Komodo IDE Compare :
Komodo IDE It's charging software , It also supports the whole platform . among , It has a free version , It's called Komodo Editor. The resources it occupies are also OK , But the reaction speed seems a little less than ideal , And used to it Pycharm After the various shortcut keys , Yes Komodo I don't have so many ideas ……
Sum up ,VSCode relatively speaking , It can be used as an ideal Python IDE.
Two 、 Download and install VSCode(Ubuntu Next )
VSCode Official homepage :https://code.visualstudio.com/;
Download the appropriate installation package , such as 64 Bit deb Installation package :code_1.20.1-1518535978_amd64.deb;
Switch to the directory where the installation file is located on the terminal , use sudo dpkg -i code_*_amd64.deb Command installation ;
3、 ... and 、 Installing a plug-in
[1]Python of :
(1)Python Extension Pack:( This is a Python Expansion pack, , It relies on the following expansion packs )
(a)Python: Support linting( An error prompt function ),debugging( debugging ),code navigation( Code navigation ) etc. ;
(b)Jupyter:Jupyter Notebook The author uses less , I won't introduce you here ;
(c)MagicPython: This is a syntax highlighting plug-in ;
(d)Jinja: Support Jinja Template engine syntax highlighting ;
(e)Django Template:Django Template code snippets and syntax highlighting ;
(f)Django Snippets:Django code snippet ;
(2)Python Docstring: A plug-in for quickly generating document comments ;
(3)Python Extended: This is also a Python Code snippet related plug-ins , It can automatically provide all parameters of the called method , It's also convenient to use ;
(4)python traceback jumper: A plug-in that supports Click to jump between source codes ;
(5)Django: Support Django Project development related plug-ins ;
(6)Cython: Support Cython Syntax highlighted plug-ins ;
(7)Tornado: Support Tornado Develop relevant plug-ins ;
(6)flask-snippets: Support flask Plug in for module code snippets ;
[2] Editor about :
(1)IntelliJ IDEA Keybindings: Can offer and Pycharm The same shortcut key binding plug-in , So you don't have to worry about Pycharm turn VSCode It's time to remember the shortcut keys again ;
(2) Various color themes ( You can search in the store “theme”) And icon themes ( You can search “icon”);
(3)backgroud: You can use the image as the background of the editor area ;
[3] Front end development :
(1)HTML Snippets:HTML Code snippet plugin ;
(2)JQuery Code Snippets:JQuery Code snippet plugin ;
(3)Bootstrap 4: The front frame bootstrap Related plug-ins ;
(4)Path Autocomplete: Path completion plug-in
(5)open in browser: Quickly open with a browser html, Support Firefox and Google browser ;VSCode Is a very useful editor ( perhaps IDE), Good scalability , It has powerful functions , The system resources occupied are also moderate , It starts faster , And it supports the whole platform , It's better to be Python For development IDE.
The following is the author's configuration file :
{
"editor.fontSize": 16, // Set editor font size
"terminal.integrated.fontSize": 15, // Set the font size of the integrated terminal
"window.zoomLevel": 0.3,
"python.pythonPath": "~/.conda/envs/py3/bin/python3.6",// Set up python Interpreter path
"python.linting.pylintPath": "pylint",
"python.linting.pylintArgs": [
"--load-plugins", "pylint_django"
],
"python.formatting.autopep8Path": "autopep8",
"python.linting.flake8Enabled": true,
"python.linting.enabled": false,
"workbench.editor.enablePreview": false,
"python.formatting.provider": "yapf",
"files.autoSave": "afterDelay",
"editor.wordWrapColumn": 100,
"editor.wordWrap": "on",
"editor.renderIndentGuides": false,
"background.enabled": true,
"background.useDefault": false,
"background.customImages": [
"file:///usr/share/backgrounds/wallpaper/python.png",
],
"background.style": {
"content": "''",
"pointer-events": "none",
"position": "absolute",
"z-index": "99999",
"width": "100%",
"height": "100%",
"background-position": "center",
"background-repeat": "no-repeat",
"background-size": "100%,90%",
"opacity": 0.2
},
"workbench.colorTheme": "ƒ - Monokai - Operator Mono/Italic",
"vsicons.dontShowNewVersionMessage": true,
"material-icon-theme.showUpdateMessage": false,
"workbench.iconTheme": "vscode-great-icons"
}