Whenever I open a shell script in vim, it shows colors and syntax highlighting. How dp I turn off all colors in vim text editor running on CentOS Linux system?
That is easy task open vim:
Type (press Esc + :)
How to disable colors i…e turn off all colors in vim?
Edit a file named .vimrc in your home directory with the following command:
Append the following
syntax off set nohlsearch set t_Co=0
Save and close the file. You won’t see any color when you open the script in vim:
You can enable or disable colors by simply typing the following command in vim or in ~/.vimr (vim config file):
Turn it on
Turn it off