vscode

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Visual Studio Code

Visual Studio Code

VS Code is the industry standard editor. In 2025, it has evolved into an AI-First editor with a native AI Companion and generic Agent Mode.
VS Code是行业标准编辑器。到2025年,它已演变为一款AI优先的编辑器,内置原生AI助手和通用Agent Mode

When to Use

适用场景

  • Everyday Coding: TypeScript, Python, Go, Rust. It wins almost everywhere.
  • Remote Dev:
    Remote - SSH
    and
    Dev Containers
    are best-in-class.
  • AI-Assisted: GitHub Copilot integration is deepest here.
  • 日常编码:适用于TypeScript、Python、Go、Rust等几乎所有编程语言。
  • 远程开发
    Remote - SSH
    Dev Containers
    功能处于行业领先水平。
  • AI辅助开发:与GitHub Copilot的集成最为深入。

Quick Start

快速开始

json
// .vscode/settings.json
{
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "files.autoSave": "onFocusChange"
}
json
// .vscode/settings.json
{
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "files.autoSave": "onFocusChange"
}

Core Concepts

核心概念

Extensions

扩展

The ecosystem is the key. 50k+ extensions.
  • Python
    (Microsoft)
  • ESLint
    (Microsoft)
  • GitLens
扩展生态是关键,目前已有5万多个扩展。
  • Python
    (微软官方)
  • ESLint
    (微软官方)
  • GitLens

Dev Containers

开发容器(Dev Containers)

Define your dev environment in
.devcontainer/devcontainer.json
. VS Code spins up a Docker container and connects to it. 100% reproducible dev environments.
.devcontainer/devcontainer.json
中定义你的开发环境。VS Code会启动一个Docker容器并连接到它,实现100%可复现的开发环境。

Profiles (2025)

配置文件(Profiles,2025新功能)

Switch between "Work", "Personal", and "Demo" profiles with different settings/extensions enabled.
可在“工作”、“个人”和“演示”配置文件之间切换,每个配置文件启用不同的设置和扩展。

Best Practices (2025)

2025年最佳实践

Do:
  • Use Sync: Turn on Settings Sync (
    GitHub
    account) to keep keybindings across machines.
  • Use
    code .
    : Launch from terminal.
  • Use Inline Chat:
    Cmd+I
    to ask Copilot to refactor code in-place.
Don't:
  • Don't minimalize too much: Hiding the sidebar/activity bar makes you slower. Learn the toggle shortcuts (
    Cmd+B
    ) instead.
建议
  • 使用同步功能:开启设置同步(通过
    GitHub
    账户),在多台设备间保持快捷键一致。
  • 使用
    code .
    命令
    :从终端启动VS Code。
  • 使用内嵌聊天:按下
    Cmd+I
    让Copilot就地重构代码。
不建议
  • 不要过度精简界面:隐藏侧边栏/活动栏会降低操作效率,建议学习切换快捷键(
    Cmd+B
    )。

References

参考资料