Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am following the Peepcode screencasts to learn vim.

The presenter mentions about the -N mode but doesn't elaborate it much and says that it should be the default mode.

My questions:

  • What is the -N mode?
  • Should I always use it?
  • If yes, how do I configure it in the .vimrc?

EDIT: The author does mention that it should always be used, but doesn't elaborate why and how.

Thanks for your time.

share|improve this question
up vote 8 down vote accepted

Running vim -N sets Vim in "nocompatible" mode, which drops strict backwards compatibility with the original vi in favor of better features. Unless you know that you need (or want) backwards compatibility, it's better to go with the features.

If you have a .vimrc file in the first place, Vim will by default put you in nocompatible mode, but the command set nocompatible will seal the deal.

See the following Vim help topics for more info:

:help compatible
:help compatible-default
share|improve this answer
Does it matter when I am learning?? – user4793 Feb 15 '11 at 20:16
I'd definitely set nocompatible, for the unlimited undo feature if nothing else. In original vi, pressing the "u" key twice is the same as not pressing it at all, whereas in Vim, u and Ctrl-r are your multi-level undo and redo. – Jander Feb 15 '11 at 20:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.