You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/getstarted/getting-started.md
+31-9Lines changed: 31 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -305,19 +305,41 @@ There are many more debugging features in VS Code, such as watch variables, cond
305
305
306
306
## Enhance your coding with AI and GitHub Copilot
307
307
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.
309
309
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.
311
311
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.
317
313
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, selectthe _lightbulb_ icon, and thenselect**Fix with Copilot**.
334
+
335
+

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.
319
341
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).
0 commit comments