On 09/08/11 14:22, wombatvvv wrote:
Thanks for the helpful replies guys.

I ended up figuring out what was wrong ... yup, the terminal wasn't in 256
colour mode.

Turns out I can put it into 256 colour mode pretty easily from within VIM
simply by using: *set t_Co=256*. This solves the problem straight away. I
guess one of the other colorschemes might have had that included, which is
why it worked after cycling through all the colorschemes.

/However, now I have another question.../ ... after so much stuffing around
with colours and colorschemes, I started building my own colorscheme. I have
2 questions...

*1.* I can't get PHP funcitons to highlight at all. I've tried lots of
different identifiers, Function, phpFunction, phpMethods, etc. but none of
them work. Functions in other languages highlight fine.

*2.* Is there anyway I can tell what "syntax" identifier is used for an
element under the cursor? (so, for example, I can just put the cursor on a
PHP function and somehow find what it's syntax mapping is? There's lots of
different syntax identifiers and I have no idea what they are for e.g.
phpIdentifierComplex, phpIdentifierErratic, etc.

Any help there appreciated.

Thanks.

I think your question *1* has already been answered. For *2* I have the following in my vimrc:

if has('user_commands') && has('syntax')
command -nargs=0 -bar WhatSyntax echomsg synIDattr(synID(line("."),col("."),0),"name") synIDattr(synIDtrans(synID(line("."),col("."),0)),"name") synIDattr(synID(line("."),col("."),1),"name") synIDattr(synIDtrans(synID(line("."),col("."),1)),"name")
endif

(this is three lines, one starting "if", a very long one starting "command" and one with only the word "endif").

It will return four syntax names; but usually there are no more than two different ones -- unless you can find a file which uses transparent syntax.

In some cases (e.g. on whitespace at the start of a line in a Vim script) it doesn't show anything.


Best regards,
Tony.
--
Fie for shame, you lascivious, lewd, lecherous, libidinous, lustful,
licentious, dirty bum!!

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to