Ch9 The vi Editor Exam
-
If you are in the
vi
command mode and want to add a new line before your cursor, you would type:- o
- a
- i
- O
-
If you are in the
vi
command mode and want to begin inserting text before your cursor, you can type:- o
- O
- A
- i
-
If you are in
vi
command mode and want to add a new line after your cursor, you can type:- O
- i
- a
- o
-
If you are in vi command mode and want to begin inserting text at the end of the line, you can type:
- o
- O
- A
- I
-
If you want to move a character to the left in
vi
command mode, you can press the Left Arrow Key ← or:- j
- k
- h
- l
-
If you want to move a character to the right in
vi
command mode, you can press the Right Arrow Key → or:- k
- h
- j
- l
-
If you want to move up a line in
vi
command mode, you can press the Up Arrow Key ↑ or:- j
- k
- l
- h
-
If you want to quit the
vi
program without saving any of the changes you made to your file, you can type in command mode:- :w!
- :s!
- :a!
- :q!
-
To go to the beginning of a line in the
vi
command mode, you press:- 1
- g
- ^
- $
-
To go to the first line of a
vi
document in command mode, you can type:(choose two)
- gg
- 1G
- G
- GG
-
To move backward through a
vi
document, word by word, you press:- r
- c
- b
- w
-
To move forward one word at a time in the
vi
command mode, you press:- f
- t
- w
- g
-
To navigate to the end of the line in
vi
command mode, you can press:- ^
- *
- $
- #
-
To perform cut and paste in a
vi
document, you actually do:- yank and put
- delete and put
- yank and paste
- delete and yank
-
To save and then quit, you can type in command mode:
- !!
- WW
- ZZ
-
To search backward from your cursor in your
vi
document in command mode, you can type __ followed by the pattern to search for.- |
- ?
- \
- /
-
To search forward from your cursor in your
vi
document in command mode, you can type __ followed by the pattern to search for.- |
- \
- ?
- /
-
Typing which of the following from
vi
command mode will attempt to save your file?- :f
- :r
- :w
- :s
-
What would typing 4dh do in
vi
command mode?- Delete the next four characters
- Delete the next four lines
- Duplicate the next four characters
- Delete the previous four characters
-
Which of the following variables affect the standard editor for a user?
- $VI
- $VISUAL
- $ENV
- $EDLIN
-
To configure the default or standard editor for a user, which file should the $EDITOR variable be configured in?
- .editor
- .vimrc
- .stdedit
- .bashrc
Subscribe
0 Comments
Newest