Phyton interpolation with a new line \n
Asked by
feliperama
I'm trying to do python interpolation to create a big block of XML code, however i'm having problems with identation when using \n in a string. For example, if I use the following snippet in a 2 space vim tab identation after the <tag> line
snippet test "XML tag test" b
`!p snip.rv = '<test>
endsnippet
I'm getting these:
<tag>
<test>
</test>
</tag>
BUT I want:
<tag>
<test>
</test>
</tag>
How can I return a string with multiple lines that respect the code identation space?
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- UltiSnips Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- feliperama
- Solved:
- Last query:
- Last reply:
To post a message you must log in.