Hi all, sorry I'm running behind this week:

I've been trying to come up with a vi question that would be useful for an expert question, and it's difficult…maybe I just don't know enough vi. I came up with a few questions that I think would work, but I'm not sure what things to expect a competent person to know. For instance, my lab mate couldn't answer #1 despite being an avid programmer, but I've seen it used in many intro tutorials of vi.

Novice/Competent:

  1. You finish typing in vi, then type "esc", ":", "ZZ", "enter" in that order. This will:

A) Change vi from insert mode to command mode, then move the cursor to the end of the last line
B) Change vi from insert mode, to command mode, to sleep mode
C) Change vi from insert mode to command mode, then save and quit
D) Change vi from insert mode to command mode then give an error

Competent/Expert

  1. You have the following file open in vi (numbers are line numbers, not part of text):

1 I really love tacos, tacos are my favorite vegetable.
2 Tacos are delicious because they have sour cream.
3 The only thing I like more than tacos is nachos.

Which of these will change all instances of 'tacos' to 'burritos':

A) s/tacos/burritos/
B) s/tacos/burritos/g
C) %s/tacos/burritos/g
D) *s/tacos/burritos/
E) %s/tacos/burritos/