Tuesday, January 26, 2010

Re: WORD # and syntax files

Hi tonibin!

On Di, 26 Jan 2010, tonibin wrote:

> Hi, i'm subscribed as tonibin.
>
> I'd like how to obtain selection for keywords (DEC-10 BASIC) like:
>
> FILE#1,...
> FILE #1,...
> FILE# 1,...
> FILE # 1,...
>
> I'd like the word "FILE" (or other words), the symbol "#" and the
> following number (1 to 9) being selected for a syntax highlighting, no
> matter how many spaces there are in between. I've tried with "region",
> "match" and "keyword", but nothing seem to work (except "keyword",
> that selects the word FILE only).

syn match MyFile 'FILE\s*#\s*\d'
hi def link MyFile Special

regards,
Christian

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments: