Getting started with Vim is not that hard than you heard.

For who want to use Vim. but afraid that Vim will slow your daywork.

Everyone heard… Vim is too hard but you know if you just start in the right way. It’s not that hard anymore. And you can use Vim instead of regular editor in a couple hours.

We can reduce this curve in a half. just start only what the starter should

Vim have a lot of command to do almost everything with keyboard

BUT You can imagine if you try to learn every command when you are a starter it absolutely TOO HARD because some command it’s not necessary. So if it not necessary why don’t you just leave them.

So how we can make Vim more EASIER. let’s see why some command it’s not necessary for starter.

Vim can move cursor by pressing “e” to go to end of word and “w” to go to next word. As you can see how far that your cursor go between “e” and “w” . IT JUST 2 SPACES. What if you just remember 1 command Just “w” only then use 2 space bar instead. After that if you remembered “w” you can try to use “E” in the future it optional to improve your skill. This is why some tutorials are misleading for starter.

JUST LEAVE THE COMMANDS THAT ALMOST THE SAME FOR NOW.

Ready now? Before we begin let setup some config for Mac user. In Mac we cannot repeat keyboard by default. So run this command in terminal then restart your Mac to repeat and spam a little bit Vim command and use Vim like a pro.

For this article I’ll cover 3 things.

As everyone know Vim have 3 modes. remember only the KEY of these.

First one is Normal mode. The key is to MOVE,DELETE cursor in your file.

Second is Insert mode. The key is to INSERT in your file.

Third is Visual mode. The key is to COPY,DELETE more text in your file.

As this type above i’ll go with simple subjects for you to EASY understand. WHAT REALLY EACH MODE DOES. and there is cover what we can do in normal editor.

Normal mode → Moving. everywhere in your file.

Normal mode → Deleting. this is why Vim is better then any editor

Insert mode → Insert. Typing text into your file.

Visual mode → Highlight. to copy or delete.

Visual mode → Copy (Normal mode → Paste)

Visual mode → Delete more text

Normal mode → Undo, Redo

If we can use all these then we can coding with Vim right?

Normal mode → MOVING

First let start with move around the file. Which is each characters.

h = left

j = down

k = up

l = right

If you want to move faster

ctrl+d = go down faster

ctrl+u = go up faster

gg = go top of file

G = go bottom of file

Just start with these and spam it to go wherever you wanted. not that hard right.

Next one if we’d like to move around in text area faster we can go with 2 commands

w = move forward to 1 word, W= remember it as GO Faster

b = move backward to 1 word, B= remember it backward faster

That’s it. For now if you try all these you can also spam these again, we can move around our whole file and text area also. It just a couple minutes. you can go anywhere and faster with a few commands.

Normal mode → Deleting

x = delete each character

dd= delete a line

D = delete all things after your cursor in a line

diw= delete a word that your cursor at.

Insert mode → INSERT

i = Enter insert and start where cursor at

I = Enter insert and start the beginning of line

A = Enter insert and start the end of line

Visual mode → Highlight.

v = Enter visual mode which is each character then you can use the same command in Normal → moving

V = Enter Visual mode inline which is you can use j to go down and k to go up.

Visual mode → Copy

y = copy your text highlighted then go to Normal mode

Normal mode → Paste

p = paste your yanked in normal

You can merge all command like V then y to copy whole line

optional in Normal mode you can quickly copy paste by

Y = copy whole line

p = paste whole line

Visual mode → Delete more text

x = delete text highlighted

Normal mode → Undo, Redo

u = undo

ctrl+r = redo

Thank you for reading until now. If you practice this I think it’ll take less than one hour. and you can use Vim for your daywork!!

You may have a question why we need to use Vim if it does like regular editors but slower. It because Vim learning curve is high but I summarize only what you can use and work without any effect. After this you can improve and learn more and more commands to make everything faster than any editor.

For more commands I may write part two but if you googling “Vim commands” there already have.

I only want someone that need to use Vim but afraid that Vim will slow down your daywork. So It’s NOT.

software developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store