Monday, November 26, 2012

HOW TO add color to root vi ?

I usually prefer vi over gedit or others, but whenever I use vi as root , it doesnt show any color. Here is a way to set color right in vi as root.

Open your bashrc file:
#vi /root/.bashrc
and add this line
alias vi='vim'

then run #source /root/.bashrc


You can also test which vi you are using by running "which vi" both as root and normal user.

remember $ is for normal mode and # is for super user mode.
All done !!