WEBVTT

1
00:00:01.900 --> 00:00:09.100
So, the suggestions feature built into Cursor, where it tries to predict where to make code

2
00:00:09.100 --> 00:00:11.440
edits next, can be really powerful.

3
00:00:12.440 --> 00:00:14.660
But it's not all Cursor has to offer.

4
00:00:15.100 --> 00:00:17.820
Like GitHub Copilot, it also offers a chat.

5
00:00:17.980 --> 00:00:20.880
And like GitHub Copilot, you get two kinds of chat.

6
00:00:21.440 --> 00:00:26.280
You get an inline chat in the end, which you can open by pressing Command or Control K

7
00:00:26.280 --> 00:00:28.580
or whichever shortcuts are shown to you here.

8
00:00:29.240 --> 00:00:31.640
If you highlight some code, it opens this pop-up.

9
00:00:32.460 --> 00:00:35.840
This is the inline chat for editing instructions right in the editor.

10
00:00:37.320 --> 00:00:42.180
You can actually choose an AI model here, at least at the point of time where I'm recording

11
00:00:42.180 --> 00:00:44.040
this, but I'll go with the default one.

12
00:00:45.340 --> 00:00:49.080
And you can write your instructions here and then also add some extra context.

13
00:00:50.080 --> 00:00:56.280
You can hit the add symbol to, for example, reference a file, some other code, some documentation.

14
00:00:57.960 --> 00:01:00.660
Cursor has built-in documentation and you can also add more.

15
00:01:01.020 --> 00:01:02.060
I'll get back to that.

16
00:01:02.460 --> 00:01:10.860
You can add web search here really easy by bringing in the web as a resource and so on.

17
00:01:12.060 --> 00:01:14.180
Here, however, I don't need any of that.

18
00:01:14.240 --> 00:01:18.020
I'll just say add error handling and hit enter.

19
00:01:19.320 --> 00:01:20.640
And now it does just that.

20
00:01:20.700 --> 00:01:25.220
It updates the code, removes some code, adds some new code to handle errors.

21
00:01:26.800 --> 00:01:31.600
And just as with GitHub Copilot, we can accept these changes by pressing the button or using

22
00:01:31.600 --> 00:01:34.460
the shortcut or we can, of course, also reject them.

23
00:01:35.600 --> 00:01:36.920
Here I'll accept them.

24
00:01:37.440 --> 00:01:39.620
We could do this for other parts of the code as well.

25
00:01:39.880 --> 00:01:44.780
You can, of course, also highlight multiple functions in one go, for example.

26
00:01:45.460 --> 00:01:50.200
All that is possible and therefore this is kind of similar to what you had with GitHub

27
00:01:50.200 --> 00:01:55.980
Copilot, but nonetheless, it's a very powerful feature, especially since you have lots of

28
00:01:56.500 --> 00:01:57.540
extra resources.

29
00:01:57.820 --> 00:02:03.320
You can bring in extra files, specific parts of your code, specific function, for example,

30
00:02:03.380 --> 00:02:07.680
that it should take into account, which can be helpful if it's a bigger code file with

31
00:02:07.680 --> 00:02:11.260
lots of code in there and especially also the web and docs.

32
00:02:12.780 --> 00:02:16.000
And it's the docs part we'll explore next.

