August 5, 2010

vim configuration

Filed under: Commands — Tags: , — shijitht @ 6:43 pm

If you are a vim editor fan and a C programmer, you could get frustrated by typing commands for line number, C indentation and syntax. To automate this, install vim-runtime package. This includes rules for language-specific syntax highlighting and indentation, color schemes etc.

Create a file .exrc in home directory. $vim  ~/.exrc
Add these lines to the file
set nu                 ” for line number
set cindent         ” for C indentation i.e. correct spacing for better understanding
syntax on           ” for coloring according C syntax

A lot more options could be added for user related customizations.


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

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 )

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

Blog at WordPress.com.

%d bloggers like this: