I modified ~/.vimrc and added the following line:
syntax on
to turn syntax on. The syntax is highlighted for python, java, but for golang it doesn't highlight at all.
I would like to do the same when editing vim files, logged in as root too. I tried to modify vimrc as root but none of the modes work with syntax.