I'm using MobaXterm to remotely connect to my Centos system. I need to use Vim specifically commands like vimdiff but it is difficult to use since it doesn't use the color configuration highlighting that I set in my vimrc file. It is mostly just using plain white color text with a few colors and my vimrc file definitely works for sure when I use Vim on my Centos system locally.
1 Answers
The terminal emulator in MobaXTerm is an adaptation of PuTTY, and thus the correct terminal type in your TERM
environment variable should be putty
, putty-256color
, or putty-sco
. They are the only terminal types whose entries in the terminfo database correctly describe PuTTY.
It is a widespread incorrect assumption that terminal emulators are all compatible with XTerm, and that the xterm
and xterm-256color
entries in the terminfo database correctly describe them. These do not even describe all versions of XTerm, let alone other terminal emulators.
It is an incorrect assumption that is encouraged by the PuTTY doco and by the default settings in MobaXTerm, but it is incorrect nonetheless. Configure the terminal type correctly in the MobaXTerm settings dialogue, and then make sure that your VIM config is not erroneously tied to "xterm" as the terminal type.
Further reading
- Jonathan de Boyne Pollard (2019). "TERM". Miscellany. nosh toolset.
- https://unix.stackexchange.com/a/560992/5132
- https://unix.stackexchange.com/a/515517/5132

- 68,745