Colorful and Syntax highlight enabled VIM on OpenSolaris

When edi­ting some text file or pro­g­ram code in Open­So­la­ris, you may want to use VI or VIM. But, Open­So­la­ris can­not give you a colo­r­ful and syn­tax hig­hli­ght ena­bled vim by default. For­tu­na­tely, These two fun­ctions can be actived by wri­ting some text into ~/.vimrc, in ano­ther word, we can con­fi­gure vim pro­file to ena­ble that functions.

So, let’s do it *right now*! Just follow this steps:

open ~/.vimrc and put the follo­wing text into the file:

set term=xtermc
set nu
if &t_Co > 1
syn­tax on
endif

open ~/.bashrc to let vi alias to vim, just append the text into ~/.bashrc:

alias vi=‘vim’

Done! Cong­ra­tu­la­tions!

Dec 4th, 2008 | Posted in Operating System, Sun
No comments yet.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>