Hello folks.
We have learned vi editor and now it's time to
look at the difference between vi and vim editor.
As far as the functionality is concerned,
both editors work in the same manner.
Which editor you choose is a
matter of your personal choice.
Some people recommend learning the vim
editor instead of the vi editor.
Now of course, due to its added feature, the learning and
using vim editor is much easier than the vi editor.
Now, if it is easier then why we were using vi
in the first place. The reason we were using vi in
the first place is because vi was the first one that
was introduced when the Linux or Unix was born.
Now, a lot of times you're going to find, supporting
an operating system, maybe like an older version of operating
system, maybe Solaris or AIS or HPUX, older Unix type
of operating system, they're probably not going to have vim
then you have to use vi.
Now the difference, do I have to learn
vim as completely new command or new tool?
Absolutely not.
If you have learned vi, then you have
learned vim as well, but you probably not
have learned it's enhanced feature.
That is why it says that if you have learned vim first,
which has a lot of new features, and then you go to
vi, that means you don't have to go back to vi.
All right, next one is since vim is based on
the vi, so when you learn how to use vim
editor, you will automatically learn how to use vi editor.
It's just that simple.
As I explained it earlier, vim has all
the features as vi with some excellent addition.
And there's also a comprehensive help system and a
lot of customization options available in the vim editor.
Now, let's look at the difference
between vi and vim editor,
the main difference.
Now I got this picture which
is very informative picture from online.
So let's look at a few things
that vi has to offer today.
It is installed on a lot of places, it has
a shorter name, and it is simpler to use.
And the combined feature for vi
and vim, let's look at them.
Both are small, both are ubiquitous, meaning that
both are available pretty much on a lot
of operating system, intuitive command language.
It has a learning curve and a powerful once you learn it.
So one way or the other, whether you learn vi or
vim, you will have the power once you learn it.
Now, if you wanted to learn of vim, you're
going to find a lot of new features that
are listed on the right hand side.
And one of them is the completion, which is that
you can autocomplete your command or your word or
as if you were typing in bash, you hit tab,
it autocompletes, pretty much the same way.
Then you have spell check. Beautiful.
So if you are typing a word and
you want to put in spell check,
it is available now, in vi
it was not available. But it's good,
the spell check is there but I do not find
[Author mumbling]
like a strong reason to do a spell check.
The reason because we do a
lot of configuration file changes.
So in configuration file a lot
of words don't even make sense.
But anyway, it's good to have a spell check
whenever we are editing, comparison, merging, unicode, vimdiff,
regular expression, scripting language, supports many different ones
plugins, it has a GUI, folding, and a syntax
highlighting, a lot of these new features.
Now if I go into each one of them it's
going to take me a lot longer but I want
you to go ahead and explore it yourself.
But what I could do here is I could
give you some of the information that will help
you to understand and learn vim editor, and all
its new features that it has to offer.
Let me give you the vim interactive learning tool.
But of course you could go online and
you could find a lot of tools.
You type vim editor tutorials, you're going to find
tons of resources, even people have written books on
vim, and you're going to find even a single
entire course, maybe 10-20 hours just on vim.
So the more you want it to learn,
the more you want to dig in,
it's pretty much the same.
As I said, I would always recommend that you
use a basic way of using vim or vi.
So let's get into those tools.
There are many websites that offer free vim interactive
training, and these websites are of course they
are free and people have done an amazing
job when they actually have built those interactive
tools for people to actually learn that.
Now one of my favorite is the www.openvim.com.
This website has an interactive tool which helps you learn vim
or vi editor a lot faster, and I would definitely recommend you
to please go ahead and try it out and you're going
to find it a lot easier than actually going through a
document or going through a tutorial or a video.
Next one is a vimgenius.com, which also is a
good interactive tool that you can learn from.
And the last one is vim-adventures.com, which actually
teaches you the vim editor through the game.
So if you're into games, you could play games as
well as you could learn vim editor as well.
So let me go into the openvim first,
so I could show you how it works.
So go to the browser and right
here I have openvim already entered.
I'm just going to refresh it, and
it's going to start the introduction.
And you see on top this is the interactive
screen for you and the bottom is the keyboard.
It's going to prompt you to enter the highlighted keys and
it's going to ask you to type it on the screen.
So let me read it the first time you're going to log in.
It's going to say, Hello. I am an interactive Vim tutorial.
I'll teach you what Vim is about without hassle.
Perfect. Nobody wants Hassle.
If you are in a hurry, press any key to fast forward.
What it means is if you want to go
directly into these different lectures or interactive sessions, then
you could just hit the spacebar, sorry any key to fast forward.
But I would not recommend it, you go through it.
Just spend some time and believe me, it's not
going to take you longer to go through the
first introduction section. To practice what you've learned,
try out practice page.
It has context sensitive reference for commands.
Now, let me introduce you to the basic of Vim.
Now see it's highlighting or blinking the enter key.
So what it's asking you to do is hit enter.
Once you hit enter, it says, Vim has two basic mode.
One is insert mode, in which you write text
as if in normal text editor, excuse me.
And, Another is normal mode which provides you
efficient way to navigate and manipulate text.
So we already know that you type i to get
into the interactive mode or where you type it in
and you hit Escape to get out of that.
So now the fifth line says, Let's try
it out! First, change to insert mode.
So it's asking me to hit i.
Go ahead on i on your keyboard. Good,
now your're in insert mode.
Write something and change back to normal mode.
Okay, hello.
And I wrote that and then I'm going to hit Escape.
Good. Let's move on to another section. Beautiful.
Let's hit enter.
In contrast to regular text editor, you use keys H, J, K,
and L, instead of arrow keys to move cursor.
As I explained that earlier as well, try not
to use the left, up, down, and right keys.
I would suggest and definitely strongly recommend that you
use H, J, K, L keys to navigate left to right.
So basically here it's actually teaching you
how you could use these interactive keys.
Again, as you could see, we are
already on the third interactive session.
All you have to do is go to up to 19.
The last one is the 20th and try that out.
It's not going to take you longer and you're
going to find it so easy to learn a
vim editor right here on this interactive tool.
The second one I explained to you is the vimgenius.
So if you go to vimgenius.com, and it's going
to say become a Vim Genius, click Start
Now, I'm a beginner.
I'm experienced.
If you are a beginner, pick the first one or
the second one if you have some experience already.
Now, before you start, this is what it's telling
you about the main keys in the vi vim editors.
So go ahead and Start Level 1.
And now it says Move cursor to left, look at this
top. Left is the H key.
So when I do H, it says h is correct!
Press Enter or click Next to continue.
Insert at beginning of line.
So insert at the beginning of line is
i or is it i or o,
so I think. Append the cursor so,
so it's giving me the next line.
Anyway, I was thinking i, hit enter,
so Append at cursor is usually a.
So hit a, and it says a is correct!
Press Enter or click Next. Append at end of line.
So it's going to keep asking you these questions and you're
going to have to press the keys on your keyboard.
And the third one, as I said, I've never used it.
It's actually, Learning VIM while playing a game.
So you could actually say press any key.
So I'm going to hit enter and it's going to say
h, k, l, j as my navigating keys up, left, right, and bottom.
And you could go left, right, bottom.
This is your cursor and you could
learn as you go through it.
So I never use it.
Try it out and if you like it, let
me know and provide your feedback on that.
Anyway, this is all about
the vim interactive learning tool.
I hope you find this lecture valuable and you could
use these open free tools online to learn vim.
If you have any questions, I'm always here, ask me.
Send me a message.
Send me a message on Udemy, or send me an email.
Thank you and good luck.
[No audio]