Vim Tutorial in 59 Minutes, Part — 1 Basics
Published in
2 min readJul 23, 2019
- Vim is a hell of an editor, which has a very steep learning curve, but very efficient when you are done with it.
Starting Editing in Vim
- editing from command-line
$ vi filename
- open a file inside vim, first entering vim using vi command then use :e command
$ vi:e filename
Saving file
- run following command from normal mode.
:w
Exiting Vim
- exiting after writing file or you haven’t changed anything
:q
- exiting without saving changes, changes will be lost
:q!
Vim Modes
Vim works on the principle of modality, so it has various modes,
- Insert mode — want to insert something
- Normal/command mode — want to run come command
- Visual mode — can mark some text and then can run some commands over them.
Navigating modes
- insert mode -> press ‘i’ from normal mode
- visual mode -> press ‘v’ from normal mode
- command/normal mode -> press ESC or Ctrl+[ from any other mode
Motion in Vim
- we can only move in normal/visual mode
- Checkout full tutorial on youtube
Please clap and subscribe on medium and youtube.
#HappyViming