:help help
:help cursor-motions
- hjkl
- 0 $ _
- gg G
- w e b
- f t F T
- :number numberG
- {} ( avoid holding jk )
PRO TIP: ; to jump to next ocurrence
:help inserting
- I i a O o A
- x, xp ( AKA "the windows move", swaps to characters very quickly )
- r ( replace one chaacter )
Ever typed widht? try fhxp from the beginning of the line
dd J
- v
- V
:help text-objects
count + operator + motion
aw iw ap ap i([{t
- c - change
- d - delete ( when you delete, you copy! )
- y - yank ( copy )
PROTIP: paste over selected text
The power of .
- set @q ( fix macro )
- use :normal @q to apply macro line by line
/ n N ? .* ( poor man's fuzzy search )
- search word under cursor
CONFIG TIP: smartcase
:help jumps
- <c-[>
- gf
- g;
:s/foo/bar :s/foo/bar/g :%s/foo/bar/g
:%s/somematch/&Lol :%s/backreferences!/\1,\2
Use custom separators ( useful for URLs )
:%s!https?://www.google.com!http://www.duckduckgo.com!gc
CONFIG TIP: use smartcase BOOK: Mastering regular expressions
- s
- v
- c
- o
- hjkl
CONFIG TIP: remap hjkl
- " ( " / )
- navigate without cursors
- open command-line window ( edit commands in normal mode OMG )
- for keystrokes ( useful for macros, you'll see later )
- ( complete by word )
- ( complete file path, relative to current directory )
- ( complete a line )
- Use to go up and down