Sunday, January 9, 2022

improve slides.vim: concealing nbsp?

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 vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/YdsJIv1P5vTodrhH%40prometheus.u-strasbg.fr.

No comments:

Post a Comment