WEBVTT

1
00:00:00.600 --> 00:00:03.210
<v Instructor>Now this auto completion feature</v>

2
00:00:03.210 --> 00:00:05.340
also got smarter over time

3
00:00:05.340 --> 00:00:08.970
and it can do even more than just complete the line

4
00:00:08.970 --> 00:00:11.820
or the code block you are currently working on.

5
00:00:11.820 --> 00:00:13.110
And I want to show you what I mean.

6
00:00:13.110 --> 00:00:15.930
And for that, I want to go to my settings here,

7
00:00:15.930 --> 00:00:19.440
my user settings, in Visual Studio Code,

8
00:00:19.440 --> 00:00:21.150
and I'll search for GitHub Copilot here

9
00:00:21.150 --> 00:00:24.300
to view the GitHub Copilot specific settings.

10
00:00:24.300 --> 00:00:27.480
And those settings will change over time.

11
00:00:27.480 --> 00:00:28.650
I'll say that right away.

12
00:00:28.650 --> 00:00:30.300
The settings you are seeing here

13
00:00:30.300 --> 00:00:32.760
will likely differ from the settings you are seeing

14
00:00:32.760 --> 00:00:36.540
because new features are added all the time.

15
00:00:36.540 --> 00:00:38.010
Not all of them matter of course,

16
00:00:38.010 --> 00:00:39.780
but some are quite interesting.

17
00:00:39.780 --> 00:00:44.190
For example, one feature that is quite interesting

18
00:00:44.190 --> 00:00:47.970
is the next edit completion setting.

19
00:00:47.970 --> 00:00:50.190
Now in general, when you search for GitHub Copilot,

20
00:00:50.190 --> 00:00:52.560
you can configure all kinds of things.

21
00:00:52.560 --> 00:00:54.690
You can in general turn it on or off,

22
00:00:54.690 --> 00:00:57.753
or control for which code files it should become active.

23
00:00:58.950 --> 00:01:00.810
You can add an instruction file,

24
00:01:00.810 --> 00:01:03.063
which is something I'll get back to later.

25
00:01:03.960 --> 00:01:06.633
And if you scroll down further,

26
00:01:07.920 --> 00:01:10.500
at some point you might find

27
00:01:10.500 --> 00:01:13.770
this Next Edit Suggestions setting.

28
00:01:13.770 --> 00:01:15.750
You also might not find it,

29
00:01:15.750 --> 00:01:17.760
because right now when I'm recording this,

30
00:01:17.760 --> 00:01:20.550
this is a preview setting.

31
00:01:20.550 --> 00:01:23.730
It might already be stabled and turned on by default

32
00:01:23.730 --> 00:01:26.730
and deeply integrated into GitHub Copilot

33
00:01:26.730 --> 00:01:29.850
by the point of time you're watching this, of course.

34
00:01:29.850 --> 00:01:32.040
Now I have already enabled it.

35
00:01:32.040 --> 00:01:34.170
You might still need to do that.

36
00:01:34.170 --> 00:01:37.440
And what's that setting all about?

37
00:01:37.440 --> 00:01:42.440
Well, with it enabled, if I go back to my code,

38
00:01:42.510 --> 00:01:45.030
let's say I'm changing this variable,

39
00:01:45.030 --> 00:01:49.800
this name here from F, to Fahrenheit.

40
00:01:49.800 --> 00:01:51.060
Now I'm getting a completion here,

41
00:01:51.060 --> 00:01:54.030
I can accept it, but this was only this one line,

42
00:01:54.030 --> 00:01:56.490
but that's what happens thereafter,

43
00:01:56.490 --> 00:01:59.550
of course not guaranteed, but quite likely.

44
00:01:59.550 --> 00:02:02.040
I am getting a suggestion not for the line

45
00:02:02.040 --> 00:02:03.900
my cursor is currently in,

46
00:02:03.900 --> 00:02:07.170
but for the next edit I likely want to make.

47
00:02:07.170 --> 00:02:10.590
So GitHub Copilot understands my code base,

48
00:02:10.590 --> 00:02:12.810
which arguably isn't too complex here,

49
00:02:12.810 --> 00:02:16.560
but it will also work in more complex code bases of course,

50
00:02:16.560 --> 00:02:21.030
and it suggests the next edit I likely want to make,

51
00:02:21.030 --> 00:02:24.873
in this case, I likely also wanna rename it down here.

52
00:02:26.250 --> 00:02:28.740
Now I can hover over this icon which popped up here

53
00:02:28.740 --> 00:02:31.350
on the left end, then accept this.

54
00:02:31.350 --> 00:02:33.510
Alternatively, I can hit Tab,

55
00:02:33.510 --> 00:02:37.110
I can reject it, or click Escape,

56
00:02:37.110 --> 00:02:40.500
or configure that in greater detail.

57
00:02:40.500 --> 00:02:43.020
So for example, whether it should also

58
00:02:43.020 --> 00:02:46.050
shift existing code to make room for the suggestions

59
00:02:46.050 --> 00:02:48.180
so that I can see both the suggestion

60
00:02:48.180 --> 00:02:51.003
as well as my existing code, and so on.

61
00:02:51.900 --> 00:02:56.280
So, if I again, try to trigger that,

62
00:02:56.280 --> 00:03:00.990
now I can hit Tab, and it will make that edit,

63
00:03:00.990 --> 00:03:02.850
so it predicted my next edit.

64
00:03:02.850 --> 00:03:06.360
And that is a feature that can, again,

65
00:03:06.360 --> 00:03:08.940
tremendously boost your productivity

66
00:03:08.940 --> 00:03:12.930
because you can move through a bigger code file

67
00:03:12.930 --> 00:03:16.710
quite efficiently and make edits quickly

68
00:03:16.710 --> 00:03:19.170
by taking advantage of this feature,

69
00:03:19.170 --> 00:03:22.380
because you don't have to manually navigate around

70
00:03:22.380 --> 00:03:26.400
and wait for GitHub Copilot to suggest changes

71
00:03:26.400 --> 00:03:28.410
in the line you're currently working in.

72
00:03:28.410 --> 00:03:30.180
Instead, it can already predict

73
00:03:30.180 --> 00:03:33.330
and suggest the next change you likely want to make.

74
00:03:33.330 --> 00:03:35.280
So of course, I can now also go back

75
00:03:35.280 --> 00:03:38.040
to F instead of Fahrenheit.

76
00:03:38.040 --> 00:03:39.390
Here it did not pick it up,

77
00:03:39.390 --> 00:03:41.910
but it also might have picked it up for you.

78
00:03:41.910 --> 00:03:44.850
So that's another nice feature worth knowing about.

79
00:03:44.850 --> 00:03:48.060
It's also a feature we'll see again later,

80
00:03:48.060 --> 00:03:49.770
when we dive into cursor,

81
00:03:49.770 --> 00:03:53.280
because cursor kind of invented that feature

82
00:03:53.280 --> 00:03:55.593
and it is pretty neat indeed.

