macOS – Differences Between Vi and Vim

macosterminalvi

I am using Mac OS X, with vim and I am getting a bit used to it. A teacher at the university told us he will ask us to demonstrate him our knowledge on Vi and specified that it is Vi and not Vim. I read a lot of posts on different website and this forum about the differences between the two, but they do not seem really big especially looking on how to use it. In order to practice for my exam on Vi should I move to Vi instead of Vim?

Is there a way to install Vi and not Vim on my Mac? I have found a lot of Vim version, I am using the native one.

Best Answer

From the vim man page : https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/vim.1.html

There are two vim options to do what you want :

vim -v          Start Vim in Vi mode, just like the executable was called "vi".   This  only  has  effect
                   when the executable is called "ex".

vim -C          Compatible.  Set the 'compatible' option.  This will make Vim behave mostly like Vi, even
               though a .vimrc file exists.

You can also install ex-vi which is the traditional vi text editor through brew, first install brew http://brew.sh/. Run brew install ex-vi, but it may cause a conflict with vim.