The vi Editor

Linux Text Editor The vi editor, also known as "vi improved," is a powerful text editor that is included with most Linux distributions. It is a command-line based editor, which means that it is operated through commands and keyboard shortcuts rather than a graphical user interface. Open a File To open a file in vi, simply type "vi" followed by the file name in the terminal. For example, "vi file.txt" would open a file named "file.txt" in vi. If the file does not exist, it will be created when you save your changes. Command Mode and Insert Mode One of the most important things to understand about vi is that it has two modes: command mode and insert mode. When you first open a file in vi, you are in command mode. In this mode, you can move the cursor around the document, delete text, and perform other editing commands. To enter insert mode, press the "i" key on your keyboard. In insert mode, you can add text to the document. To return to ...