search
HomeDevelopment ToolsVSCodeThese vscode tips you may not know can help you improve your development efficiency!

This article will share with you vscode tips that you may not know. It can make you write code more efficiently and help you improve development efficiency. Come and collect it!

These vscode tips you may not know can help you improve your development efficiency!

vscode is a commonly used editor when we write code. It has many functions, but in fact we don’t use many of them. This article just wants to sort it out. Here are some tips that you may not know but are very helpful in improving your efficiency. [Recommended learning: "vscode tutorial"]

Includes:

  • One-click execution of npm scripts
  • One-click diff and preview
  • Search in a new page
  • git view displays directory tree
  • Open a file in a new editor
  • Quickly delete, copy, and move lines while editing
  • Search files globally, jump to a certain line
  • Quickly switch case

Execute npm scripts with one click

Execute npm scripts Need to be on the command line? That's because you haven't used this function that comes with vscode.

These vscode tips you may not know can help you improve your development efficiency!

vscode will scan all npm scripts and list them. Just click run and the terminal will open to run. In addition, higher versions of vscode can also be run with debug directly.

There is no need to enter npm run xxx yourself.

Open a file in the sidebar

When you open a file, it will be opened in the current editor by default. What if you want to open a new editor? At this time, you can hold down option and click on the file, and a new editor will open to open the file.

These vscode tips you may not know can help you improve your development efficiency!

Because by default vscode opens a new file in the current editor, it is quite troublesome if you don’t know that you can open a new editor by holding down option and clicking.

More powerful search

Search There is a button in this panel that many students may not have noticed. After clicking it, the search page will open to search, and you can preview the search. The results are richer and have more rows.

These vscode tips you may not know can help you improve your development efficiency!

For example, if I search for @babel/core:

These vscode tips you may not know can help you improve your development efficiency!

Look, is it better than the small box on the left? Show more here.

These vscode tips you may not know can help you improve your development efficiency!

You can see by comparison that the search results on the right are clearer because multiple lines will be displayed.

File diff displays directory information

When we change multiple files, they will be listed in the list of the source control panel. When there are multiple files with the same name Particularly unintuitive.

These vscode tips you may not know can help you improve your development efficiency!

At this time, you can actually switch to tree view to display the directory tree.

These vscode tips you may not know can help you improve your development efficiency!

When there are multiple files with the same name, this will be much clearer:

These vscode tips you may not know can help you improve your development efficiency!

Editor One-click preview of markdown

markdown Do I need to install a plug-in? No, vscode itself has this feature built in.

These vscode tips you may not know can help you improve your development efficiency!

#There is a preview button in the upper right corner. Clicking it will open the markdown preview interface. Press and hold option and click again to open the preview in the same window.

After previewing, click the show source button and you will go back

These vscode tips you may not know can help you improve your development efficiency!

One-click diff in the editing area

Quickly switch between diff and file editing views

When you change the file content, you can click the button in the upper right corner of the editing area to open the diff directly. Many students may not notice it. These buttons are actually very useful.

1These vscode tips you may not know can help you improve your development efficiency!

Click again to return to the file editing state

1These vscode tips you may not know can help you improve your development efficiency!

Look at the function description open changes and open files, it is obvious It is used to switch between diff view and file editing view.

diff view quickly jumps between diffs

When the file content is particularly large, such as thousands of lines, it is still troublesome to find the diff. of. In fact, you don’t have to look for it yourself, and it’s easy to miss it. The vscode editor provides up and down buttons, which can jump directly to the previous diff and next diff

1These vscode tips you may not know can help you improve your development efficiency!

One-click preview, one-click preview, and one-click preview. Key diff, these are all functions that can improve efficiency.

Quick search function entrance

Know that vscode has a certain function but don’t know where the entrance is? Just use the search box under help, and the search results will directly indicate what buttons are under which menu.

1These vscode tips you may not know can help you improve your development efficiency!

Editing shortcut keys

The main function of the editor is editing, but in fact there are many vscodes. Please use the editing function. Maybe I haven’t, so let me list them.

Move rows up and down/copy

What should I do if I move the content of a row up or down?

1These vscode tips you may not know can help you improve your development efficiency!

#The efficiency of manual cutting and pasting is too low. It is better to try the option up/down shortcut keys to quickly move a line of content up and down.

Want to copy when moving? Just hold shift again.

1These vscode tips you may not know can help you improve your development efficiency!

Quickly delete rows

We know how to quickly copy rows, but what about quickly deleting rows?

Just press command shift k.

If you want to delete multiple lines, select them first and then press command shift k.

Multi-cursor editing at the same time

Modify the content in multiple places at the same time? Just hold down option and click on the place you want to modify.

1These vscode tips you may not know can help you improve your development efficiency!

What if it’s the same location for uplink and downlink? Then use the option command up/down, so that the cursor at the same position is added to multiple lines.

1These vscode tips you may not know can help you improve your development efficiency!

This may be a shortcut key that everyone knows. There will be a > in the input box. Following the representatives are commands, but there are some others that you may not know.

1These vscode tips you may not know can help you improve your development efficiency!

#For example, command p directly without pressing shift. At this time, the file is searched.

These vscode tips you may not know can help you improve your development efficiency!

