Move and update 'Custom filetypes' section.

Add 'Creating a custom filetype from an existing filetype' section.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5503 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2010-12-30 17:49:22 +00:00
parent 39278e11c4
commit 7a7b02a22e
3 changed files with 233 additions and 164 deletions

View File

@ -1,3 +1,10 @@
2010-12-30 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* doc/geany.txt, doc/geany.html:
Move and update 'Custom filetypes' section.
Add 'Creating a custom filetype from an existing filetype' section.
2010-12-24 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> 2010-12-24 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/interface.c, src/keybindings.c, geany.glade: * src/interface.c, src/keybindings.c, geany.glade:

View File

@ -6,7 +6,7 @@
<meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" /> <meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
<title>Geany</title> <title>Geany</title>
<meta name="authors" content="Enrico Tröger Nick Treleaven Frank Lanitz" /> <meta name="authors" content="Enrico Tröger Nick Treleaven Frank Lanitz" />
<meta name="date" content="2010-12-07" /> <meta name="date" content="2010-12-22" />
<style type="text/css"> <style type="text/css">
/* /*
@ -139,7 +139,7 @@ Stylesheet for Geany's documentation based on a version of John Gabriele.
<br />Nick Treleaven <br />Nick Treleaven
<br />Frank Lanitz</td></tr> <br />Frank Lanitz</td></tr>
<tr><th class="docinfo-name">Date:</th> <tr><th class="docinfo-name">Date:</th>
<td>2010-12-07</td></tr> <td>2010-12-22</td></tr>
<tr><th class="docinfo-name">Version:</th> <tr><th class="docinfo-name">Version:</th>
<td>0.20</td></tr> <td>0.20</td></tr>
</tbody> </tbody>
@ -410,100 +410,103 @@ of this program, and also in the chapter <a class="reference" href="#gnu-general
<li><a class="reference" href="#tools-menu-items" id="id175" name="id175">Tools menu items</a></li> <li><a class="reference" href="#tools-menu-items" id="id175" name="id175">Tools menu items</a></li>
<li><a class="reference" href="#global-configuration-file" id="id176" name="id176">Global configuration file</a></li> <li><a class="reference" href="#global-configuration-file" id="id176" name="id176">Global configuration file</a></li>
<li><a class="reference" href="#filetype-definition-files" id="id177" name="id177">Filetype definition files</a><ul> <li><a class="reference" href="#filetype-definition-files" id="id177" name="id177">Filetype definition files</a><ul>
<li><a class="reference" href="#custom-filetypes" id="id178" name="id178">Custom filetypes</a></li> <li><a class="reference" href="#system-files" id="id178" name="id178">System files</a></li>
<li><a class="reference" href="#system-files" id="id179" name="id179">System files</a></li> <li><a class="reference" href="#user-files" id="id179" name="id179">User files</a></li>
<li><a class="reference" href="#user-files" id="id180" name="id180">User files</a></li> <li><a class="reference" href="#custom-filetypes" id="id180" name="id180">Custom filetypes</a><ul>
<li><a class="reference" href="#filetype-configuration" id="id181" name="id181">Filetype configuration</a><ul> <li><a class="reference" href="#creating-a-custom-filetype-from-an-existing-filetype" id="id181" name="id181">Creating a custom filetype from an existing filetype</a></li>
<li><a class="reference" href="#styling-section" id="id182" name="id182">[styling] Section</a><ul>
<li><a class="reference" href="#using-a-named-style" id="id183" name="id183">Using a named style</a></li>
</ul> </ul>
</li> </li>
<li><a class="reference" href="#keywords-section" id="id184" name="id184">[keywords] Section</a></li> <li><a class="reference" href="#filetype-configuration" id="id182" name="id182">Filetype configuration</a><ul>
<li><a class="reference" href="#lexer-properties-section" id="id185" name="id185">[lexer_properties] Section</a></li> <li><a class="reference" href="#styling-section" id="id183" name="id183">[styling] Section</a><ul>
<li><a class="reference" href="#settings-section" id="id186" name="id186">[settings] Section</a></li> <li><a class="reference" href="#using-a-named-style" id="id184" name="id184">Using a named style</a></li>
<li><a class="reference" href="#build-settings-section" id="id187" name="id187">[build_settings] Section</a></li>
</ul> </ul>
</li> </li>
<li><a class="reference" href="#special-file-filetypes-common" id="id188" name="id188">Special file filetypes.common</a><ul> <li><a class="reference" href="#keywords-section" id="id185" name="id185">[keywords] Section</a></li>
<li><a class="reference" href="#named-styles-section" id="id189" name="id189">[named_styles] Section</a></li> <li><a class="reference" href="#lexer-properties-section" id="id186" name="id186">[lexer_properties] Section</a></li>
<li><a class="reference" href="#id4" id="id190" name="id190">[styling] Section</a></li> <li><a class="reference" href="#settings-section" id="id187" name="id187">[settings] Section</a></li>
<li><a class="reference" href="#id5" id="id191" name="id191">[settings] Section</a></li> <li><a class="reference" href="#build-settings-section" id="id188" name="id188">[build_settings] Section</a></li>
</ul>
</li>
<li><a class="reference" href="#special-file-filetypes-common" id="id189" name="id189">Special file filetypes.common</a><ul>
<li><a class="reference" href="#named-styles-section" id="id190" name="id190">[named_styles] Section</a></li>
<li><a class="reference" href="#id4" id="id191" name="id191">[styling] Section</a></li>
<li><a class="reference" href="#id5" id="id192" name="id192">[settings] Section</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
</li> </li>
<li><a class="reference" href="#filetype-extensions" id="id192" name="id192">Filetype extensions</a></li> <li><a class="reference" href="#filetype-extensions" id="id193" name="id193">Filetype extensions</a></li>
<li><a class="reference" href="#preferences-file-format" id="id193" name="id193">Preferences File Format</a><ul> <li><a class="reference" href="#preferences-file-format" id="id194" name="id194">Preferences File Format</a><ul>
<li><a class="reference" href="#hidden-preferences" id="id194" name="id194">Hidden preferences</a></li> <li><a class="reference" href="#hidden-preferences" id="id195" name="id195">Hidden preferences</a></li>
<li><a class="reference" href="#build-menu-section" id="id195" name="id195">[build-menu] Section</a></li> <li><a class="reference" href="#build-menu-section" id="id196" name="id196">[build-menu] Section</a></li>
</ul> </ul>
</li> </li>
<li><a class="reference" href="#project-file-format" id="id196" name="id196">Project File Format</a><ul> <li><a class="reference" href="#project-file-format" id="id197" name="id197">Project File Format</a><ul>
<li><a class="reference" href="#build-menu-additions" id="id197" name="id197">[build-menu] Additions</a></li> <li><a class="reference" href="#build-menu-additions" id="id198" name="id198">[build-menu] Additions</a></li>
</ul> </ul>
</li> </li>
<li><a class="reference" href="#templates" id="id198" name="id198">Templates</a><ul> <li><a class="reference" href="#templates" id="id199" name="id199">Templates</a><ul>
<li><a class="reference" href="#template-meta-data" id="id199" name="id199">Template meta data</a></li> <li><a class="reference" href="#template-meta-data" id="id200" name="id200">Template meta data</a></li>
<li><a class="reference" href="#file-templates" id="id200" name="id200">File templates</a><ul> <li><a class="reference" href="#file-templates" id="id201" name="id201">File templates</a><ul>
<li><a class="reference" href="#custom-file-templates" id="id201" name="id201">Custom file templates</a></li> <li><a class="reference" href="#custom-file-templates" id="id202" name="id202">Custom file templates</a></li>
<li><a class="reference" href="#filetype-templates" id="id202" name="id202">Filetype templates</a></li> <li><a class="reference" href="#filetype-templates" id="id203" name="id203">Filetype templates</a></li>
</ul> </ul>
</li> </li>
<li><a class="reference" href="#customizing-templates" id="id203" name="id203">Customizing templates</a><ul> <li><a class="reference" href="#customizing-templates" id="id204" name="id204">Customizing templates</a><ul>
<li><a class="reference" href="#template-wildcards" id="id204" name="id204">Template wildcards</a><ul> <li><a class="reference" href="#template-wildcards" id="id205" name="id205">Template wildcards</a><ul>
<li><a class="reference" href="#special-command-wildcard" id="id205" name="id205">Special {command:} wildcard</a></li> <li><a class="reference" href="#special-command-wildcard" id="id206" name="id206">Special {command:} wildcard</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
</li> </li>
</ul> </ul>
</li> </li>
<li><a class="reference" href="#customizing-the-toolbar" id="id206" name="id206">Customizing the toolbar</a><ul> <li><a class="reference" href="#customizing-the-toolbar" id="id207" name="id207">Customizing the toolbar</a><ul>
<li><a class="reference" href="#manually-editing-the-toolbar-layout" id="id207" name="id207">Manually editing the toolbar layout</a></li> <li><a class="reference" href="#manually-editing-the-toolbar-layout" id="id208" name="id208">Manually editing the toolbar layout</a></li>
<li><a class="reference" href="#available-toolbar-elements" id="id208" name="id208">Available toolbar elements</a></li> <li><a class="reference" href="#available-toolbar-elements" id="id209" name="id209">Available toolbar elements</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
</li> </li>
<li><a class="reference" href="#plugin-documentation" id="id209" name="id209">Plugin documentation</a><ul> <li><a class="reference" href="#plugin-documentation" id="id210" name="id210">Plugin documentation</a><ul>
<li><a class="reference" href="#htmlchars" id="id210" name="id210">HTMLChars</a><ul> <li><a class="reference" href="#htmlchars" id="id211" name="id211">HTMLChars</a><ul>
<li><a class="reference" href="#insert-entity-dialog" id="id211" name="id211">Insert entity dialog</a></li> <li><a class="reference" href="#insert-entity-dialog" id="id212" name="id212">Insert entity dialog</a></li>
<li><a class="reference" href="#replace-special-chars-by-its-entity" id="id212" name="id212">Replace special chars by its entity</a><ul> <li><a class="reference" href="#replace-special-chars-by-its-entity" id="id213" name="id213">Replace special chars by its entity</a><ul>
<li><a class="reference" href="#at-typing-time" id="id213" name="id213">At typing time</a></li> <li><a class="reference" href="#at-typing-time" id="id214" name="id214">At typing time</a></li>
<li><a class="reference" href="#bulk-replacement" id="id214" name="id214">Bulk replacement</a></li> <li><a class="reference" href="#bulk-replacement" id="id215" name="id215">Bulk replacement</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
</li> </li>
<li><a class="reference" href="#save-actions" id="id215" name="id215">Save Actions</a><ul> <li><a class="reference" href="#save-actions" id="id216" name="id216">Save Actions</a><ul>
<li><a class="reference" href="#instant-save" id="id216" name="id216">Instant Save</a></li> <li><a class="reference" href="#instant-save" id="id217" name="id217">Instant Save</a></li>
<li><a class="reference" href="#backup-copy" id="id217" name="id217">Backup Copy</a></li> <li><a class="reference" href="#backup-copy" id="id218" name="id218">Backup Copy</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
</li> </li>
<li><a class="reference" href="#contributing-to-this-document" id="id218" name="id218">Contributing to this document</a></li> <li><a class="reference" href="#contributing-to-this-document" id="id219" name="id219">Contributing to this document</a></li>
<li><a class="reference" href="#scintilla-keyboard-commands" id="id219" name="id219">Scintilla keyboard commands</a><ul> <li><a class="reference" href="#scintilla-keyboard-commands" id="id220" name="id220">Scintilla keyboard commands</a><ul>
<li><a class="reference" href="#keyboard-commands" id="id220" name="id220">Keyboard commands</a></li> <li><a class="reference" href="#keyboard-commands" id="id221" name="id221">Keyboard commands</a></li>
</ul> </ul>
</li> </li>
<li><a class="reference" href="#tips-and-tricks" id="id221" name="id221">Tips and tricks</a><ul> <li><a class="reference" href="#tips-and-tricks" id="id222" name="id222">Tips and tricks</a><ul>
<li><a class="reference" href="#document-notebook" id="id222" name="id222">Document notebook</a></li> <li><a class="reference" href="#document-notebook" id="id223" name="id223">Document notebook</a></li>
<li><a class="reference" href="#editor" id="id223" name="id223">Editor</a></li> <li><a class="reference" href="#editor" id="id224" name="id224">Editor</a></li>
<li><a class="reference" href="#interface" id="id224" name="id224">Interface</a></li> <li><a class="reference" href="#interface" id="id225" name="id225">Interface</a></li>
<li><a class="reference" href="#gtk-related" id="id225" name="id225">GTK-related</a></li> <li><a class="reference" href="#gtk-related" id="id226" name="id226">GTK-related</a></li>
</ul> </ul>
</li> </li>
<li><a class="reference" href="#compile-time-options" id="id226" name="id226">Compile-time options</a><ul> <li><a class="reference" href="#compile-time-options" id="id227" name="id227">Compile-time options</a><ul>
<li><a class="reference" href="#src-geany-h" id="id227" name="id227">src/geany.h</a></li> <li><a class="reference" href="#src-geany-h" id="id228" name="id228">src/geany.h</a></li>
<li><a class="reference" href="#project-h" id="id228" name="id228">project.h</a></li> <li><a class="reference" href="#project-h" id="id229" name="id229">project.h</a></li>
<li><a class="reference" href="#editor-h" id="id229" name="id229">editor.h</a></li> <li><a class="reference" href="#editor-h" id="id230" name="id230">editor.h</a></li>
<li><a class="reference" href="#keyfile-c" id="id230" name="id230">keyfile.c</a></li> <li><a class="reference" href="#keyfile-c" id="id231" name="id231">keyfile.c</a></li>
<li><a class="reference" href="#build-c" id="id231" name="id231">build.c</a></li> <li><a class="reference" href="#build-c" id="id232" name="id232">build.c</a></li>
</ul> </ul>
</li> </li>
<li><a class="reference" href="#gnu-general-public-license" id="id232" name="id232">GNU General Public License</a></li> <li><a class="reference" href="#gnu-general-public-license" id="id233" name="id233">GNU General Public License</a></li>
<li><a class="reference" href="#license-for-scintilla-and-scite" id="id233" name="id233">License for Scintilla and SciTE</a></li> <li><a class="reference" href="#license-for-scintilla-and-scite" id="id234" name="id234">License for Scintilla and SciTE</a></li>
</ul> </ul>
</div> </div>
<div class="section"> <div class="section">
@ -4310,34 +4313,7 @@ for syntax highlighting, general settings like comment characters or
word delimiter characters as well as compiler and linker settings.</p> word delimiter characters as well as compiler and linker settings.</p>
<p>See also <a class="reference" href="#configuration-file-paths">Configuration file paths</a>.</p> <p>See also <a class="reference" href="#configuration-file-paths">Configuration file paths</a>.</p>
<div class="section"> <div class="section">
<h3><a class="toc-backref" href="#id178" id="custom-filetypes" name="custom-filetypes">Custom filetypes</a></h3> <h3><a class="toc-backref" href="#id178" id="system-files" name="system-files">System files</a></h3>
<p>At startup Geany looks for <tt class="docutils literal"><span class="pre">filetypes.*.conf</span></tt> files in the system and
user filetype paths, adding any filetypes found with the name matching
the '<tt class="docutils literal"><span class="pre">*</span></tt>' wildcard.</p>
<p>Custom filetypes are not as powerful as built-in filetypes, but the following
have been implemented:</p>
<ul>
<li><p class="first">Recognizing and setting the filetype (after the user has manually edited
<tt class="docutils literal"><span class="pre">filetype_extensions.conf</span></tt>).</p>
</li>
<li><dl class="first docutils">
<dt>Filetype settings in the [settings] section (see <a class="reference" href="#filetype-configuration">Filetype configuration</a>).</dt>
<dd><ul class="first last simple">
<li>Using existing tag parsing (<tt class="docutils literal"><span class="pre">tag_parser</span></tt> key).</li>
<li>Using existing syntax highlighting (<tt class="docutils literal"><span class="pre">lexer_filetype</span></tt> key).</li>
</ul>
</dd>
</dl>
</li>
<li><p class="first">Build commands.</p>
</li>
<li><p class="first">Loading global tags files (namespace will be shared with tag_parser
type).</p>
</li>
</ul>
</div>
<div class="section">
<h3><a class="toc-backref" href="#id179" id="system-files" name="system-files">System files</a></h3>
<p>The system-wide filetype configuration files can be found in the <p>The system-wide filetype configuration files can be found in the
system configuration path and are called <tt class="docutils literal"><span class="pre">filetypes.$ext</span></tt>, system configuration path and are called <tt class="docutils literal"><span class="pre">filetypes.$ext</span></tt>,
where $ext is the name of the filetype. For every where $ext is the name of the filetype. For every
@ -4351,7 +4327,7 @@ because they will be overridden when Geany is updated.</p>
</div> </div>
</div> </div>
<div class="section"> <div class="section">
<h3><a class="toc-backref" href="#id180" id="user-files" name="user-files">User files</a></h3> <h3><a class="toc-backref" href="#id179" id="user-files" name="user-files">User files</a></h3>
<p>To change the settings, copy a file from the system configuration <p>To change the settings, copy a file from the system configuration
path to the subdirectory <tt class="docutils literal"><span class="pre">filedefs</span></tt> in your user configuration path to the subdirectory <tt class="docutils literal"><span class="pre">filedefs</span></tt> in your user configuration
directory. Then you can edit the file and the changes will still be directory. Then you can edit the file and the changes will still be
@ -4361,11 +4337,58 @@ settings you want to change. All missing settings will be read from
the corresponding system configuration file.</p> the corresponding system configuration file.</p>
</div> </div>
<div class="section"> <div class="section">
<h3><a class="toc-backref" href="#id181" id="filetype-configuration" name="filetype-configuration">Filetype configuration</a></h3> <h3><a class="toc-backref" href="#id180" id="custom-filetypes" name="custom-filetypes">Custom filetypes</a></h3>
<p>At startup Geany looks for <tt class="docutils literal"><span class="pre">filetypes.*.conf</span></tt> files in the system and
user filetype paths, adding any filetypes found with the name matching
the '<tt class="docutils literal"><span class="pre">*</span></tt>' wildcard - e.g. <tt class="docutils literal"><span class="pre">filetypes.Bar.conf</span></tt>.</p>
<p>Custom filetypes are not as powerful as built-in filetypes, but
support for the following has been implemented:</p>
<ul>
<li><p class="first">Recognizing and setting the filetype (after the user has manually edited
<tt class="docutils literal"><span class="pre">filetype_extensions.conf</span></tt>).</p>
</li>
<li><dl class="first docutils">
<dt>Reading filetype settings in the <tt class="docutils literal"><span class="pre">[settings]</span></tt> section, including:</dt>
<dd><ul class="first last simple">
<li>Using an existing syntax highlighting lexer (<a class="reference" href="#lexer-filetype">lexer_filetype</a> key).</li>
<li>Using an existing tag parser (<tt class="docutils literal"><span class="pre">tag_parser</span></tt> key).</li>
</ul>
</dd>
</dl>
</li>
<li><p class="first">Build commands (<tt class="docutils literal"><span class="pre">[build-menu]</span></tt> section).</p>
</li>
<li><p class="first">Loading global tags files (sharing the <tt class="docutils literal"><span class="pre">tag_parser</span></tt> namespace).</p>
</li>
</ul>
<p>See <a class="reference" href="#filetype-configuration">Filetype configuration</a> for details on each setting.</p>
<div class="section">
<h4><a class="toc-backref" href="#id181" id="creating-a-custom-filetype-from-an-existing-filetype" name="creating-a-custom-filetype-from-an-existing-filetype">Creating a custom filetype from an existing filetype</a></h4>
<p>Because most filetype settings will relate to the syntax
highlighting (e.g. styling, keywords, <tt class="docutils literal"><span class="pre">lexer_properties</span></tt>
sections), it is best to copy an existing filetype file that uses
the lexer you wish to use as the basis of a custom filetype, using
the correct filename extension format shown above, e.g.:</p>
<pre class="literal-block">
cp filetypes.foo filetypes.Bar.conf
</pre>
<p>Then add the <tt class="docutils literal"><span class="pre">lexer_filetype=Foo</span></tt> setting (if not already present)
and add/adjust other settings.</p>
<div class="warning">
<p class="first admonition-title">Warning</p>
<p class="last">The <tt class="docutils literal"><span class="pre">[styling]</span></tt> and <tt class="docutils literal"><span class="pre">[keywords]</span></tt> sections have key names
specific to each filetype/lexer. You must follow the same
names - in particular, some lexers only support one keyword
list, or none.</p>
</div>
</div>
</div>
<div class="section">
<h3><a class="toc-backref" href="#id182" id="filetype-configuration" name="filetype-configuration">Filetype configuration</a></h3>
<p>As well as the sections listed below, each filetype file can contain <p>As well as the sections listed below, each filetype file can contain
a [build-menu] section as described in <a class="reference" href="#build-menu-section">[build-menu] Section</a>.</p> a [build-menu] section as described in <a class="reference" href="#build-menu-section">[build-menu] Section</a>.</p>
<div class="section"> <div class="section">
<h4><a class="toc-backref" href="#id182" id="styling-section" name="styling-section">[styling] Section</a></h4> <h4><a class="toc-backref" href="#id183" id="styling-section" name="styling-section">[styling] Section</a></h4>
<p>In this section the colors for syntax highlighting are defined. The <p>In this section the colors for syntax highlighting are defined. The
manual format is:</p> manual format is:</p>
<ul class="simple"> <ul class="simple">
@ -4381,7 +4404,7 @@ value is something other than &quot;true&quot; or &quot;false&quot;, &quot;false
<p>This makes the key style have red foreground text, default background <p>This makes the key style have red foreground text, default background
color text and bold emphasis.</p> color text and bold emphasis.</p>
<div class="section"> <div class="section">
<h5><a class="toc-backref" href="#id183" id="using-a-named-style" name="using-a-named-style">Using a named style</a></h5> <h5><a class="toc-backref" href="#id184" id="using-a-named-style" name="using-a-named-style">Using a named style</a></h5>
<p>The second format uses a <em>named style</em> name to reference a style <p>The second format uses a <em>named style</em> name to reference a style
defined in filetypes.common.</p> defined in filetypes.common.</p>
<ul class="simple"> <ul class="simple">
@ -4400,7 +4423,7 @@ Section</a>.</p>
</div> </div>
</div> </div>
<div class="section"> <div class="section">
<h4><a class="toc-backref" href="#id184" id="keywords-section" name="keywords-section">[keywords] Section</a></h4> <h4><a class="toc-backref" href="#id185" id="keywords-section" name="keywords-section">[keywords] Section</a></h4>
<p>This section contains keys for different keyword lists specific to <p>This section contains keys for different keyword lists specific to
the filetype. Some filetypes do not support keywords, so adding a the filetype. Some filetypes do not support keywords, so adding a
new key will not work. You can only add or remove keywords to/from new key will not work. You can only add or remove keywords to/from
@ -4411,7 +4434,7 @@ an existing list.</p>
</div> </div>
</div> </div>
<div class="section"> <div class="section">
<h4><a class="toc-backref" href="#id185" id="lexer-properties-section" name="lexer-properties-section">[lexer_properties] Section</a></h4> <h4><a class="toc-backref" href="#id186" id="lexer-properties-section" name="lexer-properties-section">[lexer_properties] Section</a></h4>
<p>Here any special properties for the Scintilla lexer can be set in the <p>Here any special properties for the Scintilla lexer can be set in the
format <tt class="docutils literal"><span class="pre">key.name.field=some.value</span></tt>.</p> format <tt class="docutils literal"><span class="pre">key.name.field=some.value</span></tt>.</p>
<p>Properties Geany uses are listed in the system filetype files. To find <p>Properties Geany uses are listed in the system filetype files. To find
@ -4421,7 +4444,7 @@ egrep -o 'GetProperty\w*\(&quot;([^&quot;]+)&quot;[^)]+\)' scintilla/Lex*.cxx
</pre> </pre>
</div> </div>
<div class="section"> <div class="section">
<h4><a class="toc-backref" href="#id186" id="settings-section" name="settings-section">[settings] Section</a></h4> <h4><a class="toc-backref" href="#id187" id="settings-section" name="settings-section">[settings] Section</a></h4>
<dl class="docutils"> <dl class="docutils">
<dt>extension</dt> <dt>extension</dt>
<dd><p class="first">This is the default file extension used when saving files, not <dd><p class="first">This is the default file extension used when saving files, not
@ -4487,11 +4510,21 @@ context_action_cmd=firefox &quot;<a class="reference" href="http://www.php.net/%
<p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">context_action_cmd=devhelp</span> <span class="pre">-s</span> <span class="pre">&quot;%s&quot;</span></tt></p> <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">context_action_cmd=devhelp</span> <span class="pre">-s</span> <span class="pre">&quot;%s&quot;</span></tt></p>
</dd> </dd>
<dt>tag_parser</dt> <dt>tag_parser</dt>
<dd>The TagManager language name, e.g. &quot;C&quot;.</dd> <dd>The TagManager language name, e.g. &quot;C&quot;. Usually the same as the
filetype name.</dd>
</dl>
<dl class="docutils" id="lexer-filetype">
<dt>lexer_filetype</dt> <dt>lexer_filetype</dt>
<dd>A filetype name to setup syntax highlighting from another filetype. <dd><p class="first">A filetype name to setup syntax highlighting from another filetype.
This must not be recursive, i.e. it should be a filetype name that This must not be recursive, i.e. it should be a filetype name that
doesn't use the lexer_filetype key itself.</dd> doesn't use the <em>lexer_filetype</em> key itself, e.g.:</p>
<pre class="literal-block">
lexer_filetype=C
#lexer_filetype=C++
</pre>
<p class="last">The second line is wrong, because <tt class="docutils literal"><span class="pre">filetypes.cpp</span></tt> itself uses
<tt class="docutils literal"><span class="pre">lexer_filetype=C</span></tt>, which would be recursive.</p>
</dd>
<dt>symbol_list_sort_mode</dt> <dt>symbol_list_sort_mode</dt>
<dd><p class="first">What the default symbol list sort order should be.</p> <dd><p class="first">What the default symbol list sort order should be.</p>
<table border="1" class="last docutils"> <table border="1" class="last docutils">
@ -4524,7 +4557,7 @@ this setting in their system configuration files.</dd>
</dl> </dl>
</div> </div>
<div class="section"> <div class="section">
<h4><a class="toc-backref" href="#id187" id="build-settings-section" name="build-settings-section">[build_settings] Section</a></h4> <h4><a class="toc-backref" href="#id188" id="build-settings-section" name="build-settings-section">[build_settings] Section</a></h4>
<p>As of Geany 0.19 this section is supplemented by the <a class="reference" href="#build-menu-section">[build-menu] Section</a>. <p>As of Geany 0.19 this section is supplemented by the <a class="reference" href="#build-menu-section">[build-menu] Section</a>.
Values that are set in the [build-menu] section will override those in this section.</p> Values that are set in the [build-menu] section will override those in this section.</p>
<dl class="docutils"> <dl class="docutils">
@ -4577,7 +4610,7 @@ complete filename, e.g. for shell scripts.</p>
</div> </div>
</div> </div>
<div class="section"> <div class="section">
<h3><a class="toc-backref" href="#id188" id="special-file-filetypes-common" name="special-file-filetypes-common">Special file filetypes.common</a></h3> <h3><a class="toc-backref" href="#id189" id="special-file-filetypes-common" name="special-file-filetypes-common">Special file filetypes.common</a></h3>
<p>There is a special filetype definition file called <p>There is a special filetype definition file called
filetypes.common. This file defines some general non-filetype-specific filetypes.common. This file defines some general non-filetype-specific
settings.</p> settings.</p>
@ -4592,7 +4625,7 @@ the system file.</p>
<p class="last">See the <a class="reference" href="#filetype-configuration">Filetype configuration</a> section for how to define styles.</p> <p class="last">See the <a class="reference" href="#filetype-configuration">Filetype configuration</a> section for how to define styles.</p>
</div> </div>
<div class="section"> <div class="section">
<h4><a class="toc-backref" href="#id189" id="named-styles-section" name="named-styles-section">[named_styles] Section</a></h4> <h4><a class="toc-backref" href="#id190" id="named-styles-section" name="named-styles-section">[named_styles] Section</a></h4>
<p>Named styles declared here can be used in the [styling] section of any <p>Named styles declared here can be used in the [styling] section of any
filetypes.* file.</p> filetypes.* file.</p>
<p>For example:</p> <p>For example:</p>
@ -4619,7 +4652,7 @@ original style.</p>
schemes menu</a>.</p> schemes menu</a>.</p>
</div> </div>
<div class="section"> <div class="section">
<h4><a class="toc-backref" href="#id190" id="id4" name="id4">[styling] Section</a></h4> <h4><a class="toc-backref" href="#id191" id="id4" name="id4">[styling] Section</a></h4>
<dl class="docutils"> <dl class="docutils">
<dt>default</dt> <dt>default</dt>
<dd><p class="first">This is the default style. It is used for styling files without a <dd><p class="first">This is the default style. It is used for styling files without a
@ -4803,7 +4836,7 @@ arguments set whether to use the defined colors.</p>
</dl> </dl>
</div> </div>
<div class="section"> <div class="section">
<h4><a class="toc-backref" href="#id191" id="id5" name="id5">[settings] Section</a></h4> <h4><a class="toc-backref" href="#id192" id="id5" name="id5">[settings] Section</a></h4>
<dl class="docutils"> <dl class="docutils">
<dt>whitespace_chars</dt> <dt>whitespace_chars</dt>
<dd><p class="first">Characters to treat as whitespace. These characters are ignored <dd><p class="first">Characters to treat as whitespace. These characters are ignored
@ -4817,7 +4850,7 @@ when moving, selecting and deleting across word boundaries
</div> </div>
</div> </div>
<div class="section"> <div class="section">
<h2><a class="toc-backref" href="#id192" id="filetype-extensions" name="filetype-extensions">Filetype extensions</a></h2> <h2><a class="toc-backref" href="#id193" id="filetype-extensions" name="filetype-extensions">Filetype extensions</a></h2>
<p>To change the default filetype extension used when saving a new file, <p>To change the default filetype extension used when saving a new file,
see <a class="reference" href="#filetype-definition-files">Filetype definition files</a>.</p> see <a class="reference" href="#filetype-definition-files">Filetype definition files</a>.</p>
<p>You can override the list of file extensions that Geany uses to detect <p>You can override the list of file extensions that Geany uses to detect
@ -4837,13 +4870,13 @@ Make=Makefile*;*.mk;Buildfile;
</pre> </pre>
</div> </div>
<div class="section"> <div class="section">
<h2><a class="toc-backref" href="#id193" id="preferences-file-format" name="preferences-file-format">Preferences File Format</a></h2> <h2><a class="toc-backref" href="#id194" id="preferences-file-format" name="preferences-file-format">Preferences File Format</a></h2>
<p>The user preferences file <tt class="docutils literal"><span class="pre">geany.conf</span></tt> holds settings for all the items configured <p>The user preferences file <tt class="docutils literal"><span class="pre">geany.conf</span></tt> holds settings for all the items configured
in the preferences dialog. This file should not be edited while Geany is running in the preferences dialog. This file should not be edited while Geany is running
as the file will be overwritten when the preferences in Geany are changed or Geany as the file will be overwritten when the preferences in Geany are changed or Geany
is quit.</p> is quit.</p>
<div class="section"> <div class="section">
<h3><a class="toc-backref" href="#id194" id="hidden-preferences" name="hidden-preferences">Hidden preferences</a></h3> <h3><a class="toc-backref" href="#id195" id="hidden-preferences" name="hidden-preferences">Hidden preferences</a></h3>
<p>There are some rarely used preferences that are not shown in the Preferences <p>There are some rarely used preferences that are not shown in the Preferences
dialog. These can be set by editing the preferences file, then dialog. These can be set by editing the preferences file, then
restarting Geany. Search for the key name, then edit the value. Example:</p> restarting Geany. Search for the key name, then edit the value. Example:</p>
@ -5056,7 +5089,7 @@ execute section of the Build menu.</td>
</table> </table>
</div> </div>
<div class="section"> <div class="section">
<h3><a class="toc-backref" href="#id195" id="build-menu-section" name="build-menu-section">[build-menu] Section</a></h3> <h3><a class="toc-backref" href="#id196" id="build-menu-section" name="build-menu-section">[build-menu] Section</a></h3>
<p>The [build-menu] section contains the configuration of the build menu. <p>The [build-menu] section contains the configuration of the build menu.
This section can occur in filetype, preferences and project files and This section can occur in filetype, preferences and project files and
always has the format described here. Different menu items are loaded always has the format described here. Different menu items are loaded
@ -5088,11 +5121,11 @@ starting at 00</li>
</div> </div>
</div> </div>
<div class="section"> <div class="section">
<h2><a class="toc-backref" href="#id196" id="project-file-format" name="project-file-format">Project File Format</a></h2> <h2><a class="toc-backref" href="#id197" id="project-file-format" name="project-file-format">Project File Format</a></h2>
<p>The project file contains project related settings and possibly a <p>The project file contains project related settings and possibly a
record of the current session files.</p> record of the current session files.</p>
<div class="section"> <div class="section">
<h3><a class="toc-backref" href="#id197" id="build-menu-additions" name="build-menu-additions">[build-menu] Additions</a></h3> <h3><a class="toc-backref" href="#id198" id="build-menu-additions" name="build-menu-additions">[build-menu] Additions</a></h3>
<p>The project file also can have extra fields in the [build-menu] section <p>The project file also can have extra fields in the [build-menu] section
in addition to those listed in <a class="reference" href="#build-menu-section">[build-menu] Section</a> above.</p> in addition to those listed in <a class="reference" href="#build-menu-section">[build-menu] Section</a> above.</p>
<p>When filetype menu items are configured for the project they are stored <p>When filetype menu items are configured for the project they are stored
@ -5108,7 +5141,7 @@ filetype menu item 0 for the C filetype would be</p>
</div> </div>
</div> </div>
<div class="section"> <div class="section">
<h2><a class="toc-backref" href="#id198" id="templates" name="templates">Templates</a></h2> <h2><a class="toc-backref" href="#id199" id="templates" name="templates">Templates</a></h2>
<p>Geany supports the following templates:</p> <p>Geany supports the following templates:</p>
<ul class="simple"> <ul class="simple">
<li>ChangeLog entry</li> <li>ChangeLog entry</li>
@ -5137,7 +5170,7 @@ save a file in the user's template configuration directory. You can
also force this by selecting <em>Tools-&gt;Reload Configuration</em>.</p> also force this by selecting <em>Tools-&gt;Reload Configuration</em>.</p>
</div> </div>
<div class="section"> <div class="section">
<h3><a class="toc-backref" href="#id199" id="template-meta-data" name="template-meta-data">Template meta data</a></h3> <h3><a class="toc-backref" href="#id200" id="template-meta-data" name="template-meta-data">Template meta data</a></h3>
<p>Meta data can be used with all templates, but by default user set <p>Meta data can be used with all templates, but by default user set
meta data is only used for the ChangeLog and File header templates.</p> meta data is only used for the ChangeLog and File header templates.</p>
<p>In the configuration dialog you can find a tab &quot;Templates&quot; (see <p>In the configuration dialog you can find a tab &quot;Templates&quot; (see
@ -5146,7 +5179,7 @@ which will be inserted in the templates. You should select
<em>Tools-&gt;Reload Configuration</em> or restart Geany after making changes.</p> <em>Tools-&gt;Reload Configuration</em> or restart Geany after making changes.</p>
</div> </div>
<div class="section"> <div class="section">
<h3><a class="toc-backref" href="#id200" id="file-templates" name="file-templates">File templates</a></h3> <h3><a class="toc-backref" href="#id201" id="file-templates" name="file-templates">File templates</a></h3>
<p>File templates are templates used as the basis of a new file. To <p>File templates are templates used as the basis of a new file. To
use them, choose the <em>New (with Template)</em> menu item from the <em>File</em> use them, choose the <em>New (with Template)</em> menu item from the <em>File</em>
menu.</p> menu.</p>
@ -5158,7 +5191,7 @@ optional template wildcards like <tt class="docutils literal"><span class="pre">
wildcard can be placed anywhere, but it's usually put on the first wildcard can be placed anywhere, but it's usually put on the first
line of the file, followed by a blank line.</p> line of the file, followed by a blank line.</p>
<div class="section"> <div class="section">
<h4><a class="toc-backref" href="#id201" id="custom-file-templates" name="custom-file-templates">Custom file templates</a></h4> <h4><a class="toc-backref" href="#id202" id="custom-file-templates" name="custom-file-templates">Custom file templates</a></h4>
<p>These are read from <tt class="docutils literal"><span class="pre">templates/files</span></tt> under the <a class="reference" href="#configuration-file-paths">Configuration file <p>These are read from <tt class="docutils literal"><span class="pre">templates/files</span></tt> under the <a class="reference" href="#configuration-file-paths">Configuration file
paths</a>.</p> paths</a>.</p>
<p>The filetype to use is detected from the template file's extension, if <p>The filetype to use is detected from the template file's extension, if
@ -5168,7 +5201,7 @@ which created a new document with the filetype set to 'C'.</p>
clicked.</p> clicked.</p>
</div> </div>
<div class="section"> <div class="section">
<h4><a class="toc-backref" href="#id202" id="filetype-templates" name="filetype-templates">Filetype templates</a></h4> <h4><a class="toc-backref" href="#id203" id="filetype-templates" name="filetype-templates">Filetype templates</a></h4>
<div class="note"> <div class="note">
<p class="first admonition-title">Note</p> <p class="first admonition-title">Note</p>
<p class="last">It's recommended to use custom file templates instead.</p> <p class="last">It's recommended to use custom file templates instead.</p>
@ -5184,7 +5217,7 @@ the New command is used without a filetype. This is empty by default.</p>
</div> </div>
</div> </div>
<div class="section"> <div class="section">
<h3><a class="toc-backref" href="#id203" id="customizing-templates" name="customizing-templates">Customizing templates</a></h3> <h3><a class="toc-backref" href="#id204" id="customizing-templates" name="customizing-templates">Customizing templates</a></h3>
<p>Each template can be customized to your needs. The templates are <p>Each template can be customized to your needs. The templates are
stored in the <tt class="docutils literal"><span class="pre">~/.config/geany/templates/</span></tt> directory (see the section called stored in the <tt class="docutils literal"><span class="pre">~/.config/geany/templates/</span></tt> directory (see the section called
<a class="reference" href="#command-line-options">Command line options</a> for further information about the configuration <a class="reference" href="#command-line-options">Command line options</a> for further information about the configuration
@ -5192,7 +5225,7 @@ directory). Just open the desired template with an editor (ideally,
Geany ;-) ) and edit the template to your needs. There are some Geany ;-) ) and edit the template to your needs. There are some
wildcards which will be automatically replaced by Geany at startup.</p> wildcards which will be automatically replaced by Geany at startup.</p>
<div class="section"> <div class="section">
<h4><a class="toc-backref" href="#id204" id="template-wildcards" name="template-wildcards">Template wildcards</a></h4> <h4><a class="toc-backref" href="#id205" id="template-wildcards" name="template-wildcards">Template wildcards</a></h4>
<p>All wildcards must be enclosed by &quot;{&quot; and &quot;}&quot;, e.g. {date}.</p> <p>All wildcards must be enclosed by &quot;{&quot; and &quot;}&quot;, e.g. {date}.</p>
<p><strong>Wildcards for character escaping</strong></p> <p><strong>Wildcards for character escaping</strong></p>
<table border="1" class="docutils"> <table border="1" class="docutils">
@ -5406,7 +5439,7 @@ templates.</td>
</tbody> </tbody>
</table> </table>
<div class="section"> <div class="section">
<h5><a class="toc-backref" href="#id205" id="special-command-wildcard" name="special-command-wildcard">Special {command:} wildcard</a></h5> <h5><a class="toc-backref" href="#id206" id="special-command-wildcard" name="special-command-wildcard">Special {command:} wildcard</a></h5>
<p>The {command:} wildcard is a special one because it can execute <p>The {command:} wildcard is a special one because it can execute
a specified command and put the command's output (stdout) into a specified command and put the command's output (stdout) into
the template.</p> the template.</p>
@ -5441,14 +5474,14 @@ standard error and in the Help-&gt;Debug Messages dialog.</p>
</div> </div>
</div> </div>
<div class="section"> <div class="section">
<h2><a class="toc-backref" href="#id206" id="customizing-the-toolbar" name="customizing-the-toolbar">Customizing the toolbar</a></h2> <h2><a class="toc-backref" href="#id207" id="customizing-the-toolbar" name="customizing-the-toolbar">Customizing the toolbar</a></h2>
<p>You can add, remove and reorder the elements in the toolbar by using <p>You can add, remove and reorder the elements in the toolbar by using
the toolbar editor, or by manually editing the configuration file the toolbar editor, or by manually editing the configuration file
<tt class="docutils literal"><span class="pre">ui_toolbar.xml</span></tt>.</p> <tt class="docutils literal"><span class="pre">ui_toolbar.xml</span></tt>.</p>
<p>The toolbar editor can be opened from the preferences editor on the Toolbar tab or <p>The toolbar editor can be opened from the preferences editor on the Toolbar tab or
by right-clicking on the toolbar itself and choosing it from the menu.</p> by right-clicking on the toolbar itself and choosing it from the menu.</p>
<div class="section"> <div class="section">
<h3><a class="toc-backref" href="#id207" id="manually-editing-the-toolbar-layout" name="manually-editing-the-toolbar-layout">Manually editing the toolbar layout</a></h3> <h3><a class="toc-backref" href="#id208" id="manually-editing-the-toolbar-layout" name="manually-editing-the-toolbar-layout">Manually editing the toolbar layout</a></h3>
<p>To override the system-wide configuration file, copy it to your user <p>To override the system-wide configuration file, copy it to your user
configuration directory (see <a class="reference" href="#configuration-file-paths">Configuration file paths</a>).</p> configuration directory (see <a class="reference" href="#configuration-file-paths">Configuration file paths</a>).</p>
<p>For example:</p> <p>For example:</p>
@ -5470,7 +5503,7 @@ will be used instead.</p>
</div> </div>
</div> </div>
<div class="section"> <div class="section">
<h3><a class="toc-backref" href="#id208" id="available-toolbar-elements" name="available-toolbar-elements">Available toolbar elements</a></h3> <h3><a class="toc-backref" href="#id209" id="available-toolbar-elements" name="available-toolbar-elements">Available toolbar elements</a></h3>
<table border="1" class="docutils"> <table border="1" class="docutils">
<colgroup> <colgroup>
<col width="19%" /> <col width="19%" />
@ -5584,13 +5617,13 @@ use 'SearchEntry')</td>
</div> </div>
</div> </div>
<div class="section"> <div class="section">
<h1><a class="toc-backref" href="#id209" id="plugin-documentation" name="plugin-documentation">Plugin documentation</a></h1> <h1><a class="toc-backref" href="#id210" id="plugin-documentation" name="plugin-documentation">Plugin documentation</a></h1>
<div class="section"> <div class="section">
<h2><a class="toc-backref" href="#id210" id="htmlchars" name="htmlchars">HTMLChars</a></h2> <h2><a class="toc-backref" href="#id211" id="htmlchars" name="htmlchars">HTMLChars</a></h2>
<p>The HTMLChars plugin helps when working with special characters in <p>The HTMLChars plugin helps when working with special characters in
XML/HTML, e.g. German Umlauts ü and ä.</p> XML/HTML, e.g. German Umlauts ü and ä.</p>
<div class="section"> <div class="section">
<h3><a class="toc-backref" href="#id211" id="insert-entity-dialog" name="insert-entity-dialog">Insert entity dialog</a></h3> <h3><a class="toc-backref" href="#id212" id="insert-entity-dialog" name="insert-entity-dialog">Insert entity dialog</a></h3>
<p>When the plugin is enabled, you can insert special character <p>When the plugin is enabled, you can insert special character
entities using <em>Tools-&gt;Insert Special HTML Characters</em>.</p> entities using <em>Tools-&gt;Insert Special HTML Characters</em>.</p>
<p>This opens up a dialog where you can find a huge amount of special <p>This opens up a dialog where you can find a huge amount of special
@ -5602,7 +5635,7 @@ the entity for the character at the current cursor position. You
might also like to double click the chosen entity instead.</p> might also like to double click the chosen entity instead.</p>
</div> </div>
<div class="section"> <div class="section">
<h3><a class="toc-backref" href="#id212" id="replace-special-chars-by-its-entity" name="replace-special-chars-by-its-entity">Replace special chars by its entity</a></h3> <h3><a class="toc-backref" href="#id213" id="replace-special-chars-by-its-entity" name="replace-special-chars-by-its-entity">Replace special chars by its entity</a></h3>
<p>To help make a XML/HTML document valid the plugin supports <p>To help make a XML/HTML document valid the plugin supports
replacement of special chars known by the plugin. Both bulk replacement of special chars known by the plugin. Both bulk
replacement and immediate replacement during typing are supported.</p> replacement and immediate replacement during typing are supported.</p>
@ -5618,7 +5651,7 @@ replacement and immediate replacement during typing are supported.</p>
</dd> </dd>
</dl> </dl>
<div class="section"> <div class="section">
<h4><a class="toc-backref" href="#id213" id="at-typing-time" name="at-typing-time">At typing time</a></h4> <h4><a class="toc-backref" href="#id214" id="at-typing-time" name="at-typing-time">At typing time</a></h4>
<p>You can activate/deactivate this feature using the <em>Tools-&gt;HTML <p>You can activate/deactivate this feature using the <em>Tools-&gt;HTML
Replacement-&gt;Auto-replace Special Characters</em> menu item. If it's Replacement-&gt;Auto-replace Special Characters</em> menu item. If it's
activated, all special characters (beside the given exceptions from activated, all special characters (beside the given exceptions from
@ -5627,7 +5660,7 @@ above) known by the plugin will be replaced by their entities.</p>
of this feature.</p> of this feature.</p>
</div> </div>
<div class="section"> <div class="section">
<h4><a class="toc-backref" href="#id214" id="bulk-replacement" name="bulk-replacement">Bulk replacement</a></h4> <h4><a class="toc-backref" href="#id215" id="bulk-replacement" name="bulk-replacement">Bulk replacement</a></h4>
<p>After inserting a huge amount of text, e.g. by using copy &amp; paste, the <p>After inserting a huge amount of text, e.g. by using copy &amp; paste, the
plugin allows bulk replacement of all known characters (beside the plugin allows bulk replacement of all known characters (beside the
mentioned exceptions). You can find the function under the same mentioned exceptions). You can find the function under the same
@ -5637,9 +5670,9 @@ configure a keybinding for the plugin.</p>
</div> </div>
</div> </div>
<div class="section"> <div class="section">
<h2><a class="toc-backref" href="#id215" id="save-actions" name="save-actions">Save Actions</a></h2> <h2><a class="toc-backref" href="#id216" id="save-actions" name="save-actions">Save Actions</a></h2>
<div class="section"> <div class="section">
<h3><a class="toc-backref" href="#id216" id="instant-save" name="instant-save">Instant Save</a></h3> <h3><a class="toc-backref" href="#id217" id="instant-save" name="instant-save">Instant Save</a></h3>
<p>This plugin sets on every new file (<em>File-&gt;New</em> or <em>File-&gt;New (with template)</em>) <p>This plugin sets on every new file (<em>File-&gt;New</em> or <em>File-&gt;New (with template)</em>)
a randomly chosen filename and set its filetype appropriate to the used template a randomly chosen filename and set its filetype appropriate to the used template
or when no template was used, to a configurable default filetype. or when no template was used, to a configurable default filetype.
@ -5649,7 +5682,7 @@ useful when you often create new files just for testing some code or something
similar.</p> similar.</p>
</div> </div>
<div class="section"> <div class="section">
<h3><a class="toc-backref" href="#id217" id="backup-copy" name="backup-copy">Backup Copy</a></h3> <h3><a class="toc-backref" href="#id218" id="backup-copy" name="backup-copy">Backup Copy</a></h3>
<p>This plugin creates a backup copy of the current file in Geany when it is <p>This plugin creates a backup copy of the current file in Geany when it is
saved. You can specify the directory where the backup copy is saved and saved. You can specify the directory where the backup copy is saved and
you can configure the automatically added extension in the configure dialog you can configure the automatically added extension in the configure dialog
@ -5660,7 +5693,7 @@ copied into the configured backup directory when the file is saved in Geany.</p>
</div> </div>
</div> </div>
<div class="section"> <div class="section">
<h1><a class="toc-backref" href="#id218" id="contributing-to-this-document" name="contributing-to-this-document">Contributing to this document</a></h1> <h1><a class="toc-backref" href="#id219" id="contributing-to-this-document" name="contributing-to-this-document">Contributing to this document</a></h1>
<p>This document (<tt class="docutils literal"><span class="pre">geany.txt</span></tt>) is written in <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> <p>This document (<tt class="docutils literal"><span class="pre">geany.txt</span></tt>) is written in <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a>
(or &quot;reST&quot;). The source file for it is located in Geany's <tt class="docutils literal"><span class="pre">doc</span></tt> (or &quot;reST&quot;). The source file for it is located in Geany's <tt class="docutils literal"><span class="pre">doc</span></tt>
subdirectory. If you intend on making changes, you should grab the subdirectory. If you intend on making changes, you should grab the
@ -5680,7 +5713,7 @@ to build the docs. The package is named <tt class="docutils literal"><span class
and Fedora systems.</p> and Fedora systems.</p>
</div> </div>
<div class="section"> <div class="section">
<h1><a class="toc-backref" href="#id219" id="scintilla-keyboard-commands" name="scintilla-keyboard-commands">Scintilla keyboard commands</a></h1> <h1><a class="toc-backref" href="#id220" id="scintilla-keyboard-commands" name="scintilla-keyboard-commands">Scintilla keyboard commands</a></h1>
<p>Copyright © 1998, 2006 Neil Hodgson &lt;neilh(at)scintilla(dot)org&gt;</p> <p>Copyright © 1998, 2006 Neil Hodgson &lt;neilh(at)scintilla(dot)org&gt;</p>
<p>This appendix is distributed under the terms of the License for <p>This appendix is distributed under the terms of the License for
Scintilla and SciTE. A copy of this license can be found in the file Scintilla and SciTE. A copy of this license can be found in the file
@ -5689,7 +5722,7 @@ program and in the appendix of this document. See <a class="reference" href="#li
Scintilla and SciTE</a>.</p> Scintilla and SciTE</a>.</p>
<p>20 June 2006</p> <p>20 June 2006</p>
<div class="section"> <div class="section">
<h2><a class="toc-backref" href="#id220" id="keyboard-commands" name="keyboard-commands">Keyboard commands</a></h2> <h2><a class="toc-backref" href="#id221" id="keyboard-commands" name="keyboard-commands">Keyboard commands</a></h2>
<p>Keyboard commands for Scintilla mostly follow common Windows and GTK+ <p>Keyboard commands for Scintilla mostly follow common Windows and GTK+
conventions. All move keys (arrows, page up/down, home and end) conventions. All move keys (arrows, page up/down, home and end)
allows to extend or reduce the stream selection when holding the allows to extend or reduce the stream selection when holding the
@ -5771,9 +5804,9 @@ menus. Some less common commands with no menu equivalent are:</p>
</div> </div>
</div> </div>
<div class="section"> <div class="section">
<h1><a class="toc-backref" href="#id221" id="tips-and-tricks" name="tips-and-tricks">Tips and tricks</a></h1> <h1><a class="toc-backref" href="#id222" id="tips-and-tricks" name="tips-and-tricks">Tips and tricks</a></h1>
<div class="section"> <div class="section">
<h2><a class="toc-backref" href="#id222" id="document-notebook" name="document-notebook">Document notebook</a></h2> <h2><a class="toc-backref" href="#id223" id="document-notebook" name="document-notebook">Document notebook</a></h2>
<ul class="simple"> <ul class="simple">
<li>Double-click on empty space in the notebook tab bar to open a <li>Double-click on empty space in the notebook tab bar to open a
new document.</li> new document.</li>
@ -5786,7 +5819,7 @@ shortcut). The interface pref must be enabled for this to work.</li>
</ul> </ul>
</div> </div>
<div class="section"> <div class="section">
<h2><a class="toc-backref" href="#id223" id="editor" name="editor">Editor</a></h2> <h2><a class="toc-backref" href="#id224" id="editor" name="editor">Editor</a></h2>
<ul class="simple"> <ul class="simple">
<li>Alt-scroll wheel moves up/down a page.</li> <li>Alt-scroll wheel moves up/down a page.</li>
<li>Ctrl-scroll wheel zooms in/out.</li> <li>Ctrl-scroll wheel zooms in/out.</li>
@ -5796,13 +5829,13 @@ shortcut). The interface pref must be enabled for this to work.</li>
</ul> </ul>
</div> </div>
<div class="section"> <div class="section">
<h2><a class="toc-backref" href="#id224" id="interface" name="interface">Interface</a></h2> <h2><a class="toc-backref" href="#id225" id="interface" name="interface">Interface</a></h2>
<ul class="simple"> <ul class="simple">
<li>Double-click on a symbol-list group to expand or compact it.</li> <li>Double-click on a symbol-list group to expand or compact it.</li>
</ul> </ul>
</div> </div>
<div class="section"> <div class="section">
<h2><a class="toc-backref" href="#id225" id="gtk-related" name="gtk-related">GTK-related</a></h2> <h2><a class="toc-backref" href="#id226" id="gtk-related" name="gtk-related">GTK-related</a></h2>
<ul class="simple"> <ul class="simple">
<li>Scrolling the mouse wheel over a notebook tab bar will switch <li>Scrolling the mouse wheel over a notebook tab bar will switch
notebook pages.</li> notebook pages.</li>
@ -5817,7 +5850,7 @@ position without having to drag it.</li>
</div> </div>
</div> </div>
<div class="section"> <div class="section">
<h1><a class="toc-backref" href="#id226" id="compile-time-options" name="compile-time-options">Compile-time options</a></h1> <h1><a class="toc-backref" href="#id227" id="compile-time-options" name="compile-time-options">Compile-time options</a></h1>
<p>There are some options which can only be changed at compile time, <p>There are some options which can only be changed at compile time,
and some options which are used as the default for configurable and some options which are used as the default for configurable
options. To change these options, edit the appropriate source file options. To change these options, edit the appropriate source file
@ -5829,7 +5862,7 @@ not be changed.</p>
<p class="last">Most users should not need to change these options.</p> <p class="last">Most users should not need to change these options.</p>
</div> </div>
<div class="section"> <div class="section">
<h2><a class="toc-backref" href="#id227" id="src-geany-h" name="src-geany-h">src/geany.h</a></h2> <h2><a class="toc-backref" href="#id228" id="src-geany-h" name="src-geany-h">src/geany.h</a></h2>
<table border="1" class="docutils"> <table border="1" class="docutils">
<colgroup> <colgroup>
<col width="33%" /> <col width="33%" />
@ -5886,7 +5919,7 @@ when building on a non-Win32 system.</em></td>
</table> </table>
</div> </div>
<div class="section"> <div class="section">
<h2><a class="toc-backref" href="#id228" id="project-h" name="project-h">project.h</a></h2> <h2><a class="toc-backref" href="#id229" id="project-h" name="project-h">project.h</a></h2>
<table border="1" class="docutils"> <table border="1" class="docutils">
<colgroup> <colgroup>
<col width="33%" /> <col width="33%" />
@ -5911,7 +5944,7 @@ open dialog.</td>
</table> </table>
</div> </div>
<div class="section"> <div class="section">
<h2><a class="toc-backref" href="#id229" id="editor-h" name="editor-h">editor.h</a></h2> <h2><a class="toc-backref" href="#id230" id="editor-h" name="editor-h">editor.h</a></h2>
<table border="1" class="docutils"> <table border="1" class="docutils">
<colgroup> <colgroup>
<col width="33%" /> <col width="33%" />
@ -5937,7 +5970,7 @@ underscore.</td>
</table> </table>
</div> </div>
<div class="section"> <div class="section">
<h2><a class="toc-backref" href="#id230" id="keyfile-c" name="keyfile-c">keyfile.c</a></h2> <h2><a class="toc-backref" href="#id231" id="keyfile-c" name="keyfile-c">keyfile.c</a></h2>
<p>These are default settings that can be overridden in the <a class="reference" href="#preferences">Preferences</a> dialog.</p> <p>These are default settings that can be overridden in the <a class="reference" href="#preferences">Preferences</a> dialog.</p>
<table border="1" class="docutils"> <table border="1" class="docutils">
<colgroup> <colgroup>
@ -6018,7 +6051,7 @@ Geany provide.</td>
</table> </table>
</div> </div>
<div class="section"> <div class="section">
<h2><a class="toc-backref" href="#id231" id="build-c" name="build-c">build.c</a></h2> <h2><a class="toc-backref" href="#id232" id="build-c" name="build-c">build.c</a></h2>
<table border="1" class="docutils"> <table border="1" class="docutils">
<colgroup> <colgroup>
<col width="33%" /> <col width="33%" />
@ -6063,7 +6096,7 @@ overriding the compile setting.</td>
</div> </div>
</div> </div>
<div class="section"> <div class="section">
<h1><a class="toc-backref" href="#id232" id="gnu-general-public-license" name="gnu-general-public-license">GNU General Public License</a></h1> <h1><a class="toc-backref" href="#id233" id="gnu-general-public-license" name="gnu-general-public-license">GNU General Public License</a></h1>
<pre class="literal-block"> <pre class="literal-block">
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
Version 2, June 1991 Version 2, June 1991
@ -6408,7 +6441,7 @@ Public License instead of this License.
</pre> </pre>
</div> </div>
<div class="section"> <div class="section">
<h1><a class="toc-backref" href="#id233" id="license-for-scintilla-and-scite" name="license-for-scintilla-and-scite">License for Scintilla and SciTE</a></h1> <h1><a class="toc-backref" href="#id234" id="license-for-scintilla-and-scite" name="license-for-scintilla-and-scite">License for Scintilla and SciTE</a></h1>
<p>Copyright 1998-2003 by Neil Hodgson &lt;neilh(at)scintilla(dot)org&gt;</p> <p>Copyright 1998-2003 by Neil Hodgson &lt;neilh(at)scintilla(dot)org&gt;</p>
<p>All Rights Reserved</p> <p>All Rights Reserved</p>
<p>Permission to use, copy, modify, and distribute this software and <p>Permission to use, copy, modify, and distribute this software and
@ -6428,7 +6461,7 @@ USE OR PERFORMANCE OF THIS SOFTWARE.</p>
<div class="footer"> <div class="footer">
<hr class="footer" /> <hr class="footer" />
<a class="reference" href="geany.txt">View document source</a>. <a class="reference" href="geany.txt">View document source</a>.
Generated on: 2010-12-22 16:48 UTC. Generated on: 2010-12-30 17:48 UTC.
Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source. Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
</div> </div>

View File

@ -3593,24 +3593,6 @@ word delimiter characters as well as compiler and linker settings.
See also `Configuration file paths`_. See also `Configuration file paths`_.
Custom filetypes
^^^^^^^^^^^^^^^^
At startup Geany looks for ``filetypes.*.conf`` files in the system and
user filetype paths, adding any filetypes found with the name matching
the '``*``' wildcard.
Custom filetypes are not as powerful as built-in filetypes, but the following
have been implemented:
* Recognizing and setting the filetype (after the user has manually edited
``filetype_extensions.conf``).
* Filetype settings in the [settings] section (see `Filetype configuration`_).
* Using existing tag parsing (``tag_parser`` key).
* Using existing syntax highlighting (``lexer_filetype`` key).
* Build commands.
* Loading global tags files (namespace will be shared with tag_parser
type).
System files System files
^^^^^^^^^^^^ ^^^^^^^^^^^^
The system-wide filetype configuration files can be found in the The system-wide filetype configuration files can be found in the
@ -3635,6 +3617,44 @@ Alternatively, you can create the file yourself and add only the
settings you want to change. All missing settings will be read from settings you want to change. All missing settings will be read from
the corresponding system configuration file. the corresponding system configuration file.
Custom filetypes
^^^^^^^^^^^^^^^^
At startup Geany looks for ``filetypes.*.conf`` files in the system and
user filetype paths, adding any filetypes found with the name matching
the '``*``' wildcard - e.g. ``filetypes.Bar.conf``.
Custom filetypes are not as powerful as built-in filetypes, but
support for the following has been implemented:
* Recognizing and setting the filetype (after the user has manually edited
``filetype_extensions.conf``).
* Reading filetype settings in the ``[settings]`` section, including:
* Using an existing syntax highlighting lexer (`lexer_filetype`_ key).
* Using an existing tag parser (``tag_parser`` key).
* Build commands (``[build-menu]`` section).
* Loading global tags files (sharing the ``tag_parser`` namespace).
See `Filetype configuration`_ for details on each setting.
Creating a custom filetype from an existing filetype
````````````````````````````````````````````````````
Because most filetype settings will relate to the syntax
highlighting (e.g. styling, keywords, ``lexer_properties``
sections), it is best to copy an existing filetype file that uses
the lexer you wish to use as the basis of a custom filetype, using
the correct filename extension format shown above, e.g.::
cp filetypes.foo filetypes.Bar.conf
Then add the ``lexer_filetype=Foo`` setting (if not already present)
and add/adjust other settings.
.. warning::
The ``[styling]`` and ``[keywords]`` sections have key names
specific to each filetype/lexer. You must follow the same
names - in particular, some lexers only support one keyword
list, or none.
Filetype configuration Filetype configuration
^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^
@ -3786,12 +3806,21 @@ context_action_cmd
*Example:* ``context_action_cmd=devhelp -s "%s"`` *Example:* ``context_action_cmd=devhelp -s "%s"``
tag_parser tag_parser
The TagManager language name, e.g. "C". The TagManager language name, e.g. "C". Usually the same as the
filetype name.
.. _lexer_filetype:
lexer_filetype lexer_filetype
A filetype name to setup syntax highlighting from another filetype. A filetype name to setup syntax highlighting from another filetype.
This must not be recursive, i.e. it should be a filetype name that This must not be recursive, i.e. it should be a filetype name that
doesn't use the lexer_filetype key itself. doesn't use the *lexer_filetype* key itself, e.g.::
lexer_filetype=C
#lexer_filetype=C++
The second line is wrong, because ``filetypes.cpp`` itself uses
``lexer_filetype=C``, which would be recursive.
symbol_list_sort_mode symbol_list_sort_mode
What the default symbol list sort order should be. What the default symbol list sort order should be.