I recently purchased the 13" i7 MacBook Air (2011).

Since my MacBook was a fresh install, I decided to keep it that way and looked at it as a chance to clean things up a bit. Since I had a Carbon Copy Cloner image and a Time Machine backup, I started tweaking my system.

I noticed that the terminal and vim in the terminal no longer were supporting colors and remembered that I had to tweak this in Snow Leopard. Some things have changed in Lion and SIMBL and ANSI colors are now supported natively (wow, only took 20 years Apple…).

LSCOLORS in ~/.profile

The first thing you need to do is edit ~/.profile and put this code in to make folders color.

export CLICOLOR=1 export LSCOLORS=ExFxCxDxBxegedabagacad


LSCOLORS Options:

> **LSCOLORS has the ability to use 11 different indicators to set background and foreground colors:**
> 
> <pre>1 = directory
 2 = symbolic link
 3 = socket
 4 = pipe
 5 = executable
 6 = block special
 7 = character special
 8 = executable with setuid bit set
 9 = executable with setgid bit set
10 = directory writable to others, with sticky bit
11 = directory writable to others, without sticky bit<strong></strong></pre>

> **Possible letter values to associate with numbers:**
>
> ```
a black
b red
c green
d brown
e blue
f magenta
c cyan
h light grey
A block black, usually shows up as dark grey
B bold red
C bold green
D bold brown, usually shows up as yellow
E bold blue
F bold magenta
G bold cyan
H bold light grey; looks like bright white
x default foreground or background

So, the Ex means bold blue foreground and default background for directories.

Custom Cursor

If you want to add a custom cursor, add something like this to the file:

PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\W\$ \[\033[00m\]'

Vim Colors

For vim, use a theme like Vim IR_Black Theme.

And add 2 folders, ~/.vim and ~/.vim/colors to your home directory.

Put the theme file (should be called ir_black.vim) in your ~/.vim/colors folder.

Then make a file called ~/.vimrc with something like this:

syntax on        'this is needed to see syntax
set background=dark  "makes it easier to read with black background
colorscheme ir_black "set theme in ./vim/colors folder
set ls=2            " allways show status line
set hlsearch        " highlight searches
set incsearch       " do incremental searching
set ruler           " show the cursor position all the time
set visualbell t_vb=    " turn off error beep/flash
set ignorecase        "ignore case while searching
set number            'put numbers on side