I created a region that displays different highlighting for start/end
and content. However, I wanted the spaces following start and preceding
end not to be  highlighted.

I came up with the solution outlined below. It works. I am just
wondering: was this the best way to do it?

EXAMPLES (highlighting indicated below)
========

- This Is A Heading -
m ggggggggggggggggg m

-- This Is A Heading   --
mm ggggggggggggggggg   mm


NOTE
====

The title must be preceded and followed by at least one space.


SYNTAX
======

syn region  xyzNoformat matchgroup=xyzTitleMark
start="^\z(-\{1,5\}\) "rs=e-1 end=" \z1$"re=s+1 contains=xzyTitle
keepend oneline

syn match   xyzTitle "\S.\+\S\ze \+" contained


-- 

Best Regards,
Tarlika Elisabeth Schmitz

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

Reply via email to