Vim (vi improved), also referred to as vi, is a utility that creates and modifies text files. It is the standard command-line text editor included with Linux distributions. Vim has the following modes:
Command mode is the initial mode vim uses when started. It has commands that cut and replace text, and it is the mode vi uses to enter the other modes.
Command line mode is the mode that works with the file system. Use it to save files after editing them.
Edit mode is the mode that vim uses to write and edit text in the file. It has two operation modes:
Insert mode adds text between the preceding and subsequent text.
Replace mode overwrites subsequent text.