Hi there, @eht16 I’m using geany for competitive programming how can I use multi line snippets/templates in geany I’m unable to write everything in a single line any help will be appreciated.

Thank you,
Saif Ali Khan

Hi @saifcore7, I hope I understood your question correctly.

You can use the escape sequence "\n" to insert a new line in a snippet.

See also the documentation for snippets: https://geany.org/manual/#user-definable-snippets.

#geany #geanyIDE

Geany

@eht16 but I have to write everything in one line, using \n also I cannot write it like a code is written, I am unable to write this in a single line for snippet any solution as I write the snippet like this it only prints the first line

@saifcore7 in "snippets.conf" simply remove the line break at line 56, it should read:

template=#include <iostream>\nusing namespace std;{%cursor%}\n

@saifcore7 On a side note, you better ask such questions using a hashtag like "#geany", ask on the mailing list or ask on Github (https://github.com/geany/geany/discussions).
All these variants are usually better than asking multiple individuals.
geany geany · Discussions

Explore the GitHub Discussions forum for geany geany. Discuss code, ask questions & collaborate with the developer community.

GitHub
@eht16 okay sir thank you for your help.