Tuesday, June 28, 2011

Re: syntax highlight unusual strings

cyboman wrote:
> my company is using a propitiatory language. there are 4 kind of
> different kind of strings that can be defined.
>
> i"mystring"
> x"mystring"
> b"mystring"
> "mystring"
>
[snip]

Here's one attempt...

syn region Strings matchgroup=myRegularString start=/"/ end=/"/
syn match myByteString /\<b\ze"/ nextgroup=Strings
syn match myHexString /\<x\ze"/ nextgroup=Strings
syn match myOtherString /\<i\ze"/ nextgroup=Strings

hi def link Strings String
hi def link myByteString Delimiter
hi def link myHexString Delimiter
hi def link myOtherString Delimiter
hi def link myRegularString Delimiter


Regards,
Chip Campbell

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