Revision: 2073 http://geany.svn.sourceforge.net/geany/?rev=2073&view=rev Author: eht16 Date: 2007-11-29 09:52:24 -0800 (Thu, 29 Nov 2007)
Log Message: ----------- Improve usage of "Unfold all children" option and add some basic documentation for folding support.
Modified Paths: -------------- trunk/ChangeLog trunk/doc/geany.html trunk/doc/geany.txt trunk/geany.glade trunk/src/editor.c trunk/src/interface.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-11-27 15:18:57 UTC (rev 2072) +++ trunk/ChangeLog 2007-11-29 17:52:24 UTC (rev 2073) @@ -1,3 +1,10 @@ +2007-11-29 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> + + * geany.glade, doc/geany.html, geany.txt, src/editor.c, + src/interface.c: Improve usage of "Unfold all children" option and + add some basic documentation for folding support. + + 2007-11-27 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* scintilla/LexHTML.cxx: Fix syntax colouring bug when using '?>' in
Modified: trunk/doc/geany.html =================================================================== --- trunk/doc/geany.html 2007-11-27 15:18:57 UTC (rev 2072) +++ trunk/doc/geany.html 2007-11-29 17:52:24 UTC (rev 2073) @@ -6,7 +6,7 @@ <meta name="generator" content="Docutils 0.4.1: http://docutils.sourceforge.net/" /> <title>Geany</title> <meta name="authors" content="Enrico Tröger Nick Treleaven Frank Lanitz" /> -<meta name="date" content="2007-11-18" /> +<meta name="date" content="2007-11-20" /> <style type="text/css">
/* @@ -133,7 +133,7 @@ <br />Nick Treleaven <br />Frank Lanitz</td></tr> <tr><th class="docinfo-name">Date:</th> -<td>2007-11-18</td></tr> +<td>2007-11-20</td></tr> <tr><th class="docinfo-name">Version:</th> <td>0.13</td></tr> </tbody> @@ -177,133 +177,134 @@ </ul> </li> <li><a class="reference" href="#editing" id="id23" name="id23">Editing</a><ul> -<li><a class="reference" href="#drag-and-drop-of-text" id="id24" name="id24">Drag and drop of text</a></li> -<li><a class="reference" href="#auto-indentation" id="id25" name="id25">Auto indentation</a></li> -<li><a class="reference" href="#bookmarks" id="id26" name="id26">Bookmarks</a></li> -<li><a class="reference" href="#code-navigation-history" id="id27" name="id27">Code Navigation History</a></li> -<li><a class="reference" href="#send-text-through-definable-commands" id="id28" name="id28">Send text through definable commands</a></li> -<li><a class="reference" href="#context-actions" id="id29" name="id29">Context actions</a></li> -<li><a class="reference" href="#user-definable-snippets" id="id30" name="id30">User-definable snippets</a></li> -<li><a class="reference" href="#inserting-unicode-characters" id="id31" name="id31">Inserting unicode characters</a></li> +<li><a class="reference" href="#folding" id="id24" name="id24">Folding</a></li> +<li><a class="reference" href="#drag-and-drop-of-text" id="id25" name="id25">Drag and drop of text</a></li> +<li><a class="reference" href="#auto-indentation" id="id26" name="id26">Auto indentation</a></li> +<li><a class="reference" href="#bookmarks" id="id27" name="id27">Bookmarks</a></li> +<li><a class="reference" href="#code-navigation-history" id="id28" name="id28">Code Navigation History</a></li> +<li><a class="reference" href="#send-text-through-definable-commands" id="id29" name="id29">Send text through definable commands</a></li> +<li><a class="reference" href="#context-actions" id="id30" name="id30">Context actions</a></li> +<li><a class="reference" href="#user-definable-snippets" id="id31" name="id31">User-definable snippets</a></li> +<li><a class="reference" href="#inserting-unicode-characters" id="id32" name="id32">Inserting unicode characters</a></li> </ul> </li> -<li><a class="reference" href="#search-replace-and-go-to" id="id32" name="id32">Search, replace and go to</a><ul> -<li><a class="reference" href="#find" id="id33" name="id33">Find</a><ul> -<li><a class="reference" href="#matching-options" id="id34" name="id34">Matching options</a></li> -<li><a class="reference" href="#find-all" id="id35" name="id35">Find all</a></li> +<li><a class="reference" href="#search-replace-and-go-to" id="id33" name="id33">Search, replace and go to</a><ul> +<li><a class="reference" href="#find" id="id34" name="id34">Find</a><ul> +<li><a class="reference" href="#matching-options" id="id35" name="id35">Matching options</a></li> +<li><a class="reference" href="#find-all" id="id36" name="id36">Find all</a></li> </ul> </li> -<li><a class="reference" href="#find-usage" id="id36" name="id36">Find usage</a></li> -<li><a class="reference" href="#find-in-files" id="id37" name="id37">Find in files</a><ul> -<li><a class="reference" href="#filtering-out-version-control-files" id="id38" name="id38">Filtering out version control files</a></li> +<li><a class="reference" href="#find-usage" id="id37" name="id37">Find usage</a></li> +<li><a class="reference" href="#find-in-files" id="id38" name="id38">Find in files</a><ul> +<li><a class="reference" href="#filtering-out-version-control-files" id="id39" name="id39">Filtering out version control files</a></li> </ul> </li> -<li><a class="reference" href="#replace" id="id39" name="id39">Replace</a><ul> -<li><a class="reference" href="#replace-all" id="id40" name="id40">Replace all</a></li> +<li><a class="reference" href="#replace" id="id40" name="id40">Replace</a><ul> +<li><a class="reference" href="#replace-all" id="id41" name="id41">Replace all</a></li> </ul> </li> -<li><a class="reference" href="#go-to-tag-definition" id="id41" name="id41">Go to tag definition</a></li> -<li><a class="reference" href="#go-to-tag-declaration" id="id42" name="id42">Go to tag declaration</a></li> -<li><a class="reference" href="#go-to-line" id="id43" name="id43">Go to line</a></li> -<li><a class="reference" href="#regular-expressions" id="id44" name="id44">Regular expressions</a><ul> -<li><a class="reference" href="#partial-posix-compatibility" id="id45" name="id45">Partial POSIX compatibility</a></li> +<li><a class="reference" href="#go-to-tag-definition" id="id42" name="id42">Go to tag definition</a></li> +<li><a class="reference" href="#go-to-tag-declaration" id="id43" name="id43">Go to tag declaration</a></li> +<li><a class="reference" href="#go-to-line" id="id44" name="id44">Go to line</a></li> +<li><a class="reference" href="#regular-expressions" id="id45" name="id45">Regular expressions</a><ul> +<li><a class="reference" href="#partial-posix-compatibility" id="id46" name="id46">Partial POSIX compatibility</a></li> </ul> </li> </ul> </li> -<li><a class="reference" href="#tags" id="id46" name="id46">Tags</a><ul> -<li><a class="reference" href="#workspace-tags" id="id47" name="id47">Workspace tags</a></li> -<li><a class="reference" href="#global-tags" id="id48" name="id48">Global tags</a><ul> -<li><a class="reference" href="#default-global-tags-files" id="id49" name="id49">Default global tags files</a></li> -<li><a class="reference" href="#generating-a-global-tags-file" id="id50" name="id50">Generating a global tags file</a></li> +<li><a class="reference" href="#tags" id="id47" name="id47">Tags</a><ul> +<li><a class="reference" href="#workspace-tags" id="id48" name="id48">Workspace tags</a></li> +<li><a class="reference" href="#global-tags" id="id49" name="id49">Global tags</a><ul> +<li><a class="reference" href="#default-global-tags-files" id="id50" name="id50">Default global tags files</a></li> +<li><a class="reference" href="#generating-a-global-tags-file" id="id51" name="id51">Generating a global tags file</a></li> </ul> </li> </ul> </li> -<li><a class="reference" href="#preferences" id="id51" name="id51">Preferences</a><ul> -<li><a class="reference" href="#general-tab-in-preferences-dialog" id="id52" name="id52">General tab in preferences dialog</a></li> -<li><a class="reference" href="#interface-tab-in-preferences-dialog" id="id53" name="id53">Interface tab in preferences dialog</a></li> -<li><a class="reference" href="#toolbar-tab-in-preferences-dialog" id="id54" name="id54">Toolbar tab in preferences dialog</a></li> -<li><a class="reference" href="#display-tab-in-preferences-dialog" id="id55" name="id55">Display tab in preferences dialog</a></li> -<li><a class="reference" href="#editor-tab-in-preferences-dialog" id="id56" name="id56">Editor tab in preferences dialog</a></li> -<li><a class="reference" href="#files-tab-in-preferences-dialog" id="id57" name="id57">Files tab in preferences dialog</a></li> -<li><a class="reference" href="#tools-tab-in-preferences-dialog" id="id58" name="id58">Tools tab in preferences dialog</a></li> -<li><a class="reference" href="#template-tab-in-preferences-dialog" id="id59" name="id59">Template tab in preferences dialog</a></li> -<li><a class="reference" href="#keybinding-tab-in-preferences-dialog" id="id60" name="id60">Keybinding tab in preferences dialog</a></li> -<li><a class="reference" href="#vte-tab-in-preferences-dialog" id="id61" name="id61">VTE tab in preferences dialog</a></li> +<li><a class="reference" href="#preferences" id="id52" name="id52">Preferences</a><ul> +<li><a class="reference" href="#general-tab-in-preferences-dialog" id="id53" name="id53">General tab in preferences dialog</a></li> +<li><a class="reference" href="#interface-tab-in-preferences-dialog" id="id54" name="id54">Interface tab in preferences dialog</a></li> +<li><a class="reference" href="#toolbar-tab-in-preferences-dialog" id="id55" name="id55">Toolbar tab in preferences dialog</a></li> +<li><a class="reference" href="#display-tab-in-preferences-dialog" id="id56" name="id56">Display tab in preferences dialog</a></li> +<li><a class="reference" href="#editor-tab-in-preferences-dialog" id="id57" name="id57">Editor tab in preferences dialog</a></li> +<li><a class="reference" href="#files-tab-in-preferences-dialog" id="id58" name="id58">Files tab in preferences dialog</a></li> +<li><a class="reference" href="#tools-tab-in-preferences-dialog" id="id59" name="id59">Tools tab in preferences dialog</a></li> +<li><a class="reference" href="#template-tab-in-preferences-dialog" id="id60" name="id60">Template tab in preferences dialog</a></li> +<li><a class="reference" href="#keybinding-tab-in-preferences-dialog" id="id61" name="id61">Keybinding tab in preferences dialog</a></li> +<li><a class="reference" href="#vte-tab-in-preferences-dialog" id="id62" name="id62">VTE tab in preferences dialog</a></li> </ul> </li> -<li><a class="reference" href="#project-management" id="id62" name="id62">Project Management</a><ul> -<li><a class="reference" href="#new-project" id="id63" name="id63">New Project</a></li> -<li><a class="reference" href="#project-properties" id="id64" name="id64">Project Properties</a><ul> -<li><a class="reference" href="#run-command" id="id65" name="id65">Run command</a></li> +<li><a class="reference" href="#project-management" id="id63" name="id63">Project Management</a><ul> +<li><a class="reference" href="#new-project" id="id64" name="id64">New Project</a></li> +<li><a class="reference" href="#project-properties" id="id65" name="id65">Project Properties</a><ul> +<li><a class="reference" href="#run-command" id="id66" name="id66">Run command</a></li> </ul> </li> -<li><a class="reference" href="#close-project" id="id66" name="id66">Close Project</a></li> -<li><a class="reference" href="#open-project" id="id67" name="id67">Open Project</a></li> +<li><a class="reference" href="#close-project" id="id67" name="id67">Close Project</a></li> +<li><a class="reference" href="#open-project" id="id68" name="id68">Open Project</a></li> </ul> </li> -<li><a class="reference" href="#build-system" id="id68" name="id68">Build system</a><ul> -<li><a class="reference" href="#compile" id="id69" name="id69">Compile</a></li> -<li><a class="reference" href="#build" id="id70" name="id70">Build</a></li> -<li><a class="reference" href="#make-all" id="id71" name="id71">Make all</a></li> -<li><a class="reference" href="#make-custom-target" id="id72" name="id72">Make custom target</a></li> -<li><a class="reference" href="#make-object" id="id73" name="id73">Make object</a></li> -<li><a class="reference" href="#execute" id="id74" name="id74">Execute</a></li> -<li><a class="reference" href="#stopping-running-processes" id="id75" name="id75">Stopping running processes</a><ul> -<li><a class="reference" href="#terminal-emulators" id="id76" name="id76">Terminal emulators</a></li> +<li><a class="reference" href="#build-system" id="id69" name="id69">Build system</a><ul> +<li><a class="reference" href="#compile" id="id70" name="id70">Compile</a></li> +<li><a class="reference" href="#build" id="id71" name="id71">Build</a></li> +<li><a class="reference" href="#make-all" id="id72" name="id72">Make all</a></li> +<li><a class="reference" href="#make-custom-target" id="id73" name="id73">Make custom target</a></li> +<li><a class="reference" href="#make-object" id="id74" name="id74">Make object</a></li> +<li><a class="reference" href="#execute" id="id75" name="id75">Execute</a></li> +<li><a class="reference" href="#stopping-running-processes" id="id76" name="id76">Stopping running processes</a><ul> +<li><a class="reference" href="#terminal-emulators" id="id77" name="id77">Terminal emulators</a></li> </ul> </li> -<li><a class="reference" href="#set-includes-and-arguments" id="id77" name="id77">Set Includes and Arguments</a><ul> -<li><a class="reference" href="#one-step-compilation" id="id78" name="id78">One step compilation</a></li> +<li><a class="reference" href="#set-includes-and-arguments" id="id78" name="id78">Set Includes and Arguments</a><ul> +<li><a class="reference" href="#one-step-compilation" id="id79" name="id79">One step compilation</a></li> </ul> </li> -<li><a class="reference" href="#indicators" id="id79" name="id79">Indicators</a></li> +<li><a class="reference" href="#indicators" id="id80" name="id80">Indicators</a></li> </ul> </li> -<li><a class="reference" href="#printing-support" id="id80" name="id80">Printing support</a></li> -<li><a class="reference" href="#plugins" id="id81" name="id81">Plugins</a></li> -<li><a class="reference" href="#keybindings" id="id82" name="id82">Keybindings</a><ul> -<li><a class="reference" href="#switching-documents" id="id83" name="id83">Switching documents</a></li> -<li><a class="reference" href="#configurable-keybindings" id="id84" name="id84">Configurable keybindings</a></li> +<li><a class="reference" href="#printing-support" id="id81" name="id81">Printing support</a></li> +<li><a class="reference" href="#plugins" id="id82" name="id82">Plugins</a></li> +<li><a class="reference" href="#keybindings" id="id83" name="id83">Keybindings</a><ul> +<li><a class="reference" href="#switching-documents" id="id84" name="id84">Switching documents</a></li> +<li><a class="reference" href="#configurable-keybindings" id="id85" name="id85">Configurable keybindings</a></li> </ul> </li> </ul> </li> -<li><a class="reference" href="#configuration-files" id="id85" name="id85">Configuration files</a><ul> -<li><a class="reference" href="#global-configuration-file" id="id86" name="id86">Global configuration file</a></li> -<li><a class="reference" href="#filetype-definition-files" id="id87" name="id87">Filetype definition files</a><ul> -<li><a class="reference" href="#format" id="id88" name="id88">Format</a><ul> -<li><a class="reference" href="#styling-section" id="id89" name="id89">[styling] Section</a></li> -<li><a class="reference" href="#keywords-section" id="id90" name="id90">[keywords] Section</a></li> -<li><a class="reference" href="#settings-section" id="id91" name="id91">[settings] Section</a></li> -<li><a class="reference" href="#build-settings-section" id="id92" name="id92">[build_settings] Section</a></li> +<li><a class="reference" href="#configuration-files" id="id86" name="id86">Configuration files</a><ul> +<li><a class="reference" href="#global-configuration-file" id="id87" name="id87">Global configuration file</a></li> +<li><a class="reference" href="#filetype-definition-files" id="id88" name="id88">Filetype definition files</a><ul> +<li><a class="reference" href="#format" id="id89" name="id89">Format</a><ul> +<li><a class="reference" href="#styling-section" id="id90" name="id90">[styling] Section</a></li> +<li><a class="reference" href="#keywords-section" id="id91" name="id91">[keywords] Section</a></li> +<li><a class="reference" href="#settings-section" id="id92" name="id92">[settings] Section</a></li> +<li><a class="reference" href="#build-settings-section" id="id93" name="id93">[build_settings] Section</a></li> </ul> </li> -<li><a class="reference" href="#special-file-filetypes-common" id="id93" name="id93">Special file filetypes.common</a></li> +<li><a class="reference" href="#special-file-filetypes-common" id="id94" name="id94">Special file filetypes.common</a></li> </ul> </li> -<li><a class="reference" href="#filetype-extensions" id="id94" name="id94">Filetype extensions</a></li> -<li><a class="reference" href="#templates" id="id95" name="id95">Templates</a><ul> -<li><a class="reference" href="#template-metadata" id="id96" name="id96">Template metadata</a></li> -<li><a class="reference" href="#filetype-templates" id="id97" name="id97">Filetype templates</a></li> -<li><a class="reference" href="#customizing-templates" id="id98" name="id98">Customizing templates</a><ul> -<li><a class="reference" href="#template-wildcards" id="id99" name="id99">Template wildcards</a></li> +<li><a class="reference" href="#filetype-extensions" id="id95" name="id95">Filetype extensions</a></li> +<li><a class="reference" href="#templates" id="id96" name="id96">Templates</a><ul> +<li><a class="reference" href="#template-metadata" id="id97" name="id97">Template metadata</a></li> +<li><a class="reference" href="#filetype-templates" id="id98" name="id98">Filetype templates</a></li> +<li><a class="reference" href="#customizing-templates" id="id99" name="id99">Customizing templates</a><ul> +<li><a class="reference" href="#template-wildcards" id="id100" name="id100">Template wildcards</a></li> </ul> </li> </ul> </li> </ul> </li> -<li><a class="reference" href="#contributing-to-this-document" id="id100" name="id100">Contributing to this document</a></li> -<li><a class="reference" href="#scintilla-keyboard-commands" id="id101" name="id101">Scintilla keyboard commands</a><ul> -<li><a class="reference" href="#keyboard-commands" id="id102" name="id102">Keyboard commands</a></li> +<li><a class="reference" href="#contributing-to-this-document" id="id101" name="id101">Contributing to this document</a></li> +<li><a class="reference" href="#scintilla-keyboard-commands" id="id102" name="id102">Scintilla keyboard commands</a><ul> +<li><a class="reference" href="#keyboard-commands" id="id103" name="id103">Keyboard commands</a></li> </ul> </li> -<li><a class="reference" href="#hidden-preferences" id="id103" name="id103">Hidden preferences</a></li> -<li><a class="reference" href="#compile-time-options" id="id104" name="id104">Compile-time options</a></li> -<li><a class="reference" href="#gnu-general-public-license" id="id105" name="id105">GNU General Public License</a></li> -<li><a class="reference" href="#license-for-scintilla-and-scite" id="id106" name="id106">License for Scintilla and SciTE</a></li> +<li><a class="reference" href="#hidden-preferences" id="id104" name="id104">Hidden preferences</a></li> +<li><a class="reference" href="#compile-time-options" id="id105" name="id105">Compile-time options</a></li> +<li><a class="reference" href="#gnu-general-public-license" id="id106" name="id106">GNU General Public License</a></li> +<li><a class="reference" href="#license-for-scintilla-and-scite" id="id107" name="id107">License for Scintilla and SciTE</a></li> </ul> </div> <div class="section"> @@ -699,15 +700,39 @@ <div class="note"> <p class="first admonition-title">Note</p> <p class="last">If you are unsure what a BOM is or if you do not understand where -to use it, then it is not important for you and you can safely -ignore it.</p> +to use it, then it is probably not important for you and you can +safely ignore it.</p> </div> </div> </div> <div class="section"> <h2><a class="toc-backref" href="#id23" id="editing" name="editing">Editing</a></h2> <div class="section"> -<h3><a class="toc-backref" href="#id24" id="drag-and-drop-of-text" name="drag-and-drop-of-text">Drag and drop of text</a></h3> +<h3><a class="toc-backref" href="#id24" id="folding" name="folding">Folding</a></h3> +<p>Geany provides basic code folding support. Folding means the ability to +show and hide parts of the text in the current file. You can hide +unimportant code sections and concentrate on the parts you are working on +and later you can show these sections again. In the editor window there is +a small grey margin on the left side with some [+] and [-] symbols. By +clicking on these icons you can simply show and hide sections which are +marked by vertical lines within this margin. For many filetypes nested +folding is supported, so there may be several fold points within other +fold points.</p> +<p>If you don't like it or don't need it at all, you can simply disable +folding support completely in the preferences dialog.</p> +<p>The folding behaviour can be changed with the "Fold/Unfold all children of +a fold point" option in the preference dialog. If activated, Geany will +unfold all nested(child) fold points below the current one if they are +already folded (when clicking on a [+] symbol). +When clicking on a [-] symbol, Geany will fold all nested(child) fold +points below the current one if they are unfolded. +The usage of this option can be instantly inverted by pressing the Shift +key while clicking on a fold symbol. That means, if the "Fold/Unfold all +children of a fold point" option is enabled, pressing Shift will disable +it for this click and vice versa.</p> +</div> +<div class="section"> +<h3><a class="toc-backref" href="#id25" id="drag-and-drop-of-text" name="drag-and-drop-of-text">Drag and drop of text</a></h3> <p>If you drag selected text in the editor widget of Geany the text is moved to the position where the mouse pointer is when releasing the mouse button. Holding Control when releasing the mouse button will @@ -715,7 +740,7 @@ before the selected text was copied to the new position.</p> </div> <div class="section"> -<h3><a class="toc-backref" href="#id25" id="auto-indentation" name="auto-indentation">Auto indentation</a></h3> +<h3><a class="toc-backref" href="#id26" id="auto-indentation" name="auto-indentation">Auto indentation</a></h3> <p>Geany knows four types of auto indentation:</p> <dl class="docutils"> <dt>None</dt> @@ -732,7 +757,7 @@ </dl> </div> <div class="section"> -<h3><a class="toc-backref" href="#id26" id="bookmarks" name="bookmarks">Bookmarks</a></h3> +<h3><a class="toc-backref" href="#id27" id="bookmarks" name="bookmarks">Bookmarks</a></h3> <p>Geany provides a handy bookmarking feature that lets you mark one or more lines in a document, and return the cursor to them using a key combination.</p> @@ -750,7 +775,7 @@ navigate around multiple files.</p> </div> <div class="section"> -<h3><a class="toc-backref" href="#id27" id="code-navigation-history" name="code-navigation-history">Code Navigation History</a></h3> +<h3><a class="toc-backref" href="#id28" id="code-navigation-history" name="code-navigation-history">Code Navigation History</a></h3> <p>To ease navigation in source files and especially between different files, Geany lets you jump between different navigation points. Currently, this works when using the <a class="reference" href="#go-to-tag-declaration">Go to tag declaration</a>, @@ -764,7 +789,7 @@ and between different files.</p> </div> <div class="section"> -<h3><a class="toc-backref" href="#id28" id="send-text-through-definable-commands" name="send-text-through-definable-commands">Send text through definable commands</a></h3> +<h3><a class="toc-backref" href="#id29" id="send-text-through-definable-commands" name="send-text-through-definable-commands">Send text through definable commands</a></h3> <p>You can define several custom commands in Geany and send the current selection to one of these commands. The output of the command will be used to replace the current selection. So, it is possible to use text @@ -781,7 +806,7 @@ entry and press Ok. It will be deleted automatically.</p> </div> <div class="section"> -<h3><a class="toc-backref" href="#id29" id="context-actions" name="context-actions">Context actions</a></h3> +<h3><a class="toc-backref" href="#id30" id="context-actions" name="context-actions">Context actions</a></h3> <p>You can execute a specified command on the current word near the cursor position or an available selection and this word is passed as an argument to this command. It can be used for example to open @@ -807,7 +832,7 @@ called firefox) and it will open the address: <a class="reference" href="http://www.php.net/echo">http://www.php.net/echo</a>.</p> </div> <div class="section"> -<h3><a class="toc-backref" href="#id30" id="user-definable-snippets" name="user-definable-snippets">User-definable snippets</a></h3> +<h3><a class="toc-backref" href="#id31" id="user-definable-snippets" name="user-definable-snippets">User-definable snippets</a></h3> <p>Snippets are small strings or code constructs which can be replaced or completed to a more complex string. So you can save a lot of time by not typing often used strings and letting Geany do the work for you. @@ -894,7 +919,7 @@ needs.</p> </div> <div class="section"> -<h3><a class="toc-backref" href="#id31" id="inserting-unicode-characters" name="inserting-unicode-characters">Inserting unicode characters</a></h3> +<h3><a class="toc-backref" href="#id32" id="inserting-unicode-characters" name="inserting-unicode-characters">Inserting unicode characters</a></h3> <p>With GTK 2.10 and above, you can hit Ctrl-Shift-u, then still holding Ctrl-Shift, type some hex digits representing the code point for the character you want, then let go of Ctrl-Shift and hit a key such as @@ -910,7 +935,7 @@ </div> </div> <div class="section"> -<h2><a class="toc-backref" href="#id32" id="search-replace-and-go-to" name="search-replace-and-go-to">Search, replace and go to</a></h2> +<h2><a class="toc-backref" href="#id33" id="search-replace-and-go-to" name="search-replace-and-go-to">Search, replace and go to</a></h2> <p>This section describes search-related commands from the Search menu and the editor window's popup menu:</p> <ul class="simple"> @@ -925,11 +950,11 @@ <p>* These items are available from the editor window's popup menu, or by using a keyboard shortcut (see the section called <a class="reference" href="#keybindings">Keybindings</a>).</p> <div class="section"> -<h3><a class="toc-backref" href="#id33" id="find" name="find">Find</a></h3> +<h3><a class="toc-backref" href="#id34" id="find" name="find">Find</a></h3> <p>The Find dialog is used for finding text in one or more open documents.</p> <img alt="./images/find_dialog.png" src="./images/find_dialog.png" /> <div class="section"> -<h4><a class="toc-backref" href="#id34" id="matching-options" name="matching-options">Matching options</a></h4> +<h4><a class="toc-backref" href="#id35" id="matching-options" name="matching-options">Matching options</a></h4> <p>The syntax for the Use regular expressions option is shown in <a class="reference" href="#regular-expressions">Regular expressions</a>.</p> <p>The Use escape sequences option will transform any escaped characters @@ -938,7 +963,7 @@ (Unicode chararacters).</p> </div> <div class="section"> -<h4><a class="toc-backref" href="#id35" id="find-all" name="find-all">Find all</a></h4> +<h4><a class="toc-backref" href="#id36" id="find-all" name="find-all">Find all</a></h4> <p>To find all matches, click on the Find All expander. This will reveal several options:</p> <ul class="simple"> @@ -956,7 +981,7 @@ </div> </div> <div class="section"> -<h3><a class="toc-backref" href="#id36" id="find-usage" name="find-usage">Find usage</a></h3> +<h3><a class="toc-backref" href="#id37" id="find-usage" name="find-usage">Find usage</a></h3> <p>Find usage searches all open files. It is similar to the Find All In Session Find dialog command.</p> <p>If there is a selection, then it is used as the search text; otherwise @@ -966,7 +991,7 @@ shown in the Messages tab of the Message Window.</p> </div> <div class="section"> -<h3><a class="toc-backref" href="#id37" id="find-in-files" name="find-in-files">Find in files</a></h3> +<h3><a class="toc-backref" href="#id38" id="find-in-files" name="find-in-files">Find in files</a></h3> <p>Find in files is a more powerful version of Find usage that searches all files in a certain directory using the Grep tool. The Grep tool must be correctly set in Preferences to the path of the system's Grep @@ -975,7 +1000,7 @@ <p>The Extra options field is used to pass any additional arguments to the grep tool.</p> <div class="section"> -<h4><a class="toc-backref" href="#id38" id="filtering-out-version-control-files" name="filtering-out-version-control-files">Filtering out version control files</a></h4> +<h4><a class="toc-backref" href="#id39" id="filtering-out-version-control-files" name="filtering-out-version-control-files">Filtering out version control files</a></h4> <p>When using the <em>Recurse in subfolders</em> option with a directory that's under version control, you can set the <em>Extra options</em> field to use grep's <tt class="docutils literal"><span class="pre">--exclude</span></tt> flag to filter out filenames.</p> @@ -991,7 +1016,7 @@ </div> </div> <div class="section"> -<h3><a class="toc-backref" href="#id39" id="replace" name="replace">Replace</a></h3> +<h3><a class="toc-backref" href="#id40" id="replace" name="replace">Replace</a></h3> <p>The Replace dialog is used for replacing text in one or more open documents.</p> <img alt="./images/replace_dialog.png" src="./images/replace_dialog.png" /> @@ -1001,7 +1026,7 @@ and to the replacement text; for the latter back references can be used -- see the entry for '\n' in <a class="reference" href="#regular-expressions">Regular expressions</a>.</p> <div class="section"> -<h4><a class="toc-backref" href="#id40" id="replace-all" name="replace-all">Replace all</a></h4> +<h4><a class="toc-backref" href="#id41" id="replace-all" name="replace-all">Replace all</a></h4> <p>To replace several matches, click on the <em>Replace All</em> expander. This will reveal several options:</p> <ul class="simple"> @@ -1016,7 +1041,7 @@ </div> </div> <div class="section"> -<h3><a class="toc-backref" href="#id41" id="go-to-tag-definition" name="go-to-tag-definition">Go to tag definition</a></h3> +<h3><a class="toc-backref" href="#id42" id="go-to-tag-definition" name="go-to-tag-definition">Go to tag definition</a></h3> <p>If the current word is the name of a tag definition (like a function body) and the file containing the tag definition is open, this command will switch to that file and go to the corresponding line number. The @@ -1025,17 +1050,17 @@ menu is used.</p> </div> <div class="section"> -<h3><a class="toc-backref" href="#id42" id="go-to-tag-declaration" name="go-to-tag-declaration">Go to tag declaration</a></h3> +<h3><a class="toc-backref" href="#id43" id="go-to-tag-declaration" name="go-to-tag-declaration">Go to tag declaration</a></h3> <p>Like Go to tag definition, but for a forward declaration such as a function prototype or <tt class="docutils literal"><span class="pre">extern</span></tt> declaration instead of a function body.</p> </div> <div class="section"> -<h3><a class="toc-backref" href="#id43" id="go-to-line" name="go-to-line">Go to line</a></h3> +<h3><a class="toc-backref" href="#id44" id="go-to-line" name="go-to-line">Go to line</a></h3> <p>Go to a particular line number in the current file.</p> </div> <div class="section"> -<h3><a class="toc-backref" href="#id44" id="regular-expressions" name="regular-expressions">Regular expressions</a></h3> +<h3><a class="toc-backref" href="#id45" id="regular-expressions" name="regular-expressions">Regular expressions</a></h3> <p>You can use regular expressions in the Find and Replace dialogs by selecting the Use regular expressions check box. The syntax is POSIX-like, as described below in <a class="reference" href="#regular-expressions">Regular expressions</a>.</p> @@ -1104,14 +1129,14 @@ </tbody> </table> <div class="section"> -<h4><a class="toc-backref" href="#id45" id="partial-posix-compatibility" name="partial-posix-compatibility">Partial POSIX compatibility</a></h4> +<h4><a class="toc-backref" href="#id46" id="partial-posix-compatibility" name="partial-posix-compatibility">Partial POSIX compatibility</a></h4> <p>Note that the POSIX '?' regular expression character for optional matching is not supported by the Find and Replace dialogs.</p> </div> </div> </div> <div class="section"> -<h2><a class="toc-backref" href="#id46" id="tags" name="tags">Tags</a></h2> +<h2><a class="toc-backref" href="#id47" id="tags" name="tags">Tags</a></h2> <p>Geany has built-in functionality for generating tag information (aka "workspace tags") for supported filetypes when you open a file. You can also have Geany automatically load external tag files (aka "global @@ -1121,7 +1146,7 @@ (but is incompatible with ctags). You use Geany to generate global tags files, as described below.</p> <div class="section"> -<h3><a class="toc-backref" href="#id47" id="workspace-tags" name="workspace-tags">Workspace tags</a></h3> +<h3><a class="toc-backref" href="#id48" id="workspace-tags" name="workspace-tags">Workspace tags</a></h3> <p>Tags for each document are parsed whenever a file is loaded or saved. These are shown in the Symbol list in the Sidebar. These tags are also used for autocompletion of symbols and calltips for all documents @@ -1130,7 +1155,7 @@ <a class="reference" href="#go-to-tag-definition">Go to tag definition</a>.</p> </div> <div class="section"> -<h3><a class="toc-backref" href="#id48" id="global-tags" name="global-tags">Global tags</a></h3> +<h3><a class="toc-backref" href="#id49" id="global-tags" name="global-tags">Global tags</a></h3> <p>Global tags are used to provide autocompletion of symbols and calltips without having to open the corresponding source files. This is intended for library APIs, as the tags file only has to be updated when you upgrade @@ -1150,7 +1175,7 @@ with the tags. See the section called <a class="reference" href="#filetype-extensions">Filetype extensions</a> for more information.</p> <div class="section"> -<h4><a class="toc-backref" href="#id49" id="default-global-tags-files" name="default-global-tags-files">Default global tags files</a></h4> +<h4><a class="toc-backref" href="#id50" id="default-global-tags-files" name="default-global-tags-files">Default global tags files</a></h4> <p>For some languages, a list of global tags is loaded when the corresponding filetype is first used. Currently these are for:</p> <ul class="simple"> @@ -1162,7 +1187,7 @@ </ul> </div> <div class="section"> -<h4><a class="toc-backref" href="#id50" id="generating-a-global-tags-file" name="generating-a-global-tags-file">Generating a global tags file</a></h4> +<h4><a class="toc-backref" href="#id51" id="generating-a-global-tags-file" name="generating-a-global-tags-file">Generating a global tags file</a></h4> <p><em>Filetypes support:</em></p> <p>Currently this is not yet supported for Pascal, PHP and LaTeX filetypes.</p> @@ -1211,7 +1236,7 @@ </div> </div> <div class="section"> -<h2><a class="toc-backref" href="#id51" id="preferences" name="preferences">Preferences</a></h2> +<h2><a class="toc-backref" href="#id52" id="preferences" name="preferences">Preferences</a></h2> <p>You may adjust Geany's settings using the Edit --> Preferences dialog. Any changes you make there can be applied by hitting either the Apply or the Ok button. These settings will persist between Geany @@ -1229,12 +1254,12 @@ (if present) comes after the screenshot of that tab.</p> </div> <div class="section"> -<h3><a class="toc-backref" href="#id52" id="general-tab-in-preferences-dialog" name="general-tab-in-preferences-dialog">General tab in preferences dialog</a></h3> +<h3><a class="toc-backref" href="#id53" id="general-tab-in-preferences-dialog" name="general-tab-in-preferences-dialog">General tab in preferences dialog</a></h3> <p>General tab in preferences dialog</p> <img alt="./images/pref_dialog_gen.png" src="./images/pref_dialog_gen.png" /> </div> <div class="section"> -<h3><a class="toc-backref" href="#id53" id="interface-tab-in-preferences-dialog" name="interface-tab-in-preferences-dialog">Interface tab in preferences dialog</a></h3> +<h3><a class="toc-backref" href="#id54" id="interface-tab-in-preferences-dialog" name="interface-tab-in-preferences-dialog">Interface tab in preferences dialog</a></h3> <p>Interface tab in preferences dialog</p> <img alt="./images/pref_dialog_interface.png" src="./images/pref_dialog_interface.png" /> <p>The documents list and the editor tabs are two different ways @@ -1244,17 +1269,17 @@ whether or not editor tabs are visible).</p> </div> <div class="section"> -<h3><a class="toc-backref" href="#id54" id="toolbar-tab-in-preferences-dialog" name="toolbar-tab-in-preferences-dialog">Toolbar tab in preferences dialog</a></h3> +<h3><a class="toc-backref" href="#id55" id="toolbar-tab-in-preferences-dialog" name="toolbar-tab-in-preferences-dialog">Toolbar tab in preferences dialog</a></h3> <p>Toolbar tab in preferences dialog</p> <img alt="./images/pref_dialog_toolbar.png" src="./images/pref_dialog_toolbar.png" /> </div> <div class="section"> -<h3><a class="toc-backref" href="#id55" id="display-tab-in-preferences-dialog" name="display-tab-in-preferences-dialog">Display tab in preferences dialog</a></h3> +<h3><a class="toc-backref" href="#id56" id="display-tab-in-preferences-dialog" name="display-tab-in-preferences-dialog">Display tab in preferences dialog</a></h3> <p>This is for visual elements displayed in the editor window.</p> <!-- Display tab in preferences dialog (TODO) --> </div> <div class="section"> -<h3><a class="toc-backref" href="#id56" id="editor-tab-in-preferences-dialog" name="editor-tab-in-preferences-dialog">Editor tab in preferences dialog</a></h3> +<h3><a class="toc-backref" href="#id57" id="editor-tab-in-preferences-dialog" name="editor-tab-in-preferences-dialog">Editor tab in preferences dialog</a></h3> <p>Editor tab in preferences dialog</p> <img alt="./images/pref_dialog_edit.png" src="./images/pref_dialog_edit.png" /> <p>Line wrapping refers to the display of the text in the @@ -1262,22 +1287,22 @@ insert newlines into your document while you type.)</p> </div> <div class="section"> -<h3><a class="toc-backref" href="#id57" id="files-tab-in-preferences-dialog" name="files-tab-in-preferences-dialog">Files tab in preferences dialog</a></h3> +<h3><a class="toc-backref" href="#id58" id="files-tab-in-preferences-dialog" name="files-tab-in-preferences-dialog">Files tab in preferences dialog</a></h3> <p>Files tab in preferences dialog</p> <img alt="./images/pref_dialog_files.png" src="./images/pref_dialog_files.png" /> </div> <div class="section"> -<h3><a class="toc-backref" href="#id58" id="tools-tab-in-preferences-dialog" name="tools-tab-in-preferences-dialog">Tools tab in preferences dialog</a></h3> +<h3><a class="toc-backref" href="#id59" id="tools-tab-in-preferences-dialog" name="tools-tab-in-preferences-dialog">Tools tab in preferences dialog</a></h3> <p>Tools tab in preferences dialog</p> <img alt="./images/pref_dialog_tools.png" src="./images/pref_dialog_tools.png" /> </div> <div class="section"> -<h3><a class="toc-backref" href="#id59" id="template-tab-in-preferences-dialog" name="template-tab-in-preferences-dialog">Template tab in preferences dialog</a></h3> +<h3><a class="toc-backref" href="#id60" id="template-tab-in-preferences-dialog" name="template-tab-in-preferences-dialog">Template tab in preferences dialog</a></h3> <p>Template tab in preferences dialog</p> <img alt="./images/pref_dialog_templ.png" src="./images/pref_dialog_templ.png" /> </div> <div class="section"> -<h3><a class="toc-backref" href="#id60" id="keybinding-tab-in-preferences-dialog" name="keybinding-tab-in-preferences-dialog">Keybinding tab in preferences dialog</a></h3> +<h3><a class="toc-backref" href="#id61" id="keybinding-tab-in-preferences-dialog" name="keybinding-tab-in-preferences-dialog">Keybinding tab in preferences dialog</a></h3> <p>Keybinding tab in preferences dialog</p> <img alt="./images/pref_dialog_keys.png" src="./images/pref_dialog_keys.png" /> <p>There are some handy commands in here that are not, by default, @@ -1288,13 +1313,13 @@ </div> </div> <div class="section"> -<h3><a class="toc-backref" href="#id61" id="vte-tab-in-preferences-dialog" name="vte-tab-in-preferences-dialog">VTE tab in preferences dialog</a></h3> +<h3><a class="toc-backref" href="#id62" id="vte-tab-in-preferences-dialog" name="vte-tab-in-preferences-dialog">VTE tab in preferences dialog</a></h3> <p>VTE tab in preferences dialog</p> <img alt="./images/pref_dialog_vte.png" src="./images/pref_dialog_vte.png" /> </div> </div> <div class="section"> -<h2><a class="toc-backref" href="#id62" id="project-management" name="project-management">Project Management</a></h2> +<h2><a class="toc-backref" href="#id63" id="project-management" name="project-management">Project Management</a></h2> <p>Project Management is optional in Geany. Currently it can be used for:</p> <ul class="simple"> <li>Running <em>Make</em> from the project's base directory.</li> @@ -1307,7 +1332,7 @@ Geany is shutdown. When restarting Geany, the previously opened project file that was in use at the end of the last session will be reopened.</p> <div class="section"> -<h3><a class="toc-backref" href="#id63" id="new-project" name="new-project">New Project</a></h3> +<h3><a class="toc-backref" href="#id64" id="new-project" name="new-project">New Project</a></h3> <p>To create a new project, fill in the <em>Name</em> field. By default this will setup a new project file <tt class="docutils literal"><span class="pre">~/projects/name.geany</span></tt>. Usually it's best to store all your project files in the same directory (they are @@ -1317,7 +1342,7 @@ structure contained in it.</p> </div> <div class="section"> -<h3><a class="toc-backref" href="#id64" id="project-properties" name="project-properties">Project Properties</a></h3> +<h3><a class="toc-backref" href="#id65" id="project-properties" name="project-properties">Project Properties</a></h3> <p>You can set an optional description for the project, but it is not used elsewhere by Geany.</p> <p>The <em>Base path</em> field is used as the directory to run the Make and Make @@ -1325,7 +1350,7 @@ specific <em>Run command</em>. The specified path can be absolute or relative to the project's file name.</p> <div class="section"> -<h4><a class="toc-backref" href="#id65" id="run-command" name="run-command">Run command</a></h4> +<h4><a class="toc-backref" href="#id66" id="run-command" name="run-command">Run command</a></h4> <p>The <em>Run command</em> overrides the default run command. You can set this to the executable or main script file for the project, and append any command-line arguments.</p> @@ -1338,17 +1363,17 @@ </div> </div> <div class="section"> -<h3><a class="toc-backref" href="#id66" id="close-project" name="close-project">Close Project</a></h3> +<h3><a class="toc-backref" href="#id67" id="close-project" name="close-project">Close Project</a></h3> <p>Project file settings are saved when the project is closed.</p> </div> <div class="section"> -<h3><a class="toc-backref" href="#id67" id="open-project" name="open-project">Open Project</a></h3> +<h3><a class="toc-backref" href="#id68" id="open-project" name="open-project">Open Project</a></h3> <p>The Open command displays a standard file chooser, starting in <tt class="docutils literal"><span class="pre">~/projects</span></tt>.</p> </div> </div> <div class="section"> -<h2><a class="toc-backref" href="#id68" id="build-system" name="build-system">Build system</a></h2> +<h2><a class="toc-backref" href="#id69" id="build-system" name="build-system">Build system</a></h2> <p>Geany has an integrated build system. Firstly this means that the current source file will be saved before it is processed. This is for convenience so that you don't need to keep saving small changes @@ -1372,7 +1397,7 @@ <li>Set Includes and Arguments</li> </ul> <div class="section"> -<h3><a class="toc-backref" href="#id69" id="compile" name="compile">Compile</a></h3> +<h3><a class="toc-backref" href="#id70" id="compile" name="compile">Compile</a></h3> <p>The Compile command has different uses for different kinds of files.</p> <p>For compilable languages such as C and C++, the Compile command is setup to compile the current source file into a binary object file.</p> @@ -1382,7 +1407,7 @@ will run the file in its language interpreter.</p> </div> <div class="section"> -<h3><a class="toc-backref" href="#id70" id="build" name="build">Build</a></h3> +<h3><a class="toc-backref" href="#id71" id="build" name="build">Build</a></h3> <p>For compilable languages such as C and C++, the Build command will link the current source file's equivalent object file into an executable. If the object file does not exist, the source will be compiled and linked @@ -1390,7 +1415,7 @@ <p>Interpreted languages do not use the Build command.</p> </div> <div class="section"> -<h3><a class="toc-backref" href="#id71" id="make-all" name="make-all">Make all</a></h3> +<h3><a class="toc-backref" href="#id72" id="make-all" name="make-all">Make all</a></h3> <p>This effectively runs "make all" in the same directory as the current file.</p> <div class="note"> @@ -1400,19 +1425,19 @@ </div> </div> <div class="section"> -<h3><a class="toc-backref" href="#id72" id="make-custom-target" name="make-custom-target">Make custom target</a></h3> +<h3><a class="toc-backref" href="#id73" id="make-custom-target" name="make-custom-target">Make custom target</a></h3> <p>This is similar to running 'Make all' but you will be prompted for the make target name to be passed to the Make tool. For example, typing 'clean' in the dialog prompt will run "make clean".</p> </div> <div class="section"> -<h3><a class="toc-backref" href="#id73" id="make-object" name="make-object">Make object</a></h3> +<h3><a class="toc-backref" href="#id74" id="make-object" name="make-object">Make object</a></h3> <p>Make object will run "make current_file.o" in the same directory as the current file, using its prefix for 'current_file'. It is useful for compiling just the current file without building the whole project.</p> </div> <div class="section"> -<h3><a class="toc-backref" href="#id74" id="execute" name="execute">Execute</a></h3> +<h3><a class="toc-backref" href="#id75" id="execute" name="execute">Execute</a></h3> <p>Execute will run the corresponding executable file, shell script or interpreted script in a terminal window. Note that the Terminal tool path must be correctly set in the Tools tab of the Preferences dialog - @@ -1423,7 +1448,7 @@ output from the program before the terminal window is closed.</p> </div> <div class="section"> -<h3><a class="toc-backref" href="#id75" id="stopping-running-processes" name="stopping-running-processes">Stopping running processes</a></h3> +<h3><a class="toc-backref" href="#id76" id="stopping-running-processes" name="stopping-running-processes">Stopping running processes</a></h3> <p>When there is a running program, the Run button in the toolbar becomes a stop button and you can stop the current action. This works by sending a signal to the process (and its child process(es)) @@ -1432,7 +1457,7 @@ cannot be stopped. This can happen when the process creates more than one child process.</p> <div class="section"> -<h4><a class="toc-backref" href="#id76" id="terminal-emulators" name="terminal-emulators">Terminal emulators</a></h4> +<h4><a class="toc-backref" href="#id77" id="terminal-emulators" name="terminal-emulators">Terminal emulators</a></h4> <p>Xterm is known to work properly. If you are using "Terminal" (the terminal program of Xfce), you should add the command line option <tt class="docutils literal"><span class="pre">--disable-server</span></tt> otherwise the started process cannot be @@ -1441,7 +1466,7 @@ </div> </div> <div class="section"> -<h3><a class="toc-backref" href="#id77" id="set-includes-and-arguments" name="set-includes-and-arguments">Set Includes and Arguments</a></h3> +<h3><a class="toc-backref" href="#id78" id="set-includes-and-arguments" name="set-includes-and-arguments">Set Includes and Arguments</a></h3> <p>By default the Compile and Build commands invoke the compiler and linker with only the basic arguments needed by all programs. Using Set Includes and Arguments you can add any include paths and compile @@ -1458,14 +1483,14 @@ different settings, then writing a Makefile and using the Make commands is recommended.</p> <div class="section"> -<h4><a class="toc-backref" href="#id78" id="one-step-compilation" name="one-step-compilation">One step compilation</a></h4> +<h4><a class="toc-backref" href="#id79" id="one-step-compilation" name="one-step-compilation">One step compilation</a></h4> <p>If you are using the Build command to compile and link in one step, you will need to set both the compiler arguments and the linker arguments in the linker command setting.</p> </div> </div> <div class="section"> -<h3><a class="toc-backref" href="#id79" id="indicators" name="indicators">Indicators</a></h3> +<h3><a class="toc-backref" href="#id80" id="indicators" name="indicators">Indicators</a></h3> <p>Indicators are red squiggly underlines which are used to highlight errors which occured while compiling the current file. So you can easily see where your code failed to compile. To remove the indicators, @@ -1475,7 +1500,7 @@ </div> </div> <div class="section"> -<h2><a class="toc-backref" href="#id80" id="printing-support" name="printing-support">Printing support</a></h2> +<h2><a class="toc-backref" href="#id81" id="printing-support" name="printing-support">Printing support</a></h2> <p>Since Geany 0.13 there is full printing support using GTK's printing API. The printed page(s) will look nearly the same as on your screen in Geany. Additionally, there are some options to modify the printed page(s). You @@ -1523,7 +1548,7 @@ gtklp or similar programs can be used.</p> </div> <div class="section"> -<h2><a class="toc-backref" href="#id81" id="plugins" name="plugins">Plugins</a></h2> +<h2><a class="toc-backref" href="#id82" id="plugins" name="plugins">Plugins</a></h2> <p>Plugins are loaded at startup, if the <em>Enable plugin support</em> general preference is set. There is also a command-line option, <tt class="docutils literal"><span class="pre">-p</span></tt>, which prevents plugins being loaded. Plugins are scanned in @@ -1543,13 +1568,13 @@ provides some.</p> </div> <div class="section"> -<h2><a class="toc-backref" href="#id82" id="keybindings" name="keybindings">Keybindings</a></h2> +<h2><a class="toc-backref" href="#id83" id="keybindings" name="keybindings">Keybindings</a></h2> <p>Geany supports the default keyboard shortcuts for the Scintilla editing widget. For a list of these commands, see <a class="reference" href="#scintilla-keyboard-commands">Scintilla keyboard commands</a>. The Scintilla keyboard shortcuts will be overridden by any custom keybindings with the same keyboard shortcut.</p> <div class="section"> -<h3><a class="toc-backref" href="#id83" id="switching-documents" name="switching-documents">Switching documents</a></h3> +<h3><a class="toc-backref" href="#id84" id="switching-documents" name="switching-documents">Switching documents</a></h3> <p>There are a few non-configurable bindings to switch between documents, listed below. These can also be overridden by custom keybindings.</p> <table border="1" class="docutils"> @@ -1579,7 +1604,7 @@ </table> </div> <div class="section"> -<h3><a class="toc-backref" href="#id84" id="configurable-keybindings" name="configurable-keybindings">Configurable keybindings</a></h3> +<h3><a class="toc-backref" href="#id85" id="configurable-keybindings" name="configurable-keybindings">Configurable keybindings</a></h3> <p>For all actions listed below you can define your own keybindings. Open the Preferences dialog, select the desired action and click on change. In the opening dialog you can press any key combination you @@ -1955,9 +1980,9 @@ </div> </div> <div class="section"> -<h1><a class="toc-backref" href="#id85" id="configuration-files" name="configuration-files">Configuration files</a></h1> +<h1><a class="toc-backref" href="#id86" id="configuration-files" name="configuration-files">Configuration files</a></h1> <div class="section"> -<h2><a class="toc-backref" href="#id86" id="global-configuration-file" name="global-configuration-file">Global configuration file</a></h2> +<h2><a class="toc-backref" href="#id87" id="global-configuration-file" name="global-configuration-file">Global configuration file</a></h2> <p>You can use a global configuration file for Geany which will be used if the user starts Geany for the first time and an user's configuration file was not yet created or in case an user deleted the configuration @@ -1977,7 +2002,7 @@ </div> </div> <div class="section"> -<h2><a class="toc-backref" href="#id87" id="filetype-definition-files" name="filetype-definition-files">Filetype definition files</a></h2> +<h2><a class="toc-backref" href="#id88" id="filetype-definition-files" name="filetype-definition-files">Filetype definition files</a></h2> <p>All colour definitions and other filetype specific settings are stored in the filetype definition files. Those settings are colours for syntax highlighting, general settings like comment characters or @@ -2005,9 +2030,9 @@ to change. All missing settings will be read from the corresponding global definition file in <tt class="docutils literal"><span class="pre">$prefix/share/geany</span></tt>.</p> <div class="section"> -<h3><a class="toc-backref" href="#id88" id="format" name="format">Format</a></h3> +<h3><a class="toc-backref" href="#id89" id="format" name="format">Format</a></h3> <div class="section"> -<h4><a class="toc-backref" href="#id89" id="styling-section" name="styling-section">[styling] Section</a></h4> +<h4><a class="toc-backref" href="#id90" id="styling-section" name="styling-section">[styling] Section</a></h4> <p>In this section the colours for syntax highlighting are defined. The format is always: key=forground_colour;background_colour;bold;italic</p> <p>Colours have to be specified as RGB hex values prefixed by @@ -2017,7 +2042,7 @@ value is something other than "true" or "false", "false" is assumed.</p> </div> <div class="section"> -<h4><a class="toc-backref" href="#id90" id="keywords-section" name="keywords-section">[keywords] Section</a></h4> +<h4><a class="toc-backref" href="#id91" id="keywords-section" name="keywords-section">[keywords] Section</a></h4> <p>This section contains keys for different keyword lists specific to 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 @@ -2028,7 +2053,7 @@ </div> </div> <div class="section"> -<h4><a class="toc-backref" href="#id91" id="settings-section" name="settings-section">[settings] Section</a></h4> +<h4><a class="toc-backref" href="#id92" id="settings-section" name="settings-section">[settings] Section</a></h4> <dl class="docutils"> <dt>extension</dt> <dd><p class="first">This is the default file extension used when saving files, not @@ -2089,7 +2114,7 @@ </dl> </div> <div class="section"> -<h4><a class="toc-backref" href="#id92" id="build-settings-section" name="build-settings-section">[build_settings] Section</a></h4> +<h4><a class="toc-backref" href="#id93" id="build-settings-section" name="build-settings-section">[build_settings] Section</a></h4> <dl class="docutils"> <dt>compiler</dt> <dd><p class="first">This item specifies the command to compile source code files. But @@ -2122,7 +2147,7 @@ </div> </div> <div class="section"> -<h3><a class="toc-backref" href="#id93" id="special-file-filetypes-common" name="special-file-filetypes-common">Special file filetypes.common</a></h3> +<h3><a class="toc-backref" href="#id94" 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 filetypes.common. This file defines some general non-filetype-specific settings.</p> @@ -2232,7 +2257,7 @@ </div> </div> <div class="section"> -<h2><a class="toc-backref" href="#id94" id="filetype-extensions" name="filetype-extensions">Filetype extensions</a></h2> +<h2><a class="toc-backref" href="#id95" id="filetype-extensions" name="filetype-extensions">Filetype extensions</a></h2> <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> <p>You can override the list of file extensions that Geany uses for each @@ -2258,7 +2283,7 @@ </pre> </div> <div class="section"> -<h2><a class="toc-backref" href="#id95" id="templates" name="templates">Templates</a></h2> +<h2><a class="toc-backref" href="#id96" id="templates" name="templates">Templates</a></h2> <p>Geany supports the following templates:</p> <ul class="simple"> <li>ChangeLog entry</li> @@ -2280,7 +2305,7 @@ of a function or the function name cannot be determined, you cannot insert a function description.</p> <div class="section"> -<h3><a class="toc-backref" href="#id96" id="template-metadata" name="template-metadata">Template metadata</a></h3> +<h3><a class="toc-backref" href="#id97" id="template-metadata" name="template-metadata">Template metadata</a></h3> <p>Metadata can be used with all templates, but by default user set metadata is only used for the ChangeLog and File header templates.</p> <p>In the configuration dialog you can find a tab "Templates" (see @@ -2290,7 +2315,7 @@ at startup.</p> </div> <div class="section"> -<h3><a class="toc-backref" href="#id97" id="filetype-templates" name="filetype-templates">Filetype templates</a></h3> +<h3><a class="toc-backref" href="#id98" id="filetype-templates" name="filetype-templates">Filetype templates</a></h3> <p>Filetype 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> menu.</p> @@ -2311,7 +2336,7 @@ the New command is used without a filetype. This is empty by default.</p> </div> <div class="section"> -<h3><a class="toc-backref" href="#id98" id="customizing-templates" name="customizing-templates">Customizing templates</a></h3> +<h3><a class="toc-backref" href="#id99" id="customizing-templates" name="customizing-templates">Customizing templates</a></h3> <p>Each template can be customized to your needs. The templates are stored in the <tt class="docutils literal"><span class="pre">~/.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 @@ -2319,7 +2344,7 @@ Geany ;-) ) and edit the template to your needs. There are some wildcards which will be automatically replaced by Geany at startup.</p> <div class="section"> -<h4><a class="toc-backref" href="#id99" id="template-wildcards" name="template-wildcards">Template wildcards</a></h4> +<h4><a class="toc-backref" href="#id100" id="template-wildcards" name="template-wildcards">Template wildcards</a></h4> <p>All wildcards must be enclosed by "{" and "}", e.g. {date}.</p> <table border="1" class="docutils"> <colgroup> @@ -2428,7 +2453,7 @@ </div> </div> <div class="section"> -<h1><a class="toc-backref" href="#id100" id="contributing-to-this-document" name="contributing-to-this-document">Contributing to this document</a></h1> +<h1><a class="toc-backref" href="#id101" 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> (or "reST"). 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 @@ -2448,7 +2473,7 @@ and Fedora systems.</p> </div> <div class="section"> -<h1><a class="toc-backref" href="#id101" id="scintilla-keyboard-commands" name="scintilla-keyboard-commands">Scintilla keyboard commands</a></h1> +<h1><a class="toc-backref" href="#id102" id="scintilla-keyboard-commands" name="scintilla-keyboard-commands">Scintilla keyboard commands</a></h1> <p>Copyright © 1998, 2006 Neil Hodgson <neilh(at)scintilla(dot)org></p> <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 @@ -2457,7 +2482,7 @@ Scintilla and SciTE</a>.</p> <p>20 June 2006</p> <div class="section"> -<h2><a class="toc-backref" href="#id102" id="keyboard-commands" name="keyboard-commands">Keyboard commands</a></h2> +<h2><a class="toc-backref" href="#id103" id="keyboard-commands" name="keyboard-commands">Keyboard commands</a></h2> <p>Keyboard commands for Scintilla mostly follow common Windows and GTK+ conventions. All move keys (arrows, page up/down, home and end) allows to extend or reduce the stream selection when holding the @@ -2557,7 +2582,7 @@ </div> </div> <div class="section"> -<h1><a class="toc-backref" href="#id103" id="hidden-preferences" name="hidden-preferences">Hidden preferences</a></h1> +<h1><a class="toc-backref" href="#id104" id="hidden-preferences" name="hidden-preferences">Hidden preferences</a></h1> <p>There are some uncommon preferences that are not shown in the Preferences dialog. These can be set by editing <tt class="docutils literal"><span class="pre">~/.geany/geany.conf</span></tt>, then restarting Geany. Search for the key name, then edit the value. Example:</p> @@ -2628,7 +2653,7 @@ </table> </div> <div class="section"> -<h1><a class="toc-backref" href="#id104" id="compile-time-options" name="compile-time-options">Compile-time options</a></h1> +<h1><a class="toc-backref" href="#id105" 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. To change these options, edit the file src/geany.h. Look for a block of lines starting with <tt class="docutils literal"><span class="pre">#define</span> <span class="pre">GEANY_*</span></tt>. Any definitions which are @@ -2773,7 +2798,7 @@ </table> </div> <div class="section"> -<h1><a class="toc-backref" href="#id105" id="gnu-general-public-license" name="gnu-general-public-license">GNU General Public License</a></h1> +<h1><a class="toc-backref" href="#id106" id="gnu-general-public-license" name="gnu-general-public-license">GNU General Public License</a></h1> <pre class="literal-block"> GNU GENERAL PUBLIC LICENSE Version 2, June 1991 @@ -3118,7 +3143,7 @@ </pre> </div> <div class="section"> -<h1><a class="toc-backref" href="#id106" 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="#id107" 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 <neilh(at)scintilla(dot)org></p> <p>All Rights Reserved</p> <p>Permission to use, copy, modify, and distribute this software and @@ -3138,7 +3163,7 @@ <div class="footer"> <hr class="footer" /> <a class="reference" href="geany.txt">View document source</a>. -Generated on: 2007-11-20 18:13 UTC. +Generated on: 2007-11-29 17:49 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.
</div>
Modified: trunk/doc/geany.txt =================================================================== --- trunk/doc/geany.txt 2007-11-27 15:18:57 UTC (rev 2072) +++ trunk/doc/geany.txt 2007-11-29 17:52:24 UTC (rev 2073) @@ -439,8 +439,8 @@
.. note:: If you are unsure what a BOM is or if you do not understand where - to use it, then it is not important for you and you can safely - ignore it. + to use it, then it is probably not important for you and you can + safely ignore it.
@@ -448,6 +448,34 @@ -------
+Folding +^^^^^^^ + +Geany provides basic code folding support. Folding means the ability to +show and hide parts of the text in the current file. You can hide +unimportant code sections and concentrate on the parts you are working on +and later you can show these sections again. In the editor window there is +a small grey margin on the left side with some [+] and [-] symbols. By +clicking on these icons you can simply show and hide sections which are +marked by vertical lines within this margin. For many filetypes nested +folding is supported, so there may be several fold points within other +fold points. + +If you don't like it or don't need it at all, you can simply disable +folding support completely in the preferences dialog. + +The folding behaviour can be changed with the "Fold/Unfold all children of +a fold point" option in the preference dialog. If activated, Geany will +unfold all nested(child) fold points below the current one if they are +already folded (when clicking on a [+] symbol). +When clicking on a [-] symbol, Geany will fold all nested(child) fold +points below the current one if they are unfolded. +The usage of this option can be instantly inverted by pressing the Shift +key while clicking on a fold symbol. That means, if the "Fold/Unfold all +children of a fold point" option is enabled, pressing Shift will disable +it for this click and vice versa. + + Drag and drop of text ^^^^^^^^^^^^^^^^^^^^^
Modified: trunk/geany.glade =================================================================== --- trunk/geany.glade 2007-11-27 15:18:57 UTC (rev 2072) +++ trunk/geany.glade 2007-11-29 17:52:24 UTC (rev 2073) @@ -5873,9 +5873,9 @@ <child> <widget class="GtkCheckButton" id="check_unfold_children"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Unfold all children of a fold point when unfolding it. The same behaviour can be reached when holding the shift key while clicking on the fold symbol.</property> + <property name="tooltip" translatable="yes">Fold or unfold all children of a fold point. By pressing the Shift key while clicking on a fold symbol the contrary behaviour is used.</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Unfold all children of a fold point</property> + <property name="label" translatable="yes">Fold/Unfold all children of a fold point</property> <property name="use_underline">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">False</property>
Modified: trunk/src/editor.c =================================================================== --- trunk/src/editor.c 2007-11-27 15:18:57 UTC (rev 2072) +++ trunk/src/editor.c 2007-11-29 17:52:24 UTC (rev 2073) @@ -107,6 +107,46 @@
typedef struct SCNotification SCNotification;
+static void fold_symbol_click(ScintillaObject *sci, SCNotification *nt) +{ + gint line = SSM(sci, SCI_LINEFROMPOSITION, nt->position, 0); + + SSM(sci, SCI_TOGGLEFOLD, line, 0); + // extra toggling of child fold points + // use when editor_prefs.unfold_all_children is set and Shift is NOT pressed or when + // editor_prefs.unfold_all_children is NOT set but Shift is pressed + if ((editor_prefs.unfold_all_children && ! (nt->modifiers & SCMOD_SHIFT)) || + (! editor_prefs.unfold_all_children && (nt->modifiers & SCMOD_SHIFT))) + { + gint last_line = SSM(sci, SCI_GETLASTCHILD, line, -1); + gint i; + + if (SSM(sci, SCI_GETLINEVISIBLE, line + 1, 0)) + { // unfold all children of the current fold point + for (i = line; i < last_line; i++) + { + if (! SSM(sci, SCI_GETLINEVISIBLE, i, 0)) + { + SSM(sci, SCI_TOGGLEFOLD, SSM(sci, SCI_GETFOLDPARENT, i, 0), 0); + } + } + } + else + { // fold all children of the current fold point + for (i = line; i < last_line; i++) + { + gint level = sci_get_fold_level(sci, i); + if (level & SC_FOLDLEVELHEADERFLAG) + { + if (SSM(sci, SCI_GETFOLDEXPANDED, i, 0)) + SSM(sci, SCI_TOGGLEFOLD, i, 0); + } + } + } + } +} + + static void on_margin_click(ScintillaObject *sci, SCNotification *nt) { // left click to marker margin marks the line @@ -121,23 +161,7 @@ // left click on the folding margin to toggle folding state of current line else if (nt->margin == 2 && editor_prefs.folding) { - gint line = SSM(sci, SCI_LINEFROMPOSITION, nt->position, 0); - - SSM(sci, SCI_TOGGLEFOLD, line, 0); - if ((editor_prefs.unfold_all_children || (nt->modifiers & SCMOD_SHIFT)) && - SSM(sci, SCI_GETLINEVISIBLE, line + 1, 0)) - { // unfold all children of the current fold point - gint last_line = SSM(sci, SCI_GETLASTCHILD, line, -1); - gint i; - - for (i = line; i < last_line; i++) - { - if (! SSM(sci, SCI_GETLINEVISIBLE, i, 0)) - { - SSM(sci, SCI_TOGGLEFOLD, SSM(sci, SCI_GETFOLDPARENT, i, 0), 0); - } - } - } + fold_symbol_click(sci, nt); } }
Modified: trunk/src/interface.c =================================================================== --- trunk/src/interface.c 2007-11-27 15:18:57 UTC (rev 2072) +++ trunk/src/interface.c 2007-11-29 17:52:24 UTC (rev 2073) @@ -3647,10 +3647,10 @@ gtk_tooltips_set_tip (tooltips, check_folding, _("Whether to enable folding the code"), NULL); gtk_button_set_focus_on_click (GTK_BUTTON (check_folding), FALSE);
- check_unfold_children = gtk_check_button_new_with_mnemonic (_("Unfold all children of a fold point")); + check_unfold_children = gtk_check_button_new_with_mnemonic (_("Fold/Unfold all children of a fold point")); gtk_widget_show (check_unfold_children); gtk_box_pack_start (GTK_BOX (vbox17), check_unfold_children, FALSE, FALSE, 0); - gtk_tooltips_set_tip (tooltips, check_unfold_children, _("Unfold all children of a fold point when unfolding it. The same behaviour can be reached when holding the shift key while clicking on the fold symbol."), NULL); + gtk_tooltips_set_tip (tooltips, check_unfold_children, _("Fold or unfold all children of a fold point. By pressing the Shift key while clicking on a fold symbol the contrary behaviour is used."), NULL); gtk_button_set_focus_on_click (GTK_BUTTON (check_unfold_children), FALSE);
check_indicators = gtk_check_button_new_with_mnemonic (_("Use indicators to show compile errors"));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.