1
00:00:00,050 --> 00:00:02,040
- [Instructor] Vim lets you map keys to actions

2
00:00:02,040 --> 00:00:05,060
and even remap existing keys to new actions.

3
00:00:05,060 --> 00:00:08,000
Let's open sherlock.txt.

4
00:00:08,000 --> 00:00:11,070
Vim sherlock.txt.

5
00:00:11,070 --> 00:00:15,010
To scroll down, use control + F.

6
00:00:15,010 --> 00:00:17,000
Using browsers, gotten used to

7
00:00:17,000 --> 00:00:19,050
hit the space bar to scroll down.

8
00:00:19,050 --> 00:00:21,070
It's easy to add this to Vim.

9
00:00:21,070 --> 00:00:28,000
Colon noremap then the key space

10
00:00:28,000 --> 00:00:31,090
and then the designated key Control + F.

11
00:00:31,090 --> 00:00:33,090
And enter.

12
00:00:33,090 --> 00:00:38,010
I won't get into why we using noremap and not just remap.

13
00:00:38,010 --> 00:00:40,060
If you're curious, read the help.

14
00:00:40,060 --> 00:00:44,030
And now you can use space to scroll down.

15
00:00:44,030 --> 00:00:46,080
Again, you can add this to your Vimrc.

16
00:00:46,080 --> 00:00:52,070
So edit on directory .vimrc and o for insert mode

17
00:00:52,070 --> 00:00:57,080
and then noremap space Control + F

18
00:00:57,080 --> 00:01:03,030
and a comment "use space to scroll down".

19
00:01:03,030 --> 00:01:05,040
Now escape to get back to normal mode.

20
00:01:05,040 --> 00:01:07,080
Colon wq.

21
00:01:07,080 --> 00:01:10,060
And now when I do Vim sherlock.txt,

22
00:01:10,060 --> 00:01:14,000
I can start using the space to scroll down.

