LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-23-2004, 08:03 AM   #1
krumms
LQ Newbie
 
Registered: Feb 2004
Posts: 7

Rep: Reputation: 0
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?
 
Old 05-23-2004, 08:05 AM   #2
krumms
LQ Newbie
 
Registered: Feb 2004
Posts: 7

Original Poster
Rep: Reputation: 0
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 ...?
 
Old 05-23-2004, 08:42 AM   #3
krumms
LQ Newbie
 
Registered: Feb 2004
Posts: 7

Original Poster
Rep: Reputation: 0
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 I can't win
 
Old 05-23-2004, 08:43 AM   #4
krumms
LQ Newbie
 
Registered: Feb 2004
Posts: 7

Original Poster
Rep: Reputation: 0
Something to note too:
These characters ONLY appear in VIM. Emacs is fine. Pico is fine.
 
Old 05-23-2004, 09:14 AM   #5
krumms
LQ Newbie
 
Registered: Feb 2004
Posts: 7

Original Poster
Rep: Reputation: 0
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!
 
Old 05-23-2004, 09:15 AM   #6
krumms
LQ Newbie
 
Registered: Feb 2004
Posts: 7

Original Poster
Rep: Reputation: 0
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 ...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
encryption with Vim (vim -x) mikshaw Linux - Software 2 03-07-2007 09:00 AM
How to use colours in c++ ? twirl Programming 3 10-05-2005 10:09 PM
Eterm colours Shafted Debian 3 10-24-2004 02:22 PM
ls and colours when listing destin Slackware 5 12-23-2003 06:43 AM
Colours in Konqueror joseamuniz Linux - Software 0 05-26-2003 08:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration