sponsor Vim development Vim logo Vim Book Ad

basic Tip #827: XTerm and 256 Colors

 tip karma   Rating 27/11, Viewed by 2426 

Read and edit this tip on the Vim tip wiki. The wiki may have a more recent version of this tip.

created:   December 2, 2004 22:03      complexity:   basic
author:   Ryan Phillips      as of Vim:   6.0

XTerm supports 256 colors when compiled with the --enable-256-color configure option.  To actually enable the colors set the TERM enviroment variable to TERM=xterm-256color

Some of the colorschemes support the 256 color format.

 rate this tip  Life Changing Helpful Unfulfilling 

<< PHP manual in VIM help format | pad trailing blanks onto end of lines to ease visual blocks >>

Additional Notes

[email protected], December 4, 2004 20:06
rkjjkrhkljl;trr
Anonymous, December 7, 2004 8:03
hello I think comps are takeing over the world
Anonymous, December 7, 2004 8:04
your mom is a cow
Anonymous, December 9, 2004 15:45
Great tip, thanks.. a simple compile away from this nice stuff, and no need for the GUI.
xterm really is a great effort.. latest versions deal nicely with utf-8 too.. good work indeed.
[email protected], December 13, 2004 1:27
Any way to remove the first 3 additional 'notes' ?

thanks for the tip :)
any chance you might mention some of the colour schemes that do support them? (although I guess I could look at the color definition files to find out... but I get sidetracked enough as it is by this wonderful editor from that which I'm editing ;)
[email protected], December 17, 2004 2:27
A way to add xterm with 256 colors in Debian:

*   To know how many colors xterm has:
    strings /usr/X11R6/bin/xterm | grep ^color[0-9] | sort -tr +1 -n

*   Create a directory e.g. "build"
*   cd build
*   apt-get source xterm
*   apt-get build-dep xterm
*   untar sources
*   for i in debian/patches/* ; do patch -p0 < "$i" ; done
*   cd xc/programs/xterm
*   chmod +x configure
*   ./configure --with-x --enable-256-color --enable-wide-chars --disable-freetype
*   make
*   make install
*   install debian package ncurses-term (which contains the file
    usr/share/terminfo/x/xterm-256color)
*   set TERM=xterm-256color
*   Use perl script to check colors:
    perl 256colors2.pl
    (google it if it isn't in your system)

-- Ivan F. Villanueva B. --
Anonymous, December 21, 2004 17:51
Great tip! Thanks, Ivan! :)
[email protected], January 7, 2005 11:04
inkpot is one of the colorschemes that supports 256 color.
If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Sponsored by Web Concept Group Inc. SourceForge.net Logo