Vim no color - disable colors in text editor

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:

vim file.sh

Type (press Esc + :)

syntax off

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:

vim $HOME/.vimrc

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:
Screenshot%20from%202018-08-14%2017-57-14

Conclusion

You can enable or disable colors by simply typing the following command in vim or in ~/.vimr (vim config file):

Turn it on

syntax on

Turn it off

syntax off

See
https://www.cyberciti.biz/faq/turn-on-or-off-color-syntax-highlighting-in-vi-or-vim/