I'm trying to get 256 color theme files to work with VIM under xterm. This is peaksea how it looks for me:How it should look:I've tried following the tips on the wiki page to no avail.set t_Co=256 works fine butset t_AB=^[[48;5;%dmset t_AF=^[[38;5;%dmresults in the escape sequences being displayed on the terminal:EDIT: Mikel was right, I needed to type Ctrl+v+Esc to input the ^[ properly. However, that has not fixed my problem.So what other changes can I try to make this work?Additional info$ uname -aLinux xxxxxxx 3.4.7-1-ARCH #1 SMP PREEMPT Sun Jul 29 22:02:56 CEST 2012 x86_64 GNU/Linux-$ xterm -version XTerm(281)-$ vim --versionVIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jul 13 2012 05:24:27)Included patches: 1-600Compiled by ArchLinuxBig version with GTK2 GUI.  Features included (+) or not (-):+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui +diff +digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +float +folding -footer +fork() +gettext -hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +lua +menu +mksession +modify_fname +mouse +mouseshape +mouse_dec +mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +mouse_urxvt +multi_byte +multi_lang -mzscheme +netbeans_intg +path_extra +perl +persistent_undo +postscript +printer -profile +python -python3 +quickfix +reltime +rightleft +ruby +scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title +toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu +windows +writebackup +X11 -xfontset +xim +xsmp_interact +xterm_clipboard -xterm_save    system vimrc file: /etc/vimrc     user vimrc file: $HOME/.vimrc      user exrc file: $HOME/.exrc  system gvimrc file: /etc/gvimrc    user gvimrc file: $HOME/.gvimrc    system menu file: $VIMRUNTIME/menu.vim  fall-back for $VIM: /usr/share/vimCompilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15   -I/usr/local/include  -march=x86-64 -mtune=generic -pipe -fstack-protector --param=ssp-buffer-size=4  -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      Linking: gcc   -L. -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -rdynamic -Wl,-export-dynamic  -Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE  -Wl,-O1,--sort-common,--as-needed,-z,relro -L/usr/local/lib -Wl,--as-needed -o vim   -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0   -lSM -lICE -lXt -lX11 -lXdmcp -lSM -lICE -lm -lncurses -lnsl   -lacl -lattr -lgpm -ldl  -L/usr/lib -llua  -Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -fstack-protector -L/usr/local/lib  -L/usr/lib/perl5/core_perl/CORE -lperl -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc -L/usr/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic   -lruby -lpthread -lrt -ldl -lcrypt -lm  -L/usr/lib   -$ ls -l /usr/share/terminfo/x/xterm-256color -rw-r--r-- 1 root root 3336 Feb  8  2012 /usr/share/terminfo/x/xterm-256color.vimrcset t_Co=256.Xdefault!--------------------- XTERM ------------------------xterm*dynamicColors:    truexterm*background:       blackxterm*foreground:        #BBBBBBxterm*utf8:             2xterm*eightBitInput:    truexterm*saveLines:        32767xterm*scrollTtyKeypress:       truexterm*scrollTtyOutput:  falsexterm*scrollBar:        falsexterm*loginShell:       truexterm*faceName:         xft:Dejavu Sans Mono:size=10xterm*jumpScroll:       truexterm*multiScroll:      truexterm*toolBar:          falsexterm*geometry:         100x30EDIT: Attempted solutionsI already installed rxvt-unicode and was using that previously. However I had the same problem. Here is a side by side comparison of the two. On the left is xterm and on the right is urxvt. The file open is the .Xdefaults which shows the settings for urxvt one of which might be the problem?I also ran the color test script with seemingly positive output. Top is xterm bottom is urxvt. $ echo $TERMxterm-256colorWorkaround solutionI'm now using CSApprox and it seems to work well enough. What I'm still confused about is why the theme doesn't work even though it has the appropriate console color settings defined. Perhaps it has something to do with the way vim considers itself. It was installed as a part of the gvim package so it could be ignoring the cterm settings. EDIT: And now everything seems to be fine..Strangely after installing CSApprox then removing it, everything seems to work as it should. Just downloaded another colorscheme and it loaded perfectly even without the CSApprox module running. 
How to get VIM to display 256 colors properly
arch linux;vim;colors;xterm;rxvt