• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..09-Oct-2021-

src/H09-Oct-2021-2,0611,613

AUTHORSH A D16-Jul-201745 21

COPYINGH A D16-Jul-201717.6 KiB341281

ChangeLogH A D16-Jul-2017198 105

INSTALLH A D16-Jul-20177.6 KiB183143

Makefile.amH A D16-Jul-201781 53

Makefile.inH A D29-Sep-202126.9 KiB865779

READMEH A D16-Jul-20173.4 KiB9472

README

1XML Snippets Plugin
2===================
3
4About
5-----
6This plugin extends XML/HTML tag autocompletion provided by Geany.
7It automatically inserts a matching snippet after you type an opening tag.
8
9Usage
10-----
11Enable the plugin in the Plugin Manager and add snippets you need to your
12``snippets.conf``.  For example, to get an HTML definition list template
13automatically inserted after you type "<dl>", add the following snippet to
14the ``[HTML]`` section::
15
16  dl=<dl>\n\t<dt>%cursor%</dt>\n\t<dd>%cursor%</dd>\n</dl>
17
18The plugin will automatically catch up snippets supplied with Geany (for
19example, "table").
20
21Notes:
22
23* The plugin will only use snippets which body starts with a tag, optionally
24  preceded by whitespace.  This is to prevent erroneus insertion of snippets
25  which you may have defined for, e.g., JavaScript.
26* If you typed some attributes within a tag which is then automatically
27  completed by the plugin, the attributes will be copied to the first tag
28  of the snippet body.  If that tag already contains attributes,
29  autocompletion will not proceed.
30
31You can use this plugin together with tag autocompletion provided by Geany.
32Tags, for which you defined snippets, will be completed by the plugin;
33Geany will deal with other tags.
34
35Requirements
36------------
37For compiling the plugin yourself, you will need the GTK (>= 2.8.0) libraries
38and header files. You will also need its dependency libraries and header
39files, such as Pango, Glib and ATK. All these files are available at
40http://www.gtk.org.
41
42And obviously, you will need have Geany installed.
43If you have Geany installed from the sources, you should be ready to go.
44If you used a prepared package e.g. from your distribution you probably need to
45install an additional package, this might be called geany-dev or geany-devel.
46
47Furthermore you need, of course, a C compiler and the Make tool.
48The GNU versions of these tools are recommended.
49
50Installation
51------------
52Compiling and installing the code is done by the following three commands::
53
54  $ ./configure
55  $ make
56  $ make install
57
58For more configuration details run::
59
60  $ ./configure --help
61
62If there are any errors during compilation, check your build environment
63and try to find the error, otherwise contact one of the authors.
64
65Running the built-in test suite
66-------------------------------
67This stage is completely optional and does not affect the work of the plugin.
68It is useful for plugin developers so that they are sure the innards of the
69plugin are working as expected.
70
71To run the tests, you have to compile a test executable and run it using the
72commands below.  These commands will only work if you are using a Unix
73environment and GCC compiler.  Before running the commands, go to the source
74code directory (``xmlsnippets/src``).
75::
76
77  $ gcc -Wall -DTEST -ggdb `pkg-config --cflags --libs glib-2.0` *.c -o xmlsnippets
78  $ ./xmlsnippets
79
80The executable will warn you about the tests which failed.  Ignore non-warning
81informational messages like those starting with ``** Message:``.
82
83License
84-------
85This plugin is distributed under the terms of the GNU General Public License
86as published by the Free Software Foundation; either version 2 of the
87License, or (at your option) any later version.  A copy of this license
88can be found in the file COPYING included with the source code.
89
90Ideas, questions, patches and bug reports
91-----------------------------------------
92Report them to the Geany mailing list (see
93http://www.geany.org/Support/MailingList).
94