GNOME Bugzilla – Bug 683588
RFE: Provide a complete set of snippets for the DocBook XML language
Last modified: 2012-09-17 20:57:00 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.
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