Sunday, May 2, 2010

Re: Problem with VIM syntax coloring

On 02/05/10 01:31, Jack Ripper wrote:
> Tony,
> My first reply was too quick. I noted that the curly braces are all colored correctly, but the parenthesis and brackets still are not colored. I'm wondering if the "syntax" of the vim file might be in error. I used "syn match Brackets '[](){}'
> Any ideas anyone?
> Thanks,
> Peter V.

syn match Brackets '[](){}[]'

where

[ open collection
] match closing bracket
( match opening paren
) match closing paren
{ match opening brace
} match closing brace
[ match opening bracket
] close collection

I'm putting the ] first and the [ last so that Vim won't confuse them
with the enclosing [...]. The [] at the start and end are not duplicates
of each other.


Best regards,
Tony.
--
ARTHUR: Will you ask your master if he wants to join my court at
Camelot?!
GUARD #1: But then of course African swallows are not migratory.
GUARD #2: Oh, yeah...
GUARD #1: So they couldn't bring a coconut back anyway...
The Quest for the Holy Grail (Monty
Python)

--
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

No comments:

Post a Comment