General questions about snippets and their behaviour

From: phayz <russelldicken....at.gmail.com>
Date: Thu, 8 Apr 2010 16:00:25 -0700 (PDT)

I have some general questions about Textadept's snippets -

(1) In the CPP snippets file provided with Textadept, the snippets
themselves are surrounded by single quote marks ('), but the XML
snippets are surrounded by double quote marks ("). Is there a specific
reason for this difference?

In a hypertext snippets file created by Brian Schott, he escapes
double quotes with a backslash (e.g. \" ) and I wonder, if the
snippets were surrounded by single quote marks and not double quote
marks, would the double quote marks still have to be escaped with a
backslash?

(2) In a hypertext snippets file created by Brian Schott, he has
double square brackets (i.e. [[ and ]]) surrounding some snippets and
I wonder why. What is the significance of the double square brackets?

(3) Now that I have hypertext snippets working, I have done a little
testing of Brian's hypertext snippets. I type 'ahr' and press [Tab]
and, as if by magic, the snippet's replacement text is inserted.
Fantastic! I then carry on editing the file further on, but the empty
line immediately below the inserted text remains a horrible mustard
colour. I don't mean to disparage mustard as a colour in general
(although it *IS* quite disgusting) but I don't understand why the
highlight remains.

I did a little more testing before sending this and I have some more
information. The 'ahr' snippet contains placeholders '%1' and '%0' and
the highlight remains if I don't type text in the snippet's
replacement text where the '%1' placeholder appears. If I go back to
the text inserted by the snippet and DO type some text in there, the
highlighted, blank line disappears. If I put the cursor on this
highlighted, blank line, and press [Tab], the highlight disappears and
the cursor is moved to the position in the snippet's replacement text
where the '%0' placeholder appears.

Regards,

Russell Dickenson

-- 
You received this message because you are subscribed to the Google Groups "textadept" group.
To post to this group, send email to textadept.at.googlegroups.com.
To unsubscribe from this group, send email to textadept+unsubscribe.at.googlegroups.com.
For more options, visit this group at http://groups.google.com/group/textadept?hl=en.
Received on Thu 08 Apr 2010 - 19:00:25 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:42:49 EST