Introduction
Hello, my name is Yohei, and I am an engineer from WESEEK, Inc. in Japan.
Usually, when you have a word you want to copy, you select a range of words by dragging from one end to the other, right-clicking to open options, clicking copy, and so on. Honestly, it is time-consuming when engineers use VSCode every day.
Thus, this article will talk about 11 useful shortcuts in VSCode, with the goal of increasing the number of users who know how to make things easier.
Let us start now! Here is a list of the shortcuts and we will explain them one by one later.
1. Open/Close Sidebar
You can literally open and close the sidebar. This is recommended when you want to keep the screen width of the file you are editing.
2. Open Folder List
You can open the list of folders and files in the sidebar. It can be executed even when the sidebar is closed or when a folder list other than the folder list is open in the sidebar.
3. Open Search
You can open a SEARCH in the VSCode sidebar. When executed with a specific string range selected, the search opens and simultaneously searches for files containing the selected keywords. This is recommended when you want to search which files a certain function or variable is used in.
4. Open File Search
Enter a file name and it will suggest a list of files with file names that match or are close to the keyword.
If you know the file name, it is recommended to use this way instead of the sidebar.
5. Open/Close Terminal
You can open and close the terminal. Entering a shortcut from a closed terminal opens the terminal and switches the focus of the input to the terminal. Entering a shortcut from the open state will close the terminal.
This is recommended when you want to look at a wide range of edited files or when you want to open the terminal immediately.
6. Split Terminal
Each independent terminal can be split on the same tab.
This is recommended for listing out all the information rather than opening a new tab.
7. Select Word Range
Words that exist at the cursor position are automatically range-selected.
When executed consecutively, the same word found next is selected in turn by the multi-cursor.
8. Copy Line (when not selected)
You can copy the entire line where the cursor is located. If a range is selected, only that range will be copied.
Simply click the cursor anywhere on the line you wish to copy. Then you can graduate from the pain of careful range selection with the mouse.
9. Erase Line (when not selected)
You can delete the entire line where the cursor is located. If a range is selected, only that range will be targeted.
Simply click the cursor anywhere on the line you wish to delete.
10. Close File
You can close the file that is currently in focus. Then there is no need to press the Close button.
It is recommended to learn this function with the "Re-open a Closed File" shortcut that will be introduced next.
11. Re-open a Closed File
You can reopen a previously closed file. When executed in succession, you can go back and reopen files in order from the most recently closed one to the past.
This is recommended when you have closed a file by mistake or when you want to check a file in the past.
Summary
If you want to learn more about VSCode shortcuts, check the following cheatsheets from the official website.
For Windows: https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf
For Mac: https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf
About Us 💡
In addition, we want to introduce a little more about GROWI, an open software developed by WESEEK, Inc.
GROWI is a wiki service with features-rich support for efficient information storage within the company. It also boasts high security and various authentication methods are available to simplify authentication management, including LDAP/OAuth/SAML.
GROWI originated in Japan and GROWI OSS is FREE for anyone to download and use in English.
For more information, go to GROWI.org to learn more about us.