Resources > Vim
Useful References
- Vim Cheatsheet
- Vim Cheatsheet (another one)
Useful Commands
Start vim
vi my_file.txt
Quit vim
First press the escape key, then press…
1
2
3
:q # quits
:q! # quit and discard any edits
:qw # quits and saves all changes
Edit a file
- Press the i key to put into edit mode.
- Edits as you like.
- Press the Escape key to get out of edit mode.
- Press :w to save your changes
Delete a line
- use the cursor to navigate to the line you want to delete
- press dd (two “ds” in a row)