How to remove colors from vi command

I want to Linux turn off colors in VI command. How can I disabling vi syntax colors permanently? Do I need to edit some file on Linux?

To make vi disable or remove colors, you need to set the syntax flag. To do so:

  1. Edit your ~/.vimrc file:
vi ~/.vimrc
  1. Make sure syntax is set to off as follows. Append the following at the end of file:
syntax off
set nohlsearch
set t_Co=0
  1. Save and close the file by pressing ESC, :x and Enter. Now open any file and syntax highlighter should be gone forever:
vim file.sh
vim config.ini

See my page -


Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki