Sunday, May 07, 2006

I see colors

On OpenBSD using 'vi' or 'ls' doesn't yield color by default. Also as I'm too used to having bash I usually install that as well

To start off you first have to install the fileutils, vim and bash package to get the 'gls', 'vim' and 'bash' command respectively. Copy the /usr/local/share/vim/vim64/vimrc_example.vim to ~/.vimrc which will automatically enable syntax highlighting for you. If it still isn't, check to make sure that 'syntax on' is in the ~/.vimrc file.

To make bash your default shell, type 'chpass' and edit the line that says 'shell' to point to /usr/local/bin/bash (I always set the absolute path). Quit and save (ESC,:wq) to store your new information.

Once that is done edit your ~/.profile and add these lines
export TERM=xterm-color
alias ls='gls --color'
alias vi='vim'

Quit and save the file. Now logout and login again and voiila, you will now be able to see colors when you type ls and edit files using vi;) Ciaoz

No comments: