0% found this document useful (0 votes)
15 views4 pages

OS Lab Assignment 3

This document provides descriptions of 25 commands for the vi text editor. It lists the command name, objective, description, syntax and expected output for each command. The commands allow basic text editing functions like inserting, deleting, moving text and saving/quitting files.

Uploaded by

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

OS Lab Assignment 3

This document provides descriptions of 25 commands for the vi text editor. It lists the command name, objective, description, syntax and expected output for each command. The commands allow basic text editing functions like inserting, deleting, moving text and saving/quitting files.

Uploaded by

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

ASSIGNMENT-3

1. Command: Vi
Objective: To open new file on Vi editor.
Description: This command is used to open new file on Vi editor.
Syntax: Vi <filename with extension>
Output:

2. Command: a
Objective: To append text after the cursor.
Description: This command is used to append text after the cursor.
Syntax: <Esc> a
Output:

3. Command: A
Objective: To insert text at the end of the current line.
Description: This command is used to insert text at the end of the current line.
Syntax: <Esc> A
Output:

4. Command: l
Objective: To insert text at the beginning of the current line.
Description: This command is used to insert text at the beginning of the current line.
Syntax: <Esc> I
Output:

5. Command: i
Objective: To insert text before the current cursor location.
Description: This command is used to insert text before the current cursor location.
Syntax: <Esc> i
Output:

6. Command: o
Objective: To create a new line for text entry below the current cursor location.
Description: This command is used to create a new line for text entry below the
current cursor location.
Syntax: <Esc> o
Output:

7. Command: O
Objective: To create a new line for text entry above the current cursor location.
Description: This command is used to create a new line for text entry above the
current cursor location.
Syntax: <Esc> O
Output:

8. Command: s
Objective: To replace the current character with the character you type.
Description: This command is used to replace the current character with the
character you type.
Syntax: <Esc> s
Output:

9. Command: S
Objective: To delete the line the cursor is on and replace with the new text, after the
new text is entered vi remain in input mode.
Description: This command is used to delete the line the cursor is on and replace
with the new text, after the new text is entered vi remain in input mode.
Syntax: <Esc> S
Output:

10. Command: nh
Objective: To move the cursor to the left multiple character position.
Description: This command is used to move the cursor to the left multiple character
position.
Syntax: <Esc> nh
Output:

11. Command: nl
Objective: To move the cursor to the right multiple character position.
Description: This command is used to move the cursor to the right multiple
character position.
Syntax: <Esc> nl
Output:

12. Command: j
Objective: To move the cursor down one line.
Description: This command is used to move the cursor down one line.
Syntax: <Esc> j
Output:

13. Command: nj
Objective: To move the cursor down to multiple line.
Description: This command is used to move the cursor down to multiple line.
Syntax: <Esc> nj
Output:

14. Command: k
Objective: To move the cursor up one line.
Description: This command is used to move the cursor up one line.
Syntax: <Esc> k
Output:

15. Command: nk
Objective: To move the cursor up multiple line.
Description: This command is used to move the cursor up multiple line.
Syntax: <Esc> nk
Output:

16. Command: +
Objective: To move the cursor to the beginning of next line.
Description: This command is used to move the cursor to the beginning of next line.
Syntax: <Esc> +
Output:

17. Command: n+
Objective: To move the cursor to the beginning of next group of line.
Description: This command is used to move the cursor to the beginning of next
group of line.
Syntax: <Esc> n+
Output:

18. Command: -
Objective: To move the cursor to the beginning of previous line.
Description: This command is used to move the cursor to the beginning of previous
line.
Syntax: <Esc> -
Output:

19. Command: x
Objective: To delete the character which is under the cursor location.
Description: This command is used to delete the character which is under the cursor
location.
Syntax: <Esc> x
Output:

20. Command: dd
Objective: To delete the line where the cursor is on.
Description: This command is used to delete the line where the cursor is on.
Syntax: <Esc> dd
Output:

21. Command: d$
Objective: To delete from the current cursor position to the end of line.
Description: This command is used to delete from the current cursor position to the
end of line.
Syntax: <Esc> d$
Output:

22. Command: $
Objective: To move the cursor at the end of the same current line.
Description: This command is used to move the cursor at the end of the same
current line.
Syntax: <Esc> $
Output:

23. Command: w
Objective: To save the given text which is present in current file but doesn’t exit.
Description: This command is used to save the given text which is present in current
file but doesn’t exit.
Syntax: <Esc>: w
Output:

24. Command: q
Objective: To quit the vi editor.
Description: This command is used to quit the vi editor.
Syntax: <Esc>: q
Output:

25. Command: wq
Objective: To quit and save the file.
Description: This command is used to quit and save the file.
Syntax: <Esc>: wq
Output:

You might also like