vscode
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseVisual 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: and
Remote - SSHare best-in-class.Dev Containers - 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.
- (Microsoft)
Python - (Microsoft)
ESLint GitLens
扩展生态是关键,目前已有5万多个扩展。
- (微软官方)
Python - (微软官方)
ESLint GitLens
Dev Containers
开发容器(Dev Containers)
Define your dev environment in . VS Code spins up a Docker container and connects to it. 100% reproducible dev environments.
.devcontainer/devcontainer.json在中定义你的开发环境。VS Code会启动一个Docker容器并连接到它,实现100%可复现的开发环境。
.devcontainer/devcontainer.jsonProfiles (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 (account) to keep keybindings across machines.
GitHub - Use : Launch from terminal.
code . - Use Inline Chat: to ask Copilot to refactor code in-place.
Cmd+I
Don't:
- Don't minimalize too much: Hiding the sidebar/activity bar makes you slower. Learn the toggle shortcuts () instead.
Cmd+B
建议:
- 使用同步功能:开启设置同步(通过账户),在多台设备间保持快捷键一致。
GitHub - 使用命令:从终端启动VS Code。
code . - 使用内嵌聊天:按下让Copilot就地重构代码。
Cmd+I
不建议:
- 不要过度精简界面:隐藏侧边栏/活动栏会降低操作效率,建议学习切换快捷键()。
Cmd+B