On 5/6/06, Thomas Haselwanter <[EMAIL PROTECTED]> wrote:
Hi,

Vims excellent script support just asks to be exploited, and I am in the
process of putting 2html.vim to use. I have been getting different
results from this script, which I've tracked down to synIDattr()
returning different attribute values for given syntax IDs depending upon
the environment from which vim is called.

Calling

/usr/bin/vim -e +"syntax on" +"set syntax=c" +"run! syntax/2html.vim"
+"wq" +"q" /tmp/helloworld.c

from the command line results in a different HTML file than calling it
via a system call from within mod_perl. In particular synIDattr()
doesn't return "1" anymore for the attribute bold and for the fg
attribute it maps to different cterm colors, even two different colors
to the same cterm color which weakens the highlighting effect. This is
not a switch from 8 cterm colors to 16 or vice versa, both work with 8
colors.

I realize that this may possibly need to be fixed in mod_perl and not
vim, but at this stage I'm just fishing for pointers what might cause
synIDattr() to behave differently. I've verified this behavior in vim
6.3 and the latest 7.0 beta. Any ideas?

Is $TERM environment variable defined identically
in both cases ?

$TERM value is important where
terminal capabilities are concerned. To force TERM value,
you can use either 'vim -T ...', or 'env TERM=... vim', or
shell command.

Yakov

Reply via email to