1
00:00:00,060 --> 00:00:02,060
- [Instructor] Let's start and quit Vim.

2
00:00:02,060 --> 00:00:05,040
In the terminal, run Vim.

3
00:00:05,040 --> 00:00:08,040
You'll see a greeting message and nothing else.

4
00:00:08,040 --> 00:00:09,090
Vim has a minimal interface

5
00:00:09,090 --> 00:00:12,060
that keeps you focused on what you're doing.

6
00:00:12,060 --> 00:00:14,010
All the tilde signs mean

7
00:00:14,010 --> 00:00:16,050
that there are lines not yet inserted.

8
00:00:16,050 --> 00:00:20,030
You have an empty file, but the editor itself is bigger.

9
00:00:20,030 --> 00:00:24,010
If you'll try writing text, it might or might not work.

10
00:00:24,010 --> 00:00:26,090
This is due to the fact that you are in normal mode.

11
00:00:26,090 --> 00:00:30,040
We'll talk about normal and other modes in another chapter.

12
00:00:30,040 --> 00:00:33,040
To quit Vim, first hit Escape.

13
00:00:33,040 --> 00:00:36,070
If you don't have Escape key, you can use Control + C.

14
00:00:36,070 --> 00:00:39,020
If you press Control + C again,

15
00:00:39,020 --> 00:00:41,020
you will see a message down below

16
00:00:41,020 --> 00:00:43,040
that tells you how to quit Vim.

17
00:00:43,040 --> 00:00:49,050
Follow the message, and type :qa!

18
00:00:49,050 --> 00:00:51,040
and then Enter.

19
00:00:51,040 --> 00:00:53,080
And we're back at the command prompt.

20
00:00:53,080 --> 00:00:58,020
Let's understand what :qa! means.

21
00:00:58,020 --> 00:01:01,060
Colon is the prefix for entering EX command.

22
00:01:01,060 --> 00:01:04,080
This is also known as command-line mode.

23
00:01:04,080 --> 00:01:08,020
Q is a shortcut for the quit command.

24
00:01:08,020 --> 00:01:10,090
A means all buffers.

25
00:01:10,090 --> 00:01:13,050
You can have several files open in Vim,

26
00:01:13,050 --> 00:01:15,050
and you'd like to quit all of them.

27
00:01:15,050 --> 00:01:18,070
An exclamation mark usually means force.

28
00:01:18,070 --> 00:01:21,000
In your case, it will tell Vim to quit

29
00:01:21,000 --> 00:01:24,070
even if there are some changes that you have not saved yet.

30
00:01:24,070 --> 00:01:26,080
Quitting Vim was not that hard.

31
00:01:26,080 --> 00:01:31,010
You just need to remember :qa!.

32
00:01:31,010 --> 00:01:33,000
Once you know the meaning of this,

33
00:01:33,000 --> 00:01:36,000
quit all now, it makes sense.

