search
HomeDevelopment ToolsVSCode[Compilation and Sharing] Commonly used and efficient tips in VSCode (wonderful skills and tricks)

VSCodeHow to use? What are some weird tricks? In order to give everyone a clearer understanding of VSCode, this article will share with you some of its efficient uses (weird tricks). I hope it will be helpful to you!

[Compilation and Sharing] Commonly used and efficient tips in VSCode (wonderful skills and tricks)

Different development tools can capture their own group of loyal users and supporters.

VS Code, Eclipse, IDEA, atom... which development tool is better? There has always been such a debate.

VS Code has become a popular development tool in recent years and has gradually been welcomed by more developers.

The reason why it is so popular is inseparable from its continuous innovation and breakthroughs.

Even so, many users still find VS Code difficult to use.

This is not difficult to understand. If a student who has used tool A suddenly migrates to tool B, even if it is already perfect, he can still find a lot of faulty points.

One of the reasons is due to usage habits, and the other is that developers don’t know enough about this new tool.

But one thing should be clear. As a popular development tool at the moment, VS Code also supports many excellent functions that other development tools have.

In order to let everyone understand VS Code more clearly, today I will introduce to you some of its efficient usage. [Recommended learning: "vscode introductory tutorial"]

Integrated terminal


In VS Code, Able to open the terminal directly. This eliminates the need to switch windows and avoid wasting time whether you are debugging code or executing terminal command line tools.

To use the VS Code terminal, you need to install it first. The installation steps are very simple and only require the following steps:

  • Start VS Code
  • shift cmd pOpen the command panel and enter shell command
  • Click to confirm

In this way, the development of the VS Code integrated terminal is completed.

Batch renaming


[Compilation and Sharing] Commonly used and efficient tips in VSCode (wonderful skills and tricks)

##Names play a vital role in the development process status. Function names, class names, variable names... In the process of writing code, we often deal with various names.

Renaming will be often used at this time. If a variable name appears

100 times in the code, it will obviously be very troublesome to manually modify it one by one.

Use the shortcut key

shift cmd l to select all the names that appear in the code and rename them in batches.

Based on the fact that it takes 5 seconds to rename once, this operation can take about 8 minutes.

Multiple selection mode


Multi-line editing is supported in many development tools because it has many application scenarios , and very efficient.


If there are multiple similar lines, this function is very practical. It can modify the content of multiple lines and multiple locations at the same time to avoid duplication of work.

[Compilation and Sharing] Commonly used and efficient tips in VSCode (wonderful skills and tricks)

alt click Each click will add a new cursor.

alt cmd down or alt cmd up will insert the cursor below or above respectively.

Command Panel


The Command Panel for VS Code makes VS Code fully accessible with just the keyboard.


Typing

shift cmd P will bring up the command panel, giving you access to all the features of VS Code.

Here are shortcuts for some of the most useful commands:

  • cmd P will allow you to navigate to any file or symbol by entering its name Symbol
  • ctrl tab will take you to the last set of files opened
  • shift cmd P will take you directly to the editor command
  • shift cmd O will allow you to navigate to a specific symbol in the file
  • ctrl g will allow you to navigate to a specific line in the file

Shortcut keys


Shortcut keys often put a burden on the user’s memory, but if they are used frequently, integrate them into For your own habits, the next step is to improve efficiency.


Next, let’s introduce some useful shortcut keys for VS Code. You don’t need to remember them all, just remember some that fit your usage scenario.

Navigation shortcut keys

  • shift cmd F Search
  • shift ctrl G Source code management
  • cmd shift D Run panel
  • cmd shift Properties
  • cmd j Use the terminal, question, output, debug console to switch the bottom panel that opens
  • Common shortcut keys
  • alt Z
  • Toggle automatic line wrapping. If the lines in the file are long and you need to see everything without formatting each line.

cmd F Search the current file

  • alt shift left/alt shift right
  • Select by word
  • cmd D
  • Find and select the next occurrence of the currently selected word.
  • cmd down/cmd up
  • Move the cursor to the end/beginning of the current file
  • cmd left
  • /
  • cmd rightMove the cursor to the end of the current linealt left
  • /
  • alt rightMove the cursor word by word ctrl -
  • /
  • ctrl shift - Back and forwardshift ctrl cmd left
  • /
  • shift ctrl cmd rightExpand or shrink block selection F12
  • /
  • cmd clickJump to definition
  • Editing shortcut key
  • cmd ##/
  • shift up
Move selection up and down

alt down

