Access buffer variables in Vim interpolation
Hi, first of all kudos for a great plugin: it's awesome.
I'm a relatively new Vim user by any means. My question is: Is there a way to access the buffer's variables in a Vim interpolation (the buffer in question is the one where the snippet will be expanded in)? I have some buffer variables that I set according to filetype and would like to use them in a UltiSnip snippet using Vim interpolation.
Here is an example of a UltiSnip snippet I'm trying to define:
snippet \todo "TODO comment" b
`!v b:comment_strb` TODO: $1`!v b:comment_stre`$0
endsnippet
I want it to expand to the appropriate comment string defined for the programming language (which I define in the b:comment_strb and b:comment_stre variables in a ftplugin vim file).
Thanks for your help.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- UltiSnips Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- SirVer
- Solved:
- Last query:
- Last reply: