1
00:00:00,050 --> 00:00:02,060
- [Instructor] Open success.text.

2
00:00:02,060 --> 00:00:06,000
Vim success.txt.

3
00:00:06,000 --> 00:00:09,050
Say you'd like to change problems to challenges.

4
00:00:09,050 --> 00:00:11,040
First you'll move to problems

5
00:00:11,040 --> 00:00:12,090
with a regular expression,

6
00:00:12,090 --> 00:00:16,040
forward slash + p + enter.

7
00:00:16,040 --> 00:00:19,060
Now if you do d w to delete the word,

8
00:00:19,060 --> 00:00:21,020
it will delete the word,

9
00:00:21,020 --> 00:00:23,020
but you're still in normal mode,

10
00:00:23,020 --> 00:00:25,000
which means you have to press I

11
00:00:25,000 --> 00:00:27,010
to enter instant mode.

12
00:00:27,010 --> 00:00:29,010
For this we have the c command.

13
00:00:29,010 --> 00:00:31,010
The c command stands for change.

14
00:00:31,010 --> 00:00:32,070
It will delete the part of the text

15
00:00:32,070 --> 00:00:34,080
and will drop you to instant mode

16
00:00:34,080 --> 00:00:37,090
at the same time, c w.

17
00:00:37,090 --> 00:00:39,060
And now that you're in instant mode,

18
00:00:39,060 --> 00:00:42,090
you can write your changes, challenges.

19
00:00:42,090 --> 00:00:44,080
The first version was better.

20
00:00:44,080 --> 00:00:47,040
Hit escape to get back to normal mode

21
00:00:47,040 --> 00:00:49,030
and u to undo.

22
00:00:49,030 --> 00:00:50,060
As with other commands,

23
00:00:50,060 --> 00:00:53,020
you can use any motion with c.

24
00:00:53,020 --> 00:00:54,080
Let's change the first part

25
00:00:54,080 --> 00:00:56,080
up to have.

26
00:00:56,080 --> 00:01:00,000
Move to the beginning of the line with zero

27
00:01:00,000 --> 00:01:03,060
and then c + forward slash + h

28
00:01:03,060 --> 00:01:10,020
which means change up to where you find an h, and enter.

29
00:01:10,020 --> 00:01:12,070
And now we can write you should.

30
00:01:12,070 --> 00:01:16,000
Let's get back to the original text and quit.

31
00:01:16,000 --> 00:01:19,040
First escape, to get into normal mode.

32
00:01:19,040 --> 00:01:21,050
And then view to undo.

33
00:01:21,050 --> 00:01:25,000
And then column + q to quit.