/
    alt up
  • Move up and down one line
  • shift alt down
  • /shift alt upCopy the row or selection and paste below or above the row or selection
  • Conclusion
  • If you remember these efficient ways to use VS Code, you will find that it is much more efficient than the operations you were accustomed to before.
  • No one can reach a thousand miles without taking small steps. Perhaps for a small amount of operations, the changes it brings cannot be felt. However, if in the development process of a large project, the changes brought by a tool The impact will be highlighted.
  • Through these efficient operations, VS Code allows you to focus on the coding itself without being affected by tool-level obstacles that affect development efficiency. The above is all the content shared this time. If you think the article is not bad, welcome to follow the official account: Python Programming Learning Circle
  • , share daily useful information, and you can get it by sending "J" A large number of learning materials, covering Python e-books, tutorials, database programming, Django, crawlers, cloud computing, etc. Or go to the Programming Learning Network to learn more about programming technology.

For more knowledge about VSCode, please visit: vscode tutorial!

The above is the detailed content of [Compilation and Sharing] Commonly used and efficient tips in VSCode (wonderful skills and tricks). For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:segmentfault. If there is any infringement, please contact admin@php.cn delete
Visual Studio vs. VS Code: Pricing, Licensing, and AvailabilityVisual Studio vs. VS Code: Pricing, Licensing, and AvailabilityMay 07, 2025 am 12:11 AM

The differences in pricing, licensing and availability of VisualStudio and VSCode are as follows: 1. Pricing: VSCode is completely free, while VisualStudio offers free community and paid enterprise versions. 2. License: VSCode uses a flexible MIT license, and the license of VisualStudio varies according to the version. 3. Usability: VSCode is supported across platforms, while VisualStudio performs best on Windows.

Visual Studio: From Code to ProductionVisual Studio: From Code to ProductionMay 06, 2025 am 12:10 AM

VisualStudio supports the entire process from code writing to production deployment. 1) Code writing: Provides intelligent code completion and reconstruction functions. 2) Debugging and testing: Integrate powerful debugging tools and unit testing framework. 3) Version control: seamlessly integrate with Git to simplify code management. 4) Deployment and Release: Supports multiple deployment options to simplify the application release process.

Visual Studio: A Look at the Licensing LandscapeVisual Studio: A Look at the Licensing LandscapeMay 05, 2025 am 12:17 AM

VisualStudio offers three license types: Community, Professional and Enterprise. The Community Edition is free, suitable for individual developers and small teams; the Professional Edition is annually subscribed, suitable for professional developers who need more functions; the Enterprise Edition is the highest price, suitable for large teams and enterprises. When selecting a license, project size, budget and teamwork needs should be considered.

The Ultimate Showdown: Visual Studio vs. VS CodeThe Ultimate Showdown: Visual Studio vs. VS CodeMay 04, 2025 am 12:01 AM

VisualStudio is suitable for large-scale project development, while VSCode is suitable for projects of all sizes. 1. VisualStudio provides comprehensive development tools, such as integrated debugger, version control and testing tools. 2.VSCode is known for its scalability, cross-platform and fast launch, and is suitable for fast editing and small project development.

Visual Studio vs. VS Code: Comparing the Two IDEsVisual Studio vs. VS Code: Comparing the Two IDEsMay 03, 2025 am 12:04 AM

VisualStudio is suitable for large projects and Windows development, while VSCode is suitable for cross-platform and small projects. 1. VisualStudio provides a full-featured IDE, supports .NET framework and powerful debugging tools. 2.VSCode is a lightweight editor that emphasizes flexibility and extensibility, and is suitable for various development scenarios.

Visual Studio: Comparing Free and Paid OptionsVisual Studio: Comparing Free and Paid OptionsMay 02, 2025 am 12:09 AM

When choosing VisualStudio, the free version is suitable for individual developers and small teams, and the paid version is suitable for large enterprises and users who need advanced features. 1. The free CommunityEdition provides basic development tools for individuals and small teams. 2. Paid Professional and Enterprise Editions provide advanced features and support for business environments and large teams.

Visual Studio: A Comprehensive Guide to its FeaturesVisual Studio: A Comprehensive Guide to its FeaturesMay 01, 2025 am 12:14 AM

VisualStudio provides a variety of features to improve development efficiency. 1. Interface and navigation: manage projects through menu bar, toolbar and other components. 2. Code editing and intelligent perception: Provide code completion and formatting tools. 3. Debugging and testing: Support breakpoint settings and variable monitoring. 4. Version control: Integrate with Git and other systems to facilitate team collaboration.

Visual Studio vs. VS Code: Installation, Setup, and Ease of UseVisual Studio vs. VS Code: Installation, Setup, and Ease of UseApr 30, 2025 am 12:05 AM

VisualStudio and VSCode have their own advantages and disadvantages, which are suitable for different development needs. VisualStudio is suitable for large projects and provides rich functions; VSCode is lightweight, flexible, and has cross-platform support.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version