Home >Development Tools >VSCode >Take you to understand [Space Control] in vscode
Welcome to the world of vscode. The goal of this article is to popularize some design concepts about [space control] in vscode. Space is limited, but information is unlimited, just like us When writing a page, you must consider the center of the page and the placement of the space. vscode is actually an application, and its interface space is also limited. These are built up by various areas. So what are these areas? How do they work together? [Recommended learning: "vscode tutorial"]
The main content of this article can be said to be tips, but I am a very lazy person, I don’t like to memorize by rote, I like to remember when I need to Looking for internal connections between the contents, and then using logic to string them together, this gives me an indescribable pleasure; this memory method may not be suitable for many industries, but in the computer field, it is really a method that I personally highly recommend. The reason is simple: computers are a world built entirely by humans!
This means that if you can understand the designer's thinking, the design of many things will become logical, and it would feel awkward not to use it this way. Another potential benefit is that we come to think like those good people, which is crucial.
I’ve talked a lot, let’s get down to business, let’s get started!
Taking the above picture as an example, our common and commonly used areas and corresponding functions It is roughly as follows
Working directory: Directory information of the currently processed project
Command panel: Provides a panel that supports calling vscode corresponding actions through commands
Editing area: an area to change the content of the current project, there are concepts such as editing groups
Terminal area: Provide a way to embed the terminal area in vscode Directly execute terminal commands in win, default power shell
; can be configured as bash
Knowing the existence of these core areas, next, we start to analyze one by one
The editor area is the most critical area, because it is the entrance to our direct control of the project, normal file operation design The concept is actually mainly about the operation of the cursor. This has been shared in the article Cursor Operation, so I won’t go into details. Interested friends can take a look;
The focus of this article is Regarding the allocation of space, the editing area is the area that is displayed by default and occupies the largest area. For the processing of this space, the main requirements are as follows
For the first question, it can be achieved through a type of shortcut keys; for the second question, the concept of editor group is proposed in vscode. The editing area can be divided into up to five areas, which are independent of each other.
If you have read the article Cursor Operation, you will know that I use the [granularity] perspective to understand the cursor setting. In fact, spatial control can also be understood from this perspective. How to understand it specifically? Do, let’s understand through the questions
Let’s take a look first Default shortcut key settings
Command | mac | win | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Select in the currently open file list | ctrl tab | ctrl tab | ||||||||||||||||||||||
Switch to the next in the current file | Open Previous Editor | cmd option ← | ctrl option ← | ||||||||||||||||||||||
cmd option → | ctrl option → |
Command | mac | win |
---|---|---|
Select | ctrl in the list of currently open files tab | ctrl tab |
Switch to the next in the current file | Open Previous Editor | cmd option ← (customized ctrl option ← ) | |
Switch to the previous one in the current file | Open Next Editor | cmd option → (customized ctrl option → ) |
For such a large piece of content in the editor area, if you want to see multiple processed files at the same time, then split it. This leads to the concept of Editor Group. In fact, It is divided into partitions, and the functions are exactly the same. Just look at the case directly
Regarding the grasp of the editor group space, in the same sentence, The editor group granularity is cmd
, the corresponding command overview is as follows;
Command | mac | win |
---|---|---|
Split Editor | Split Editor | Cmd \ | Ctrl \ |
Split switch | Switch the current editor in the editor group | Cmd [number of groups] | Ctrl [number of groups] |
Flip Editor Group Layout | Switch vertical/horizontal editor layout | Cmd Option 0 | Shift Alt 0 |
Command | mac | win |
---|---|---|
Split switch | Switch the current editor in the editor group | Cmd [number of groups] | Ctrl [number of groups] |
The default editor arrangement between editor groups is horizontal
Command | mac | win | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Cmd Option 0 | Shift Alt 0 |
mac | win | |
---|---|---|
cmd ctrl ← | ctrl tab | |
cmd ctrl ← |
mac | win | |
---|---|---|
ctrl tab | ctrl tab | in the currently open file list |
cmd option ← (customized ctrl option ←) |
|
|
cmd option → (customized ctrl option → ) |
|
mac | win | |
---|---|---|
ctrl tab | Move Editor into Next Group | Move the current file to the next editor | |
##Command Panel Area
Shortcut key for Mac | Shortcut keys for win | ||
---|---|---|---|
cmd p |
? |
||
Execute command |
|||
##[ filename?]:[rowIndex] | Locate the line number (if you don’t specify a file name, it will be the currently opened file)|||
ctrl g | @[:?] | Fuzzy query for current file symbols, if not filled in, all will be displayed by default (if added: will be displayed in categories) | |
Ctrl Shift O | # Fuzzy query for symbols in the currently open file list, if not filled in, the default is empty | ||
Special characters | Source word
##edt [active?] | edit | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ext [install?] | extension For help on possible operations, add | install||||||||||||||||||||||||
task Perform the task |
||||||||||||||||||||||||
debug | Execute debugging | |||||||||||||||||||||||
term | terminal | Create and manage terminal instances | |||||||||||||||||||||||
view | Open Various UI components of VS Code | |||||||||||||||||||||||
Extended FeedBased on the command panel, there is actually a set of sorting out the search function in vscode. Due to space limitations, it will be described in a short article (tool article) in the next article ) appears in the form Terminal areais easier to understand, but it is actually some commands
Create a new terminal in the awakened stateFocus on TerminalFocus on previous/next terminalSidebar area The sidebar only cares about one very commonly used key shortcut key, which is to show/hide the sidebar
##Summary At this point, we have completed the vscode journey with space control as the main line! Be diligent in thinking, enjoy thinking, come onFor more knowledge about VSCode, please visit:vscode Basic Tutorial! |
The above is the detailed content of Take you to understand [Space Control] in vscode. For more information, please follow other related articles on the PHP Chinese website!