记录 VScode 使用过程中常用扩展的常用快捷键!
使用扩展可以极大地提高我们编程和开发的效率,学会选择和使用优秀的扩展也是使用 VScode
的必要任务。
1. flask-snippets
Flask snippets collections
- Base snippets
Shortcuts | Description |
---|---|
hw |
Flask hello world |
route |
Flask route |
routegp |
Flask route with GET, POST |
routep |
Flask route POST only |
- Controls snippets
Shortcuts | Description |
---|---|
""" |
ML docstring |
"" |
SL docstring |
fapp |
Flask App |
froute |
Flask route |
furl |
URL generator |
fmeth |
URL methods |
frt |
Render template |
ftreq |
Test request |
fup |
Flask upload |
fsup |
Secure upload |
frc |
Read cookie |
fsc |
Set cookie |
feh |
Error handler |
flog |
Flask logging |
- Templates snippets
Shortcuts | Description |
---|---|
fexp |
Flask expresion |
ffilter |
Flask filter |
fcomment |
Flask comment |
fblock |
Flask block |
fextends |
Flask extends |
fself |
Flask self |
fsuper |
Flask super |
ffor |
Flask for |
fif |
Flask if |
fife |
Flask ife |
felif |
Flask elif |
fmacro |
Flask macro |
ffb |
Flask filter block |
fset |
Flask set |
finclude |
Flask include |
fimport |
Flask import |
fautoescape |
Flask autoescape |
furl |
Flask url |
2. Jupyter
Jupyter Extension for Visual Studio Code
Shortcuts | Description |
---|---|
Jupyter: Create New Blank Jupyter Notebook |
Create a new blank Jupyter Notebook |
Notebook: Select Notebook Kernel |
Select or switch kernels within your notebook |
Notebook: Change Cell Language |
Change the language of the cell currently in focus |
Jupyter: Export to HTML Jupyter: Export to PDF |
Create a presentation-friendly version of your notebook in HTML or PDF |
3. JSON Tools
Tools for manipulating JSON
Shortcuts | Description |
---|---|
Ctrl(Cmd)+Alt+M |
JSON pretty |
Alt+M |
JSON minify |
4. HTML Snippets
Full HTML tags including HTML5 Snippets
div --> <div></div>
doc --> <!DOCTYPE html>
a --> <a href=""></a>
5. Code Runner
Run code snippet or code file for multiple languages
Shortcuts | Description |
---|---|
Ctrl+Alt+N |
to run code |
Ctrl+Alt+M |
to stop the running code |
6. Markdown Preview Enhanced
Markdown Preview Enhanced ported to vscode
Shortcuts | Functionality |
---|---|
cmd+k v |
Open preview to the Side |
cmd+shift+v |
Open preview |
ctrl+shift+s |
Sync preview / Sync source |
shift+enter |
Run Code Chunk |
ctrl+shift+enter |
Run all Code Chunks |
cmd+= |
Preview zoom in |
cmd+- |
Preview zoom out |
cmd+0 |
Preview reset zoom |
esc |
Toggle sidebar TOC |
7. Open in GitHub
Jump to a source code line in Github, Gitlab
Shortcuts | Functionality |
---|---|
ctrl+l g |
Open in GitHub |
ctrl+l c |
Copy GitHub link to clipboard |
ctrl+l p |
Open Pull Request |
8. Project Manager
Easily switch between projects
Shortcuts | Functionality |
---|---|
Project Manager: Save Project |
Save the current folder/workspace as a new project |
Project Manager: Edit Project |
Edit your projects manually (projects.json) |
Project Manager: List Projects to Open |
List all saved/detected projects and pick one |
Project Manager: List Projects to Open in New Window |
List all saved/detected projects and pick one to be opened in New Window |
Project Manager: Refresh Projects |
Refresh the cached projects |
9. PostgreSQL
Develop Postgres everywhere
Shortcuts | Functionality |
---|---|
PostgreSQL: New Query |
New Query |
PostgreSQL: Connect |
Connect |
PostgreSQL: Use Database |
Use Database |
10. Python
Python extension for Visual Studio Code
Shortcuts | Description |
---|---|
Python: Select Interpreter |
Switch between Python interpreters, versions, and environments. |
Python: Start REPL |
Start an interactive Python REPL using the selected interpreter in the VS Code terminal. |
Python: Run Python File in Terminal |
Runs the active Python file in the VS Code terminal. You can also run a Python file. |
Python: Select Linter |
Switch from Pylint to Flake8 or other supported linters. |
Format Document |
Formats code using the provided formatter in the settings.json file. |
Python: Configure Tests |
Select a test framework and configure it to display the Test Explorer. |
11. Settings Sync
Previously known as Visual Studio Code Settings Sync
Shortcuts | Functionality |
---|---|
Shift + Option + U |
Upload Key |
Shift + Option + D |
Download Key |