Simple and practical VSCode shortcuts

1, a search of all text files

VSCode one of my favorite features is the ability of all files in the project directory in the search for any text matching.

To use this feature, you can press Ctrl + Shift + fto open the view, it will display the sidebar on the left side of the editor, the contents of the input to find and press Enter, VS code will provide a list of results matching your input, you can also simultaneously regulate each search If the file in all matches. If you click on the little arrow on the left, it will pop up a second input box below, where you can enter text to be replaced, and click the small box appears on the right.

2. Set the accent color (Material Theme) for the tabs

 Are you tired of seeing the same color tabs at the bottom every day? Material Theme can be used to extend the theme VsCode so that tabs can set a different color. There are 16 different colors to choose from. Therefore, if there is chest command panel installing this extension, open ( Ctrl + Shift + P), select Material Theme: Set accent colorand choose a color from the list, it will change the color of the underline tab

3、Expand Bracket Selection

 Open keyboard shortcut ( Ctrl + Shift + P 或 command + Shift + p), search Expand Bracket Selection. Use this function to automatically select the entire block, from the beginning to the end braces. In this function you want to find if/elsethe end of the corresponding block is useful.

4. Reopen closed Edit Page

 When you deal with a lot of large-scale project file, if you do not accidentally close a page, and have to search for it again in the side menu, which can be a bit frustrating. Now, you can press Ctrl + Shift + Tto re-open a closed page.

5, open the file by matching text

When it comes to searching for files, you can dynamically search for and open files. This is one of my favorite features, there is no need to manually click to open a directory no longer open the file again.

6, integrated terminal

By Ctrl + ` can open or close the terminal

7, see the running plug-ins

You can open a command panel ( Ctrl + Shift + P) and enter Show running extensionsto view all plug-ins running your installation.

8, reload

I personally think this is one of the coolest features VsCode. It allows you to put in front of the window when reloading the editor, while having the same closing and reopening the window effect.

9, the tab switching to a different group

VsCode there is a method by pressing Ctrl + Alt +右箭头(Mac: Control + Option +右箭头)moving the label to the right of the group, or by Ctrl + Alt + 左箭头transfer to a separate tag label set (Mac: Control + Option +左箭头)) to move to the left tag group

10, all the contents choose the left / right side

Sometimes you want to delete all the contents of the cursor to the right or left. You can select all the contents of the cursor to the right or left. For example, to select all content of the right or left.

Apple notebook not home key, you can use key combinations to achieve

  • fn + left arrow key is HOME

  • fn + right arrow key is key END

  • Fn + direction is the page up key

  • fn + next page down direction key is

11, delete the word

To delete the previous word, press Ctrl + Backspace(Mac: option + delete). This is useful when you have the wrong word.

12, start-up performance

In VsCode, the start-up performance is very important. That's why you can pop up a useful window, miraculously provide all the information you need: Open a command panel ( Ctrl + Shift + P), search S tartup Performance.

13, select the text one by one

By shortcuts Ctrl + Shift +右箭头(Mac: option + Shift +右箭头) and Ctrl + Shift +左箭头(Mac: option + Shift + Left Arrow) to select individual text.

14, duplicate rows

A very powerful and known function is to copy the line. Simply press Shift + Alt + 向下箭头(Mac: command + Shift + 向下箭头)

15, moved to the beginning of the file / end

To move the cursor to the first row or the last row, the fastest way is to press the Ctrl + Home( Mac: command + Homebeginning) key, then press Ctrl + End(Mac: command + End) button at the end.

16, to replace the current batch file, all matching text

You can select any set of text, if the selected text appear more, by pressing Ctrl + F2(Mac: command + F2) once to change all the text appears.

17, the up / down one line

Press Alt + 向上箭头(the Mac: command+ 向上箭头) the current row is moved upward, press Alt + 向下箭头(the Mac: command+ 向下箭头)) the current row is moved downward.

18, delete a row

There are two ways you can delete a line immediately.

Use the Ctrl + XCut command ( Mac:command + X) to delete a row or use Ctrl + Shift + K(Mac: command + Shift + K) command.

19, the editor will move left or right

By Ctrl + Shift + PgUp / PgDown (command + + Shift + PgUp / PgDown) leftward / rightward editor.

20, a cursor up or copy content add up batch

Copy the cursor VsCode may prove to be the most time-saving features. Press Ctrl + Alt +向上箭头(the Mac: Control + Option +向上箭头) Add the cursor to the upper, press Ctrl + Alt +向下箭头(the Mac: Control + Option + 向下箭头) Add the following to the cursor.

 

Guess you like

Origin www.cnblogs.com/cxyuan/p/11491121.html