hello people,

i got some help from #vim channel:

syn region emphasize matchgroup=emphasizeConceal start=" " end=" " oneline 
concealends

https://github.com/eiro/slides.vim/commit/facb335d41a1e914f5c2f6d3ee27842f25873161


Le dimanche 9 janvier 2022 à 17:11:27 UTC+1, Marc Chantreux a écrit :

> hello people,
>
> In slides.vim (an ftplugin to transform vim to a presentation system),
> I use nbsp to emphase things
>
> https://github.com/eiro/slides.vim/blob/master/syntax/slides.vim#L1
>
> syn match emphasize "\v \zs[^ ]+\ze "
>
> Which works fine when I want to quote words (or parts of the sentence)
> like.
>
> « What if we use vim as presentation system ?»
>
> But... In the case of my next Fosdem talk, I need to emphase
>
> fibonnaci.grep(&evens).head(5)
> ^^^^^^^^^^^^^
> THIS
>
> But next code isn't valid
>
> fibonnaci. grep(&evens) .head(5)
>
> So I want the nbsp to be concealed ane "grep(&evens)" to be emphased.
>
> So I tried
>
> :set conceallevel=3
> :syn match nbsp " " concealed
>
> It do the opposite as expected:
>
> * no more color
> * nbsp still visible
>
> I read the doc and I spent some time trying to use "contained"
> (inspiration by "help.vim") but I'm not sure I got the problem
> so I don't really know how to fix it.
>
> Does someone have a clue?
>
> Thanks by advance.
> regards
> marc
>

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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/a252a02d-c6dd-4252-9090-84ccd5bf1c89n%40googlegroups.com.

Reply via email to