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 > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article introduces the relevant knowledge of "how to operate Shortcut Keys in VS Code". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
F12 jump reference
As shown above:
F12 jumps to the definition of variables, functions, and classes
Shift + F12 jumps to its reference; when there are multiple references, you can choose which reference
Using F12, you can also jump to the source code of the environment library, as shown in the following figure, I jump to the core.py of the library gym (installed to lib using conda).
Find and replace
Use Ctrl + F to find it; use Ctrl + H to pop up a replacement window. As above, I replaced foo with foobar and used Alt + R to support regular syntax.
Ctrl + Shift + P
Ctrl + Shift + P is probably the most commonly used operation in all editors and debuggers: a command window pops up, then we enter the name of the relevant command, and enter to execute the command.
As shown in the figure above, I use Ctrl + Shift + P to execute the View: Split Editor Right command, and then use Ctrl + P to call out the window switch (file switcher).
Toggle window
In a pile of overlapping files, VS code calls it a "group". We usually use "group intra-group handoff" and "inter-group handoff".
As shown above, Ctrl + focuses the cursor (attention focus) on the group you are going to. Above Ctrl + 1 switches to group on the left; Ctrl + 2 switches to group on the right.
Alt + switches tabs within group.
In addition, notice that Ctrl + Shift + E opens or closes the file manager Explorer, which is the tree view on the left. Ctrl + B is the switch Side Bar, that is, the sidebar.
Build, close and adjust the station
Use the Ctrl + ~ switch terminal, while Ctrl + J is the switch Panel, that is, the bottom container containing the terminal and the modulator.
In addition, Ctrl + N is a new file, and Ctrl + W closes the current file (this applies to almost all windows applications).
Zen mode
Sometimes, the program appears to be too complex and bloated, distracting us, not having a clear vision, and reducing comfort. Using Zen mode Zen Mode shields these interruptions.
You can use Ctrl + Shift + P to enter Zen to invoke the relevant commands. In addition, I changed the shortcut to (in the Keymaps of the pinion in the lower left corner) Ctrl + Alt + Z, which is very comfortable as shown above.
Group size
A small monitor, but also divided by two or more group areas, our code reading screen is too "narrow".
As shown in the image above, we can use Toggle Editor Group Sizes to switch between reading modes to make it wider. I set the shortcut key to Ctrl + Alt + G.
Ctrl + I / Ctrl + /
As shown in the following figure, code hints can be invoked with Ctrl + I, while Ctrl + / can comment out or uncomment the selected text.
Plug-in: vscode-input-sequence
A vscode-input-sequence solves the problem of entering sequence data.
As shown above, with multiple cursors, we can enter a sequence of data, and can determine the sequence of progressive rules, progressive length, occupancy, binary, and so on.
Plug-in: Relative Path
I like Relative Path very much, as shown in the following figure, enter Ctrl + Shift + H to automatically complete the relative path of the file.
Plug-in: Auto Markdown TOC
There are many plug-ins for markdown auto-generated directories, and I think the most friendly to Chinese should be Hunter Tran's Auto Markdown TOC.
As above, use Auto Markdown TOC to automatically generate directories (again, invoke the relevant commands in Ctrl + Shift + P).
This is the end of the tutorial on how to operate Shortcut Keys in VS Code. Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.