1
00:00:00,050 --> 00:00:02,030
- [Instructor] There are many, many settings

2
00:00:02,030 --> 00:00:04,010
you can use in Vim.

3
00:00:04,010 --> 00:00:07,030
You can use the built in help system to view them all.

4
00:00:07,030 --> 00:00:10,070
Let's start Vim, and then, to access the help system,

5
00:00:10,070 --> 00:00:14,070
colon help, and we'll search for the topic.

6
00:00:14,070 --> 00:00:18,070
In our case, option summary.

7
00:00:18,070 --> 00:00:22,070
This gives us the summary of options that are available,

8
00:00:22,070 --> 00:00:26,050
but if we go down, we'll start to see the options.

9
00:00:26,050 --> 00:00:28,020
Here, we have aleph, which is

10
00:00:28,020 --> 00:00:30,060
a number, et cetera, et cetera.

11
00:00:30,060 --> 00:00:34,070
If you'd like to view the current settings, use set.

12
00:00:34,070 --> 00:00:37,090
Let's close this window, with colon close,

13
00:00:37,090 --> 00:00:41,040
and then, colon set, and enter,

14
00:00:41,040 --> 00:00:43,090
and we see the current set option.

15
00:00:43,090 --> 00:00:46,040
Number comes from our vimrc,

16
00:00:46,040 --> 00:00:49,030
and the rest are some defaults for the system,

17
00:00:49,030 --> 00:00:51,080
and again, enter to go back to Vim.

18
00:00:51,080 --> 00:00:54,000
Let's cover some useful options.

19
00:00:54,000 --> 00:00:57,010
By default, search in Vim is case sensitive.

20
00:00:57,010 --> 00:01:00,050
Let's open e sherlock.txt, and

21
00:01:00,050 --> 00:01:02,020
let's start looking for Sherlock.

22
00:01:02,020 --> 00:01:06,020
So, forward slash sherlock, and it doesn't find it,

23
00:01:06,020 --> 00:01:09,000
because Sherlock is written with a capital S.

24
00:01:09,000 --> 00:01:11,040
If you set the ignore case, or ic,

25
00:01:11,040 --> 00:01:13,070
you can have case insensitive search,

26
00:01:13,070 --> 00:01:19,050
so set ic, enter, and now, when we do sherlock,

27
00:01:19,050 --> 00:01:21,000
it will find it.

28
00:01:21,000 --> 00:01:22,080
Another thing you can do in search

29
00:01:22,080 --> 00:01:25,090
is to highlight the matches, so,

30
00:01:25,090 --> 00:01:30,010
set highlight search, and now we see

31
00:01:30,010 --> 00:01:32,020
that the search is highlighted.

32
00:01:32,020 --> 00:01:37,020
You can turn the current highlighting off with noh,

33
00:01:37,020 --> 00:01:41,050
and lastly in search, you can jump to matches as you search.

34
00:01:41,050 --> 00:01:44,060
Set incsearch, for incremental search,

35
00:01:44,060 --> 00:01:47,000
and now when I'm putting Sherlock,

36
00:01:47,000 --> 00:01:48,050
as I'm typing the search button,

37
00:01:48,050 --> 00:01:51,030
the editor jumps to the next match.

38
00:01:51,030 --> 00:01:54,010
Hit escape, and we're back.

39
00:01:54,010 --> 00:01:56,010
Vim uses its own clipboard.

40
00:01:56,010 --> 00:01:57,090
To integrate with the system clipboard,

41
00:01:57,090 --> 00:02:07,030
use set clipboard equal unnamedplus,

42
00:02:07,030 --> 00:02:11,010
and now, you can copy from other programs and paste in Vim,

43
00:02:11,010 --> 00:02:13,020
and the other way around.

44
00:02:13,020 --> 00:02:14,080
When working with code, you'd like

45
00:02:14,080 --> 00:02:16,020
to see syntax highlighting.

46
00:02:16,020 --> 00:02:24,000
Let's open, loaded by e, hello.py and now I'll write syntax

47
00:02:24,000 --> 00:02:27,040
on, and we see syntax highlighting.

48
00:02:27,040 --> 00:02:30,040
Vim comes with syntax highlighting to many languages,

49
00:02:30,040 --> 00:02:32,030
and has several color schemes we can use.

50
00:02:32,030 --> 00:02:38,000
For example colon colorscheme delek,

51
00:02:38,000 --> 00:02:39,070
and we change the color scheme.

52
00:02:39,070 --> 00:02:42,060
As you continue using Vim, you find the settings that are

53
00:02:42,060 --> 00:02:46,000
right for you, make sure to save them in your vimrc.

