What is a ‘workspace’ in Visual Studio Code?

What is a workspace? A project that consists of one or more root folders, along with all of the Visual Studio Code configurations that belong to that project. These configurations include: settings that should be applied when that project is open recommended extensions for the project (useful when sharing the configuration files with colleagues) project-specific … Read more

Remove trailing spaces automatically or with a shortcut

You can enable whitespace trimming at file save time from settings: Open Visual Studio Code User Settings (menu File → Preferences → Settings → User Settings tab). Click the icon in the top-right part of the window. This will open a document. Add a new “files.trimTrailingWhitespace”: true setting to the User Settings document if it’s … Read more

Multiline editing in Visual Studio Code

On Windows, you hold Ctrl+Alt while pressing the up ↑ or down ↓ arrow keys to add cursors. Mac: ⌥ Opt+⌘ Cmd+↑/↓ Linux: Shift+Alt+↑/↓ Note that third-party software may interfere with these shortcuts, preventing them from working as intended (particularly Intel’s HD Graphics software on Windows; see comments for more details). If you experience this … Read more

How do I hide certain files from the sidebar in Visual Studio Code?

You can configure patterns to hide files and folders from the explorer and searches. Open VS User Settings (Main menu: File > Preferences > Settings). This will open the setting screen. Search for files:exclude in the search at the top. Configure the User Setting with new glob patterns as needed. In this case add this … Read more

How can I customize the tab-to-space conversion factor?

By default, Visual Studio Code will try to guess your indentation options depending on the file you open. You can turn off indentation guessing via “editor.detectIndentation”: false. You can customize this easily via these three settings for Windows in menu File → Preferences → User Settings and for Mac in menu Code → Preferences → … Read more