[Osaka/Yokohama/Tokushima] Looking for infrastructure/server side engineers!

[Osaka/Yokohama/Tokushima] Looking for infrastructure/server side engineers!

[Deployed by over 500 companies] AWS construction, operation, maintenance, and monitoring services

[Deployed by over 500 companies] AWS construction, operation, maintenance, and monitoring services

[Successor to CentOS] AlmaLinux OS server construction/migration service

[Successor to CentOS] AlmaLinux OS server construction/migration service

[For WordPress only] Cloud server “Web Speed”

[For WordPress only] Cloud server “Web Speed”

[Cheap] Website security automatic diagnosis “Quick Scanner”

[Cheap] Website security automatic diagnosis “Quick Scanner”

[Reservation system development] EDISONE customization development service

[Reservation system development] EDISONE customization development service

[Registration of 100 URLs is 0 yen] Website monitoring service “Appmill”

[Registration of 100 URLs is 0 yen] Website monitoring service “Appmill”

[Compatible with over 200 countries] Global eSIM “Beyond SIM”

[Compatible with over 200 countries] Global eSIM “Beyond SIM”

[If you are traveling, business trip, or stationed in China] Chinese SIM service “Choco SIM”

[If you are traveling, business trip, or stationed in China] Chinese SIM service “Choco SIM”

[Global exclusive service] Beyond's MSP in North America and China

[Global exclusive service] Beyond's MSP in North America and China

[YouTube] Beyond official channel “Biyomaru Channel”

[YouTube] Beyond official channel “Biyomaru Channel”

Introducing powerful shortcut keys in Visual Studio Code

Hello.
I'm Mandai, in charge of Wild on the development team.

When developing, the speed at which you work depends on whether the editor feels familiar to your hands, so I want to use the shortcut keys as little as possible, so that my hands can move on their own without having to use my brain.

Even so, there are some shortcuts that you only use once in a while, or that you use often but just can't get used to and your body rejects them.
Also, even if you think it's very convenient, you can use it as a memo to prevent the wasteful case of forgetting it later.It's not easy to find even if you search for something that can be used with Visual Studio Code (hereinafter referred to as VSCode). I would like to introduce a new shortcut.

Note that the key configuration may change depending on the version you use, but the shortcut confirmation environment in this article is 1.17.2.

Jump cursor to corresponding parenthesis

Ctrl + Shift + \

In the case of JS and PHP, it reacts to "[", "{", "(", etc.).

In the case of HTML, it seems to respond to the pair of "<" and ">" placed before and after the tag.

 

Code folding at cursor position

Ctrl
+ Shift + [ Ctrl + Shift + ]

The top is folded and the bottom is unfolded.
As you use it, it becomes a pain to move the mouse cursor to each line number.

 

Fold the entire file using code folding

Ctrl + k -> Ctrl + 0

Hold down Ctrl press k and 0

 

Expand all collapsed code folds

Ctrl + k -> Ctrl + j

Hold down Ctrl press k and j

 

Add line breaks + indentation to the selected JSON data to make it easier to read (JSON pretty)

Alt + Ctrl + m

If it cannot be parsed, a warning will be displayed, so it can also be used to check the structure of JSON data.

I introduced it even though it wasn't a standard feature. It's just too convenient...
Please install JSON Tools

 

Delete an entire line

Ctrl + Shift + k

In Eclipse, Ctrl + Shift was set, and I was able to delete it using only my left hand.

 

Add line break before cursor line

Ctrl + Shift + Enter

If you're not sure, imagine doing Press Home Enter

 

Move to beginning/end of file

Ctrl
+ Home Ctrl + End

You can also add Shift

 

Switching editor tabs

There are several ways to switch editor tabs from the keyboard, so I will introduce them all.

Ctrl + Tab

Select from a list of open files.

Ctrl
+ PageUp Ctrl + PageDown

Move to the next editor tab.

 

Comment out / Uncomment

Ctrl + /

Commenting out is a feature of Joshiki, but for the following reasons, I always use the shortcut key unless there is a very good reason.

  • If you comment out a shortcut, it will comment out with the appropriate indentation so as not to break the indentation.
  • The shortcut key combination for block comments is too unfortunate ( Ctrl + Shift + a )
  • The behavior of the combination of selection range and block comment is not what I intended, and it is better to comment multiple lines to get the desired result.
  • VSCode comments out the extension according to the programming language, which is convenient for people who go back and forth between various languages.

Well, perhaps the biggest thing is that you don't have to think about unnecessary things.
The disadvantage is that code folding does not work for multi-line comments.

 

summary

When you're doing development, the thing you spend most of your time doing is probably your right hand going back and forth between the mouse and keyboard (this is a bit of an exaggeration).
If that time could be reduced even a little, it would be great if the speed of development would increase and I could be more productive and do better work.

We also have a collection of shortcuts for Visual Studio Code that start with Alt, which surprisingly popular and has become obsessed Alt

That's it.

If you found this article helpful , please give it a like!
1
Loading...
1 vote, average: 1.00 / 11
49,298
X facebook Hatena Bookmark pocket
[2025.6.30 Amazon Linux 2 support ended] Amazon Linux server migration solution

[2025.6.30 Amazon Linux 2 support ended] Amazon Linux server migration solution

The person who wrote this article

About the author

Yoichi Bandai

My main job is developing web APIs for social games, but I'm also fortunate to be able to do a lot of other work, including marketing.
Furthermore, my portrait rights in Beyond are treated as CC0 by him.