For example, press ctrl g directly, or enter a colon in the input box, which means that the next line number is the jump line number, and you can quickly jump to a certain line

2These vscode tips you may not know can help you improve your development efficiency!

Of course, you can also add a colon and line number when searching for a file to quickly jump to that line of the file.

2These vscode tips you may not know can help you improve your development efficiency!

Quickly switch case

There is also a small function, with built-in uppercase and lowercase The switching function can quickly switch the uppercase and lowercase of the selected content.

2These vscode tips you may not know can help you improve your development efficiency!

2These vscode tips you may not know can help you improve your development efficiency!

Summary

This article has sorted out some functions in vscode that can improve efficiency. You may not have noticed it.

  • One-click diff and preview
  • Search on the new page
  • Git view displays the directory tree
  • One-click execution of npm scripts
  • Open the file in a new editor
  • Quickly delete, copy, and move lines while editing
  • Search files globally and jump to a certain line
  • Quickly switch case

Being familiar with the use of these functions, I believe it will improve the efficiency of our daily development. It is quite meaningful to learn the skills of using tools for writing code every day.

For more programming related knowledge, please visit: Programming Video! !

The above is the detailed content of These vscode tips you may not know can help you improve your development efficiency!. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:掘金--zxg_神说要有光. If there is any infringement, please contact admin@php.cn delete
Visual Studio: Exploring the Free and Paid OfferingsVisual Studio: Exploring the Free and Paid OfferingsApr 22, 2025 am 12:09 AM

The main difference between the free and paid versions of VisualStudio is the richness of features and the service supported. The free version (Community) is suitable for individual developers and small teams, providing basic development tools; the paid version (Professional and Enterprise) provides advanced features such as advanced debugging and team collaboration tools, suitable for large projects and enterprise-level development.

Visual Studio Community Edition: The Free Option ExplainedVisual Studio Community Edition: The Free Option ExplainedApr 21, 2025 am 12:09 AM

VisualStudioCommunityEdition is a free IDE suitable for individual developers, small teams and educational institutions. 1) It provides functions such as code editing, debugging, testing and version control. 2) Based on the Roslyn compiler platform, it supports multiple programming languages ​​and integrates Git and TFVC. 3) Advanced features include unit testing, optimization suggestions include turning off unnecessary extensions and using a lightweight editor.

Visual Studio: Building Applications with EaseVisual Studio: Building Applications with EaseApr 20, 2025 am 12:09 AM

VisualStudio is an integrated development environment (IDE) developed by Microsoft, which supports a variety of programming languages, including C#, C, Python, etc. 1. It provides IntelliSense function to help write code quickly. 2. The debugger allows setting breakpoints, step-by-step code execution, and identifying problems. 3. For beginners, creating a simple console application is a great way to get started. 4. Advanced usage includes the application of design patterns such as project management and dependency injection. 5. Common errors can be solved step by step through debugging tools. 6. Performance optimization and best practices include code optimization, version control, code quality inspection and automated testing.

Visual Studio and VS Code: Understanding Their Key DifferencesVisual Studio and VS Code: Understanding Their Key DifferencesApr 19, 2025 am 12:16 AM

VisualStudio is suitable for large-scale projects and enterprise-level application development, while VSCode is suitable for rapid development and multilingual support. 1. VisualStudio provides a comprehensive IDE environment and supports Microsoft technology stack. 2.VSCode is a lightweight editor that emphasizes flexibility and scalability, and supports cross-platform.

Is Visual Studio Still Free? Understanding the AvailabilityIs Visual Studio Still Free? Understanding the AvailabilityApr 18, 2025 am 12:05 AM

Yes, some versions of VisualStudio are free. Specifically, VisualStudioCommunityEdition is free for individual developers, open source projects, academic research, and small organizations. However, there are also paid versions such as VisualStudioProfessional and Enterprise, suitable for large teams and enterprises, providing additional features.

Using Visual Studio: Developing Software Across PlatformsUsing Visual Studio: Developing Software Across PlatformsApr 17, 2025 am 12:13 AM

Cross-platform development with VisualStudio is feasible, and by supporting frameworks like .NETCore and Xamarin, developers can write code at once and run on multiple operating systems. 1) Create .NETCore projects and use their cross-platform capabilities, 2) Use Xamarin for mobile application development, 3) Use asynchronous programming and code reuse to optimize performance to ensure efficient operation and maintainability of applications.

How to format json with vscodeHow to format json with vscodeApr 16, 2025 am 07:54 AM

The ways to format JSON in VS Code are: 1. Use shortcut keys (Windows/Linux: Ctrl Shift I; macOS: Cmd Shift I); 2. Go through the menu ("Edit" > "Format Document"); 3. Install JSON formatter extensions (such as Prettier); 4. Format manually (use shortcut keys to indent/extract blocks or add braces and semicolons); 5. Use external tools (such as JSONLint and JSON Formatter).

How to compile vscodeHow to compile vscodeApr 16, 2025 am 07:51 AM

Compiling code in VSCode is divided into 5 steps: Install the C extension; create the "main.cpp" file in the project folder; configure the compiler (such as MinGW); compile the code with the shortcut key ("Ctrl Shift B") or the "Build" button; run the compiled program with the shortcut key ("F5") or the "Run" button.

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

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor