Visual Studio Code Documentation

Comprehensive guides for developers

Visual Studio Code - Basic Editing

This guide covers the fundamental editing features in Visual Studio Code (VS Code), empowering you to navigate, select, and manipulate code efficiently. Mastering these basics is key to a productive development workflow.

Core Editing Features

Advanced Editing Techniques

Multiple Cursors and Selections

VS Code's multi-cursor support is a game-changer for repetitive tasks. You can:

Code Folding

Collapse and expand code blocks to declutter your view. Hover over the gutter to the left of the line numbers to reveal folding icons (- to collapse, + to expand). You can also use Ctrl+Shift+[ to fold, and Ctrl+Shift+] to unfold. Folding all code blocks can be done with Ctrl+K Ctrl+0 and unfolding all with Ctrl+K Ctrl+Shift+0.

Auto-Closing Brackets and Quotes

By default, VS Code automatically closes brackets, parentheses, and quotes as you type them. This feature can be toggled in the settings.

Indentation and Formatting

Maintain consistent code style with VS Code's powerful indentation and formatting tools.

Find and Replace

Efficiently search and modify text within your files.

Emmet Snippets

VS Code has built-in support for Emmet, allowing you to write HTML and CSS much faster using abbreviations. For example, typing div.container>ul>li*5>a{Item $} and pressing Tab will generate a complete HTML structure.

Tips for Efficient Editing