- Details
- Written by Tech Notes
- Published: 23 April 2014
Solution To VIM Not Showing Colors Even When The Switch syntax Is Set To On
If you have already done what is indicated in the article of Add, Turn On, or Off Coloring To VIM (VI) Editor, and you still are not seeing colors, then the following will hopefully fix the issue.
Locate your user profile file. Two examples of file names for this file are .profile, and .bash_profile.
I expect this file to be in the home directory of your user. If you are logged in as root, then it would be at /root. Such as /root/.bash_profile.
With the assumption that your are logged in as root, edit the profile file (.bash_profile or .profile or other name you found or documented for your OS and/or shell) by adding the following into it:
export TERM=xterm-color vim
The above is for a Linux OS of like Centos, Fedora, and similar.
As mentioned in the other article, make sure you have syntax on
listed in your .vimrc file within your user's profile home directory; if not add it to the end of the .vimrc file. The home directory for root is typically /root.