Surviving in vim


made with by xaf

Vim reputation

Modes

Normal

Insert

Visual

Normal mode

Default mode

You can execute commands and move around the code

Come back here with

Insert mode

Tipical notepad mode

You can execute commands with key combinations

Use i

Visual mode

Mode of text selection

You can execute commands

Use v

Bonus: Command mode

You can execute more commands

Use :

Open file

:e gunit.md

Files

:w Write

:x Write & Exit

ZZ Write & Exit

:q Quit

:q! Quit without saving changes

Split screen

:sp file

:vsp file

Moving

hjkl

Try it in gmail or github :D

Moving II

w (word)

b (back)

gg (top)

G (botton)

0 (column 0)

$ (end of line)

Verbs

y (yank)

p (paste)

d (delete)

r (replace)

Mix things

2yy (yank 2 lines)

5pp (paste 5 lines)

2dd (delete 2 lines)

d2w (delete 2 words)

dtw (delete 2 words)

Search

/something

Replace

:%s/xavi/Xavi

Undo and redo

u (undoes)

Control-r (redoes)

Plugins

Config

/home/user/.vimrc

Allows you to tune vim, themes, install plugins, aliases, personal keystronkes, function...

Resources

:help

:help tutor

https://www.vimgolf.com

in terminal type: vimtutor

https://www.vim-adventures.com

Questions?