🚀 在 VS Code 中

你的代码编辑器。由 AI 重新定义。

免费获取 Copilot

使用 VS Code 即表示你同意其许可协议隐私声明

选择适合你的模型

选择最适合你的项目和团队的模型,包括 GPT 4o 和 Claude Sonnet。

Dropdown menu in GitHub Copilot Chat displaying AI model options: 'GPT 4o' selected, with other options like 'Claude 3.5 Sonnet (Preview)', 'Gemini 2.0 Flash (Preview)', and 'o3-mini (Preview)' Dropdown menu in GitHub Copilot Chat displaying AI model options: 'GPT 4o' selected, with other options like 'Claude 3.5 Sonnet (Preview)', 'Gemini 2.0 Flash (Preview)', and 'o3-mini (Preview)'

你代码库的专家

Copilot 在本地为你的代码库建立索引,以了解相关内容,并将该上下文补充到与 Copilot 的交互中。

VS Code Copilot Edits prompt input with a working set of two files. The prompt message mentions #codebase and #file:HistoryView.swift for context. VS Code Copilot Edits prompt input with a working set of two files. The prompt message mentions #codebase and #file:HistoryView.swift for context.

根据你的需求个性化定制

Copilot 以你习惯的方式工作。使用有关你团队的工作流程、工具和项目的详细信息自定义 Copilot 的提示。

Settings JSON for copilot instructions, the first set to `use React functional components', then including another file for extra instructions 'code-style.md'. Settings JSON for copilot instructions, the first set to `use React functional components', then including another file for extra instructions 'code-style.md'.

在 Visual Studio Code 中激活 Copilot Free

无需试用。无需信用卡。只需你的 GitHub 帐户。

免费获取 Copilot

多文件编辑

用自然语言描述你想要构建的内容,Copilot Edits 会处理剩下的事情。Copilot Edits 可以在你的代码库中的多个文件之间进行更改,其 UI 专为快速迭代而设计。这是为你的应用程序添加新功能的最快方式。

使用 Copilot Edits 构建
VS Code window showing a code editor with projects.tsx open, alongside a Copilot Edits panel. The chat discusses modifications to make each project a link and add dynamic pages. Two files, projects.tsx and [slug].tsx, are in the working set, with GitHub Copilot suggesting edits. VS Code window showing a code editor with projects.tsx open, alongside a Copilot Edits panel. The chat discusses modifications to make each project a link and add dynamic pages. Two files, projects.tsx and [slug].tsx, are in the working set, with GitHub Copilot suggesting edits.

代码建议

Copilot 通过“下一步编辑建议”预测你的下一个想法。使用 Tab 键在编辑器中直接接受 AI 驱动的建议。“下一步编辑建议”会根据你正在进行的编辑智能地建议在文件中的何处以及进行哪些更改。

与 Copilot 结对编程
Code editor showing a JavaScript file post.js. It defines a render method that renders a social media post by calling an external API. Next Edit Suggestions is suggesting how to complete the implementation. Code editor showing a JavaScript file post.js. It defines a render method that renders a social media post by calling an external API. Next Edit Suggestions is suggesting how to complete the implementation.

使用任何语言进行编码

VS Code 支持几乎所有主要的编程语言。一些语言(如 JavaScript、TypeScript、CSS 和 HTML)已内置在其中,但其他语言的扩展可以在 VS Code 市场中找到。

JavaScript iconJavaScript
TypeScript iconTypeScript
Python iconPython
C# iconC#
C++ iconC++
HTML iconHTML
Java iconJava
JSON iconJSON
PHP iconPHP
Markdown iconMarkdown
Powershell iconPowershell
YAML iconYAML

完全可自定义

自定义你的 VS Code UI 和布局,使其适合你的编码风格。

颜色主题使你可以修改 VS Code 用户界面中的颜色,以适应你的偏好和工作环境。

设置同步使你可以使用设置同步功能在你的 VS Code 实例之间共享你的用户设置。

配置文件使你可以创建自定义设置集,并在它们之间快速切换或与他人共享。

Selecting the GitHub Dark theme with a quick pick Selecting the GitHub Dark theme with a quick pick

随时随地编码

无论你连接到云、远程存储库还是在浏览器中使用 VS Code for the Web (vscode.dev),都可以在你最高效的地方进行编码。

内置源代码控制为你提供开箱即用的 Git 支持。许多其他源代码控制提供程序可通过扩展获得。

GitHub Codespaces 为任何活动提供云驱动的开发环境 - 无论是长期项目,还是像审查拉取请求这样的短期任务。

vscode.dev in an Edge browser tab vscode.dev in an Edge browser tab

使用丰富的功能进行编码

编辑器的功能远不止这些。无论是使用内置功能还是丰富的扩展,总有适合每个人的功能。