You are not logged in.

#1 2006-04-03 14:08:46

lidzky
Member
From: Brazil
Registered: 2006-03-23
Posts: 12

VIM Syntax highlight not working

Hello all

Someone please tell me how to get syntax highlight working under VIM.

I've already configured my .vimrc to enable syntax, but VIM is not highlighting my files.  roll

TIA

Offline

#2 2006-04-03 15:54:41

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: VIM Syntax highlight not working

Before you enter vim, what is the output of "echo $TERM".

When inside vim, what is the output ":set ft" and ":set syntax"?

Offline

#3 2006-04-03 16:14:53

lidzky
Member
From: Brazil
Registered: 2006-03-23
Posts: 12

Re: VIM Syntax highlight not working

Hi,

$ echo $TERM
xterm

And

:set ft
  filetype=php                                     

:set syntax
  syntax=php 


Using aterm does work! But is there any option to enable colors under xterm?

roll

thanks

phrakture wrote:

Before you enter vim, what is the output of "echo $TERM".

When inside vim, what is the output ":set ft" and ":set syntax"?

Offline

#4 2006-04-03 18:10:43

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: VIM Syntax highlight not working

the terminal type 'xterm' is a mono terminal.  You need to change it to be 'xterm-color' or 'xterm-256color'.

This can be done via your ~/.Xdefaults like so:

xterm*termName: xterm-256color

Less properly, you can use "export TERM=xterm-256color" in bashrc or something.

Offline

#5 2006-04-03 18:26:52

lidzky
Member
From: Brazil
Registered: 2006-03-23
Posts: 12

Re: VIM Syntax highlight not working

Wow, thank you very much!!!! Working fine now smile

Offline

Board footer

Powered by FluxBB