特點
- 可以debug調(diào)試python
- 內(nèi)置終端,用著很爽
- 兼并ST和Atom的優(yōu)點,快而美觀.
安裝
https://code.visualstudio.com/download
用戶配置
preference -> user settings
{
"workbench.iconTheme": "vscode-icons",
"python.linting.pylintArgs": [
"--load-plugins", "pylint_django"
],
"python.formatting.autopep8Path": "autopep8",
"editor.fontSize": 16,
"workbench.colorTheme": "One Dark Pro",
"python.pythonPath": "/home/jonliu/env3/bin/python3.5"
}
安裝的插件
Django開發(fā)安裝的插件.png
常用快捷鍵(高級自定義方式)
// 將鍵綁定放入此文件中以覆蓋默認值
[
{
"key": "f5",
"command": "editor.action.formatDocument",
"when": "editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+i",
"command": "-editor.action.formatDocument",
"when": "editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly"
},
{
"key": "f1",
"command": "editor.action.goToDeclaration",
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
},
{
"key": "f12",
"command": "-editor.action.goToDeclaration",
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
},
{
"key": "ctrl+shift+d",
"command": "editor.action.deleteLines",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+k",
"command": "-editor.action.deleteLines",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+w",
"command": "extension.vim_ctrl+w",
"when": "editorTextFocus && vim.active && vim.use<C-w> && !inDebugRepl"
},
{
"key": "ctrl+w",
"command": "-extension.vim_ctrl+w",
"when": "editorTextFocus && vim.active && vim.use<C-w> && !inDebugRepl"
},
{
"key": "ctrl+b",
"command": "-extension.vim_ctrl+b",
"when": "editorTextFocus && vim.active && vim.use<C-b> && !inDebugRepl && vim.mode != 'Insert'"
},
{
"key": "ctrl+f",
"command": "-extension.vim_ctrl+f",
"when": "editorTextFocus && vim.active && vim.use<C-f> && !inDebugRepl"
},
{
"key": "ctrl+a",
"command": "-extension.vim_ctrl+a",
"when": "editorTextFocus && vim.active && vim.use<C-a> && !inDebugRepl"
}
]
- autoformat: f5
- 關(guān)閉左側(cè)邊欄: ctrl + b
- previre markdown: ctrl + shift +v
- 喚出終端: ctrl + `
- 支持vim的快捷鍵操作
- 切分編輯器:ctrl+\
主題更換
ctrl + shift + p
-> 然后在彈出框中輸入theme -> 回車.
此時會列出so many的主題,可以↑和↓來實時預(yù)覽主題效果.