VS Code Extensions / Shortcuts For Python / Web - DEV Community
Có thể bạn quan tâm
DEV Community
FollowA space to discuss and keep up software development and manage your software career
Future
FollowNews and discussion of science and technology such as AI, VR, cryptocurrency, quantum computing, and more.
Open Forem
FollowA general discussion space for the Forem community. If it doesn't have a home elsewhere, it belongs here
Gamers Forem
FollowAn inclusive community for gaming enthusiasts
Music Forem
FollowFrom composing and gigging to gear, hot music takes, and everything in between.
Vibe Coding Forem
FollowDiscussing AI software development, and showing off what we're building.
Popcorn Movies and TV
FollowMovie and TV enthusiasm, criticism and everything in-between.
DUMB DEV Community
FollowMemes and software development shitposting
Design Community
FollowWeb design, graphic design and everything in-between
Security Forem
FollowYour central hub for all things security. From ethical hacking and CTFs to GRC and career development, for beginners and pros alike
Golf Forem
FollowA community of golfers and golfing enthusiasts
Crypto Forem
FollowA collaborative community for all things Crypto—from Bitcoin to protocol development and DeFi to NFTs and market analysis.
Forem Core
FollowDiscussing the core forem open source software project — features, bugs, performance, self-hosting.
Parenting
FollowA place for parents to the share the joys, challenges, and wisdom that come from raising kids. We're here for them and for each other.
Maker Forem
FollowA community for makers, hobbyists, and professionals to discuss Arduino, Raspberry Pi, 3D printing, and much more.
HMPL.js Forem
FollowFor developers using HMPL.js to build fast, lightweight web apps. A space to share projects, ask questions, and discuss server-driven templating
Dropdown menu Dropdown menuI use Visual Studio Code editor by Microsoft for Python development. I find below shortcuts and extensions particularly very useful during application development. Hope you find them useful as well!
Python extension for Visual Studio Code by Microsoft
With over 20 million installs, this is one of the most popular extensions for Python development in VS Code. Some of the commonly used editor options are:
- Go to Definition (F12) jumps from the current code into the code that defines an object. This command is especially useful when working with libraries and want to learn more about them.
- Peek Definition (Alt+F12), is similar, but displays the definition directly in the editor.
- To run a specific section of code in Python, highlight the section and press shift + Enter. This runs just the highlighted portion of code from the Python file.
- To enable brackets completion and linting - Press ctrl + shift + p and type settings.json to get the settings file. In settings.json file, add below:
- To get a printable reference of all shortcuts in VS Code: Press ctrl + shift + p and type Keyboard Shortcuts Reference in the search box. This will take you to the shortcuts link containing nice printable version of shortcuts in a pdf format.
- Please note default keyboard shortcuts could be changed using Code > Preferences option.
Visual Studio IntelliCode by Microsoft
This is again another popular extension that helps with code completion. Pausing or pressing ctrl + space after module name activates and displays list of code completion options.
Better Jinja by Samuel Colvin
Jinja code added in the html template usually looks unformatted. To add colorization effect, install Better Jinja by Samuel Colvin. Then add below association in settings.json file
{ "files.associations": { "*.html": "jinja-html" } } Enter fullscreen mode Exit fullscreen modeFlask snippets by cstrap
Flask snippets by cstrap provides shortcuts for generating commonly used snippets in Flask and Jinja. Once extension is installed, typing hw in the editor generates below snippet:
from flask import Flask app = Flask(__name__) @app.route('/') def hello(): return 'Hello World!' if __name__ == '__main__': app.run() Enter fullscreen mode Exit fullscreen modePython DocString Generator by Nils Werner
This Python DocString Generator extension provides a consistent way to provide documentation to Python functions and modules.
References
https://code.visualstudio.com/docs/python/editing
Templates let you quickly answer FAQs or store snippets for re-use.
Submit Preview Dismiss Code of Conduct • Report abuseAre you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
dev0928 Follow Full stack developer - Location United States
- Education Master's in Computer Science
- Joined May 11, 2020
We're a place where coders share, stay up-to-date and grow their careers.
Log in Create accountTừ khóa » Visual Studio Code Run Python Keyboard Shortcut
-
How To Execute Python Code From Within Visual Studio Code
-
VsCode Keyboard Shortcut To Run Python In The Terminal - Jason Murray
-
Setup Visual Studio Code Python Run Keyboard Shortcut - YouTube
-
Visual Studio Code Key Bindings
-
What Is The Keyboard Shortcut To Run Selected Python Code In Visual ...
-
What Is The Keyboard Shortcut In VS Code To Run A Python File? - Reddit
-
Is There Any Keyboard Shortcut To Run Code From Visual Studio Code?
-
User Keyboard Shortcut For 'Run Selection/Line In Python Terminal ...
-
Keyboard Shortcuts - Visual Studio (Windows) | Microsoft Docs
-
42 Visual Studio Code Shortcuts For Boosting Your Productivity
-
Visual Studio Code Shortcuts Code Example - Code Grepper
-
5 Great Visual Studio Keyboard Shortcuts
-
Debug Keyboard Shortcuts For Visual Studio Code - GeeksforGeeks
-
How To Format Source Code In Visual Studio Code (VSCode)