特点
- 可以debug调试python
- 内置终端,用着很爽
- 兼并ST和Atom的优点,快而美观.
安装
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开发安装的插件.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
- 关闭左侧边栏: ctrl + b
- previre markdown: ctrl + shift +v
- 唤出终端: ctrl + `
- 支持vim的快捷键操作
- 切分编辑器:ctrl+\
主题更换
ctrl + shift + p
-> 然后在弹出框中输入theme -> 回车.
此时会列出so many的主题,可以↑和↓来实时预览主题效果.
网友评论