Thom1729 / YAML-Macros

A macro system for YAML files powered by Python. Intended for Sublime Text development.
MIT License
21 stars 3 forks source link

Problems inserting several lines of text. #31

Open ngppgn opened 6 years ago

ngppgn commented 6 years ago

I'm trying to use YAML macro to heavily reduce chunk of text I repeat across a family of related syntaxes. For example, all of them use the same set of variables, so I write a simple python function common_vars(str) that just return the multiline string containing all those variables. When invoking it in a .yaml-macros I get the problem that i get '\n' printed instead of actual newlines, and '\' at the start of each inserted line.

So, is there any better approach to inserting several lines of text at once than having to write a function that returns an array of lines?