Enable Syntax Highlight in Ubuntu

In Ubuntu, it is hard to read config, code, file when the syntax is turn off or all in black and white. To enable the syntax, you can type ":syntax on" at the file

If there is an error appear when type syntax on"

You need reinstall the vim again with the commandThen retype ":syntax on" . It should be work now.


If not happy and do not want always type "syntax on". Set it as permanent with follow the steps:

  1. edit the /etc/vimrc file. If no privileges to edit, use sudo command
  2. add the line "syntax on" at the file
  3. save and everything will be in colour

Comments :

1
0rd1n said...
on 

you are Ubuntu guru now~
I am still Linux novice~