DistributedNetworks DistributedNetworks


vi editing  «Prev  Next»
 

vi Commands - Quiz

Each question is worth one point. Select the best answer or answers for each question.

1. Which of the following commands in vi will list all of your keyboard macros?
Please select the best answer.
  A. :map
  B. :map all
  C. :ab
  D. :ab all

2. If you were editing your .exrc file, which two of the following lines would be correct to include?
Please select all the correct answers.
  A. set prompt="danielg "
  B. set ignorecase
  C. set history=25
  D. set wrapmargin=7

3. Suppose you have entered the following UNIX command to edit multiple files:
% vi ch1 ch2 ch3
Please select all the correct answers.
  A. You are now in ch2 after switching out of ch1. In this situation, which two of the following commands can you use to edit ch3?
  B. :rew
  C. :e ch3
  D. :e#
  E. :n

4. Suppose you are editing a particular file within a multi-file vi session. After you move to the next file, which of the following features will no longer be available?
Please select the best answer.
  A. Any configuration options you set
  B. Any keyboard maps you defined
  C. The last search pattern you specified
  D. The contents of an unnamed buffer