: 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 file, Force quit vi:e! Discard all changes, from the last time you save the file and then edit the screen tumbling Class command ctrl+u: To file The first half screen ctrl+d: to the end of the file half screen ctrl+f: to the end of the file to flip a screen ctrl+b to the file first screen NZ: Roll the nth row to the top of the screen, Rolls the current line to the top of the screen when n is not specified. If you enter "U" two times and your text reverts to the original, it should be that your vim is configured in VI compatibility mode. Redo If you undo too much, you can enter Ctrl-r (redo) to rewind the previous command.
VI Common functions