A summary of Visual Studio Code shortcuts starting with Alt

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

Visual Studio Code (hereinafter referred to as VSCode) is constantly being updated, and the number of shortcut keys assigned to it is incredible

When you first start using it, there are so many things that it's impossible to cover them all, so I've put together a list of some useful ones

 

Swap lines

If you want to swap it with the line immediately above, move the cursor to the line you want to swap and press Alt + up/down arrows!

As an advanced technique, you can select multiple lines andAlt swap them all at once using

That's convenient!

 

Copying a row

Sometimes you want to copy lines that contain the same text, right?
Alt + Shift You can do that easily by pressing

As an advanced technique, you can also select multiple lines andAlt + Shift copy them using

That's convenient!

 

Rectangle Selection

Rectangular selection is a handy feature for batch editing of data in a table format or for quickly inserting the same string at the beginning of each row.
Some editors require mouse operation, but with VS Code, you can do it with just the keyboard!

When making a rectangular selection,Ctrl + Alt you can extend the cursor vertically by pressing
You can also move the cursor while it's extended.

In this state,Shift you can adjust the selection range using
You can rewrite it all at once!

pressingEsc.

That's convenient!

 

Split Editor

Sometimes you want to compare two editors side-by-side, right?
In those cases,Ctrl + ¥you can split them using

again while the editor is split into two panesCtrl + ¥, you can split it into three panes!

It used toCtrl + Alt + , but the shortcut key was recently changed.
I was genuinely shocked.

That's convenient!

 

Follow the edit history

Have you ever spent a lot of time searching for the place you just edited?
In those situations,Alt + left/right arrow keys to move back to your previous work location!

which undoes changesCtrl + z, this function simply moves the cursor to the changed location, making it easy to use.

That's convenient!

 

Search like "grep -r" on VSCode

Searching is quick and easy in a Linux environment, but it's not so simple in a Windows environment.
However, with VS Code,Ctrl + Shift + fyou can easily search using

You can also perform a batch replacement of search resultsCtrl + Shift + h.
It's also easy to exclude items from the replacement; simply click the "X" button next to the file name.

That's convenient!

 

Use $1 when replacing

It can handle backreferences too!
In fact, it can even perform substitutions using regular expressions.

This isn't a shortcut

That's convenient!

Above, we have introduced some shortcut keys involving Alt

It would be convenient if we could eventually create something like a cheat sheet!

That's all

If you found this article helpful,please give it a "Like"!
4
Loading...
4 votes, average: 1.00 / 14
15,854
X Facebook Hatena Bookmark pocket

The person who wrote this article

About the author

Yoichi Bandai

My main job is developing web APIs for social games, but thankfully I'm also given the opportunity to work on various other tasks, including marketing.
My image rights within Beyond are treated as CC0.