[code] Dealing with % before a snippet-placeholder

From: docmorchel . <docmorchel.att.gmail.com>
Date: Wed, 11 Nov 2015 23:22:01 +0100

Hi all,

How would I get a percent sign in front of the substituted placeholder?
The snippet result (actually part of it) should consist of a percent sign
followed by some digits, eg. '%12'. My two attempts, which failed were:

snippets.pm = {
re1 = '%%%1(digits)',
re2 = '%%1(digits)',
}

And to sneak in another snippets-question:
In one of my snippets I want to have the current date as placeholder. What
is considered to be best practise to have dynamic content (I came up with
the following: date = "%1("..os.date('%Y/%m/%d')..")")

Kind Regards,
Martin

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Wed 11 Nov 2015 - 17:22:01 EST

This archive was generated by hypermail 2.2.0 : Thu 12 Nov 2015 - 06:46:02 EST