post-processing (i.e. code formatter) filter

Asked by Brian Phillips

Is there any way to have the resulting snippet block be processed in some way when you hit the $0 tab stop? For instance, I'd like to be able to process the full block of the snippet with the '=' command (i.e. {Visual}= ). Perhaps this could implemented as an option on the ${0} tab stop or a snippet option? Perhaps this is doable already using some embedded python in the snippet? Thoughts?

Question information

Language:
English Edit question
Status:
Answered
For:
UltiSnips Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
SirVer (sirver) said :
#1

This goes along the lines of this bug 926256. No, this is currently not possible for the simple reason that it would confuse UltiSnips when the snippet you are using it on is nested. There is no way to avoid this due to Vims limited capabilities of communicating text changes.

Therefore: Sorry, out of luck. There is no way to achieve this at this point in time. But if you give me your specific use case as an example, maybe I can help you with ultisnips current abilities to achieve what you want to do.

Can you help with this problem?

Provide an answer of your own, or ask Brian Phillips for more information if necessary.

To post a message you must log in.