DEV Community

Chandu
Chandu

Posted on • Updated on

Road to Vim Mastery Day 1

Yesterday while i was going through some videos(which i don't understand btw) i saw a video called vim for python. As i was feeling uncomfortable with using pycharm which takes a solid 2 min to load, i decided to check what this so called vim is ?. This is what i found out:

What is VIM ?

vim is fast command line based text editor (this is what my brain managed to understand after dabbling on google for 30 min. if you want formal definition go here

Why use VIM

Cause it is fast and powerful

as for why it is powerful, idk yet. it's like telling children rockets are powerful

My motivation to learn VIM

It looks cool

looks like software from hacker movies
Don't need a mouse when mastered, alteast that's what they said.

How I Started Learning

I found a website called VimGenius where you can practice your knowledge on vim.

well first you need to get the knowledge

So first download vim from here and install it with default settings(which means just keep pressing next button).

now follow the below steps:

  1. open cmd (press windows + r and type cmd and press enter)
  2. type vimtutor and a file containing commands that you need to know will open up.

Important step : take it slow, don't try to complete it in one day.
Practice so that they become a part of your instincts

What I learned on my first day

vim has two modes (for now i only know these two modes )

  1. Insert Mode
  2. Normal Mode

Insert Mode:

When you open a file using vim, you can't just starting typing like we used to do in notepad. first you have to enter insert mode by clicking i or I.

Without entering Insert mode, you are basically viewing a read-only file

Normal Mode:

This where you get to do the fun stuff, to enter this mode press esc ( a button at left most corner on top of your keyboard).

After enter esc key, you can enter following commands

:q

used to close a file

the : is not for decoration it is supposed to be typed

:q!
To close a file without saving, just in case you messed up your code

:w
To save changes to file but don't wanna close it.

:wq! or :x or :zz
To save changes and close file

x
To delete character at cursor (cursor is something your mouse location)

Navigation commands (use in normal mode)

h
Move cursor left

l
Move cursor right

j
Move cursor down

k
Move cursor up

Well that's it for day 1.

Zed

Top comments (0)