Setting up the vim configuration.

While writing C programs using the ‘vi’ editor ,you might find a frustrating task of handling with line numbers ,setting up the indentation properly and of course you might never mind if some indications are given about the keywords using colors. There fore we set up the vim configuration and automate the above said tasks by doing the following.
Create a file .exrc in your home directory..
vi .exrc ….filename ending with rc indicates that you can configure them the way you want it to be.
Now type the following:
set nu /*to set up line numbers properly*/
set cindent /*to set up the indentation(for the better clarity of the program)*/
syntax on /*this sets the coloring ‘on’ for the program according to the C syntax */
Now save the file and start writing your programs more comfortably.


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