I always install VIM, it’s easier to use than VI, however for some reason in Raspbian, syntax highlighting is not enabled by default. It’s such a useful feature I don’t know who wouldn’t want it on. Anyway, to enable it:

sudo vim /etc/vim/vimrc

Remove the quotes from the line: “syntax on

Write and Quit, done!