In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces what are the VSCode shortcuts to improve development efficiency, which are introduced in great detail and have a certain reference value. Friends who are interested must finish reading them!
21 VSCode shortcuts to share with you.
Note: when you try, Mac (17, pro) is not quite the same as the shortcut keyboard provided in the original text. The Ctrl corresponding to mac should be replaced with command.
1. Search the text of all files at once
Windows: Ctrl + Shift + F
Mac: Command + Shift + F
One of my favorite features in VSCode is the ability to search for any matching text in all files in the project directory.
To use this feature, you can press Ctrl + Shift + f to open the view, which displays the sidebar on the left side of the editor:
Enter the content of the search and enter, and VS code will provide a list of results that match the input, as shown below:
You can also regulate all matches in each search result file at the same time. If you click the small arrow on the left, it will pop up a second input box below, where you can enter the text you want to replace and click the small box that appears on the right:
two。 Set accent color (Material Theme) for tabs
Are you tired of seeing the same tabs bottom color every day? You can use Material Theme to extend the theme of VsCode so that you can set different colors for tabs.
Red:
Purple
Yellow
There are 16 different colors to choose from.
So, if the chest has this extension installed, open the command panel (Ctrl + Shift + P), select Material Theme: Set accent color and select a color from the list, it will change the underline color of the tab, as shown below
3. Process Explorer
Do you find your VsCode editor a little slow sometimes? Which process do you want to eat our memory at this time?
Well, if you don't already know, VsCode has a process resource manager feature, as follows:
Does it look familiar?
You've seen this in the windows task manager, and you can open it by pressing Ctrl + Alt + Delete in VsCode.
4.Expand Bracket Selection
Open the keyboard shortcut (Ctrl + Shift + P or command + Shift + p) and search for Expand Bracket Selection.
It took me some time to find out, because I couldn't guess the name of the feature. Use this feature to automatically select the entire block, from the beginning of the braces to the end.
I find this feature useful in trying to find the corresponding end block for if/else.
5. Reopen the closed editing page
Windows: Ctrl + Shift + T
Mac: command + Shift + T
When you are working on a large project with a lot of files, it can be a little frustrating if you accidentally close a page and have to search it again in the side menu.
Now you can press Ctrl + Shift + T to reopen a closed page.
6. Open a file by matching text
Windows: Ctrl + T
Mac: command + T
When it comes to searching for files, you can search and open files dynamically. This is one of my favorite features because you don't need to click the directory manually to reopen a file that is no longer open.
7. Integrated terminal
Windows: Ctrl + Mac: control +
The terminal can be turned on or off through Ctrl + `
8. View the plug-in running
You can view all the running plug-ins you have installed by opening the command panel (Ctrl + Shift + P) and typing Show running extensions.
9. Reload
Personally, I think this is one of the coolest features of VsCode. It allows you to place the window in front when you reload the editor, with the same effect as closing and reopening the window.
Windows: Ctrl + Alt + R
Mac: Control + Option + R
10. Swap tabs to different groups
In the course of my development, I used to use tabs in the wrong tab set. I also want to avoid using my mouse as much as possible to solve the problem, because it allows me to lift my hands off the keyboard. I'm lazy and want to put my hands on the keyboard together.
Fortunately, VsCode has a way to move the label to the right group by pressing Ctrl + Alt + right arrow (Mac:Control + Option + right arrow), or by pressing Ctrl + Alt + left arrow to move the label to a separate label group (Mac:Control + Option + left arrow).
11. Select everything on the left / right
Sometimes you want to delete everything on the right or left side of the cursor. You can select everything on the right or left side of the cursor. For example, to select everything on the right or left:
Windows: Ctrl + Shift + Home/End
Mac: command + Shift + Home/End
Apple notebook does not have home key, it can be realized with key combination.
FN key + left arrow key is HOME
FN key + right key is END
The fn+ up key is page up
Under fn+, the direction key is page down.
twelve。 Delete the previous word
To delete the previous word, press Ctrl + Backspace (Mac: option + delete). This is very useful when you type wrong words.
You can use it anywhere other than VsCode.
13. Startup performance
Sometimes, it is very painful to lack detailed information about performance issues, while also finding out which ones have performance problems.
Sometimes, if you are lucky enough, you will find a tool that will give you all the answers. In VsCode, startup performance is important. That's why you can pop up a useful window that miraculously provides all the information you need:
Open the command panel (Ctrl + Shift + P) and search for Startup Performance.
14. Select text one by one
You can select text one by one using the shortcut keys Ctrl + Shift + right arrow (Mac: option + Shift + right arrow) and Ctrl + Shift + left arrow (Mac: option + Shift + left arrow).
15. Duplicate Lin
A very powerful and known feature is to copy rows. Just press Shift + Alt + down arrow (Mac: command + Shift + down arrow)
16. Move to the beginning / end of the file
The quickest way to move the cursor to the first or last line of a file is to press Ctrl + Home (Mac: command + Home) at the beginning, and then press Ctrl + End (Mac: command + End) at the end.
17. Batch replace all matching text in the current file
You can select any set of text, and if there is more than one text in the selection, you can change all the text that appears at once by pressing Ctrl + F2 (Mac: command + F2).
18. Move up / down one line
Press the Alt + up arrow (Mac: command+ up arrow) to move the current line up, and press the Alt + down arrow (Mac: command+ down arrow) to move the current line down.
19. Delete a row
There are two ways to delete a row immediately.
Use the Ctrl + X cut command (Mac:command + X) to delete a row.
Or use the Ctrl + Shift + K (Mac: command + Shift + K) command.
20. Move the editor to the left or right
If you are like me, you may have an uncontrollable desire to rearrange tabs in a group, where tabs are related to each other, and the tabs on the left are more important files. and the tab on the right is relatively unimportant.
Move the editor left / right through Ctrl+Shift+PgUp/PgDown (command + + Shift+PgUp/PgDown).
21. Copy the cursor up or batch up to add content
Copying cursors in VsCode can prove to be the most time-saving feature.
Press Ctrl + Alt + up arrow (Mac: Control + Option + up arrow) to add the cursor to the top, and press Ctrl + Alt + down arrow (Mac: Control + Option + down arrow) to add the cursor below.
The above is all the contents of the article "what are the VSCode shortcuts to improve development efficiency?" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.