LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   VIM and Colours (https://www.linuxquestions.org/questions/linux-software-2/vim-and-colours-184781/)

krumms 05-23-2004 08:03 AM

VIM and Colours
 
I'm working on a remote system via SSH. The remote system had a few niggly little problems that are of annoyance to me, but I've fixed most of them up. The most frustrating issue I'm having at the moment is that VIM isn't using colours for syntax highlighting (i.e. after executing :syntax on) - instead, text is bold, underlined, etc.

I checked the VIM documentation and it mentions something about the type of terminal program being used, recommending xterm. Now, I know for a fact the remote system isn't running X at all, yet "echo $TERM" outputs "xterm". I think this may be the problem, but I don't know what else I should set TERM to.

Anybody know?

krumms 05-23-2004 08:05 AM

Also possibly of interest is the fact that ls output is correctly coloured (i.e. different colours for executable files, directories, sockets and devices).

Perhaps it's not TERM that's the problem after all ...?

krumms 05-23-2004 08:42 AM

Okay, TERM=linux and VIM colours appear, but now I have a new problem.

Vim spits out-looking characters on certain lines, which look something like:

[][?0c[][?1c

(the [] characters is actually one block-like character)

Another mystery :confused: I can't win

krumms 05-23-2004 08:43 AM

Something to note too:
These characters ONLY appear in VIM. Emacs is fine. Pico is fine.

krumms 05-23-2004 09:14 AM

Alright, if TERM is unset all together, syntax highlighting occurs correctly, but now my END and HOME keys do funky stuff, presumably because of things from /etc/inputrc ... argh!

krumms 05-23-2004 09:15 AM

Finally cracked it:

export TERM=xterm-color

And everything (including HOME/END) works great.
I find it a bit odd that xterm-color fixes things though, considering the remote system isn't running X ...


All times are GMT -5. The time now is 11:42 PM.