Vim Notes
Moving
w- move a word (only letters)e- move to the end of a word (only letters)b- move back a word (only letters)W- move a word (moves until the next space)E- move the end of a word (moves until before the next space)B- move back a word (moves until the previous space)0- move to the start of a line$- move to the end of a line_- move to the first word in a linef<char>- move to the next occurrence of the char within the lineF<char>- move to the previous occurrence of the char within the line;- repeat the last motion
Inserting/Deleting/Changing
x- delete a characters- delete a character and turn on insert moder- replace a charactero- insert one line downO- insert one line upI- insert at the start of the lineA- insert at the end of the lineciw- change in word (turns on insert mode)diw- delete in word (does not put in insert mode)dd- delete current linedj- delete current line and the one belowdk- delete current line and the one aboveD- delete from cursor until the end of the line<num>dd- delete<num>number of linesR- enter replace mode
Copy (yank) and Paste
y- yank operatoryy- yank the current lineyw- yank from the cursor to the end of a wordp- paste (in case ofyyit pastes on the line below)P- paste on the line above
nvim-tree
a- create a new file on the current directoryd- remove a file<leader>e- toggle tree^K- leader fornvim-tree^Wh- move left in tab^Wl- move right in tab^Wv- duplicate tab vertically^Wh- duplicate tab horizontally^Wc- close the tab
Cool Macros
To start recording a macro, type qa (for example). The actions you take next are going to be recorded until q is pressed again and stored in the a key variable (any letter can be used).
Reuse it later with: @a