Re: [code] [textadept] Is there a way to enclose text in Snippets?

From: Robert Gieseke <>
Date: Thu, 23 Mar 2017 22:00:55 +0100

Am 23/03/17 um 19:22 schrieb cryo shock:
> There is another thing I should mention to be complete:
> when a snippet looks like this (the way initially described):
> snippets.context['emph'] = '{\\em %0<selected_text>}'
> then snippets work as expecten when you paste them over highlighted
> text. BUT when you use the very same snippet without highlighted text,
> then the cursor jumps to the end of the snippet, and not like expected
> to the %0 placeholder. So what I had to to is: add a second placeholder
> to the snippet:
> snippets.context['emph'] = '{\\em %0%1<selected_text>}'
> But I am sure that this will lead to undesired results with snippets
> that contain multiple placeholders...

Hm, don't know whether this could be considered a bug, maybe %0 can only
be "standalone".

But your workaround doesn't seem to work for me ...


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Thu 23 Mar 2017 - 17:00:55 EDT

This archive was generated by hypermail 2.2.0 : Fri 24 Mar 2017 - 06:54:17 EDT