Saturday, August 19, 2017

Creating a syntax file need to grab a global variable to match.

One of the plugins that I use allows the end user to redefine a variable to use different markers for text replacement.

It defaults to:

startDelim is: {{+
endDelim is: +}}

I would like to grab the global variable g:startDelim and g:endDelim and use that in my syntax matching group.

Since the end user can remap it and I do using || instead of the curly brackets, I need to grab and use that global variable.

I can force match it to my own choice with:

syntax match mystartKeyword "\v\|\|\+"
syntax match myKeyword "\v\+\|\|"

But that's not optimal.

Is that possible?

Thanks for any help and suggestions.

--
Bob

--
--
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.
For more options, visit https://groups.google.com/d/optout.

No comments: