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 683588 - RFE: Provide a complete set of snippets for the DocBook XML language
RFE: Provide a complete set of snippets for the DocBook XML language
Status: RESOLVED FIXED
Product: gedit
Classification: Applications
Component: snippets
3.5.x
Other Linux
: Normal normal
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2012-09-07 17:13 UTC by Jaromir Hradilek
Modified: 2012-09-17 20:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
An updated docbook.xml file with snippets for all DocBook 4.5 elements (73.45 KB, application/xml)
2012-09-07 17:13 UTC, Jaromir Hradilek
Details

Description Jaromir Hradilek 2012-09-07 17:13:35 UTC
Created attachment 223778 [details]
An updated docbook.xml file with snippets for all DocBook 4.5 elements

The gedit text editor is installed with a default collection of snippets for the DocBook XML language located at /usr/share/gedit/plugins/snippets/docbook.xml. Currently, this collection is very limited: it does not provide snippets for most of the commonly used DocBook elements, is not very consistent, and is not really that DocBook-specific.

Attached is my custom docbook.xml file. This file provides snippets for every single DocBook element defined in DocBook: The Definitive Guide, version 2.0.17 of the book, as well as aliases for common combinations of elements and attributes (such as "directory" for <filename class="directory">$0</filename>) and general XML elements a technical writer often needs (e.g. xi:include, xi:fallback, DOCTYPE etc.). It is currently available on GitHub, but you may consider distributing these snippets as part of the official package.
Comment 1 Paolo Borelli 2012-09-17 20:57:00 UTC
wow... this is extensive. Thanks!

In fact I fear it may a bit *too* much... snippets are supposed to be a quick way to insert boilerplate... having a snippet for every tag defeats a bit the purpose of being easy to memorize and quick to find in the completion.


Anyway for now I committed it, it is surely better than what we had before and docbook is a nice testcase for scalability ;)


I do not think we should go down this road for every language though...


As a matter of fact I would not mind a patch that removes some of the simple tags snippets and bring back a simple "generic" tag xml snippet where you type "<foo>" an "</foo>" gets added for you