1
00:00:00,050 --> 00:00:02,000
- [Instructor] In many cases,

2
00:00:02,000 --> 00:00:03,060
you'll get some data in an archive

3
00:00:03,060 --> 00:00:05,030
such as a zip file.

4
00:00:05,030 --> 00:00:07,040
Instead of unzipping the file to a directory,

5
00:00:07,040 --> 00:00:09,080
viewing, and maybe making changes,

6
00:00:09,080 --> 00:00:12,060
you can do everything directly in Vim.

7
00:00:12,060 --> 00:00:16,020
Note, on Linux and Windows make sure you have the zip

8
00:00:16,020 --> 00:00:18,070
and unzip utilities installed.

9
00:00:18,070 --> 00:00:20,000
Open weather.zip.

10
00:00:20,000 --> 00:00:23,040
So Vim weather.zip.

11
00:00:23,040 --> 00:00:24,080
And we see a list of files.

12
00:00:24,080 --> 00:00:28,030
You can move up and down with j and k.

13
00:00:28,030 --> 00:00:31,090
To open a file, stand on it and hit enter.

14
00:00:31,090 --> 00:00:34,060
And you will view the content of the file.

15
00:00:34,060 --> 00:00:38,030
To exit, type column + q + enter.

16
00:00:38,030 --> 00:00:41,010
Now let's open a file and make some changes.

17
00:00:41,010 --> 00:00:45,000
Let's go to weather five with j,

18
00:00:45,000 --> 00:00:46,050
hit enter.

19
00:00:46,050 --> 00:00:49,040
And then I'm going to go one line down with j

20
00:00:49,040 --> 00:00:50,070
to the end of the line

21
00:00:50,070 --> 00:00:51,090
with dollar.

22
00:00:51,090 --> 00:00:53,060
And change the last character to nine

23
00:00:53,060 --> 00:00:56,030
with power + nine.

24
00:00:56,030 --> 00:00:57,070
Now we can save the changes

25
00:00:57,070 --> 00:00:59,060
with column + w

26
00:00:59,060 --> 00:01:04,010
and exit, column + q + a + enter.

27
00:01:04,010 --> 00:01:05,050
If you'll open zip again.

28
00:01:05,050 --> 00:01:08,020
Vim weather.zip

29
00:01:08,020 --> 00:01:09,090
and open our file.

30
00:01:09,090 --> 00:01:10,090
And we'll go to the end.

31
00:01:10,090 --> 00:01:13,070
We'll see that our changes has persisted.

32
00:01:13,070 --> 00:01:15,050
This is a very handy feature in Vim.

33
00:01:15,050 --> 00:01:17,010
And you'll find it will save you time

34
00:01:17,010 --> 00:01:19,000
when working with zip or power files.

