Customise your VIM

Most of coders used to use editors that highlight syntax, or support auto complete, or etc…

So that we don’t think in Vim as the suitable editor for us. But do you know you can do what you do with any other text editor with VIM? In this article I’ll show you somethings I use in Vim to make my life easier.

When you open your Vim editor to code you see your code in bad case like that:

Vim without any feature

Vim without any feature

OK, I agree with you it’s boring, let’s try to comstomise it to be suitable for us.


For me I don’t do any feature but 2,

  1. Syntax Highlight
  2. Line Numbers

So, create a file called .vimrc in your home folder:
touch .vimrc
Then open it with any editor you like, for example with Nano or Vim:
nano .vimrc
vim .vimrc

Now, it works well, let’s add the feature we need:
For the Syntax highlight and the line numbers:
syntax on
set number

NOTE: You can add any feature you want in this file, just google it to find many of Vim features.

Now, our vim became like that:

Vim after customisation

Vim after customisation

Advertisements

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