0% found this document useful (0 votes)
50 views5 pages

Student Name: Student ID: Student Section

This document provides instructions for various keyboard commands and actions in the vim text editor. It details how commands like i, escape, w, b, k, j, h, H, dd, dw, J, :w and :wq function to edit text, move the cursor, delete text, save files and exit the editor. For example, pressing i enters insert mode, escape exits insert mode, k moves the cursor up lines, dw deletes from the cursor to the next word, and :w saves changes to the file. The document demonstrates the commands through examples like replacing text with ru, appending text with a, deleting lines with dd, and restoring deleted lines with u.

Uploaded by

venkatreddy
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)
50 views5 pages

Student Name: Student ID: Student Section

This document provides instructions for various keyboard commands and actions in the vim text editor. It details how commands like i, escape, w, b, k, j, h, H, dd, dw, J, :w and :wq function to edit text, move the cursor, delete text, save files and exit the editor. For example, pressing i enters insert mode, escape exits insert mode, k moves the cursor up lines, dw deletes from the cursor to the next word, and :w saves changes to the file. The document demonstrates the commands through examples like replacing text with ru, appending text with a, deleting lines with dd, and restoring deleted lines with u.

Uploaded by

venkatreddy
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/ 5

Student Name:

Student ID:

Student Section:

1. "exercise" [New File] 0,0 -1 All was printed at the bottom of the screen

2. -- INSERT -- is seen on the bottom of the screen when pressed “i”

3. After pressing the “escape” button there is nothing present at the bottom of the screen. The –
INSERT – message appeared before is no longer there
4. "exercise" [New] 19L, 768C written was written on the bottom screen after issuing the “:w” on
command mode

5. The “T” character in the word “The” which is the first word in the file is highlighted

6. The character “s” in the last line first word “somewhere” is highlighted

7. When pressed “k” three times the cursor takes me up three lines above. Now the cursor is at at
the character “y” of the word “yank”
8. When pressed “l” the cursor moved right. If pressed three times the cursor moved three
characters right from the current position. If pressed four times the cursor moved four
characters’ right

9. When pressed “j” the cursor moved one line down. If pressed twice it moves two lines down. If
pressed thrice it moves three lines down

10. When pressed “h” it moves the cursor to the left from current position. If pressed twice the
cursor moves two characters left and if pressed thrice the cursor moves three characters’ left

11. By using the “H” moved to the top of the file.


12. When pressed “w” thrice the cursor moves three words forward and the first character in third
word is highlighted. If pressed four times it moves four words forward and the first character in
forth word is highlighted
13. When pressed “b” thrice it moves the cursor three words backward and i.e. to the left from
current cursor position and the first character of the word is highlighted

14. The cursor is at the character “f” from the word “fill” in first line
15. command, and, and, command
16. When issued the “ru” command by placing the cursor on the character “I” of the word “fill". The
character “i” in the word “fill” is replaced by letter “u”. Now word become “full”
17. I used “l” to move to the particular position. Now the cursor is on the second “l” of the word
“full”. Then I used the command “a” to append the word “screen”
18. Before issuing the append command the cursor is on second “l” of the word “full” in first/top
line
19. Used the “j” to move the curson down, then “l” to move to the right. Now the cursor at
character “s” on word “moves”. Use the “a” to append the word “the cursor” after the word
“moves” then press “Esc”
20. As soon as I enter the “cw” without pressing enter after I positioned my cursor on character “t”
of word “two” the message shown at the bottom of the screen is “-- INSERT --”
21. The word two is disappeared
22. When typed “x” after placing the cursor “s” in the word “lines”, the character “s” was deleted
from the word “lines”
23. Used the “k” to move up the line, then used the “h” to the cursor to the word “yhe”. Once my
cursor position is on letter “y” of the word “yhe” then issued the command “rt” to place the
letter “y” with letter “t”.
(or)

Issue the forward search the word “yhe” by using the “/yhe” or backword search “yhe” using the
“?yhe” either way cursor points to the character “y” in the word “yhe” then issue the “rt”
command which replaces the character “y” with “t”
24. When issued the command “dw” by placing the cursor on the character “y” in word “typing”
everything after character “t” i.e., “yping” was deleted and it becames “tcertain”
25. The output after issuing the “dw” command is “tcertain”
26. When issued the “dd” command by placing the curson on (1) the entire line is deleted and the
cursor points to next line first character of first word
27. When issued the “d <cr>” by placing the cursor on (2) it deletes the entire sentence (From
current position to the end of the line that ends with full stop)
28. By using the “dd” command only current line will be deleted. The “d <cr>” command deletes the
entire sentence that ends with full stop. With “dd” we don’t need to press enter to get the line
deleted
29. The command “3dd” deleted three lines from the current cursor position i.e., (Delete line 1.,
(current cursor position), Delete line 2., Delete word word 1.)
30. The three lines which got deleted by issuing the “3dd” are restored back by “u” command
31. Placed the cursor at desired position and used the “dw” command to remove the duplicate
words (word and delete)
32. The two lines that start with (1) and (2) are placed below the “ You can also move lines to a
new location by using the "y" for yank.”
33. It copies the line that starts with (1) and placed above/before “ You can also move lines to a
new location by using the "y" for yank.”
34. By issuing the “3yy” three lines are copied/yanked and when issued the “p” at the line that with
(2) those three lines copied are pasted after/below the line that starts with (2)
35. “-- REPLACE --” is the message seen at the bottom
36. Used the “Escape” or <esc> to get back to command mode
37. At desired position used the “x” to remove extra “r” from the word “currsor”. After removing
the extra “r” it becomes the word “cursor”
38. Once the cursor at the character “n” in the word “ona”, when pressed “a” in command mode
the cursor moved one-character right (i.e., the cursor is on the character “a” in the word “ona”)
and at the bottom of the screen we can “-- INSERT --” message indicating the insert mode
39. Used the “Escape” or <esc> to get out of append mode
40. A new line was added above the current cursor position (Delete word 1.) in insert mode
41. When pressed “J” at the cursor position “,” it joins the lines “If you want to open a new line
below the line you are on,” and “press the “o”(lower case “o”)key.” to single line. The output is
“If you want to open a new line below the line you are on, press the "o" (lower case
"o")key.”
42. When issued the :w command in command mode and press enter we can the message
“"exercise" 17L, 1026C”. If you issue the command the :wq it save the file and quits the editor
43. Earlier the file size is "exercise" [New] 14L, 703C now the final file size is “"exercise" 17L, 1026C

You might also like