If you’re like most people, you use Vim to edit text files. And if you’re like most people, you use syntax highlighting to make your editing experience more pleasant. But what if you don’t want syntax highlighting? What if you want to disable it? There are a few ways to do this. The easiest is to use the :syntax off command line option. This will disable all syntax highlighting in Vim. However, this might not be the best solution for everyone. If you only occasionally need to disable syntax highlighting, this approach might work fine for you. But if you need to disable syntax highlighting frequently, it might be easier to use a different editor that doesn’t have such a feature built in. Another way to disable syntax highlighting is to use the :syntax on command line option. This will enable all of the default Vim syntax highlights again. However, this might not be the best solution for everyone either. If you only occasionally need syntax highlights enabled, this approach might work fine for you. But if you need them enabled frequently, using the on command line option might be more difficult than using another editor that doesn’t have such a feature built in. ..
Note that this isn’t the fault of OS X, it’s because I’ve got ansi color turned on and my settings configured wrong. So, how to disable syntax highlighting in Vim?
Look, somebody puked a rainbow into my terminal window…
Disable for Current Session
If you type :syntax off into the current editor, it’ll turn the syntax highlighting off immediately:
You could use the opposite command, :syntax on, to turn it back on and make your eyes bleed.
Turn Off Permanently (for current user)
In order to turn off highlighting permanently for your user account, you can edit the .vimrc file in your user directory and add the setting to turn off syntax highlighting. Run this command:
Add the following line to disable syntax highlighting for your user account:
If you wanted to enable highlighting, you could use “syntax on” instead.