Closed AndydeCleyre closed 6 years ago
You can try a definition like this (I just tested it and at least on my system with up-to-date Plasma frameworks this works):
multiline=this definition \n has multiple \n lines of text
(The spaces before and after the \n
are just for clarity.)
If this works for you as well, I can add this new-found feature to the README ;)
Thanks, it's partially working. There's some funny behavior with trailing spaces (for example, if it ends with an indented, blank line).
The latest update to krunner appears to have altered the visualization of these multi-line definitions; only the first line of the definition is being displayed. However, triggering the result still has the wished effect of copying the full, multi-line snippet.
As this plugin only returns the content of the matches and has no influence on their graphical representation, I won't be able to change this.
To be clear, my previous comment was not regarding the preview. I was noting that if the snippet ends with a new line followed by white space, the inserted snippet does not include that white space.
Just noticed this issue is still open – sorry I didn't answer anymore back then. For anyone who still wonders how to do this: a non-breaking space (see the definition nbsp
) can be added after the last new line, and it should be included in the retrieved string. (I think the KConfig framework does automatic trimming of whitespaces at the beginning and end of each line, so with non-breaking spaces we tell it that we actually care about the spaces – just like html
works.)
Is there a syntax supporting multiline snippets? I don't see that mentioned.