1, if you want to phpinfo.php in this PHP file, and then add a line, we can first press "a" on the keyboard, the cursor will jump to the previous green cursor, that is, "a" is represented after the current cursor editing . So, after pressing "a", after hitting a carriage return, a row is created
2, and so on, you need to edit after the location of the file can press "a" after the editing can be, if you want to edit the current cursor, we can press "I" key, actually "I" is "insert" inserted meaning , and then edit it. In summary, "a" and "I" can all go into edit mode, but the location is a little different.
3, in the process of editing, want to use keyboard keys to move the cursor, so there is no problem, there is a problem, when you press "a" or "I" after, that is, to open the editing mode, in the direction of the key or the keypad, the system will feel that you are entering information, which leads to the "NDD" command , first, press ESC to exit edit mode , then use the arrow keys to move the cursor to the row you want to delete, then press "NDD", and the current row will be deleted.
4, if you delete a character, then use the "delete" key, in the edit mode or exit edit mode can be deleted.
5, if the editor has completed the change how to save the exit? Just exit edit mode and press ": Wq" to enter. : W saves the file but does not exit vi:w. File to save the modification to file without exiting vi:w! Force save, do not eject Vi:wq save file and exit vi:wq! Force save file and exit Viq: Do not save file, exit vi:q! Do not save the file, Force exit vi:e! Discard all changes and edit them from the last time you saved the file.
Note: VI edit mode and command line mode of the switch, press "ESC" into the command line mode, "a" or "I" into the editing mode.
Basic commands for the VI editor of Linux