30

From the vimtutor LESSON 7.3: COMPLETION

          ** Command line completion with CTRL-D and <TAB> **
  1. Make sure Vim is not in compatible mode: :set nocp

  2. Look what files exist in the directory: :!ls or :!dir

  3. Type the start of a command: :e

  4. 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?

41

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.

  • Does setting compatible also clear your vim history? I turned it on and somehow my history disappeared on me. – cokedude Sep 19 '15 at 7:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.