Show syntax highlighting in VIM – GNU Linux – Ubuntu
For those programs directly from the terminal, it is imperative syntax highlighting to see the code properly and to better understand how the code is structured. If you've got here is that you need to activate this feature in the vim editor, let it.
First of all make sure you have the vim installed, seems silly but things have been worse
.
$ sudo apt-get install vim
Once you had it installed if you open a file for editing to see that such is no syntax highlighting, in my case it would be this way.

Although a window appears Mac, and Linux is that I'm connected via ssh to another computer that has Ubuntu Server.
Now we will see that this is the syntax highlighting the same file, for this we must first enable this functionality in vim we make the following change:
$ sudo vim /etc/vim/vimrc
Locate the line containing syntax on:
" Vim5 and later versions support syntax highlighting. Uncommenting the next
" line enables syntax highlighting by default.
" syntax on
and uncomment
" Vim5 and later versions support syntax highlighting. Uncommenting the next
" line enables syntax highlighting by default.
syntax on
Also I want the bottom of the screen go dark edition, which found:
" If using a dark background within the editing area and syntax highlighting
" turn on this option as well
" set background=dark
and uncomment:
" If using a dark background within the editing area and syntax highlighting
" turn on this option as well
set background=dark
left the editing of the file with ": wq". Doing all this would see the same file as follows:

Much better and more beautiful and clear ....
Greetings.