Vim setting

Once again this is for my sanity. When using vi, I kept finding myself doing Ctrl-G just to know where I am in a particular file, i.e. which line number. To display that all the time, place the following settings in your ~.vimrc file.

set number
set ruler

“set number” will place a vertical column on the left to show the line numbers. “set ruler” will place a bottom row to show the current line number and row number, plus where you are in the edited file in percentage. Very handy.

One more setting that I have mentioned before. You can color-code your file in vi by adding the following setting.

syntax on

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 )

Facebook photo

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

Connecting to %s