Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
add comment

1 Answer

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
3  
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
add comment

Your Answer

 
discard

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