After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 452586 - Snippets plugin syntax changed
Snippets plugin syntax changed
Status: RESOLVED DUPLICATE of bug 460523
Product: gedit
Classification: Applications
Component: docs
git master
Other Linux
: Normal normal
: ---
Assigned To: Maintainers of Gnome user documentation
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2007-06-30 16:02 UTC by jessevdk@gmail.com
Modified: 2009-12-31 12:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description jessevdk@gmail.com 2007-06-30 16:02:57 UTC
The snippets plugin syntax changed a bit and the docs should be updated accordingly.

Changes:
  - Normal placeholders can have multiple default values. The first non-empty default value will be used as the default value. This is useful if you want to have a default value which is a environmental variable but fallback on a fixed default if the environmental variable isn't set. The syntax is: ${n:[def1,def2,...]}. So for example: ${1:[$GEDIT_SELECTED_TEXT,mytext]}

  - The syntax for python placeholder dependencies has changed. The dependencies can now be specified by using the following syntax: $<[n1,n2,...]: python code>. For example: $<[1,2]: return "example">.

  - Both shell and python placeholders can now have a tabstop, The syntax is: $(n:shell code), `n:shell code` and $<n:shell code> respectively. For python snippets this means that if you want to specify both a tabstop and dependencies than you need $<3:[1,2]: python code>. Tabstops in these placeholders are only valid when the placeholders don't have any dependencies (either implicit or explicit) on other placeholders

  - Escaping behaviour has changed. You now only need to escape characters that would be interpreted non literal if they weren't escaped. This means that many latex snippets will become much more readable. Things that need escaping are displaying placeholders ($1, ${1}, $< py >, $(shell)) -> (\$1, \${1}, \$< py >, \$(shell)), placeholder terminators such as }, >, ` and ) ($< py \> code >, $(shell \) code), `shell\` code`
Comment 1 Paolo Borelli 2009-12-31 12:33:15 UTC

*** This bug has been marked as a duplicate of bug 460523 ***