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? |
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 ...? |
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 |
Something to note too:
These characters ONLY appear in VIM. Emacs is fine. Pico is fine. |
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!
|
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. |