0

When I edit a file with mvim (Installed via MacVim) I see syntax highlighting in colour on a large range of files. However, when I edit with the built in vi there is never syntax highlighting. Is there something you need to do?

Colour does work with other terminal commands, e.g. git, ls etc... The problem is only with vi

Im on latest OS X 10.11.5:

> vi -version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Apr  5 2016 14:53:37)
4
  • 1
  • That question and answer is about enabling syntax highlighting for certain file extensions. That already works for me in mvim no work needed. My question is about why vi isn't operating the same way.
    – Jay
    Jun 4, 2016 at 8:38
  • 1
    Your question is unclear to me - I changed the wording to "terminal" - if that's incorrect please roll it back. Jun 4, 2016 at 8:42
  • What happens if you run :syntax enable?
    – 8bittree
    Jun 10, 2016 at 16:12

1 Answer 1

1

The vi command is running vim in compatible mode. Try disabling it by adding this to your .vimrc:

set nocompatible

or running this command:

:set nocompatible

More info: What is compatible mode in Vim?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .