Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 working with an Ubuntu 10.04 VM. By default, vim shows syntax color and I don't want it. I do not have a .vimrc file in my home directory (or anywhere in the system for that matter). I do have a file called .viminfo in my home directory but that doesn't seem to be where the setting is because when I rename it, the syntax color is still on. I also like to have line numbers and for that I created a .exrc file in my home.

share|improve this question
up vote 7 down vote accepted

To turn off color syntax highlighting, pres ESC and type:

:syntax off

To turn it on again, type:

:syntax on

To make the changes permanently, you can create ~/.vimrc file and add the following line:

syntax off
share|improve this answer
but that is just for in the existing instance. putting it in .exrc makes it cross instance – amphibient Aug 29 '13 at 21:26
@amphibient I just edited my answer. – Radu Rădeanu Aug 29 '13 at 21:27

Got it figured:

syntax off

in .vimrc

share|improve this answer

Your Answer


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

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