To enable key repeat in Mac OS 10.7 Lion, open up your Console, enter the following line, then restart your computer.

defaults write -g ApplePressAndHoldEnabled -bool false

The default behavior in 10.7 is to have a special keys selector pop up when holding down a key, similar to the behavior in iOS. This can be handy for typing accented letters, but makes things like navigating in Vi much more difficult. As of now, there is no way to change this setting in the user interface.