Vim Commands
These are notes on vim from Lesson 3 of Missing Semester, this lesson contains a lot of useful information about Vim.
Since I've written a quick introduction to vim, the notes on this post are just something to complement that article. I will probably update that article with these notes in the future.
The one thing that I loved learning in this lesson was how to create new windows and tabs. The lesson didn't mention how to cycle through them, so I did a quick search to figure out how to do it.
Normal mode:
- click 
Xto remove a letter - use 
:qato close all windows 
Vim windows can have tabs.
- use 
:spto create a new windows- Cycle between tabs with 
ctrl+w 
 - Cycle between tabs with 
 - use 
:tabnewto open a new tab that can contain a window or more- Move between tabs with 
ctrl+PgUporctrl+PgDn 
 - Move between tabs with 
 
Moving around
- use 
eto move to the end of the word 0moves the cursor to the beginning of the line$moves the cursor to the end of the line^moves to the first non-empty character of a linectrl+uscrolls upctrl+dscrolls downGmoves to the end of the file- so does 
:$ 
- so does 
 ggmoves to the beginning of the fileLmoves to the lowest line in the screenMmoves to the middle line in the screenHmoves to the highest line in the screenf<character>moves the cursor to the first character - f stands for findt<character>move cursor to character/<word>search word
Editing commands
uundo changesctrl+rredo changesoopens a new line under the cursorOopens a new line on top of the cursorcchange mode - used similarly todbut puts you in insert modeci'change word inside '
xdelete a characterrreplace characterycopyyycopy the whole linepwcopy word
ppaste~change the case of the selected textaappend word.repeat the previous command