Skip to content

Commit b79e369

Browse files
authored
Merge pull request #7957 from microsoft/getting-started
Update Getting Started with Copilot
2 parents 40a4e36 + a525412 commit b79e369

File tree

11 files changed

+53
-19
lines changed

11 files changed

+53
-19
lines changed

docs/getstarted/copilot-quickstart.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
Order: 2
3+
Area: getstarted
4+
TOCTitle: Copilot Quickstart
5+
ContentId: b9184911-c822-4ea4-b19b-aba239313c88
6+
PageTitle: Get started with GitHub Copilot in VS Code
7+
DateApproved: 12/11/2024
8+
MetaDescription: Get started with GitHub Copilot in Visual Studio Code and create your first AI-powered suggestions in the editor.
9+
---
10+
# Quickstart: Getting started with GitHub Copilot in VS Code
11+
12+
This page is redirected to /docs/copilot/getting-started.md and only exists to keep the "Copilot Quickstart" TOC item.

docs/getstarted/getting-started.md

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -305,19 +305,41 @@ There are many more debugging features in VS Code, such as watch variables, cond
305305
306306
## Enhance your coding with AI and GitHub Copilot
307307
308-
With [GitHub Copilot](/docs/copilot/overview.md), you can further enhance your coding experience in VS Code and even discover VS Code features and settings you didn't know about.
308+
GitHub Copilot is an AI-powered assistant that helps you write code faster, and can help you with a wide range of tasks, such as code completion, code refactoring, and fixing errors.
309309
310-
GitHub Copilot in VS Code can help you with a wide range of tasks, such as:
310+
Let's get started by getting code suggestions from Copilot.
311311

312-
- **Code completion**: Get suggestions for lines of code or entire functions.
313-
- **Explain code**: Get explanations for code snippets to help you understand what they do.
314-
- **Code refactoring & generation**: Refactor your code and generate code-related artifacts like tests or documentation.
315-
- **Fix errors**: Get help with common coding tasks like finding and fixing bugs, or errors with shell commands.
316-
- **Learn about VS Code**: Ask about VS Code features, settings, or commands.
312+
1. Make sure you have set up Copilot in VS Code. Follow the steps in our [Copilot Setup](/docs/copilot/setup.md) guide.
317313

318-
<video src="./images/getting-started/copilot-chat-intro.mp4" title="Video showing Copilot Chat used for asking about VS Code, explaining what a project does, and generating unit tests." autoplay loop controls muted></video>
314+
> [!TIP]
315+
> If you don't have a Copilot subscription yet, you can use Copilot for free by signing up for the [Copilot Free plan](https://github.com/github-copilot/signup) and get a monthly limit of completions and chat interactions.
316+
317+
1. In the `hello.py` file, place the cursor at the end of the file and type this function header.
318+
319+
```python
320+
def say_day_of_week(date)
321+
```
322+
323+
GitHub Copilot will automatically suggest the rest of the function. Accept the code suggestion by pressing `kbstyle(Tab)`.
324+
325+
1. Next, let's invoke our new function.
326+
327+
```python
328+
say_day_of_week(date.today())
329+
```
330+
331+
Notice that there's a squiggle on the `date` keyword, indicating that there's an error.
332+
333+
1. Put the cursor, on the `date` keyword, select the _lightbulb_ icon, and then select **Fix with Copilot**.
334+
335+
![Screenshot that shows the lightbulb Code Action to fix an error with Copilot.](images/getting-started/code-action-fix-with-copilot.png)
336+
337+
GitHub Copilot will suggest a fix for the error. Select **Accept** if you're happy with the suggestion.
338+
339+
> [!TIP]
340+
> You can also use the `kb(editor.action.quickFix)` keyboard shortcut to manually trigger a quick fix.
319341
320-
> <a class="install-extension-btn" href="vscode:extension/GitHub.copilot">Install the GitHub Copilot extension</a>
342+
There's a lot more you can do with Copilot in VS Code. Discover more about GitHub Copilot in VS Code with our [Copilot Quickstart](/docs/copilot/getting-started.md).
321343

322344
## Next steps
323345

Lines changed: 3 additions & 0 deletions
Loading

docs/getstarted/images/getting-started/copilot-chat-intro.mp4

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/getstarted/introvideos.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
Order: 2
2+
Order: 3
33
Area: getstarted
44
TOCTitle: Intro Videos
55
ContentId: f29747b9-0f4f-4f62-b0a7-037ffc49d972

docs/getstarted/keybindings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
Order: 7
2+
Order: 8
33
Area: getstarted
44
TOCTitle: Key Bindings
55
ContentId: 045980C1-62C7-4E8E-8CE4-BAD722FFE31E

docs/getstarted/locales.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
Order: 8
2+
Order: 9
33
Area: getstarted
44
TOCTitle: Display Language
55
PageTitle: Visual Studio Code Display Language (Locale)

docs/getstarted/settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
Order: 6
2+
Order: 7
33
Area: getstarted
44
TOCTitle: Settings
55
ContentId: FDA6D86C-FF24-49BC-A1EB-E3BA43130FA0

docs/getstarted/telemetry.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
Order: 9
2+
Order: 10
33
Area: getstarted
44
TOCTitle: Telemetry
55
PageTitle: Visual Studio Code Telemetry

docs/getstarted/themes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
Order: 5
2+
Order: 6
33
Area: getstarted
44
TOCTitle: Themes
55
ContentId: CAC88BC7-90A5-4384-8A05-2187117C0F72

0 commit comments

Comments
 (0)