What's Vim?
This web page explores the basic functionality of Vim.
Vim is a text editor. Everybody loves Vim! Read more: here!
Using Vim
- Normal Mode (Press esc)
- navigate - h (left), j (down), k (up), l (right)
- move to beginning of next word - w
- move to beginning of previous word - b
- move to start of line - 0
- move to end of line - $
- go first line - gg
- go last line - G
- Editing Operations (Normal Mode)
- insert before the cursor - i
- append after the cursor - a
- delete single character under cursor - x
- delete word - dw
- delete (cut) current line - dd
- yank (copy) current line - yy
- paste (put) after cursor - p
- undo last action - u
- replace a single character - r
- Saving and Quitting
- save the file - :w
- quit vim - :q
- save and quit - :wq
- quit without saving changes - :q!
- Searching
- search for "text" (forward) - /text
- search for "text" (backward) - ?text
- next match - n
- previous match - N