# Vim
# Shortcuts
Command Mode:
:q- quit:w- write the current state to the file:wq- save and quit:q!- quit without saving:setnumber - turns on line numberingi- Pressigo enter Insert mode:%s/find/replace/- Find and replace first occurrence. Replacefindandreplaceaccordingly.:%s/find/replace/g- Find and replace greed mode, all occurrences.:%s/find/replace/gc- Find and replace greed mode with confirmation to all occurrences.
Insert mode:
esc- get back to command modedd- delete a line2dd- delete 2 line (if you put a number x before a command It will try to execute the command x times)u- undo last actionctrl r- redo/- search (Type forward slash, and the subject you want to search) within the search pressnto forward the search andNto back. When you find typeito edit.