From the vimtutor LESSON 7.3: COMPLETION
** Command line completion with CTRL-D and <TAB> **
Make sure Vim is not in compatible mode: :set nocp
Look what files exist in the directory: :!ls or :!dir
Type the start of a command: :e
Press CTRL-D and Vim will show a list of commands that start with “e”.
What does compatibility mode in Vim mean and why doesn’t command completion work in that mode?
Solution:
Compatible mode means compatibility to venerable old vi. When you :set compatible
, all the enhancements and improvements of Vi Improved are turned off. It’s not recommended to do this, but some systems provide (mostly for backwards compatibility with old Unix systems) a vi
command that is implemented with Vim in compatible mode.
Note that once a personal initialization file ~/.vimrc
exists, Vim automatically turns on 'nocompatible'
mode, so this usually is nothing to worry about. For the full story, :help 'compatible'
has all the details.