Skip to content
Discussion options

You must be logged in to vote

Oh, yeah certainly!! Look for snip_expand in DOC.md, you can expand any snippet, you just need to have the snippet-object (created by s(...)) (there are some other discussions on this, I'm too lazy to look for the exact ones right now, but search should turn them up :) ).
One issue with snip_expand is that it can't handle eg. snippets with regTrig/non-plaintext trigEngine (we don't know whether the text at the expand-position matches the pattern/regex), or more precisely, it can handle them, but it won't set the env-variables.

Regarding your suggestion, that's very possible!
You'd have to set expand_params.env_override.VISUAL to the text selected in visual mode, and then use it inside the…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by s1n7ax
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants