Get colors using a Mac OS X terminal when editing source code on remote Linux machines

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

What determines that on some machines, using the same MACOSX terminal settings, the source code is colored, but not on the other?

thanks

+4
source share
4 answers

Do you use :syntax enable in vim on a remote computer? Just ask, as for those who work, it can be in .vimrc or similar.

+6
source

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

$TERM installed when connected to a remote terminal. From there, you can try export TERM='xterm-color' and see what happens.

+1
source

In my case, these "remote Linux machines" usually have a "small" or "tiny" version of vim that does not have syntax highlighting. When in vim enter the command :version and see if there are +syntax or -syntax in the list of functions. If you do not have +syntax , then vim was compiled without syntax support, and you need to recompile vim on this machine.

0
source

Installing .vimrc with

set term = xterm-color

I had a tiger server running in OS X. I put this at the top of .vimrc. I also set the term app on the OS X El capitan host in the xterm settings. I have syntax highlighting on SSH. thanks again

0
source

Source: https://habr.com/ru/post/1303467/


All Articles