1
00:00:00,050 --> 00:00:01,060
- [Instructor] When you look at text,

2
00:00:01,060 --> 00:00:03,060
it has a certain structure.

3
00:00:03,060 --> 00:00:06,060
There are words, sentences, and paragraphs.

4
00:00:06,060 --> 00:00:09,020
Vim recognizes these text objects

5
00:00:09,020 --> 00:00:11,020
and can use them to move around.

6
00:00:11,020 --> 00:00:13,020
Let's open sherlock.txt.

7
00:00:13,020 --> 00:00:17,000
Vim sherlock.txt.

8
00:00:17,000 --> 00:00:19,010
As usual, you start in normal mode

9
00:00:19,010 --> 00:00:21,020
and at the beginning of the file.

10
00:00:21,020 --> 00:00:23,010
Now hit "w".

11
00:00:23,010 --> 00:00:25,010
You see it moved to the next word.

12
00:00:25,010 --> 00:00:28,070
Unsurprisingly, "w" stands for word.

13
00:00:28,070 --> 00:00:32,030
W will move you to the beginning of the next word.

14
00:00:32,030 --> 00:00:35,050
If you want to move to the end, use "e",

15
00:00:35,050 --> 00:00:38,020
which is short for end.

16
00:00:38,020 --> 00:00:39,040
You can prefix the number of times

17
00:00:39,040 --> 00:00:41,070
you'd like to execute the command.

18
00:00:41,070 --> 00:00:46,010
So four and then w will move us four words.

19
00:00:46,010 --> 00:00:48,050
A sentence is defined as sequence of words

20
00:00:48,050 --> 00:00:51,070
ending with a dot, and exclamation mark,

21
00:00:51,070 --> 00:00:54,010
or a question mark followed by

22
00:00:54,010 --> 00:00:57,060
either the end of line or a space or a tab.

23
00:00:57,060 --> 00:01:01,040
To move between sentences, you use regular braces.

24
00:01:01,040 --> 00:01:04,010
The closing brace moves to the next sentence.

25
00:01:04,010 --> 00:01:05,070
Think of the shape of the brace

26
00:01:05,070 --> 00:01:08,040
and you will see the direction you're going.

27
00:01:08,040 --> 00:01:12,060
So, closing brace, and we are at the next sentence.

28
00:01:12,060 --> 00:01:15,060
And use the open brace to move to the previous sentence.

29
00:01:15,060 --> 00:01:20,010
So open brace and we're back at the previous sentence.

30
00:01:20,010 --> 00:01:22,040
And finally, paragraphs.

31
00:01:22,040 --> 00:01:25,040
A paragraph begins after an empty line

32
00:01:25,040 --> 00:01:27,050
and it ends with an empty line.

33
00:01:27,050 --> 00:01:30,090
You move between paragraphs with the curly braces.

34
00:01:30,090 --> 00:01:34,000
The closing one move us to the next paragraph.

35
00:01:34,000 --> 00:01:35,030
Closing braces.

36
00:01:35,030 --> 00:01:37,020
And the opening curly brace

37
00:01:37,020 --> 00:01:39,050
moves us to the previous paragraph.

38
00:01:39,050 --> 00:01:41,010
Open curly brace.

39
00:01:41,010 --> 00:01:43,010
As you can see, Vim makes it super easy

40
00:01:43,010 --> 00:01:46,000
to navigate between parts of text.

