tags:

views:

67

answers:

3

Hi,

I use terminal from Mac OS X Leopard to connect to remote Linux machines and edit C++ code there using VI.

What determines that in some machines, using the same MACOSX terminal settings, the source code gets colorized and in other not?

Thanks

+1  A: 

Usually, the $TERM environment variable determines whether the terminal is capable of color.

$TERM is set upon connection to the remote terminal. From there, you can try export TERM='xterm-color' and see what happens.

sirlancelot
+1  A: 

Have you used :syntax enable in vim on the remote machine? Just asking, since on the ones that are working it could be in .vimrc or similar.

Ramashalanka
A: 

In my case, these "remote linux machines" usually have a 'small' or 'tiny' version of vim installed which does not have syntax highlighting. When in vim, enter the command :version, and see if you have +syntax or -syntax in the feature list. If you don't have +syntax, then vim has been compiled without syntax support and you need to recompile vim on that machine.

too much php