Vim Enable Syntax Coloring

In most of operating systems by default vim syntax colouring is enabled.

Syntax coloring will help us while editing .java, .html, and .py etc…

In your operating system if the syntax coloring is not enabled by default you need to do small change in your vimrc file as explained below.

    • open your vimrc fine with any editor. You need root permissions to edit it.
sudo vim /etc/vim/vimrc
  • Now search for keys “syntax highlighting”, the lines look like below.

" Vim5 and later versions support syntax highlighting. Uncommenting the next

” line enables syntax highlighting by default.

“syntax on

  • The line syntax on is commented with ", remove comment by removing ". It should looks like below.
    • syntax on
  • Now save and exit the vimrc file. Also check your by editing some file.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s