I’m the type of geek that always has an open ssh session connected to my servers, but ever since I switched to using a Mac running OS X, I noticed a huge annoyance in my terminal… the syntax highlighting makes it impossible to read the files I’m trying to edit.
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.
- › How to Control Your Entire Smarthome Through One App
- › Everyone’s Making a PC Game Subscription: Are They Worth It?
- › How to Install the Linux 5.0 Update on Ubuntu 18.04 LTS
- › How to Stop Companies From Listening to Your Voice Assistant Recordings
- › Mouse Left-Click Button Not Working? Here’s How to Fix It