When working with shells, if your Mac does not show various colors automatically, you can enable them by two easy steps.
First add a line as shown below to your .bash_profile. This file should be under your home directory.
Second, add the following line in your .vimrc file. This file should be under your home directory. If it is not there, create one.
Log out and log back in. That’s it. Get ready for a versatile shell interface.
Shell environment – Before
Shell environment – After
vi environment – Before
vi environment – After