Thursday, January 17, 2013

Syntax Highlighting

In the kconfig.vim file, there exists the following:

syn keyword kconfigPreProc source
\ nextgroup=kconfigPath
\ skipwhite

Later, there is:

syn match kconfigPath '"[^"\\]*\%(\\.[^"\\]*\)*"\|\S\+'
\ contained

which appears to match something like:

source "path/to/myfile"

however, it also seems to match

source path/to/myfile

which has caused me issues in the past. To that end, I want to do
something like what lilo.conf has in it where I can set
"source path/to/myfile" as Error text so I can clearly see what my
problem is.

I attempted to do something like:

syn match kconfigPreProcError source
\ nextgroup=kconfigPathError
\ skipwhite

syn match kconfigPathError '[^"]*.*$'

then later

hi def link kconfigPreProcError Error

But this didn't do what I expected.

Please tell me where I've gone wrong.

Thanks!
Andy

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