0% found this document useful (0 votes)
5 views

4th(VI editor) s

The document provides an overview of the vi editor, the default text editor in UNIX, detailing its three modes: Command Mode, Input/Insert Mode, and Ex-Mode. It outlines various commands for editing, replacing, and inserting text within files. The document serves as a practical guide for users to effectively utilize the vi editor.

Uploaded by

malikirfan0502
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

4th(VI editor) s

The document provides an overview of the vi editor, the default text editor in UNIX, detailing its three modes: Command Mode, Input/Insert Mode, and Ex-Mode. It outlines various commands for editing, replacing, and inserting text within files. The document serves as a practical guide for users to effectively utilize the vi editor.

Uploaded by

malikirfan0502
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Shahabuddin Ahmad 11232945 I

Shahabuddin Ahmad 11232945 I

Practical -04
Aim- To study vi editor in detail.

VI EDITOR: - The default editor that comes with the UNIX operating system is called vi (visual editor).
Using vi editor, we can edit an existing file or create a new file from scratch. we can also use this editor
to just read a text file.
There are three modes in vi editor.

1. Command Mode.

2. Input/Insert Mode.

3. Ex-Mode/Ex-command Mode.
1. Command Mode: - In command mode, actions are taken on the file. The vi editor starts in
command mode. Here, the typed words will act as commands in vi editor. To pass a command, you need
to be in command mode.

2. Insert Mode: - In insert mode, entered text will be inserted into the file. The Esc key will take
you to the command mode from insert mode.

3. Ex-Mode: - This mode enables you to perform tasks such as saving files, executing commands.

Commands to editing, replacing and inserting text in Files.

1. i :- Inserts text before current cursor location.

2. a :- Inserts text after current cursor location.

3. I :- Inserts text at beginning of current line.

4. A :- Inserts text at end of current line.

5. o :- Creates a new line for text entry below cursor location.

6. O :- Creates a new line for text entry above cursor location.

7. r :- Replace single character under the cursor with the next character typed.

8. R :- Replaces text from the cursor to right.

9. s: - Replaces single character under the cursor with any number of characters.

10. S:- Replaces entire line.


Shahabuddin Ahmad 11232945 I

You might also like