Bug 238799 - Some Vim color settings break vim
Summary: Some Vim color settings break vim
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: vim
Version: 5.0
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Karsten Hopp
QA Contact: Kevin Baker
Depends On:
TreeView+ depends on / blocked
Reported: 2007-05-02 23:11 UTC by Luke Kanies
Modified: 2014-12-01 23:08 UTC (History)
2 users (show)

Clone Of:
Last Closed: 2013-03-05 13:23:11 UTC

Attachments (Terms of Use)

Description Luke Kanies 2007-05-02 23:11:23 UTC
Description of problem:

The following color settings cause ANSI bugs to appear in the terminal, rather
than changing colors, which makes vim unusable:

set t_AB=^[[%?%p1%{8}%<%t25;%p1%{40}%+%e5;%p1%{32}%+%;%dm
set t_AF=^[[%?%p1%{8}%<%t22;%p1%{30}%+%e1;%p1%{22}%+%;%dm

Version-Release number of selected component (if applicable):

VIM - Vi IMproved 7.0 (2006 May 7, compiled Jan  7 2007 17:44:47)

How reproducible:

100% consistent.

Steps to Reproduce:
1.  Add the above two lines to your .vimrc
2.  Try to edit a file with vim
3.  Notice the horrible gump
Actual results:

Lots of non-ASCII-looking text

Expected results:

Nice colorized text

Additional info:

Comment 1 Steve Siano 2007-10-27 00:06:21 UTC
The following "standard" setting pairs also don't work:

set t_AB=^[[%?%p1%{8}%<%t%p1%{40}%+%e%p1%{92}%+%;%dm
set t_AF=^[[%?%p1%{8}%<%t%p1%{30}%+%e%p1%{82}%+%;%dm

set t_AB=^[[%?%p1%{8}%<%t3%p1%d%e%p1%{22}%+%d;1%;m
set t_AF=^[[%?%p1%{8}%<%t4%p1%d%e%p1%{32}%+%d;1%;m

I do not know of a pair of settings that makes the Vim help tags look correct 
(such that you can see the asterisks on both sides of the tag), for t_Co is 8 
or 16, for GNOME Terminal 2.16.0.

Comment 2 Karsten Hopp 2008-04-28 15:41:11 UTC
this works for me. Which terminal do you use and how do you enter the ^[ ?
Please note that this character needs to be entered as Ctrl-V ESC which makes it
appear as one character.
This is also explained in the vim help page of termcap-options:
It is always possible to change individual strings by setting the
appropriate option.  For example: >
        :set t_ce=^V^[[K        (CTRL-V, <Esc>, [, K)

Comment 3 Luke Kanies 2008-04-28 15:55:35 UTC
This was either RXVT (ssh'ed from a Debian or Darwin box), or it could have been
iTerm when ssh'ed in from my Darwin box.  Based on the time of the complaint, it
was probably from my mac.

And yes, I was using ^V-escape to create the ^[ characters; all other settings
work fine on all other platforms.  I'm the author of Puppet and regularly test
on 3-5 platforms, and Red Hat and CentOS are the only places this cropped up.

Comment 5 Karsten Hopp 2013-03-05 13:23:11 UTC
This should have been closed long ago as WORKSFORME as it doesn't happen with any of our supported terminals.

Note You need to log in before you can comment on or make changes to this bug.