Thursday, 5 June 2008

A !Zap colour scheme for Vim

It's common knowledge that Vi (well, Vim) is the best editor in the world, with no exception. I have used Vim for the majority of my programming career, and I love it. It's as much a way of thinking - a way of life - as it is an editor.

Before using Vim, when incarcerated on Acorn computers, I used an editor called Zap (or !Zap if you're that way inclined). It was a really powerful little beast, with great support for different filetypes and awesome syntax highlighting. It was the power of Zap that forced me to look for a similarly powerful editor... Vim.

Ever since my move to Vim I've been using a custom colour scheme that made Vim look more Zap-like. A few other people have used it over the years, but it's always been a few random lines pasted into my .vimrc file, rather than a proper Vim colourscheme.

Well, that is, until now. Vim users rejoice, here is my Zap colorscheme file for Vim. Save this as ~/.vim/colours/zap.vim and then add "colorscheme zap" to your ~/.vimrc file.


" =============================================================================
" Name: zap
" Purpose: Zap-like colour scheme
" Maintainer: Pete Goodliffe (
" Last change: January 2008
" =============================================================================

" Zap is an archaic editor from RISC OS (an archaic computer)
" But it was great.

" =============================================================================
" Preamble
" =============================================================================

set background=dark

hi clear

if exists("syntax-on")
syntax reset

let colors_name = "zap"

" =============================================================================
" Vim >= 7.0 specific colours
" =============================================================================

if version >= 700
hi CursorLine term=underline cterm=underline guibg=#111133
" hi CursorColoumn
" hi MatchParen
" hi Pmenu
" hi PmenuSel

" =============================================================================
" General colours
" =============================================================================

hi Normal guibg=Black guifg=White ctermbg=Black ctermfg=White
hi Cursor gui=none guibg=White guifg=Black ctermbg=White ctermfg=Black

hi Folded guifg=Orange guibg=DarkBlue
hi FoldColumn guifg=Orange guibg=DarkBlue

" The following values have never been set by my vimrc, but this these are the
" default values that I end up using...

"NonText xxx gui=bold term=bold cterm=bold ctermfg=4 gui=bold guifg=Blue
"LineNr xxx term=underline cterm=bold ctermfg=3 guifg=Yellow

"hi StatusLine xxx term=bold,reverse cterm=bold,reverse gui=bold,reverse
"hi StatusLineNC xxx term=reverse cterm=reverse gui=reverse
"hi VertSplit xxx term=reverse cterm=reverse gui=reverse
"hi Title xxx term=bold cterm=bold ctermfg=5 gui=bold guifg=Magenta
"hi Visual xxx term=reverse cterm=reverse guibg=DarkGrey
"hi SpecialKey xxx term=bold cterm=bold ctermfg=4 guifg=Cyan

" =============================================================================
" Syntax highlighting
" =============================================================================

hi Comment gui=none term=bold guifg=Green ctermfg=Green
hi Todo gui=bold term=bold guibg=yellow guifg=black
hi Constant term=underline guifg=#8dffff
hi Identifier gui=bold term=underline guifg=#ffff60
hi Function gui=none guifg=#ffcabd
hi Type gui=bold term=underline guifg=#aaaa00
hi Statement term=bold guifg=#ffff20
hi PreProc term=underline guifg=#00bbff ctermfg=LightBlue
hi Special term=bold guifg=Orange

hi Search gui=underline guifg=#fe0000 guibg=#553333
hi QtClass guifg=Orange ctermfg=LightBlue
Oh, and if you're looking for an excellent version of Vim that runs on Mac OS, the check out MacVim.


Anonymous said...

screenshot plz?

lijialefw said...

Why was there no follow on bankruptcy then? The bailout of AIG FP went to (wow power leveling) hedge funds that bound credit swaps on Lehman failing or others betting on rating (wow power leveling) declines. AIG has drained over 100 billion from the government. Which had to go to (wow power leveling) those who bet on failures and downgrades. Many of whom (power leveling)were hedge funds. I-banks that had offsetting swaps needed the money from the AIG bailout or they would have been caught. Its an (wow powerleveling) insiders game and it takes just a little bit too much time for most people to think (wow gold) through where the AIG 100 billion bailout money went to, hedge funds and players, many of whom hire from the top ranks of DOJ, Fed, Treasury, CAOBO

jay paul said...

Very informative post. Keep up the good work. I would really look forward to your other posts

Samsung - 14" Notebook 4 GB Memory - 500 GB Hard Drive

Samsung - 14" Notebook 4 GB Memory - 640 GB Hard Drive