Topic: visual-studio-code

Using Alt + Click for Multiple Cursors in Visual Studio Code
Category: visual-studio-code
By: Jeremy Faucher

Description:

In Visual Studio Code, the Alt + Click feature allows you to place multiple cursors throughout your code, making it easy to edit several lines at once. This is especially useful for making the same change in multiple places without having to copy and paste.

How It Works:

Simply hold down the Alt key (or Option key on Mac) and click at the locations where you want additional cursors. Once you’ve placed them, you can start typing, and the changes will be reflected at all cursor positions.

Change repeating sections of code at once with shortcut key
Category: visual-studio-code
By: jeremy-one

1. Select the text you want to change in one you code that there is duplicates of.

2. Press Ctrl+D (Windows/Linux) or Cmd+D (Mac) to add the next section of code selected text to your selection.

3. Repeat Ctrl+D (Windows/Linux) or Cmd+D (Mac) to add more section of code.

4. Once you've selected all sections of code you want to change, simply start typing to replace the selected text with your desired new text.

Don't show the VS Code welcome screen
Category: visual-studio-code
By: jeremy-one

Go to File > Preferences > Settings and search "Startup Editor" Then choose "None" from the drop-down menu.

Keyboard shortcuts to auto format code in VS Code
Category: visual-studio-code
By: jeremy-one
On Windows Shift + Alt + F On Mac Shift + Option + F On Ubuntu Ctrl + Shift + I