Creating a New Document
To create a new text document using VI, simply invoke the editor followed by the desired filename. For example:
vi new_document.txt
This command opens the VI editor with a new file named “new_document.txt.” If the file already exists, VI opens it for editing; otherwise, it creates a new file.
Verifying file is created using ls command.
ls
Creating New Text Documents with the VI Editor
VI, short for “Visual Editor,” is a modal text editor that operates in different modes: command mode, insert mode, and visual mode. Command mode is used for navigation and executing commands, insert mode is for inserting and editing text, and visual mode is for selecting and manipulating text.
Contact Us