personal web log written by izabeera and dryobates


256-color console Vim

by dryobates

For nowadays programmers it’s quite difficult to to live without syntax highlighting. Standard 16 colors in console vim isn’t sufficient for comfortable code editing. How to use more of them?

Nowadays even console programs are run in terminal emulator. Most of them has support for 256 colors. I use urxvt [1]. In order to tell programs, that I use 256 color terminal in my .bashrc I set:

export TERM=xterm-256color

For my Vim [2] it’s not enough. I had to force it to use 256 colors. In .vimrc I set:

set t_Co=256

From now on I can enjoy with full color palette from solarized schema [3].

[1]rxvt-unicode - terminal emulator with unicode support:
[2]Vim - modal text editor
[3]Solarized - color schema
Jakub Stolarski. Software engineer. I work professionally as programmer since 2005. Speeding up software development with Test Driven Development, task automation and optimization for performance are things that focus my mind from my early career up to now. If you ask me for my religion: Python, Vim and FreeBSD are my trinity ;) Email: