|Enter command-line mode|
Command-line mode is entered through normal mode. You will know you are in command-line mode when there is a
: in the bottom left corner of your terminal window.
Normal mode is the default mode of vi/vim and can be switched to by pressing the ESC.
Vi/Vim have built-in checks to prevent unsaved work from being lost and other useful features. To bypass these checks, use the override
! in your command.
In Vi/Vim it is possible to have more than one file displayed (in different windows) at the same time. Use
a to close all the opened windows.
Exit forcefully (with save)
Exit forcefully (without save)
Exit forcefully from all opened windows (without save)
Exit with save
Exit without save
if multiple files are opened
Exiting multiple files with saving contents
Exiting multiple files without saving contents