Summarized: How to Use Vim — Tutorial
Insert mode
i → Type at the cursoresc → Escape any modea → After the cursorI → Type at the beginning of the line of the cursorA → Type at the end of the line of the cursoro → Type at a new line after the cursorO → Type at a new line before the cursor
Navigating
gg → Brings the cursor to the beginning of the fileG → Brings the cursor at the end of the file$ → Brings cursor at the end of a line0 → Brings cursor at the start of a line{ → Next space on a paragraph on a upward direction} → Next space on a paragraph on a downward directionw→ Go to next word (Rightside)W → Go to next word seperated by a space (Rightside)b → Go to previous word (Leftside)B → Go to previous word seperated by a space (Leftside)
Searching
f → Finds the associated character starting at the right side of the cursor. E.g. fa birngs cursor to the next “a”F → Finds the associated character starting at the left side of the cursor/ → Finds a word
n→ Circles through found word; progresses on rightN→ Circles through found word; progresses on left
# → Finds a words similar to word at cursor
#→ Again to progress leftwards
* → Finds a words similar to word at cursor
*→ Again to progress rightwards
Editing
d → Delete something, it should be combined with a navigation command
dw→ Delete a word at cursord{→ Delete entire paragraph
df) → Deletes everything up until ), including ).dt) → Deletes everything up until ), excluding ).3dw → Deletes 3 words.dd → Deletes the entire line at cursorp → Pastes to the right of the cursorP → Pastes to the left of the cursordi → Deletes within specific characters combined with.dit → Deletes content is within the tag at cursordi(→ Deletes content is within the parenthesis at cursordat → Deletes the entire tag contentci → Deletes character then automatically switches to insert modeci’ → Deletes characters is inside the closest ‘ automatically switches to insert modecit → Deletes whatever is inside the closest tag, then automatically switches to insert mode
Author of the video: Freecodecamp
