Thursday, November 8, 2012

Re: Use different color for whitespace seperated list

On Wednesday, November 7, 2012 7:43:54 PM UTC-6, SungHyun Nam wrote:
> Hello,
>
>
>
> I want to use different colors for whitespace seperated list.
>
> For example, if there is a line like below:
>
> ABC def3 g.1.3_b what.ever
>
> DEF 1.2.3 abcdef __yeah__
>
>
>
> Can I assign different color for 4 columns?
>

Yes. Is this within another syntax or on an otherwise unhighlighted file?

The most trivial implementation would probably be to match start-of-line followed by non-whitespace followed by whitespace, and use nextgroup to do it again with a different name for each column after the first. See :help :syn-nextgroup.

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