Have you ever found yourself needing to edit a file via command line/ssh? Here are a few commands that might help you get started. To start editing a file using vi simply type: vi [filename]
Key:            Action:
x                 Delete
i                  Insert
a                 Append
Esc              Exits you out of insert or append mode
dd               Delete a single line
d[n]d          Deletes n lines (Replace [n] with the number lines you wish to delete
u                 Undo
:[n]             Go to Line number
:/[text]        Search file for keyword (while in this mode use n to go to next instance of word in document)
:w               Save File
:q               Quit
:q!              Quit but don't save changes
:wq            Save and Quit