Skip to main content
Improved the answer.
Source Link

Try the following:

syntax region myMinusStart start=/^\s\+zzzz / end=/^\s\+qqqq /   \ keepend   \ contains=myMinusBegin,myMinusEnd syntax match myMinusBegin /^\s\+zzzz / contained conceal syntax match myMinusEnd /^\s\+qqqq / contained conceal 

Note that you need to set conceallevel e.g. to 2, see :h conceallevel.

Update: A simpler alternative:

syntax region myMinusRegion matchgroup=myMinusDelim \ start=/^\s\+zzzz / end=/^\s\+qqqq / \ concealends 

Of course, if you want the start and end matches to be highlighted differently, then the original version is necessary.

Try the following:

syntax region myMinusStart start=/^\s\+zzzz / end=/^\s\+qqqq / \ keepend \ contains=myMinusBegin,myMinusEnd syntax match myMinusBegin /^\s\+zzzz / contained conceal syntax match myMinusEnd /^\s\+qqqq / contained conceal 

Note that you need to set conceallevel e.g. to 2, see :h conceallevel.

Try the following:

syntax region myMinusStart start=/^\s\+zzzz / end=/^\s\+qqqq /   \ keepend   \ contains=myMinusBegin,myMinusEnd syntax match myMinusBegin /^\s\+zzzz / contained conceal syntax match myMinusEnd /^\s\+qqqq / contained conceal 

Note that you need to set conceallevel e.g. to 2, see :h conceallevel.

Update: A simpler alternative:

syntax region myMinusRegion matchgroup=myMinusDelim \ start=/^\s\+zzzz / end=/^\s\+qqqq / \ concealends 

Of course, if you want the start and end matches to be highlighted differently, then the original version is necessary.

deleted 13 characters in body
Source Link

Try the following:

syntax region myMinusStart start=/^\s\+zzzz / end=/^\s\+qqqq / \ transparent keependskeepend \ contains=myMinusBegin,myMinusEnd syntax match myMinusBegin /^\s\+zzzz / contained conceal syntax match myMinusEnd /^\s\+qqqq / contained conceal 

Note that you need to set conceallevel e.g. to 2, see :h conceallevel.

Try the following:

syntax region myMinusStart start=/^\s\+zzzz / end=/^\s\+qqqq / \ transparent keepends \ contains=myMinusBegin,myMinusEnd syntax match myMinusBegin /^\s\+zzzz / contained conceal syntax match myMinusEnd /^\s\+qqqq / contained conceal 

Note that you need to set conceallevel e.g. to 2, see :h conceallevel.

Try the following:

syntax region myMinusStart start=/^\s\+zzzz / end=/^\s\+qqqq / \ keepend \ contains=myMinusBegin,myMinusEnd syntax match myMinusBegin /^\s\+zzzz / contained conceal syntax match myMinusEnd /^\s\+qqqq / contained conceal 

Note that you need to set conceallevel e.g. to 2, see :h conceallevel.

added 9 characters in body
Source Link

Try the following:

syntax region myMinusStart start=/^\s\+zzzz / end=/^\s\+qqqq / \ transparent keepends \ contains=myMinusBegin,myMinusEnd syntax match myMinusBegin /^\s\+zzzz / contained conceal syntax match myMinusEnd /^\s\+qqqq / contained conceal 

Note that you need to set conceallevel e.g. to 2, see :h conceallevel.

Try the following:

syntax region myMinusStart start=/^\s\+zzzz / end=/^\s\+qqqq / \ transparent \ contains=myMinusBegin,myMinusEnd syntax match myMinusBegin /^\s\+zzzz / contained conceal syntax match myMinusEnd /^\s\+qqqq / contained conceal 

Note that you need to set conceallevel e.g. to 2, see :h conceallevel.

Try the following:

syntax region myMinusStart start=/^\s\+zzzz / end=/^\s\+qqqq / \ transparent keepends \ contains=myMinusBegin,myMinusEnd syntax match myMinusBegin /^\s\+zzzz / contained conceal syntax match myMinusEnd /^\s\+qqqq / contained conceal 

Note that you need to set conceallevel e.g. to 2, see :h conceallevel.

Source Link
Loading