Ch9 The vi Editor Exam

  1. 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
  2. If you are in the vi command mode and want to begin inserting text before your cursor, you can type:

    • o
    • O
    • A
    • i
  3. If you are in vi command mode and want to add a new line after your cursor, you can type:

    • O
    • i
    • a
    • o
  4. 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
  5. 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
  6. 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
  7. If you want to move up a line in vi command mode, you can press the Up Arrow Key ↑ or:

    • j
    • k
    • l
    • h
  8. 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!
  9. To go to the beginning of a line in the vi command mode, you press:

    • 1
    • g
    • ^
    • $
  10. To go to the first line of a vi document in command mode, you can type:

    (choose two)

    • gg
    • 1G
    • G
    • GG
  11. To move backward through a vi document, word by word, you press:

    • r
    • c
    • b
    • w
  12. To move forward one word at a time in the vi command mode, you press:

    • f
    • t
    • w
    • g
  13. To navigate to the end of the line in vi command mode, you can press:

    • ^
    • *
    • $
    • #
  14. To perform cut and paste in a vi document, you actually do:

    • yank and put
    • delete and put
    • yank and paste
    • delete and yank
  15. To save and then quit, you can type in command mode:

    • QQ
    • !!
    • WW
    • ZZ
  16. To search backward from your cursor in your vi document in command mode, you can type __ followed by the pattern to search for.

    • |
    • ?
    • \
    • /
  17. To search forward from your cursor in your vi document in command mode, you can type __ followed by the pattern to search for.

    • |
    • \
    • ?
    • /
  18. Typing which of the following from vi command mode will attempt to save your file?

    • :f
    • :r
    • :w
    • :s
  19. 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
  20. Which of the following variables affect the standard editor for a user?

    • $VI
    • $VISUAL
    • $ENV
    • $EDLIN
  21. To configure the default or standard editor for a user, which file should the $EDITOR variable be configured in?

    • .editor
    • .vimrc
    • .stdedit
    • .bashrc
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments