Introduction:
vi is an advanced file editor that was often used in non-graphical OS environments. There is a later file editor built upon vi called vim (vi improved). vim can be installed on Windows with distributions such as gVim. vi comes with features that make non-graphical file editing efficient.
Requirements:
Procedure:
Open vi/vim by running an executable or by typing one of the following:
vi filename.txt
vi
vim
If vi is open and you need to open a specific file, type one of the following:
:o C:\FolderLocationofFile\file.txt
:o /root/FolderLocationofFile/file.txt
Many ‘commands’ start with a ‘:’ such as ‘:o’ to open a file. You can save a file with:
:w C:\FolderLocationofFile\file.txt
:w /root/FolderLocationofFile/file.txt
To go into editing mode, type
i
To get out of editing mode, press the ‘escape’ key on your keyboard. In editing (insert) mode, you can do
basic file editing, like some other word processing applications. To quit vi/vim, type:
:q