Yakov,
Yes. .vimrc and contents of ~/.vim would be different in two cases,
because $HOME is different. For example, if you have 'colorscheme
darkbrown' in your $HOME/.vimrc, this is probably missing or different
in the httpd $HOME
environment.
You need to find out value of $HOME in
the httpd environment and copy your ~/.vimrc to there,
(and maybe ~/.vim, too).
Tried that, but I use the standard color scheme so it didn't change
much. su'ing to the http user and executing 2html.vim from the shell
works as it should.
If that fails, I'd try to add $ENV{TERM}='xterm' to perl
syscall, or system("env TERM=xterm vim ...");
In theory, '-T xterm' is the same, as setting env.var. $TERM,.
but what if it's not ?
Interesting. I've added two lines to 2html.vim:
exe "normal! a$TERM is "
exe "normal! a".$TERM."\n"
to print out the used terminal on the generated XHTML document.
A "vim -T xterm -e [...]" perl syscall didn't force $TERM=xterm, but
$ENV{TERM}='xterm' did. -T still seemed to force xterm to be used
despite $TERM behind the scenes.
Despite all that, a mod_perl syscall backed synIDattr() still maps two
different regions to the same fg ID that are mapped to different ones in
a shell backed vim instance.
Thanks,
Thomas