


This article summarizes and shares with you some VSCode code tips and tricks worth collecting. Hurry and save them, maybe you will use them often in the future!
[Recommended learning: "vscode introductory tutorial"]
Code folding
Keyboard shortcuts: Ctrl Shift [ and Ctrl Shift ]
Trim trailing spaces
Keyboard shortcuts: Ctrl K Ctrl The actual operation is Ctrl K, then Ctrl X.
Currently Ctrl K key is basically defined as an operation related to files, while Ctrl K Ctrl key is mostly an operation related to layout etc.
Currently selected source code: Ctrl K Ctrl F Entire document format: Shift Alt F
Move rows up and down
Keyboard shortcuts: Alt Up or Alt Down
Multiple cursor selection
Keyboard shortcuts: Ctrl Alt up key or Ctrl Alt down key
This feels very convenient
You can use Ctrl Shift L to add an additional cursor to all instances of the current selection
If you don't want to add all currently selected items, you can use Ctrl D instead. This will only select the next event after the event you selected, so you can add selections one by one.
Copy lines up/down
Keyboard shortcuts: Shift Alt Up Arrow or Shift Alt Down key
When multiple cursors are selected, only the value of the first row will be copiedColumn (Box) Selection
You can select blocks of text by holding down Shift Alt (Shift Option on macOS) while dragging the mouse. A separate cursor will be added to the end of each line.
(pee
Select a symbol and enter Alt F12. Alternatively, you can use the context menu.
Go to definition: Select a symbol and type F12
Go to reference: Select a symbol and type Shift F12
https://code.visualstudio.com/docs/getstarted/tips-and-tricks#_preventing-dirty-writes
!If it helps you, I can Like?
For more knowledge about VSCode, please visit:
vscode tutorial
The above is the detailed content of Several VSCode code tips and tricks worth collecting [animation demonstration]. For more information, please follow other related articles on the PHP Chinese website!

2022年了,该学会用VSCode debug了!下面本篇文章手把手带大家会习VSCode debug,希望对大家有所帮助!

本篇是VSCode配置文章,手把手教大家怎么在VSCode中配置使用 Geant4 和 Root,希望对大家有所帮助!

本篇文章扒拉一下vscode Prettier的选项,总结分享16个让你的代码变漂亮的属性,希望对大家有所帮助!

“工欲善其事,必先利其器!”,vscode作为前端开发的重要工具,其插件能大幅提升战斗力,精心收集12个插件,总有几款你还未曾拥有。

VSCode中如何开发uni-app?下面本篇文章给大家分享一下VSCode中开发uni-app的教程,这可能是最好、最详细的教程了。快来看看!

VScode中怎么开发置C/C++?怎么配置C/C++环境?下面本篇文章给大家分享一下Windows系统下VScode配置C/C++环境图文教程,希望对大家有所帮助!


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SublimeText3 Chinese version
Chinese version, very easy to use
