Here are a few tips on how to get around in VI
To edit a file type: vi filename
Basic vi commands
- i – Change to insert mode (edit mode)
- CTRL-C – Change to command mode (exit edit mode)
- :w – Save the file being edited (command mode only)
- :wq – Save file and Quit (command mode only)
- :q – Quit (command mode only)
- :q! – Quit without saving (command mode only)
- h/j/k/l Navigation keys if your arrows break (command mode only) (Try pressing scroll-lock first to try and make arrows work)
