Enabling Syntax Highlighting in Vi(m)

Vim Syntax Highlighting

Having enabled line number in vim, let’s bring syntax highlighting to get vim closer to an IDE-like environment. Vim supports syntax highlighting for most of the programming languages such as C, C++, Java, Python, Perl, Ruby, HTML, JavaScript etc.

To turn the syntax highlighting on, enter the following in command mode inside vim.

:syntax on

To make it permanent, append the following line to your .vimrc file.

syntax on

There are several awesome color schemes available for vim to match your taste of syntax highlighting. We’ll talk about them in the upcoming posts.

About Deepak Devanand

Seeker of knowledge
This entry was posted in vi and tagged , , , , . Bookmark the permalink.

One Response to Enabling Syntax Highlighting in Vi(m)

  1. Pingback: Setting Autoindent in Vi(m) | Deepak's Kaleidoscope

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s