A vim cheatsheet different to everyone else. It is a mindmap cheatsheet. It is still a draft.

Get Started. It's Free
or sign up with your email address
Rocket clouds
vim by Mind Map: vim

1. Insert mode

1.1. paste

1.1.1. ^R,"

1.2. change to normal mode

1.2.1. esc

2. Normal Mode

2.1. paste (put)

2.1.1. after p and move the cursor after the new text gp from register 'x' pux

2.1.2. before P and move the cursor after the new text gP from register 'x' pu!x

2.1.3. prepend "x to use register 'x'

2.2. quit

2.2.1. :q

2.2.2. without saving :q!

2.2.3. and save :wq :x ZZ

2.3. edit file

2.3.1. the same file :e

2.3.2. :e {filename}

2.4. delete

2.4.1. under and after the cursor x

2.4.2. before the cursor X

2.4.3. acordding to {motion} d{motion}

2.4.4. line dd

2.4.5. until end of line D

2.5. replace

2.5.1. character under the cursor r{new_char}

2.5.2. entering Insert Mode R

2.6. switch case

2.6.1. and move cursor right ~

2.6.2. acordding to {motion} g~{motion}

2.7. substitute

2.7.1. expression :[range]s:{pattern}:{string}:[options]

2.7.2. modifiers options confirm ignore errors replace all occurrences in the line ignore pattern case don't ignore pattern case print the line containing the last substitution range entire document last line of document line number mark between {a} and {b} ranges

2.8. copy (yank) text

2.8.1. according to {motion} y{motion}

2.8.2. line yy Y

2.8.3. prepend "x to use register 'x'

2.9. registers

2.9.1. select "{register}

2.9.2. view :reg

2.10. most of this actions can be prepended by a [count]

2.10.1. what is this [count] ? Is the number of times the action will be repeated, unless otherwise noticed.

2.11. change to insert mode

2.11.1. appending at current position a at end of the line A

2.11.2. inserting in current position i on start of the line I on new line below above

2.11.3. replacing R

2.12. undo

2.12.1. u

2.12.2. :u

2.12.3. all changes on the line U

2.13. redo

2.13.1. ^R

2.13.2. :r

2.14. repeat

2.14.1. last change .

2.15. move

2.15.1. up k

2.15.2. down j

2.15.3. left h

2.15.4. right l

2.15.5. to first char of line 0 non blank ^

2.15.6. to last char of line $

2.15.7. to char forward f and place the cursor on left backward F and place the cursor on left repeat latest move forward backward

2.15.8. to line [count] G gg

2.15.9. by words forward backward what are they? WORDS forward backward what are they? sentences forward backward paragraphs forward backward

2.16. marks

2.16.1. set m{a-zA-Z}

2.16.2. go to `{mark} first non blank char '{mark}

2.16.3. list :marks

2.17. search

2.17.1. forward /{pattern} latest pattern / and go {offset} lines up or down /{pattern}/{offset} word nearest to cursor *

2.17.2. backwards ?{pattern} latest pattern ? and go {offset} lines up or down ?{pattern}?{offset} word nearest to cursor #

2.17.3. repeat n opposite direction N

2.18. macro

2.18.1. record start q{letter} end q

2.18.2. apply @{letter} last applied macro @@

2.19. execute

2.19.1. global :g/{pattern}/{comands} not matching {pattern} :v/{pattern}/{comands}

2.20. re-indent

2.20.1. =

2.20.2. most useful with visual mode