r5082
[geany-mirror.git] / doc / geany.html
blob675340578368e63a2f8302f4e2f84ba9c719e539
1 <?xml version="1.0" encoding="utf-8" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
7 <title>Geany</title>
8 <meta name="authors" content="Enrico Tröger Nick Treleaven Frank Lanitz" />
9 <meta name="date" content="2010-08-11" />
10 <style type="text/css">
13 :Author: Enrico Troeger
14 :Contact: enrico(dot)troeger(at)uvena(dot)de
15 :Copyright: This stylesheet has been placed in the public domain.
17 Stylesheet for Geany's documentation based on a version of John Gabriele.
20 @media screen {
22 body {
23 background-color: #f2f2f2;
24 color: #404040;
25 margin-left: 0.4em;
26 max-width: 60em;
27 font-size: 90%;
30 a {
31 color: #990000;
34 a:visited {
35 color: #7E558E;
38 a:hover {
39 text-decoration: none;
42 h1 {
43 border-top: 1px dotted;
44 margin-top: 2em;
47 h1, h2, h3 {
48 font-family: sans-serif;
49 color: #5D0606;
52 h1.title {
53 text-align: left }
55 h2 {
56 margin-top: 30px;
59 h2.subtitle {
60 text-align: left }
62 h3 {
63 padding-left: 3px;
66 blockquote, pre {
67 border: 1px solid;
68 padding: 0.4em;
71 blockquote {
72 font-family: sans-serif;
73 background-color: #DBEDD5;
74 border: 1px dotted;
75 border-left: 4px solid;
76 border-color: #9FD98C;
79 pre {
80 background-color: #ECDFCE;
81 border: 1px dotted;
82 border-left: 4px solid;
83 border-color: #D9BE9A;
86 tt, pre, code {
87 color: #6D4212;
90 table {
91 border: 1px solid #D9BE9A;
94 th {
95 background-color: #ECDFCE;
96 border: 1px dotted #D9BE9A;
99 td {
100 border: 1px dotted #D9BE9A;
103 .docinfo-name {
104 color: #5D0606;
107 p.admonition-title {
108 color: #990000;
109 font-weight: bold;
112 div.note {
113 margin: 1em 3em;
114 padding: 0em;
117 dt {
118 font-style: italic;
123 @media print {
127 </style>
128 </head>
129 <body>
130 <div class="document" id="geany">
131 <h1 class="title">Geany</h1>
132 <h2 class="subtitle" id="a-fast-light-gtk-ide">A fast, light, GTK+ IDE</h2>
133 <table class="docinfo" frame="void" rules="none">
134 <col class="docinfo-name" />
135 <col class="docinfo-content" />
136 <tbody valign="top">
137 <tr><th class="docinfo-name">Authors:</th>
138 <td>Enrico Tröger
139 <br />Nick Treleaven
140 <br />Frank Lanitz</td></tr>
141 <tr><th class="docinfo-name">Date:</th>
142 <td>2010-08-11</td></tr>
143 <tr><th class="docinfo-name">Version:</th>
144 <td>0.19</td></tr>
145 </tbody>
146 </table>
147 <p>Copyright © 2005-2010</p>
148 <p>This document is distributed under the terms of the GNU General Public
149 License as published by the Free Software Foundation; either version 2
150 of the License, or (at your option) any later version. A copy of this
151 license can be found in the file COPYING included with the source code
152 of this program, and also in the chapter <a class="reference" href="#gnu-general-public-license">GNU General Public License</a>.</p>
153 <div class="contents topic">
154 <p class="topic-title first"><a id="contents" name="contents">Contents</a></p>
155 <ul class="simple">
156 <li><a class="reference" href="#introduction" id="id8" name="id8">Introduction</a><ul>
157 <li><a class="reference" href="#about-geany" id="id9" name="id9">About Geany</a></li>
158 <li><a class="reference" href="#where-to-get-it" id="id10" name="id10">Where to get it</a></li>
159 <li><a class="reference" href="#license" id="id11" name="id11">License</a></li>
160 <li><a class="reference" href="#about-this-document" id="id12" name="id12">About this document</a></li>
161 </ul>
162 </li>
163 <li><a class="reference" href="#installation" id="id13" name="id13">Installation</a><ul>
164 <li><a class="reference" href="#requirements" id="id14" name="id14">Requirements</a></li>
165 <li><a class="reference" href="#binary-packages" id="id15" name="id15">Binary packages</a></li>
166 <li><a class="reference" href="#source-compilation" id="id16" name="id16">Source compilation</a><ul>
167 <li><a class="reference" href="#autotools-based-build-system" id="id17" name="id17">Autotools based build system</a></li>
168 <li><a class="reference" href="#waf-based-build-system" id="id18" name="id18">Waf based build system</a><ul>
169 <li><a class="reference" href="#waf-cache" id="id19" name="id19">Waf Cache</a><ul>
170 <li><a class="reference" href="#cleaning-the-cache" id="id20" name="id20">Cleaning the Cache</a></li>
171 </ul>
172 </li>
173 </ul>
174 </li>
175 <li><a class="reference" href="#custom-installation" id="id21" name="id21">Custom installation</a></li>
176 <li><a class="reference" href="#dynamic-linking-loader-support-and-vte" id="id22" name="id22">Dynamic linking loader support and VTE</a></li>
177 <li><a class="reference" href="#build-problems" id="id23" name="id23">Build problems</a></li>
178 </ul>
179 </li>
180 <li><a class="reference" href="#installation-prefix" id="id24" name="id24">Installation prefix</a></li>
181 </ul>
182 </li>
183 <li><a class="reference" href="#usage" id="id25" name="id25">Usage</a><ul>
184 <li><a class="reference" href="#getting-started" id="id26" name="id26">Getting started</a></li>
185 <li><a class="reference" href="#the-geany-workspace" id="id27" name="id27">The Geany workspace</a></li>
186 <li><a class="reference" href="#command-line-options" id="id28" name="id28">Command line options</a></li>
187 <li><a class="reference" href="#general" id="id29" name="id29">General</a><ul>
188 <li><a class="reference" href="#startup" id="id30" name="id30">Startup</a></li>
189 <li><a class="reference" href="#opening-files-from-the-command-line-in-a-running-instance" id="id31" name="id31">Opening files from the command-line in a running instance</a></li>
190 <li><a class="reference" href="#virtual-terminal-emulator-widget-vte" id="id32" name="id32">Virtual terminal emulator widget (VTE)</a></li>
191 <li><a class="reference" href="#defining-own-widget-styles-using-gtkrc-2-0" id="id33" name="id33">Defining own widget styles using .gtkrc-2.0</a></li>
192 </ul>
193 </li>
194 <li><a class="reference" href="#documents" id="id34" name="id34">Documents</a><ul>
195 <li><a class="reference" href="#switching-between-documents" id="id35" name="id35">Switching between documents</a></li>
196 </ul>
197 </li>
198 <li><a class="reference" href="#character-sets-and-unicode-byte-order-mark-bom" id="id36" name="id36">Character sets and Unicode Byte-Order-Mark (BOM)</a><ul>
199 <li><a class="reference" href="#using-character-sets" id="id37" name="id37">Using character sets</a></li>
200 <li><a class="reference" href="#in-file-encoding-specification" id="id38" name="id38">In-file encoding specification</a></li>
201 <li><a class="reference" href="#special-encoding-none" id="id39" name="id39">Special encoding &quot;None&quot;</a></li>
202 <li><a class="reference" href="#unicode-byte-order-mark-bom" id="id40" name="id40">Unicode Byte-Order-Mark (BOM)</a></li>
203 </ul>
204 </li>
205 <li><a class="reference" href="#editing" id="id41" name="id41">Editing</a><ul>
206 <li><a class="reference" href="#folding" id="id42" name="id42">Folding</a></li>
207 <li><a class="reference" href="#column-mode-editing-rectangular-selections" id="id43" name="id43">Column mode editing (rectangular selections)</a></li>
208 <li><a class="reference" href="#drag-and-drop-of-text" id="id44" name="id44">Drag and drop of text</a></li>
209 <li><a class="reference" href="#indentation" id="id45" name="id45">Indentation</a></li>
210 <li><a class="reference" href="#auto-indentation" id="id46" name="id46">Auto-indentation</a></li>
211 <li><a class="reference" href="#bookmarks" id="id47" name="id47">Bookmarks</a></li>
212 <li><a class="reference" href="#code-navigation-history" id="id48" name="id48">Code navigation history</a></li>
213 <li><a class="reference" href="#sending-text-through-custom-commands" id="id49" name="id49">Sending text through custom commands</a></li>
214 <li><a class="reference" href="#context-actions" id="id50" name="id50">Context actions</a></li>
215 <li><a class="reference" href="#autocompletion" id="id51" name="id51">Autocompletion</a><ul>
216 <li><a class="reference" href="#word-part-completion" id="id52" name="id52">Word part completion</a></li>
217 <li><a class="reference" href="#scope-autocompletion" id="id53" name="id53">Scope autocompletion</a></li>
218 </ul>
219 </li>
220 <li><a class="reference" href="#user-definable-snippets" id="id54" name="id54">User-definable snippets</a></li>
221 <li><a class="reference" href="#inserting-unicode-characters" id="id55" name="id55">Inserting Unicode characters</a></li>
222 </ul>
223 </li>
224 <li><a class="reference" href="#search-replace-and-go-to" id="id56" name="id56">Search, replace and go to</a><ul>
225 <li><a class="reference" href="#toolbar-entries" id="id57" name="id57">Toolbar entries</a><ul>
226 <li><a class="reference" href="#search-bar" id="id58" name="id58">Search bar</a></li>
227 </ul>
228 </li>
229 <li><a class="reference" href="#find" id="id59" name="id59">Find</a><ul>
230 <li><a class="reference" href="#matching-options" id="id60" name="id60">Matching options</a></li>
231 <li><a class="reference" href="#find-all" id="id61" name="id61">Find all</a></li>
232 <li><a class="reference" href="#change-font-in-search-dialog-text-fields" id="id62" name="id62">Change font in search dialog text fields</a></li>
233 </ul>
234 </li>
235 <li><a class="reference" href="#find-usage" id="id63" name="id63">Find usage</a></li>
236 <li><a class="reference" href="#find-in-files" id="id64" name="id64">Find in files</a><ul>
237 <li><a class="reference" href="#filtering-out-version-control-files" id="id65" name="id65">Filtering out version control files</a></li>
238 </ul>
239 </li>
240 <li><a class="reference" href="#replace" id="id66" name="id66">Replace</a><ul>
241 <li><a class="reference" href="#replace-all" id="id67" name="id67">Replace all</a></li>
242 </ul>
243 </li>
244 <li><a class="reference" href="#go-to-tag-definition" id="id68" name="id68">Go to tag definition</a></li>
245 <li><a class="reference" href="#go-to-tag-declaration" id="id69" name="id69">Go to tag declaration</a></li>
246 <li><a class="reference" href="#go-to-line" id="id70" name="id70">Go to line</a></li>
247 <li><a class="reference" href="#regular-expressions" id="id71" name="id71">Regular expressions</a></li>
248 </ul>
249 </li>
250 <li><a class="reference" href="#tags" id="id72" name="id72">Tags</a><ul>
251 <li><a class="reference" href="#workspace-tags" id="id73" name="id73">Workspace tags</a></li>
252 <li><a class="reference" href="#global-tags" id="id74" name="id74">Global tags</a><ul>
253 <li><a class="reference" href="#default-global-tags-files" id="id75" name="id75">Default global tags files</a></li>
254 <li><a class="reference" href="#global-tags-file-format" id="id76" name="id76">Global tags file format</a></li>
255 <li><a class="reference" href="#generating-a-global-tags-file" id="id77" name="id77">Generating a global tags file</a></li>
256 </ul>
257 </li>
258 <li><a class="reference" href="#ignore-tags" id="id78" name="id78">Ignore tags</a></li>
259 </ul>
260 </li>
261 <li><a class="reference" href="#preferences" id="id79" name="id79">Preferences</a><ul>
262 <li><a class="reference" href="#general-startup-preferences" id="id80" name="id80">General Startup preferences</a><ul>
263 <li><a class="reference" href="#id1" id="id81" name="id81">Startup</a></li>
264 <li><a class="reference" href="#shutdown" id="id82" name="id82">Shutdown</a></li>
265 <li><a class="reference" href="#paths" id="id83" name="id83">Paths</a></li>
266 </ul>
267 </li>
268 <li><a class="reference" href="#general-miscellaneous-preferences" id="id84" name="id84">General Miscellaneous preferences</a><ul>
269 <li><a class="reference" href="#miscellaneous" id="id85" name="id85">Miscellaneous</a></li>
270 <li><a class="reference" href="#search" id="id86" name="id86">Search</a></li>
271 <li><a class="reference" href="#projects" id="id87" name="id87">Projects</a></li>
272 </ul>
273 </li>
274 <li><a class="reference" href="#interface-preferences" id="id88" name="id88">Interface preferences</a><ul>
275 <li><a class="reference" href="#sidebar" id="id89" name="id89">Sidebar</a></li>
276 <li><a class="reference" href="#fonts" id="id90" name="id90">Fonts</a></li>
277 <li><a class="reference" href="#editor-tabs" id="id91" name="id91">Editor tabs</a></li>
278 <li><a class="reference" href="#tab-positions" id="id92" name="id92">Tab positions</a></li>
279 <li><a class="reference" href="#id2" id="id93" name="id93">Miscellaneous</a></li>
280 </ul>
281 </li>
282 <li><a class="reference" href="#toolbar-preferences" id="id94" name="id94">Toolbar preferences</a><ul>
283 <li><a class="reference" href="#toolbar" id="id95" name="id95">Toolbar</a></li>
284 <li><a class="reference" href="#appearance" id="id96" name="id96">Appearance</a></li>
285 </ul>
286 </li>
287 <li><a class="reference" href="#editor-features-preferences" id="id97" name="id97">Editor Features preferences</a><ul>
288 <li><a class="reference" href="#features" id="id98" name="id98">Features</a></li>
289 </ul>
290 </li>
291 <li><a class="reference" href="#editor-indentation-preferences" id="id99" name="id99">Editor Indentation preferences</a><ul>
292 <li><a class="reference" href="#indentation-group" id="id100" name="id100">Indentation group</a></li>
293 </ul>
294 </li>
295 <li><a class="reference" href="#editor-completions-preferences" id="id101" name="id101">Editor Completions preferences</a><ul>
296 <li><a class="reference" href="#completions" id="id102" name="id102">Completions</a></li>
297 <li><a class="reference" href="#auto-close-quotes-and-brackets" id="id103" name="id103">Auto-close quotes and brackets</a></li>
298 </ul>
299 </li>
300 <li><a class="reference" href="#editor-display-preferences" id="id104" name="id104">Editor Display preferences</a><ul>
301 <li><a class="reference" href="#display" id="id105" name="id105">Display</a></li>
302 <li><a class="reference" href="#long-line-marker" id="id106" name="id106">Long line marker</a></li>
303 <li><a class="reference" href="#virtual-spaces" id="id107" name="id107">Virtual spaces</a></li>
304 </ul>
305 </li>
306 <li><a class="reference" href="#files-preferences" id="id108" name="id108">Files preferences</a><ul>
307 <li><a class="reference" href="#new-files" id="id109" name="id109">New files</a></li>
308 <li><a class="reference" href="#saving-files" id="id110" name="id110">Saving files</a></li>
309 <li><a class="reference" href="#id3" id="id111" name="id111">Miscellaneous</a></li>
310 </ul>
311 </li>
312 <li><a class="reference" href="#tools-preferences" id="id112" name="id112">Tools preferences</a><ul>
313 <li><a class="reference" href="#tool-paths" id="id113" name="id113">Tool paths</a></li>
314 <li><a class="reference" href="#commands" id="id114" name="id114">Commands</a></li>
315 </ul>
316 </li>
317 <li><a class="reference" href="#template-preferences" id="id115" name="id115">Template preferences</a><ul>
318 <li><a class="reference" href="#template-data" id="id116" name="id116">Template data</a></li>
319 </ul>
320 </li>
321 <li><a class="reference" href="#keybinding-preferences" id="id117" name="id117">Keybinding preferences</a></li>
322 <li><a class="reference" href="#printing-preferences" id="id118" name="id118">Printing preferences</a></li>
323 <li><a class="reference" href="#terminal-vte-preferences" id="id119" name="id119">Terminal (VTE) preferences</a><ul>
324 <li><a class="reference" href="#terminal-widget" id="id120" name="id120">Terminal widget</a></li>
325 </ul>
326 </li>
327 </ul>
328 </li>
329 <li><a class="reference" href="#project-management" id="id121" name="id121">Project Management</a><ul>
330 <li><a class="reference" href="#new-project" id="id122" name="id122">New Project</a></li>
331 <li><a class="reference" href="#project-properties" id="id123" name="id123">Project Properties</a><ul>
332 <li><a class="reference" href="#set-base-path-button" id="id124" name="id124">Set Base Path Button</a></li>
333 </ul>
334 </li>
335 <li><a class="reference" href="#open-project" id="id125" name="id125">Open Project</a></li>
336 <li><a class="reference" href="#close-project" id="id126" name="id126">Close Project</a></li>
337 </ul>
338 </li>
339 <li><a class="reference" href="#build-menu" id="id127" name="id127">Build Menu</a><ul>
340 <li><a class="reference" href="#indicators" id="id128" name="id128">Indicators</a></li>
341 <li><a class="reference" href="#default-build-menu-items" id="id129" name="id129">Default Build Menu Items</a><ul>
342 <li><a class="reference" href="#compile" id="id130" name="id130">Compile</a></li>
343 <li><a class="reference" href="#build" id="id131" name="id131">Build</a></li>
344 <li><a class="reference" href="#make" id="id132" name="id132">Make</a></li>
345 <li><a class="reference" href="#make-custom-target" id="id133" name="id133">Make custom target</a></li>
346 <li><a class="reference" href="#make-object" id="id134" name="id134">Make object</a></li>
347 <li><a class="reference" href="#next-error" id="id135" name="id135">Next Error</a></li>
348 <li><a class="reference" href="#previous-error" id="id136" name="id136">Previous Error</a></li>
349 <li><a class="reference" href="#execute" id="id137" name="id137">Execute</a></li>
350 <li><a class="reference" href="#stopping-running-processes" id="id138" name="id138">Stopping running processes</a><ul>
351 <li><a class="reference" href="#terminal-emulators" id="id139" name="id139">Terminal emulators</a></li>
352 </ul>
353 </li>
354 <li><a class="reference" href="#set-build-commands" id="id140" name="id140">Set Build Commands</a></li>
355 </ul>
356 </li>
357 <li><a class="reference" href="#build-menu-configuration" id="id141" name="id141">Build Menu Configuration</a></li>
358 <li><a class="reference" href="#build-menu-commands-dialog" id="id142" name="id142">Build Menu Commands Dialog</a><ul>
359 <li><a class="reference" href="#substitutions-in-commands-and-working-directories" id="id143" name="id143">Substitutions in Commands and Working Directories</a></li>
360 <li><a class="reference" href="#build-menu-keyboard-shortcuts" id="id144" name="id144">Build Menu Keyboard Shortcuts</a></li>
361 <li><a class="reference" href="#configuration-files" id="id145" name="id145">Configuration Files</a></li>
362 </ul>
363 </li>
364 </ul>
365 </li>
366 <li><a class="reference" href="#printing-support" id="id146" name="id146">Printing support</a></li>
367 <li><a class="reference" href="#plugins" id="id147" name="id147">Plugins</a></li>
368 <li><a class="reference" href="#keybindings" id="id148" name="id148">Keybindings</a><ul>
369 <li><a class="reference" href="#switching-documents" id="id149" name="id149">Switching documents</a></li>
370 <li><a class="reference" href="#configurable-keybindings" id="id150" name="id150">Configurable keybindings</a><ul>
371 <li><a class="reference" href="#file-keybindings" id="id151" name="id151">File keybindings</a></li>
372 <li><a class="reference" href="#editor-keybindings" id="id152" name="id152">Editor keybindings</a></li>
373 <li><a class="reference" href="#clipboard-keybindings" id="id153" name="id153">Clipboard keybindings</a></li>
374 <li><a class="reference" href="#select-keybindings" id="id154" name="id154">Select keybindings</a></li>
375 <li><a class="reference" href="#insert-keybindings" id="id155" name="id155">Insert keybindings</a></li>
376 <li><a class="reference" href="#format-keybindings" id="id156" name="id156">Format keybindings</a></li>
377 <li><a class="reference" href="#settings-keybindings" id="id157" name="id157">Settings keybindings</a></li>
378 <li><a class="reference" href="#search-keybindings" id="id158" name="id158">Search keybindings</a></li>
379 <li><a class="reference" href="#go-to-keybindings" id="id159" name="id159">Go to keybindings</a></li>
380 <li><a class="reference" href="#view-keybindings" id="id160" name="id160">View keybindings</a></li>
381 <li><a class="reference" href="#focus-keybindings" id="id161" name="id161">Focus keybindings</a></li>
382 <li><a class="reference" href="#notebook-tab-keybindings" id="id162" name="id162">Notebook tab keybindings</a></li>
383 <li><a class="reference" href="#document-keybindings" id="id163" name="id163">Document keybindings</a></li>
384 <li><a class="reference" href="#build-keybindings" id="id164" name="id164">Build keybindings</a></li>
385 <li><a class="reference" href="#tools-keybindings" id="id165" name="id165">Tools keybindings</a></li>
386 <li><a class="reference" href="#help-keybindings" id="id166" name="id166">Help keybindings</a></li>
387 </ul>
388 </li>
389 </ul>
390 </li>
391 </ul>
392 </li>
393 <li><a class="reference" href="#id4" id="id167" name="id167">Configuration files</a><ul>
394 <li><a class="reference" href="#tools-menu-items" id="id168" name="id168">Tools menu items</a></li>
395 <li><a class="reference" href="#global-configuration-file" id="id169" name="id169">Global configuration file</a></li>
396 <li><a class="reference" href="#filetype-definition-files" id="id170" name="id170">Filetype definition files</a><ul>
397 <li><a class="reference" href="#custom-filetypes" id="id171" name="id171">Custom filetypes</a></li>
398 <li><a class="reference" href="#system-files" id="id172" name="id172">System files</a></li>
399 <li><a class="reference" href="#user-files" id="id173" name="id173">User files</a></li>
400 <li><a class="reference" href="#format" id="id174" name="id174">Format</a><ul>
401 <li><a class="reference" href="#styling-section" id="id175" name="id175">[styling] Section</a><ul>
402 <li><a class="reference" href="#using-a-named-style" id="id176" name="id176">Using a named style</a></li>
403 </ul>
404 </li>
405 <li><a class="reference" href="#keywords-section" id="id177" name="id177">[keywords] Section</a></li>
406 <li><a class="reference" href="#lexer-properties-section" id="id178" name="id178">[lexer_properties] Section</a></li>
407 <li><a class="reference" href="#settings-section" id="id179" name="id179">[settings] Section</a></li>
408 <li><a class="reference" href="#build-settings-section" id="id180" name="id180">[build_settings] Section</a></li>
409 </ul>
410 </li>
411 <li><a class="reference" href="#special-file-filetypes-common" id="id181" name="id181">Special file filetypes.common</a><ul>
412 <li><a class="reference" href="#named-styles-section" id="id182" name="id182">[named_styles] Section</a></li>
413 <li><a class="reference" href="#id5" id="id183" name="id183">[styling] Section</a></li>
414 <li><a class="reference" href="#id6" id="id184" name="id184">[settings] Section</a></li>
415 </ul>
416 </li>
417 </ul>
418 </li>
419 <li><a class="reference" href="#filetype-extensions" id="id185" name="id185">Filetype extensions</a></li>
420 <li><a class="reference" href="#preferences-file-format" id="id186" name="id186">Preferences File Format</a><ul>
421 <li><a class="reference" href="#hidden-preferences" id="id187" name="id187">Hidden preferences</a></li>
422 <li><a class="reference" href="#build-menu-section" id="id188" name="id188">[build-menu] Section</a></li>
423 </ul>
424 </li>
425 <li><a class="reference" href="#project-file-format" id="id189" name="id189">Project File Format</a><ul>
426 <li><a class="reference" href="#build-menu-additions" id="id190" name="id190">[build-menu] Additions</a></li>
427 </ul>
428 </li>
429 <li><a class="reference" href="#templates" id="id191" name="id191">Templates</a><ul>
430 <li><a class="reference" href="#template-meta-data" id="id192" name="id192">Template meta data</a></li>
431 <li><a class="reference" href="#file-templates" id="id193" name="id193">File templates</a><ul>
432 <li><a class="reference" href="#custom-file-templates" id="id194" name="id194">Custom file templates</a></li>
433 <li><a class="reference" href="#filetype-templates" id="id195" name="id195">Filetype templates</a></li>
434 </ul>
435 </li>
436 <li><a class="reference" href="#customizing-templates" id="id196" name="id196">Customizing templates</a><ul>
437 <li><a class="reference" href="#template-wildcards" id="id197" name="id197">Template wildcards</a><ul>
438 <li><a class="reference" href="#special-command-wildcard" id="id198" name="id198">Special {command:} wildcard</a></li>
439 </ul>
440 </li>
441 </ul>
442 </li>
443 </ul>
444 </li>
445 <li><a class="reference" href="#customizing-the-toolbar" id="id199" name="id199">Customizing the toolbar</a><ul>
446 <li><a class="reference" href="#manually-editing-of-the-toolbar-layout" id="id200" name="id200">Manually editing of the toolbar layout</a></li>
447 <li><a class="reference" href="#available-toolbar-elements" id="id201" name="id201">Available toolbar elements</a></li>
448 </ul>
449 </li>
450 </ul>
451 </li>
452 <li><a class="reference" href="#plugin-documentation" id="id202" name="id202">Plugin documentation</a><ul>
453 <li><a class="reference" href="#save-actions" id="id203" name="id203">Save Actions</a><ul>
454 <li><a class="reference" href="#instant-save" id="id204" name="id204">Instant Save</a></li>
455 <li><a class="reference" href="#backup-copy" id="id205" name="id205">Backup Copy</a></li>
456 </ul>
457 </li>
458 </ul>
459 </li>
460 <li><a class="reference" href="#contributing-to-this-document" id="id206" name="id206">Contributing to this document</a></li>
461 <li><a class="reference" href="#scintilla-keyboard-commands" id="id207" name="id207">Scintilla keyboard commands</a><ul>
462 <li><a class="reference" href="#keyboard-commands" id="id208" name="id208">Keyboard commands</a></li>
463 </ul>
464 </li>
465 <li><a class="reference" href="#tips-and-tricks" id="id209" name="id209">Tips and tricks</a><ul>
466 <li><a class="reference" href="#document-notebook" id="id210" name="id210">Document notebook</a></li>
467 <li><a class="reference" href="#editor" id="id211" name="id211">Editor</a></li>
468 <li><a class="reference" href="#interface" id="id212" name="id212">Interface</a></li>
469 <li><a class="reference" href="#gtk-related" id="id213" name="id213">GTK-related</a></li>
470 </ul>
471 </li>
472 <li><a class="reference" href="#compile-time-options" id="id214" name="id214">Compile-time options</a><ul>
473 <li><a class="reference" href="#src-geany-h" id="id215" name="id215">src/geany.h</a></li>
474 <li><a class="reference" href="#project-h" id="id216" name="id216">project.h</a></li>
475 <li><a class="reference" href="#editor-h" id="id217" name="id217">editor.h</a></li>
476 <li><a class="reference" href="#keyfile-c" id="id218" name="id218">keyfile.c</a></li>
477 <li><a class="reference" href="#build-c" id="id219" name="id219">build.c</a></li>
478 </ul>
479 </li>
480 <li><a class="reference" href="#gnu-general-public-license" id="id220" name="id220">GNU General Public License</a></li>
481 <li><a class="reference" href="#license-for-scintilla-and-scite" id="id221" name="id221">License for Scintilla and SciTE</a></li>
482 </ul>
483 </div>
484 <div class="section">
485 <h1><a class="toc-backref" href="#id8" id="introduction" name="introduction">Introduction</a></h1>
486 <div class="section">
487 <h2><a class="toc-backref" href="#id9" id="about-geany" name="about-geany">About Geany</a></h2>
488 <p>Geany is a small and lightweight Integrated Development Environment. It
489 was developed to provide a small and fast IDE, which has only a few
490 dependencies on other packages. Another goal was to be as independent
491 as possible from a particular Desktop Environment like KDE or GNOME -
492 Geany only requires the GTK2 runtime libraries.</p>
493 <p>Some basic features of Geany:</p>
494 <ul class="simple">
495 <li>Syntax highlighting</li>
496 <li>Code folding</li>
497 <li>Autocompletion of symbols/words</li>
498 <li>Construct completion/snippets</li>
499 <li>Auto-closing of XML and HTML tags</li>
500 <li>Calltips</li>
501 <li>Many supported filetypes including C, Java, PHP, HTML, Python, Perl,
502 Pascal, and others</li>
503 <li>Symbol lists</li>
504 <li>Code navigation</li>
505 <li>Build system to compile and execute your code</li>
506 <li>Simple project management</li>
507 <li>Plugin interface</li>
508 </ul>
509 </div>
510 <div class="section">
511 <h2><a class="toc-backref" href="#id10" id="where-to-get-it" name="where-to-get-it">Where to get it</a></h2>
512 <p>You can obtain Geany from <a class="reference" href="http://www.geany.org/">http://www.geany.org/</a> or perhaps also from
513 your distribution. For a list of available packages, please see
514 <a class="reference" href="http://www.geany.org/Download/ThirdPartyPackages">http://www.geany.org/Download/ThirdPartyPackages</a>.</p>
515 </div>
516 <div class="section">
517 <h2><a class="toc-backref" href="#id11" id="license" name="license">License</a></h2>
518 <p>Geany is distributed under the terms of the GNU General Public License
519 as published by the Free Software Foundation; either version 2 of
520 the License, or (at your option) any later version. A copy of this
521 license can be found in the file COPYING included with the source
522 code of this program and in the chapter, <a class="reference" href="#gnu-general-public-license">GNU General Public License</a>.</p>
523 <p>The included Scintilla library (found in the subdirectory
524 <tt class="docutils literal"><span class="pre">scintilla/</span></tt>) has its own license, which can be found in the chapter,
525 <a class="reference" href="#license-for-scintilla-and-scite">License for Scintilla and SciTE</a>.</p>
526 </div>
527 <div class="section">
528 <h2><a class="toc-backref" href="#id12" id="about-this-document" name="about-this-document">About this document</a></h2>
529 <p>This documentation is available in HTML and text formats.
530 The latest version can always be found at <a class="reference" href="http://www.geany.org/">http://www.geany.org/</a>.</p>
531 <p>If you want to contribute to it, see <a class="reference" href="#contributing-to-this-document">Contributing to this document</a>.</p>
532 </div>
533 </div>
534 <div class="section">
535 <h1><a class="toc-backref" href="#id13" id="installation" name="installation">Installation</a></h1>
536 <div class="section">
537 <h2><a class="toc-backref" href="#id14" id="requirements" name="requirements">Requirements</a></h2>
538 <p>You will need the GTK (&gt;= 2.8.0) libraries and their dependencies
539 (Pango, GLib and ATK). Your distro should provide packages for these,
540 usually installed by default. For Windows, you can download an installer
541 from the website which bundles these libraries.</p>
542 </div>
543 <div class="section">
544 <h2><a class="toc-backref" href="#id15" id="binary-packages" name="binary-packages">Binary packages</a></h2>
545 <p>There are many binary packages available. For an up-to-date but maybe
546 incomplete list see <a class="reference" href="http://www.geany.org/Download/ThirdPartyPackages">http://www.geany.org/Download/ThirdPartyPackages</a>.</p>
547 </div>
548 <div class="section">
549 <h2><a class="toc-backref" href="#id16" id="source-compilation" name="source-compilation">Source compilation</a></h2>
550 <p>Compiling Geany is quite easy.
551 To do so, you need the GTK (&gt;= 2.8.0) libraries and header files.
552 You also need the Pango, GLib and ATK libraries and header files.
553 All these files are available at <a class="reference" href="http://www.gtk.org">http://www.gtk.org</a>, but very often
554 your distro will provide development packages to save the trouble of
555 building these yourself.</p>
556 <p>Furthermore you need, of course, a C and C++ compiler. The GNU versions
557 of these tools are recommended.</p>
558 <div class="section">
559 <h3><a class="toc-backref" href="#id17" id="autotools-based-build-system" name="autotools-based-build-system">Autotools based build system</a></h3>
560 <p>The Autotools based build system is very mature and has been well tested.
561 To use it, you just need the Make tool, preferably GNU Make.</p>
562 <p>Then run the following commands:</p>
563 <pre class="literal-block">
564 $ ./configure
565 $ make
566 </pre>
567 <p>Then as root:</p>
568 <pre class="literal-block">
569 % make install
570 </pre>
571 </div>
572 <div class="section">
573 <h3><a class="toc-backref" href="#id18" id="waf-based-build-system" name="waf-based-build-system">Waf based build system</a></h3>
574 <p>The Waf build system is still quite young and under heavy development but already in a
575 usable state. In contrast to the Autotools system, Waf needs Python. So before using Waf, you need
576 to install Python on your system.
577 The advantage of the Waf build system over the Autotools based build system is that the whole
578 build process might be a bit faster. Especially when you use the Waf
579 cache feature for repetitive builds (e.g. when changing only a few source files
580 to test something) will become much faster since Waf will cache and re-use the
581 unchanged built files and only compile the changed code again. See <a class="reference" href="#waf-cache">Waf Cache</a> for details.
582 To build Geany with Waf as run:</p>
583 <pre class="literal-block">
584 $ ./waf configure
585 $ ./waf build
586 </pre>
587 <p>Then as root:</p>
588 <pre class="literal-block">
589 % ./waf install
590 </pre>
591 <div class="section">
592 <h4><a class="toc-backref" href="#id19" id="waf-cache" name="waf-cache">Waf Cache</a></h4>
593 <p>The Waf build system has a nice and interesting feature which can help to avoid
594 a lot of unnecessary rebuilding of unchanged code. This often happens when developing new features
595 or trying to debug something in Geany.
596 Waf is able to store and retrieve the object files from a cache. This cache is declared
597 using the environment variable <tt class="docutils literal"><span class="pre">WAFCACHE</span></tt>.
598 A possible location of the cache directory could be <tt class="docutils literal"><span class="pre">~/.cache/waf</span></tt>. In order to make use of
599 this, you first need to create this directory:</p>
600 <pre class="literal-block">
601 $ mkdir -p ~/.cache/waf
602 </pre>
603 <p>then add the environment variable to your shell configuration (the following example is for
604 Bash and should be adjusted to your used shell):</p>
605 <pre class="literal-block">
606 export WAFCACHE=/home/username/.cache/waf
607 </pre>
608 <p>Remember to replace <tt class="docutils literal"><span class="pre">username</span></tt> with your actual username.</p>
609 <p>More information about the Waf cache feature are available at
610 <a class="reference" href="http://code.google.com/p/waf/wiki/CacheObjectFiles">http://code.google.com/p/waf/wiki/CacheObjectFiles</a>.</p>
611 <div class="section">
612 <h5><a class="toc-backref" href="#id20" id="cleaning-the-cache" name="cleaning-the-cache">Cleaning the Cache</a></h5>
613 <p>You should be careful about the size of the cache directory as it may
614 grow rapidly over time.
615 Waf doesn't do any cleaning or other house-keeping of the cache yet, so you need to keep it
616 clean by yourself.
617 An easy way to keep it clean is to run the following command regularly to remove old
618 cached files:</p>
619 <pre class="literal-block">
620 $ find /home/username/.cache/waf -mtime +14 -exec rm {} \;
621 </pre>
622 <p>This will delete all files in the cache directory which are older than 14 days.</p>
623 <p>For details about the <tt class="docutils literal"><span class="pre">find</span></tt> command and its options, check its manual page.</p>
624 </div>
625 </div>
626 </div>
627 <div class="section">
628 <h3><a class="toc-backref" href="#id21" id="custom-installation" name="custom-installation">Custom installation</a></h3>
629 <p>The configure script supports several common options, for a detailed
630 list, type:</p>
631 <pre class="literal-block">
632 $ ./configure --help
633 </pre>
634 <dl class="docutils">
635 <dt>or::</dt>
636 <dd>$ ./waf --help</dd>
637 </dl>
638 <p>(depending on which build system you use).</p>
639 <p>You may also want to read the INSTALL file for advanced installation
640 options.</p>
641 <ul class="simple">
642 <li>See also <a class="reference" href="#compile-time-options">Compile-time options</a>.</li>
643 </ul>
644 </div>
645 <div class="section">
646 <h3><a class="toc-backref" href="#id22" id="dynamic-linking-loader-support-and-vte" name="dynamic-linking-loader-support-and-vte">Dynamic linking loader support and VTE</a></h3>
647 <p>In the case that your system lacks dynamic linking loader support, you
648 probably want to pass the option <tt class="docutils literal"><span class="pre">--disable-vte</span></tt> to the <tt class="docutils literal"><span class="pre">configure</span></tt>
649 script. This prevents compiling Geany with dynamic linking loader
650 support for automatically loading <tt class="docutils literal"><span class="pre">libvte.so.4</span></tt> if available.</p>
651 </div>
652 <div class="section">
653 <h3><a class="toc-backref" href="#id23" id="build-problems" name="build-problems">Build problems</a></h3>
654 <p>If there are any errors during compilation, check your build
655 environment and try to find the error, otherwise contact the mailing
656 list or one the authors. Sometimes you might need to ask for specific
657 help from your distribution.</p>
658 </div>
659 </div>
660 <div class="section">
661 <h2><a class="toc-backref" href="#id24" id="installation-prefix" name="installation-prefix">Installation prefix</a></h2>
662 <p>If you want to edit any of Geany's system configuration files after
663 installation you will need to know the installation prefix. Usually this
664 is not necessary as you can just use per user configuration files and
665 you will not need root permissions.</p>
666 <p>Use the <tt class="docutils literal"><span class="pre">--print-prefix</span></tt> option to Geany to check - see <a class="reference" href="#command-line-options">Command line
667 options</a>. The first path is the prefix.</p>
668 <p>This is commonly <tt class="docutils literal"><span class="pre">/usr</span></tt> if you installed from a binary package, or
669 <tt class="docutils literal"><span class="pre">/usr/local</span></tt> if you build from source.</p>
670 </div>
671 </div>
672 <div class="section">
673 <h1><a class="toc-backref" href="#id25" id="usage" name="usage">Usage</a></h1>
674 <div class="section">
675 <h2><a class="toc-backref" href="#id26" id="getting-started" name="getting-started">Getting started</a></h2>
676 <p>You can start Geany in the following ways:</p>
677 <ul>
678 <li><p class="first">From the Desktop Environment menu:</p>
679 <p>Choose in your application menu of your used Desktop Environment:
680 Development --&gt; Geany.</p>
681 </li>
682 <li><p class="first">From the command line:</p>
683 <p>To start Geany from a command line, type the following and press
684 Return:</p>
685 <pre class="literal-block">
686 % geany
687 </pre>
688 </li>
689 </ul>
690 </div>
691 <div class="section">
692 <h2><a class="toc-backref" href="#id27" id="the-geany-workspace" name="the-geany-workspace">The Geany workspace</a></h2>
693 <p>The Geany window is shown in the following figure:</p>
694 <img alt="./images/main_window.png" src="./images/main_window.png" />
695 <p>The workspace has the following parts:</p>
696 <ul class="simple">
697 <li>The menu.</li>
698 <li>An optional toolbar.</li>
699 <li>An optional sidebar that can show the following tabs:<ul>
700 <li>Documents - A document list, and</li>
701 <li>Symbols - A list of symbols in your code.</li>
702 </ul>
703 </li>
704 <li>The main editor window.</li>
705 <li>An optional message window which can show the following tabs:<ul>
706 <li>Status - A list of status messages.</li>
707 <li>Compiler - The output of compiling or building programs.</li>
708 <li>Messages - Results of 'Find Usage', 'Find Usage' 'Find in Files' and other actions</li>
709 <li>Scribble - A text scratchpad for any use.</li>
710 <li>Terminal - An optional terminal window.</li>
711 </ul>
712 </li>
713 <li>A status bar</li>
714 </ul>
715 <p>Additional tabs may be added to the sidebar and message window by plugins.</p>
716 <p>The position of the tabs can be selected in the interface preferences.</p>
717 <p>The sizes of the sidebar and message window can be adjusted by
718 dragging the dividers.</p>
719 </div>
720 <div class="section">
721 <h2><a class="toc-backref" href="#id28" id="command-line-options" name="command-line-options">Command line options</a></h2>
722 <table border="1" class="docutils">
723 <colgroup>
724 <col width="9%" />
725 <col width="18%" />
726 <col width="72%" />
727 </colgroup>
728 <thead valign="bottom">
729 <tr><th class="head">Short option</th>
730 <th class="head">Long option</th>
731 <th class="head">Function</th>
732 </tr>
733 </thead>
734 <tbody valign="top">
735 <tr><td><em>none</em></td>
736 <td>+number</td>
737 <td>Set initial line number for the first opened file
738 (same as --line, do not put a space between the + sign
739 and the number). E.g. &quot;geany +7 foo.bar&quot; will open the
740 file foo.bar and place the cursor in line 7.</td>
741 </tr>
742 <tr><td><em>none</em></td>
743 <td>--column</td>
744 <td>Set initial column number for the first opened file.</td>
745 </tr>
746 <tr><td>-c dir_name</td>
747 <td>--config=directory_name</td>
748 <td>Use an alternate configuration directory. The default
749 configuration directory is <tt class="docutils literal"><span class="pre">~/.config/geany/</span></tt> and that
750 is where <tt class="docutils literal"><span class="pre">geany.conf</span></tt> and other configuration files
751 reside.</td>
752 </tr>
753 <tr><td><em>none</em></td>
754 <td>--ft-names</td>
755 <td>Print a list of Geany's internal filetype names (useful
756 for snippets configuration).</td>
757 </tr>
758 <tr><td>-g</td>
759 <td>--generate-tags</td>
760 <td>Generate a global tags file (see
761 <a class="reference" href="#generating-a-global-tags-file">Generating a global tags file</a>).</td>
762 </tr>
763 <tr><td>-P</td>
764 <td>--no-preprocessing</td>
765 <td>Don't preprocess C/C++ files when generating tags.</td>
766 </tr>
767 <tr><td>-i</td>
768 <td>--new-instance</td>
769 <td>Do not open files in a running instance, force opening
770 a new instance. Only available if Geany was compiled
771 with support for Sockets.</td>
772 </tr>
773 <tr><td>-l</td>
774 <td>--line</td>
775 <td>Set initial line number for the first opened file.</td>
776 </tr>
777 <tr><td><em>none</em></td>
778 <td>--list-documents</td>
779 <td>Return a list of open documents in a running Geany
780 instance.
781 This can be used to read the currently opened documents in
782 Geany from an external script or tool. The returned list
783 is separated by newlines (LF) and consists of the full,
784 UTF-8 encoded filenames of the documents.
785 Only available if Geany was compiled with support for
786 Sockets.</td>
787 </tr>
788 <tr><td>-m</td>
789 <td>--no-msgwin</td>
790 <td>Do not show the message window. Use this option if you
791 do not need compiler messages or VTE support.</td>
792 </tr>
793 <tr><td>-n</td>
794 <td>--no-ctags</td>
795 <td>Do not load symbol completion and call tip data. Use this
796 option if you do not want to use them.</td>
797 </tr>
798 <tr><td>-p</td>
799 <td>--no-plugins</td>
800 <td>Do not load plugins or plugin support.</td>
801 </tr>
802 <tr><td><em>none</em></td>
803 <td>--print-prefix</td>
804 <td>Print installation prefix, the data directory, the lib
805 directory and the locale directory (in this order) to
806 stdout, one line each. This is mainly intended for plugin
807 authors to detect installation paths.</td>
808 </tr>
809 <tr><td>-s</td>
810 <td>--no-session</td>
811 <td>Do not load the previous session's files.</td>
812 </tr>
813 <tr><td>-t</td>
814 <td>--no-terminal</td>
815 <td>Do not load terminal support. Use this option if you do
816 not want to load the virtual terminal emulator widget
817 at startup. If you do not have <tt class="docutils literal"><span class="pre">libvte.so.4</span></tt> installed,
818 then terminal-support is automatically disabled. Only
819 available if Geany was compiled with support for VTE.</td>
820 </tr>
821 <tr><td><em>none</em></td>
822 <td>--socket-file</td>
823 <td><p class="first">Use this socket filename for communication with a
824 running Geany instance. This can be used with the following
825 command to execute Geany on the current workspace:</p>
826 <pre class="last literal-block">
827 geany --socket-file=/tmp/geany-sock-$(xprop -root _NET_CURRENT_DESKTOP | awk '{print $3}')
828 </pre>
829 </td>
830 </tr>
831 <tr><td><em>none</em></td>
832 <td>--vte-lib</td>
833 <td>Specify explicitly the path including filename or only
834 the filename to the VTE library, e.g.
835 <tt class="docutils literal"><span class="pre">/usr/lib/libvte.so</span></tt> or <tt class="docutils literal"><span class="pre">libvte.so</span></tt>. This option is
836 only needed when the auto-detection does not work. Only
837 available if Geany was compiled with support for VTE.</td>
838 </tr>
839 <tr><td>-v</td>
840 <td>--verbose</td>
841 <td>Be verbose (print useful status messages).</td>
842 </tr>
843 <tr><td>-V</td>
844 <td>--version</td>
845 <td>Show version information and exit.</td>
846 </tr>
847 <tr><td>-?</td>
848 <td>--help</td>
849 <td>Show help information and exit.</td>
850 </tr>
851 <tr><td><em>none</em></td>
852 <td>[files ...]</td>
853 <td><p class="first">Open all given files at startup. This option causes
854 Geany to ignore loading stored files from the last
855 session (if enabled).
856 Geany also recognizes line and column information when
857 appended to the filename with colons, e.g.
858 &quot;geany foo.bar:10:5&quot; will open the file foo.bar and
859 place the cursor in line 10 at column 5.</p>
860 <p class="last">Projects can also be opened but a project file (*.geany)
861 must be the first non-option argument. All additionally
862 given files are ignored.</p>
863 </td>
864 </tr>
865 </tbody>
866 </table>
867 <p>You can also pass line number and column number information, e.g.:</p>
868 <pre class="literal-block">
869 geany some_file.foo:55:4
870 </pre>
871 <p>Geany supports all generic GTK options, a list is available on the
872 help screen.</p>
873 </div>
874 <div class="section">
875 <h2><a class="toc-backref" href="#id29" id="general" name="general">General</a></h2>
876 <div class="section">
877 <h3><a class="toc-backref" href="#id30" id="startup" name="startup">Startup</a></h3>
878 <p>At startup, Geany loads all files from the last time Geany was
879 launched. You can disable this feature in the preferences dialog
880 (see <a class="reference" href="#general-startup-preferences">General Startup preferences</a>). If you specify some
881 files on the command line, only these files will be opened, but you
882 can find the files from the last session in the file menu under the
883 &quot;Recent files&quot; item. By default this contains the last 10 recently
884 opened files. You can change the number of recently opened files in
885 the preferences dialog.</p>
886 <p>You can start several instances of Geany, but only the first will
887 load files from the last session. To run a second instance of Geany,
888 do not specify any filenames on the command-line, or disable opening
889 files in a running instance using the appropriate command line option.</p>
890 </div>
891 <div class="section">
892 <h3><a class="toc-backref" href="#id31" id="opening-files-from-the-command-line-in-a-running-instance" name="opening-files-from-the-command-line-in-a-running-instance">Opening files from the command-line in a running instance</a></h3>
893 <p>Geany detects if there is an an instance of itself already running and opens files
894 from the command-line in that instance. So, Geany can
895 be used to view and edit files by opening them from other programs
896 such as a file manager.</p>
897 <p>You can also pass line number and column number information, e.g.:</p>
898 <pre class="literal-block">
899 geany some_file.foo:55:4
900 </pre>
901 <p>This would open the file <tt class="docutils literal"><span class="pre">some_file.foo</span></tt> with the cursor on line 55,
902 column 4.</p>
903 <p>If you do not like this for some reason, you can disable using the first
904 instance by using the appropriate command line option -- see the section
905 called <a class="reference" href="#command-line-options">Command line options</a>.</p>
906 </div>
907 <div class="section">
908 <h3><a class="toc-backref" href="#id32" id="virtual-terminal-emulator-widget-vte" name="virtual-terminal-emulator-widget-vte">Virtual terminal emulator widget (VTE)</a></h3>
909 <p>If you have installed <tt class="docutils literal"><span class="pre">libvte.so</span></tt> on your system, it is loaded
910 automatically by Geany, and you will have a terminal widget in the
911 notebook at the bottom.</p>
912 <p>If Geany cannot find any <tt class="docutils literal"><span class="pre">libvte.so</span></tt> at startup, the terminal widget
913 will not be loaded. So there is no need to install the package containing
914 this file in order to run Geany. Additionally, you can disable the use
915 of the terminal widget by command line option, for more information
916 see the section called <a class="reference" href="#command-line-options">Command line options</a>.</p>
917 <p>You can use this terminal (from now on called VTE) much as you would
918 a terminal program like xterm. There is basic clipboard support. You
919 can paste the contents of the clipboard by pressing the right mouse
920 button to open the popup menu, and choosing Paste. To copy text from
921 the VTE, just select the desired text and then press the right mouse
922 button and choose Copy from the popup menu. On systems running the
923 X Window System you can paste the last selected text by pressing the
924 middle mouse button in the VTE (on 2-button mice, the middle button
925 can often be simulated by pressing both mouse buttons together).</p>
926 <p>In the preferences dialog you can specify a shell which should be
927 started in the VTE. To make the specified shell a login shell just
928 use the appropriate command line options for the shell. These options
929 should be found in the manual page of the shell. For zsh and bash
930 you can use the argument <tt class="docutils literal"><span class="pre">--login</span></tt>.</p>
931 <div class="note">
932 <p class="first admonition-title">Note</p>
933 <p class="last">Geany tries to load <tt class="docutils literal"><span class="pre">libvte.so</span></tt>. If this fails, it tries to load
934 some other filenames. If this fails too, you should check whether you
935 installed libvte correctly. Again note, Geany will run without this
936 library.</p>
937 </div>
938 <p>It could be, that the library is called something else than
939 <tt class="docutils literal"><span class="pre">libvte.so</span></tt> (e.g. on FreeBSD 6.0 it is called <tt class="docutils literal"><span class="pre">libvte.so.8</span></tt>). If so
940 please set a link to the correct file (as root):</p>
941 <pre class="literal-block">
942 # ln -s /usr/lib/libvte.so.X /usr/lib/libvte.so
943 </pre>
944 <p>Obviously, you have to adjust the paths and set X to the number of your
945 <tt class="docutils literal"><span class="pre">libvte.so</span></tt>.</p>
946 <p>You can also specify the filename of the VTE library to use on the command
947 line (see the section called <a class="reference" href="#command-line-options">Command line options</a>) or at compile time
948 by specifying the command line option <tt class="docutils literal"><span class="pre">--with-vte-module-path</span></tt> to
949 ./configure.</p>
950 </div>
951 <div class="section">
952 <h3><a class="toc-backref" href="#id33" id="defining-own-widget-styles-using-gtkrc-2-0" name="defining-own-widget-styles-using-gtkrc-2-0">Defining own widget styles using .gtkrc-2.0</a></h3>
953 <p>You can define your widget style for many of Geany's GUI parts. To
954 do this, just edit your <tt class="docutils literal"><span class="pre">.gtkrc-2.0</span></tt> (usually found in your home
955 directory on UNIX-like systems and in the etc subdirectory of your
956 Geany installation on Windows).</p>
957 <p>To have a defined style used by Geany you must assign it to
958 at least one of Geany's widgets. For example use the following line:</p>
959 <pre class="literal-block">
960 widget &quot;Geany*&quot; style &quot;geanyStyle&quot;
961 </pre>
962 <p>This would assign your style &quot;geany_style&quot; to all Geany
963 widgets. You can also assign styles only to specific widgets. At the
964 moment you can use the following widgets:</p>
965 <ul class="simple">
966 <li>GeanyMainWindow</li>
967 <li>GeanyEditMenu</li>
968 <li>GeanyToolbarMenu</li>
969 <li>GeanyDialog</li>
970 <li>GeanyDialogPrefs</li>
971 <li>GeanyDialogProject</li>
972 <li>GeanyDialogSearch</li>
973 <li>GeanyMenubar</li>
974 <li>GeanyToolbar</li>
975 </ul>
976 <p>An example of a simple <tt class="docutils literal"><span class="pre">.gtkrc-2.0</span></tt>:</p>
977 <pre class="literal-block">
978 style &quot;geanyStyle&quot;
980 font_name=&quot;Sans 12&quot;
982 widget &quot;GeanyMainWindow&quot; style &quot;geanyStyle&quot;
984 style &quot;geanyStyle&quot;
986 font_name=&quot;Sans 10&quot;
988 widget &quot;GeanyPrefsDialog&quot; style &quot;geanyStyle&quot;
989 </pre>
990 </div>
991 </div>
992 <div class="section">
993 <h2><a class="toc-backref" href="#id34" id="documents" name="documents">Documents</a></h2>
994 <div class="section">
995 <h3><a class="toc-backref" href="#id35" id="switching-between-documents" name="switching-between-documents">Switching between documents</a></h3>
996 <p>The documents list and the editor tabs are two different ways
997 to switch between documents using the mouse. When you hit the key
998 combination to move between tabs, the order is determined by the tab
999 order. Its is not alphabetical as shown in the documents list
1000 (regardless of whether or not editor tabs are visible).</p>
1001 <p>The tabs can be positioned at the top, bottom, left, or right of the
1002 main editing window, by a selection in the interface preferences.</p>
1003 <p>See the <a class="reference" href="#notebook-tab-keybindings">Notebook tab keybindings</a> section for useful
1004 shortcuts including for Most-Recently-Used document switching.</p>
1005 </div>
1006 </div>
1007 <div class="section">
1008 <h2><a class="toc-backref" href="#id36" id="character-sets-and-unicode-byte-order-mark-bom" name="character-sets-and-unicode-byte-order-mark-bom">Character sets and Unicode Byte-Order-Mark (BOM)</a></h2>
1009 <div class="section">
1010 <h3><a class="toc-backref" href="#id37" id="using-character-sets" name="using-character-sets">Using character sets</a></h3>
1011 <p>Geany provides support for detecting and converting character sets. So
1012 you can open and save files in different character sets, and even
1013 convert a file from one character set to another. To do this,
1014 Geany uses the character conversion capabilities of the GLib library.</p>
1015 <p>Only text files are supported, i.e. opening files which contain
1016 NULL-bytes may fail. Geany will try to open the file anyway but it is
1017 likely that the file will be truncated because it can only be read up
1018 to the first occurrence of a NULL-byte. All characters after this
1019 position are lost and are not written when you save the file.</p>
1020 <p>Geany tries to detect the encoding of a file while opening it, but
1021 auto-detecting the encoding of a file is not easy and sometimes an
1022 encoding might not be detected correctly. In this case you have to
1023 set the encoding of the file manually in order to display it
1024 correctly. You can this in the file open dialog by selecting an
1025 encoding in the drop down box or by reloading the file with the
1026 file menu item &quot;Reload as&quot;. The auto-detection works well for most
1027 encodings but there are also some encodings where it is known that
1028 auto-detection has problems.</p>
1029 <p>There are different ways to set different encodings in Geany:</p>
1030 <ul>
1031 <li><p class="first">Using the file open dialog</p>
1032 <p>This opens the file with the encoding specified in the encoding drop
1033 down box. If the encoding is set to &quot;Detect from file&quot; auto-detection
1034 will be used. If the encoding is set to &quot;Without encoding (None)&quot; the
1035 file will be opened without any character conversion and Geany will
1036 not try to auto-detect the encoding (see below for more information).</p>
1037 </li>
1038 <li><p class="first">Using the &quot;Reload as&quot; menu item</p>
1039 <p>This item reloads the current file with the specified encoding. It can
1040 help if you opened a file and found out that the wrong encoding was used.</p>
1041 </li>
1042 <li><p class="first">Using the &quot;Set encoding&quot; menu item</p>
1043 <p>Contrary to the above two options, this will not change or reload
1044 the current file unless you save it. It is useful when you want to
1045 change the encoding of the file.</p>
1046 </li>
1047 <li><p class="first">Specifying the encoding in the file itself</p>
1048 <p>As mentioned above, auto-detecting the encoding of a file may fail on
1049 some encodings. If you know that Geany doesn't open a certain file,
1050 you can add the specification line, described in the next section,
1051 to the beginning of the file to force Geany to use a specific
1052 encoding when opening the file.</p>
1053 </li>
1054 </ul>
1055 </div>
1056 <div class="section">
1057 <h3><a class="toc-backref" href="#id38" id="in-file-encoding-specification" name="in-file-encoding-specification">In-file encoding specification</a></h3>
1058 <p>Geany detects meta tags of HTML files which contain charset information
1059 like:</p>
1060 <pre class="literal-block">
1061 &lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=ISO-8859-15&quot; /&gt;
1062 </pre>
1063 <p>and the specified charset is used when opening the file. This is useful if the
1064 encoding of the file cannot be detected properly.
1065 For non-HTML files you can also define a line like:</p>
1066 <pre class="literal-block">
1067 /* geany_encoding=ISO-8859-15 */
1068 </pre>
1069 <p>or:</p>
1070 <pre class="literal-block">
1071 # geany_encoding=ISO-8859-15 #
1072 </pre>
1073 <p>to force an encoding to be used. The #, /* and */ are examples
1074 of filetype-specific comment characters. It doesn't matter which
1075 characters are around the string &quot; geany_encoding=ISO-8859-15 &quot; as long
1076 as there is at least one whitespace character before and after this
1077 string. Whitespace characters are in this case a space or tab character.
1078 An example to use this could be you have a file with ISO-8859-15
1079 encoding but Geany constantly detects the file encoding as ISO-8859-1.
1080 Then you simply add such a line to the file and Geany will open it
1081 correctly the next time.</p>
1082 <p>Since Geany 0.15 you can also use lines which match the
1083 regular expression used to find the encoding string:
1084 <tt class="docutils literal"><span class="pre">coding[\t</span> <span class="pre">]*[:=][\t</span> <span class="pre">]*([a-z0-9-]+)[\t</span> <span class="pre">]*</span></tt></p>
1085 <div class="note">
1086 <p class="first admonition-title">Note</p>
1087 <p class="last">These specifications must be in the first 512 bytes of the file.
1088 Anything after the first 512 bytes will not be recognized.</p>
1089 </div>
1090 <p>Some examples are:</p>
1091 <pre class="literal-block">
1092 # encoding = ISO-8859-15
1093 </pre>
1094 <p>or:</p>
1095 <pre class="literal-block">
1096 # coding: ISO-8859-15
1097 </pre>
1098 </div>
1099 <div class="section">
1100 <h3><a class="toc-backref" href="#id39" id="special-encoding-none" name="special-encoding-none">Special encoding &quot;None&quot;</a></h3>
1101 <p>There is a special encoding &quot;None&quot; which uses no
1102 encoding. It is useful when you know that Geany cannot auto-detect
1103 the encoding of a file and it is not displayed correctly. Especially
1104 when the file contains NULL-bytes this can be useful to skip auto
1105 detection and open the file properly at least until the occurrence
1106 of the first NULL-byte. Using this encoding opens the file as it is
1107 without any character conversion.</p>
1108 </div>
1109 <div class="section">
1110 <h3><a class="toc-backref" href="#id40" id="unicode-byte-order-mark-bom" name="unicode-byte-order-mark-bom">Unicode Byte-Order-Mark (BOM)</a></h3>
1111 <p>Furthermore, Geany detects a Unicode Byte Order Mark (see
1112 <a class="reference" href="http://en.wikipedia.org/wiki/Byte_Order_Mark">http://en.wikipedia.org/wiki/Byte_Order_Mark</a> for details). Of course,
1113 this feature is only available if the opened file is in a Unicode
1114 encoding. The Byte Order Mark helps to detect the encoding of a file,
1115 e.g. whether it is UTF-16LE or UTF-16BE and so on. On Unix-like systems
1116 using a Byte Order Mark could cause some problems for programs not
1117 expecting it, e.g. the compiler gcc stops
1118 with stray errors, PHP does not parse a script containing a BOM and
1119 script files starting with a she-bang maybe cannot be started. In the
1120 status bar you can easily see whether the file starts with a BOM or
1121 not.</p>
1122 <p>If you want to set a BOM for a file or if you want to remove it
1123 from a file, just use the document menu and toggle the checkbox.</p>
1124 <div class="note">
1125 <p class="first admonition-title">Note</p>
1126 <p class="last">If you are unsure what a BOM is or if you do not understand where
1127 to use it, then it is probably not important for you and you can
1128 safely ignore it.</p>
1129 </div>
1130 </div>
1131 </div>
1132 <div class="section">
1133 <h2><a class="toc-backref" href="#id41" id="editing" name="editing">Editing</a></h2>
1134 <div class="section">
1135 <h3><a class="toc-backref" href="#id42" id="folding" name="folding">Folding</a></h3>
1136 <p>Geany provides basic code folding support. Folding means the ability to
1137 show and hide parts of the text in the current file. You can hide
1138 unimportant code sections and concentrate on the parts you are working on
1139 and later you can show hidden sections again. In the editor window there is
1140 a small grey margin on the left side with [+] and [-] symbols which
1141 show hidden parts and hide parts of the file respectively. By
1142 clicking on these icons you can simply show and hide sections which are
1143 marked by vertical lines within this margin. For many filetypes nested
1144 folding is supported, so there may be several fold points within other
1145 fold points.</p>
1146 <div class="note">
1147 <p class="first admonition-title">Note</p>
1148 <p class="last">You can customize the folding icon and line styles - see the
1149 filetypes.common <a class="reference" href="#folding-settings">Folding Settings</a>.</p>
1150 </div>
1151 <p>If you don't like it or don't need it at all, you can simply disable
1152 folding support completely in the preferences dialog.</p>
1153 <p>The folding behaviour can be changed with the &quot;Fold/Unfold all children of
1154 a fold point&quot; option in the preference dialog. If activated, Geany will
1155 unfold all nested fold points below the current one if they are already
1156 folded (when clicking on a [+] symbol).
1157 When clicking on a [-] symbol, Geany will fold all nested fold points
1158 below the current one if they are unfolded.</p>
1159 <p>This option can be inverted by pressing the Shift
1160 key while clicking on a fold symbol. That means, if the &quot;Fold/Unfold all
1161 children of a fold point&quot; option is enabled, pressing Shift will disable
1162 it for this click and vice versa.</p>
1163 </div>
1164 <div class="section">
1165 <h3><a class="toc-backref" href="#id43" id="column-mode-editing-rectangular-selections" name="column-mode-editing-rectangular-selections">Column mode editing (rectangular selections)</a></h3>
1166 <p>There is basic support for column mode editing. To use it, create a
1167 rectangular selection by holding down the Control and Shift keys
1168 (or Control and Alt if it doesn't work) while
1169 selecting some text. It is also possible to create a zero-column selection.
1170 Once a rectangular selection exists you can start editing the text within
1171 this selection and the modifications will be done for every line in the
1172 selection.</p>
1173 </div>
1174 <div class="section">
1175 <h3><a class="toc-backref" href="#id44" id="drag-and-drop-of-text" name="drag-and-drop-of-text">Drag and drop of text</a></h3>
1176 <p>If you drag selected text in the editor widget of Geany the text is
1177 moved to the position where the mouse pointer is when releasing the
1178 mouse button. Holding Control when releasing the mouse button will
1179 copy the text instead. This behaviour was changed in Geany 0.11 -
1180 before the selected text was copied to the new position.</p>
1181 </div>
1182 <div class="section">
1183 <h3><a class="toc-backref" href="#id45" id="indentation" name="indentation">Indentation</a></h3>
1184 <p>Geany allows each document to indent either with a tab character or
1185 multiple spaces. The default indent mode is set in the <a class="reference" href="#editor-features-preferences">Editor Features
1186 preferences</a> (see the link for more information). But
1187 this can be overridden using either the <em>Document-&gt;Indent Type</em> menu,
1188 or by using the <em>Detect from file</em> indentation preference. When enabled,
1189 this scans each file that is opened and sets the indent mode based on
1190 how many lines start with a tab vs. 2 or more spaces.</p>
1191 <p>The indent mode for the current document is shown on the status bar
1192 as follows:</p>
1193 <dl class="docutils">
1194 <dt>TAB</dt>
1195 <dd>Indent with Tab characters.</dd>
1196 <dt>SP</dt>
1197 <dd>Indent with spaces.</dd>
1198 <dt>T/S</dt>
1199 <dd>Indent with tabs and spaces, depending on how much indentation is
1200 on a line.</dd>
1201 </dl>
1202 </div>
1203 <div class="section">
1204 <h3><a class="toc-backref" href="#id46" id="auto-indentation" name="auto-indentation">Auto-indentation</a></h3>
1205 <p>When enabled, auto-indentation happens when pressing <em>Enter</em> in the
1206 Editor. It adds a certain amount of indentation to the new line so the
1207 user doesn't always have to indent each line manually.</p>
1208 <p>Geany has four types of auto-indentation:</p>
1209 <dl class="docutils">
1210 <dt>None</dt>
1211 <dd>Disables auto-indentation completely.</dd>
1212 <dt>Basic</dt>
1213 <dd>Adds the same amount of whitespace on a new line as on the last line.</dd>
1214 <dt>Current chars</dt>
1215 <dd>Does the same as <em>Basic</em> but also indents a new line after an opening
1216 brace '{', and de-indents when typing a closing brace '}'. For Python,
1217 a new line will be indented after typing ':' at the end of the
1218 previous line.</dd>
1219 <dt>Match braces</dt>
1220 <dd>Similar to <em>Current chars</em> but the closing brace will be aligned to
1221 match the indentation of the line with the opening brace.</dd>
1222 </dl>
1223 </div>
1224 <div class="section">
1225 <h3><a class="toc-backref" href="#id47" id="bookmarks" name="bookmarks">Bookmarks</a></h3>
1226 <p>Geany provides a handy bookmarking feature that lets you mark one
1227 or more lines in a document, and return the cursor to them using a
1228 key combination.</p>
1229 <p>To place a mark on a line, either left-mouse-click in the left margin
1230 of the editor window, or else use Ctrl-m. This will
1231 produce a small green plus symbol in the margin. You can have as many
1232 marks in a document as you like. Click again (or use Ctrl-m again)
1233 to remove the bookmark. To remove all the marks in a given document,
1234 use &quot;Remove Markers&quot; in the Document menu.</p>
1235 <p>To navigate down your document, jumping from one mark to the next,
1236 use Ctrl-. (control period). To go in the opposite direction on
1237 the page, use Ctrl-, (control comma). Using the bookmarking feature
1238 together with the commands to switch from one editor tab to another
1239 (Ctrl-PgUp/PgDn and Ctrl-Tab) provides a particularly fast way to
1240 navigate around multiple files.</p>
1241 </div>
1242 <div class="section">
1243 <h3><a class="toc-backref" href="#id48" id="code-navigation-history" name="code-navigation-history">Code navigation history</a></h3>
1244 <p>To ease navigation in source files and especially between
1245 different files, Geany lets you jump between different navigation
1246 points. Currently, this works for the following:</p>
1247 <ul class="simple">
1248 <li><a class="reference" href="#go-to-tag-declaration">Go to tag declaration</a></li>
1249 <li><a class="reference" href="#go-to-tag-definition">Go to tag definition</a></li>
1250 <li>Symbol list items</li>
1251 <li>Build errors</li>
1252 <li>Message items</li>
1253 </ul>
1254 <p>When using one of these actions, Geany remembers your current position
1255 and jumps to the new one. If you decide to go back to your previous
1256 position in the file, just use &quot;Navigate back a location&quot;. To
1257 get back to the new position again, just use &quot;Navigate forward a
1258 location&quot;. This makes it easier to navigate in e.g. foreign code
1259 and between different files.</p>
1260 </div>
1261 <div class="section">
1262 <h3><a class="toc-backref" href="#id49" id="sending-text-through-custom-commands" name="sending-text-through-custom-commands">Sending text through custom commands</a></h3>
1263 <p>You can define several custom commands in Geany and send the current
1264 selection to one of these commands using the &quot;Edit-&gt;Format-&gt;Send
1265 Selection to&quot; menu or keybindings.
1266 The output of the command will be
1267 used to replace the current selection. This makes it possible to use text
1268 formatting tools with Geany in a general way. The selected text will
1269 be sent to the standard input of the executed command, so the command
1270 should be able to read from it and it should print all results to its
1271 standard output which will be read by Geany. To help finding errors
1272 in executing the command, the output of the program's standard error
1273 will be printed on Geany's standard output.</p>
1274 <p>To add a custom command, just go to the Set Custom Commands dialog
1275 in the Format sub menu of the Edit and Popup menu. Then click on Add
1276 to get a new text entry and type the command. You can also specify
1277 some command line options. To delete a command, just clear the text
1278 entry and press OK. It will be deleted automatically.</p>
1279 </div>
1280 <div class="section">
1281 <h3><a class="toc-backref" href="#id50" id="context-actions" name="context-actions">Context actions</a></h3>
1282 <p>You can execute the context action command on the current word at the
1283 cursor position or the available selection. This word or selection
1284 can be used as an argument to the command.
1285 The context action is invoked by a menu entry in the popup menu of the
1286 editor and also a keyboard shortcut (see the section called
1287 <a class="reference" href="#keybindings">Keybindings</a>).</p>
1288 <p>The command can be specified in the preferences dialog and also for
1289 each filetype (see &quot;context_action_cmd&quot; in the section called
1290 <a class="reference" href="#format">Format</a>). When the context action is invoked, the filetype
1291 specific command is used if available, otherwise the command
1292 specified in the preferences dialog is executed.</p>
1293 <p>The current word or selection can be referred with the wildcard &quot;%s&quot;
1294 in the command, it will be replaced by the current word or
1295 selection before the command is executed.</p>
1296 <p>For example a context action can be used to open API documentation
1297 in a browser window, the command to open the PHP API documentation
1298 would be:</p>
1299 <pre class="literal-block">
1300 firefox &quot;http://www.php.net/%s&quot;
1301 </pre>
1302 <p>when executing the command, the %s is substituted by the word near
1303 the cursor position or by the current selection. If the cursor is at
1304 the word &quot;echo&quot;, a browser window will open(assumed your browser is
1305 called firefox) and it will open the address: <a class="reference" href="http://www.php.net/echo">http://www.php.net/echo</a>.</p>
1306 </div>
1307 <div class="section">
1308 <h3><a class="toc-backref" href="#id51" id="autocompletion" name="autocompletion">Autocompletion</a></h3>
1309 <p>Geany can offer a list of possible completions for symbols defined in the
1310 tags and for all words in a document.</p>
1311 <p>The autocompletion list for symbols is presented when the first few
1312 characters of the symbol are typed (configurable, see <a class="reference" href="#editor-completions-preferences">Editor Completions
1313 preferences</a>, default 4) or when the <em>Complete word</em>
1314 keybinding is pressed (configurable, see <a class="reference" href="#editor-keybindings">Editor keybindings</a>,
1315 default Ctrl-Space).</p>
1316 <p>When the defined keybinding is typed and the <em>Autocomplete all words in
1317 document</em> preference (in <a class="reference" href="#editor-completions-preferences">Editor Completions preferences</a>)
1318 is selected then the autocompletion list will show all matching words
1319 in the document, if there are no matching symbols.</p>
1320 <p>If you don't want to use autocompletion it can be dismissed until
1321 the next symbol by pressing Escape. The autocompletion list is updated
1322 as more characters are typed so that it only shows completions that start
1323 with the characters typed so far. If no symbols begin with the sequence,
1324 the autocompletion window is closed.</p>
1325 <p>The up and down arrows will move the selected item. The highlighted
1326 item on the autocompletion list can be chosen from the list by pressing
1327 Enter/Return. You can also double-click to select an item. The sequence
1328 will be completed to match the chosen item, and if the <em>Drop rest of
1329 word on completion</em> preference is set (in <a class="reference" href="#editor-completions-preferences">Editor Completions
1330 preferences</a>) then any characters after the cursor that match
1331 a symbol or word are deleted.</p>
1332 <div class="section">
1333 <h4><a class="toc-backref" href="#id52" id="word-part-completion" name="word-part-completion">Word part completion</a></h4>
1334 <p>By default, pressing Tab will complete the selected item by word part;
1335 useful e.g. for adding the prefix <tt class="docutils literal"><span class="pre">gtk_combo_box_entry_</span></tt> without typing it
1336 manually:</p>
1337 <ul class="simple">
1338 <li>gtk_com&lt;TAB&gt;</li>
1339 <li>gtk_combo_&lt;TAB&gt;</li>
1340 <li>gtk_combo_box_&lt;e&gt;&lt;TAB&gt;</li>
1341 <li>gtk_combo_box_entry_&lt;s&gt;&lt;ENTER&gt;</li>
1342 <li>gtk_combo_box_entry_set_text_column</li>
1343 </ul>
1344 <p>The key combination can be changed from Tab - See <a class="reference" href="#editor-keybindings">Editor keybindings</a>.
1345 If you clear/change the key combination for word part completion, Tab
1346 will complete the whole word instead, like Enter.</p>
1347 </div>
1348 <div class="section">
1349 <h4><a class="toc-backref" href="#id53" id="scope-autocompletion" name="scope-autocompletion">Scope autocompletion</a></h4>
1350 <p>E.g.:</p>
1351 <pre class="literal-block">
1352 struct
1354 int i;
1355 char c;
1356 } foo;
1357 </pre>
1358 <p>When you type <tt class="docutils literal"><span class="pre">foo.</span></tt> it will show an autocompletion list with 'i' and
1359 'c' symbols.</p>
1360 <p>It only works for languages that set parent scope names for e.g. struct
1361 members. Currently this means C-like languages. The C tag parser only
1362 parses global scopes, so this won't work for structs or objects declared
1363 in local scope.</p>
1364 </div>
1365 </div>
1366 <div class="section">
1367 <h3><a class="toc-backref" href="#id54" id="user-definable-snippets" name="user-definable-snippets">User-definable snippets</a></h3>
1368 <p>Snippets are small strings or code constructs which can be replaced or
1369 completed to a more complex string. So you can save a lot of time when
1370 typing common strings and letting Geany do the work for you.
1371 To know what to complete or replace Geany reads a configuration file
1372 called <tt class="docutils literal"><span class="pre">snippets.conf</span></tt> at startup.</p>
1373 <p>Maybe you need to often type your name, so define a snippet like this:</p>
1374 <pre class="literal-block">
1375 [Default]
1376 myname=Enrico Tröger
1377 </pre>
1378 <p>Every time you write <tt class="docutils literal"><span class="pre">myname</span></tt> &lt;TAB&gt; in Geany, it will replace &quot;myname&quot;
1379 with &quot;Enrico Tröger&quot;. The key to start autocompletion can be changed
1380 in the preferences dialog, by default it is TAB. The corresponding keybinding
1381 is called <tt class="docutils literal"><span class="pre">Complete</span> <span class="pre">snippet</span></tt>.</p>
1382 <p>The system-wide configuration file can be found in
1383 <tt class="docutils literal"><span class="pre">$prefix/share/geany</span></tt>, where <tt class="docutils literal"><span class="pre">$prefix</span></tt> is the path where Geany is
1384 installed (see <a class="reference" href="#installation-prefix">Installation prefix</a>). It is not recommended to edit the
1385 system-wide file, because it will be overridden when Geany is updated.</p>
1386 <p>To change the settings, copy the file from <tt class="docutils literal"><span class="pre">$prefix/share/geany</span></tt>
1387 in your configuration directory (usually <tt class="docutils literal"><span class="pre">~/.config/geany/</span></tt>).</p>
1388 <p>For example:</p>
1389 <pre class="literal-block">
1390 % cp /usr/local/share/geany/snippets.conf /home/username/.config/geany/
1391 </pre>
1392 <p>Then you can edit the file and the changes will remain available
1393 after an update of Geany because the file resides in your
1394 configuration directory. Alternatively, you can create a file
1395 <tt class="docutils literal"><span class="pre">~/.config/geany/snippets.conf</span></tt> and add only these settings you want
1396 to change. All missing settings will be read from the global snippets
1397 file in <tt class="docutils literal"><span class="pre">$prefix/share/geany</span></tt>.</p>
1398 <p>The file <tt class="docutils literal"><span class="pre">snippets.conf</span></tt> contains sections defining snippets that
1399 are available for particular filetypes and in general.</p>
1400 <p>The two sections &quot;Default&quot; and &quot;Special&quot; apply to all filetypes.
1401 &quot;Default&quot; contains all snippets which are available for every
1402 filetype and &quot;Special&quot; contains snippets which can only be used in
1403 other snippets. So you can define often used parts of snippets and
1404 just use the special snippet as a placeholder (see the
1405 <tt class="docutils literal"><span class="pre">snippets.conf</span></tt> for details).</p>
1406 <p>You can define sections with the name of a filetype eg &quot;C++&quot;. The
1407 snippets in that section are only available for use in files with that
1408 filetype. Snippets in filetype sections will hide snippets with the
1409 same name in the &quot;Default&quot; section when used in a file of that
1410 filetype.</p>
1411 <p>To define snippets you can use several special character sequences which
1412 will be replaced when using the snippet:</p>
1413 <p><strong>Substitution Sequences for snippets</strong></p>
1414 <table border="1" class="docutils">
1415 <colgroup>
1416 <col width="22%" />
1417 <col width="78%" />
1418 </colgroup>
1419 <tbody valign="top">
1420 <tr><td>\n or %newline%</td>
1421 <td>Insert a new line (it will be replaced by the used EOL
1422 char(s): LF, CR/LF, or CR).</td>
1423 </tr>
1424 <tr><td>\t or %ws%</td>
1425 <td>Insert an indentation step, it will be replaced according
1426 to the current document's indent mode.</td>
1427 </tr>
1428 <tr><td>\s</td>
1429 <td>\s to force whitespace at beginning or end of a value
1430 ('key= value' won't work, use 'key=\svalue')</td>
1431 </tr>
1432 <tr><td>%cursor%</td>
1433 <td>Place the cursor at this position after completion has
1434 been done. You can define multiple %cursor% wildcards
1435 and use the keybinding <tt class="docutils literal"><span class="pre">Move</span> <span class="pre">cursor</span> <span class="pre">in</span> <span class="pre">snippet</span></tt> to jump
1436 to the next defined cursor position in the completed
1437 snippet.</td>
1438 </tr>
1439 <tr><td>%...%</td>
1440 <td>&quot;...&quot; means the name of a key in the &quot;Special&quot; section.
1441 If you have defined a key &quot;brace_open&quot; in the &quot;Special&quot;
1442 section you can use %brace_open% in any other snippet.</td>
1443 </tr>
1444 </tbody>
1445 </table>
1446 <p>Snippet names must not contain spaces otherwise they won't
1447 work correctly. But beside that you can define almost any
1448 string as a snippet and use it later in Geany. It is not limited
1449 to existing contructs of certain programming languages(like <tt class="docutils literal"><span class="pre">if</span></tt>,
1450 <tt class="docutils literal"><span class="pre">for</span></tt>, <tt class="docutils literal"><span class="pre">switch</span></tt>). Define whatever you need.</p>
1451 <p>Since Geany 0.15 you can also use most of the available templates wildcards
1452 listed in <a class="reference" href="#template-wildcards">Template wildcards</a>. All wildcards which are listed as
1453 <cite>available in snippets</cite> can be used. For instance to improve the above example:</p>
1454 <pre class="literal-block">
1455 [Default]
1456 myname=My name is {developer}
1457 mysystem=My system: {command:uname -a}
1458 </pre>
1459 <p>this will replace <tt class="docutils literal"><span class="pre">myname</span></tt> with &quot;My name is &quot; and the value of the template
1460 preference <tt class="docutils literal"><span class="pre">developer</span></tt>.</p>
1461 <p>You can change the way Geany recognizes the word to complete,
1462 that is how the start and end of a word is recognised when the
1463 snippet completion is requested. The section &quot;Special&quot; may
1464 contain a key &quot;wordchars&quot; which lists all characters a string may contain
1465 to be recognized as a word for completion. Leave it commented to use
1466 default characters or define it to add or remove characters to fit your
1467 needs.</p>
1468 </div>
1469 <div class="section">
1470 <h3><a class="toc-backref" href="#id55" id="inserting-unicode-characters" name="inserting-unicode-characters">Inserting Unicode characters</a></h3>
1471 <p>With GTK 2.10 and above, you can insert Unicode code points by hitting
1472 Ctrl-Shift-u, then still holding Ctrl-Shift, type some hex digits representing
1473 the code point for the character you want and hit Enter or Return (still
1474 holding Ctrl-Shift). If you release Ctrl-Shift before hitting Enter or Return
1475 (or any other character), the code insertion is completed, but the typed
1476 character is also entered. In the case of Enter/Return, it is a newline, as
1477 you might expect.</p>
1478 <p>In some earlier versions of Geany, you might need to first unbind Ctrl-Shift-u
1479 in the <a class="reference" href="#keybinding-preferences">keybinding preferences</a>, then select <em>Tools-&gt;Reload Configuration</em>
1480 or restart Geany. Note that it works slightly differently from other GTK
1481 applications, in that you'll need to continue to hold down the Ctrl and Shift
1482 keys while typing the code point hex digits (and the Enter or Return to finish the code point).</p>
1483 <p>For GTK &lt; 2.10, it is also possible, but typing the first Ctrl-Shift-u
1484 is not necessary. One problem is that you may find the alphabetic
1485 keys conflict with other Geany keybindings.</p>
1486 </div>
1487 </div>
1488 <div class="section">
1489 <h2><a class="toc-backref" href="#id56" id="search-replace-and-go-to" name="search-replace-and-go-to">Search, replace and go to</a></h2>
1490 <p>This section describes search-related commands from the Search menu
1491 and the editor window's popup menu:</p>
1492 <ul class="simple">
1493 <li>Find</li>
1494 <li>Find usage *</li>
1495 <li>Find in files</li>
1496 <li>Replace</li>
1497 <li>Go to tag definition *</li>
1498 <li>Go to tag declaration *</li>
1499 <li>Go to line</li>
1500 </ul>
1501 <p>* These items are available from the editor window's popup menu, or by
1502 using a keyboard shortcut (see <a class="reference" href="#search-keybindings">Search keybindings</a>).</p>
1503 <div class="section">
1504 <h3><a class="toc-backref" href="#id57" id="toolbar-entries" name="toolbar-entries">Toolbar entries</a></h3>
1505 <p>There are also two toolbar entries:</p>
1506 <ul class="simple">
1507 <li>Search bar</li>
1508 <li>Go to line entry</li>
1509 </ul>
1510 <p>There are keybindings to focus each of these - see <a class="reference" href="#focus-keybindings">Focus
1511 keybindings</a>. Pressing Escape will then focus the editor.</p>
1512 <div class="section">
1513 <h4><a class="toc-backref" href="#id58" id="search-bar" name="search-bar">Search bar</a></h4>
1514 <p>The quickest way to find some text is to use the search bar entry in
1515 the toolbar. This performs a case-insensitive search in the current
1516 document whilst you type. Pressing Enter will search again.</p>
1517 </div>
1518 </div>
1519 <div class="section">
1520 <h3><a class="toc-backref" href="#id59" id="find" name="find">Find</a></h3>
1521 <p>The Find dialog is used for finding text in one or more open documents.</p>
1522 <img alt="./images/find_dialog.png" src="./images/find_dialog.png" />
1523 <div class="section">
1524 <h4><a class="toc-backref" href="#id60" id="matching-options" name="matching-options">Matching options</a></h4>
1525 <p>The syntax for the <em>Use regular expressions</em> option is shown in
1526 <a class="reference" href="#regular-expressions">Regular expressions</a>.</p>
1527 <div class="note">
1528 <p class="first admonition-title">Note</p>
1529 <p class="last"><em>Use escape sequences</em> is implied for regular expressions.</p>
1530 </div>
1531 <p>The <em>Use escape sequences</em> option will transform any escaped characters
1532 into their UTF-8 equivalent. For example, \t will be transformed into
1533 a tab character. Other recognized symbols are: \\, \n, \r, \uXXXX
1534 (Unicode characters).</p>
1535 </div>
1536 <div class="section">
1537 <h4><a class="toc-backref" href="#id61" id="find-all" name="find-all">Find all</a></h4>
1538 <p>To find all matches, click on the Find All expander. This will reveal
1539 several options:</p>
1540 <ul class="simple">
1541 <li>In Document</li>
1542 <li>In Session</li>
1543 <li>Mark</li>
1544 </ul>
1545 <p>Find All In Document will show a list of matching lines in the
1546 current document in the Messages tab of the Message Window. <em>Find All
1547 In Session</em> does the same for all open documents.</p>
1548 <p>Mark will highlight all matches in the current document with a
1549 colored box. These markers can be removed by selecting the
1550 Remove Markers command from the Document menu.</p>
1551 </div>
1552 <div class="section">
1553 <h4><a class="toc-backref" href="#id62" id="change-font-in-search-dialog-text-fields" name="change-font-in-search-dialog-text-fields">Change font in search dialog text fields</a></h4>
1554 <p>All search related dialogs use a Monospace for the text input fields to
1555 increase the readability of input text. This is useful when you are
1556 typing input such as regular expressions with spaces, periods and commas which
1557 might it hard to read with a proportional font.</p>
1558 <p>If you want to change the font, you can do this easily
1559 by inserting the following style into your <tt class="docutils literal"><span class="pre">.gtkrc-2.0</span></tt>
1560 (usually found in your home directory on UNIX-like systems and in the
1561 etc subdirectory of your Geany installation on Windows):</p>
1562 <pre class="literal-block">
1563 style &quot;search_style&quot;
1565 font_name=&quot;Monospace 8&quot;
1567 widget &quot;GeanyDialogSearch.*.GtkEntry&quot; style:highest &quot;search_style&quot;
1568 </pre>
1569 <p>Please note the addition of &quot;:highest&quot; in the last line which sets the priority
1570 of this style to the highest available. Otherwise, the style is ignored
1571 for the search dialogs.</p>
1572 </div>
1573 </div>
1574 <div class="section">
1575 <h3><a class="toc-backref" href="#id63" id="find-usage" name="find-usage">Find usage</a></h3>
1576 <p>Find usage searches all open files. It is similar to the Find All In
1577 Session option in the Find dialog.</p>
1578 <p>If there is a selection, then it is used as the search text; otherwise
1579 the current word is used. The current word is either taken from the
1580 word nearest the edit cursor, or the word underneath the popup menu
1581 click position when the popup menu is used. The search results are
1582 shown in the Messages tab of the Message Window.</p>
1583 </div>
1584 <div class="section">
1585 <h3><a class="toc-backref" href="#id64" id="find-in-files" name="find-in-files">Find in files</a></h3>
1586 <p>Find in files is a more powerful version of Find usage that searches
1587 all files in a certain directory using the Grep tool. The Grep tool
1588 must be correctly set in Preferences to the path of the system's Grep
1589 utility. GNU Grep is recommended.</p>
1590 <img alt="./images/find_in_files_dialog.png" src="./images/find_in_files_dialog.png" />
1591 <p>The Encoding combo box can be used to define the encoding of the files
1592 to be searched. The entered search text is converted to the chosen encoding
1593 and the search results are converted back to UTF-8.
1594 The Extra options field is used to pass any additional arguments to
1595 the grep tool.</p>
1596 <div class="section">
1597 <h4><a class="toc-backref" href="#id65" id="filtering-out-version-control-files" name="filtering-out-version-control-files">Filtering out version control files</a></h4>
1598 <p>When using the <em>Recurse in subfolders</em> option with a directory that's
1599 under version control, you can set the <em>Extra options</em> field to use
1600 grep's <tt class="docutils literal"><span class="pre">--exclude</span></tt> flag to filter out filenames.</p>
1601 <p>SVN Example: <tt class="docutils literal"><span class="pre">--exclude=*.svn-base</span></tt></p>
1602 <p>The --exclude argument only matches the file name part, not the path. If
1603 you have GNU Grep &gt;= 2.5.2 you can use the <tt class="docutils literal"><span class="pre">--exclude-dir</span></tt> argument to
1604 filter out CVS and hidden directories like <tt class="docutils literal"><span class="pre">.svn</span></tt>.</p>
1605 <p>Example: <tt class="docutils literal"><span class="pre">--exclude-dir=.*</span> <span class="pre">--exclude-dir=CVS</span></tt></p>
1606 </div>
1607 </div>
1608 <div class="section">
1609 <h3><a class="toc-backref" href="#id66" id="replace" name="replace">Replace</a></h3>
1610 <p>The Replace dialog is used for replacing text in one or more open
1611 documents.</p>
1612 <img alt="./images/replace_dialog.png" src="./images/replace_dialog.png" />
1613 <p>The Replace dialog has the same options for matching text as the Find
1614 dialog. See the section <a class="reference" href="#matching-options">Matching options</a>.</p>
1615 <p>The <em>Use regular expressions</em> option allows regular expressions to
1616 be used in the search string and back references in the replacement
1617 text -- see the entry for '\n' in <a class="reference" href="#regular-expressions">Regular expressions</a>.</p>
1618 <div class="section">
1619 <h4><a class="toc-backref" href="#id67" id="replace-all" name="replace-all">Replace all</a></h4>
1620 <p>To replace several matches, click on the <em>Replace All</em> expander. This
1621 will reveal several options:</p>
1622 <ul class="simple">
1623 <li>In Document</li>
1624 <li>In Session</li>
1625 <li>In Selection</li>
1626 </ul>
1627 <p><em>Replace All In Document</em> will replace all matching text in the
1628 current document. <em>Replace All In Session</em> does the same for all open
1629 documents. <em>Replace All In Selection</em> will replace all matching text
1630 in the current selection of the current document.</p>
1631 </div>
1632 </div>
1633 <div class="section">
1634 <h3><a class="toc-backref" href="#id68" id="go-to-tag-definition" name="go-to-tag-definition">Go to tag definition</a></h3>
1635 <p>If the current word is the name of a tag definition (like a function
1636 body) and the file containing the tag definition is open, this command
1637 will switch to that file and go to the corresponding line number. The
1638 current word is either the word nearest the edit cursor,
1639 or the word underneath the popup menu click position when the popup
1640 menu is used.</p>
1641 </div>
1642 <div class="section">
1643 <h3><a class="toc-backref" href="#id69" id="go-to-tag-declaration" name="go-to-tag-declaration">Go to tag declaration</a></h3>
1644 <p>Like Go to tag definition, but for a forward declaration such as a
1645 function prototype or <tt class="docutils literal"><span class="pre">extern</span></tt> declaration instead of a function
1646 body.</p>
1647 </div>
1648 <div class="section">
1649 <h3><a class="toc-backref" href="#id70" id="go-to-line" name="go-to-line">Go to line</a></h3>
1650 <p>Go to a particular line number in the current file.</p>
1651 </div>
1652 <div class="section">
1653 <h3><a class="toc-backref" href="#id71" id="regular-expressions" name="regular-expressions">Regular expressions</a></h3>
1654 <p>You can use regular expressions in the Find and Replace dialogs
1655 by selecting the <em>Use regular expressions</em> check box (see <a class="reference" href="#matching-options">Matching
1656 options</a>). The syntax is POSIX compatible, as described in the table
1657 below.</p>
1658 <div class="note">
1659 <p class="first admonition-title">Note</p>
1660 <ol class="last arabic simple">
1661 <li>The <em>Use escape sequences</em> dialog option always applies for regular
1662 expressions.</li>
1663 <li>Searching backwards with regular expressions is not supported.</li>
1664 <li>\b, \d, \s, \w are GNU extensions and may not be available
1665 on non-GNU POSIX systems unless you built Geany with the
1666 <tt class="docutils literal"><span class="pre">--enable-gnu-regex</span></tt> option (this is always used on Windows).</li>
1667 </ol>
1668 </div>
1669 <p><strong>In a regular expression, the following characters are interpreted:</strong></p>
1670 <table border="1" class="docutils">
1671 <colgroup>
1672 <col width="10%" />
1673 <col width="90%" />
1674 </colgroup>
1675 <tbody valign="top">
1676 <tr><td>.</td>
1677 <td>Matches any character.</td>
1678 </tr>
1679 <tr><td>(</td>
1680 <td>This marks the start of a region for tagging a match.</td>
1681 </tr>
1682 <tr><td>)</td>
1683 <td>This marks the end of a tagged region.</td>
1684 </tr>
1685 <tr><td>\n</td>
1686 <td><p class="first">Where n is 1 through 9 refers to the first through ninth tagged
1687 region when searching or replacing.</p>
1688 <p>Searching for (Wiki)\1 matches WikiWiki.</p>
1689 <p class="last">If the search string was Fred([1-9])XXX and the
1690 replace string was Sam\1YYY, when applied to Fred2XXX this
1691 would generate Sam2YYY.</p>
1692 </td>
1693 </tr>
1694 <tr><td>\0</td>
1695 <td>When replacing, the whole matching text.</td>
1696 </tr>
1697 <tr><td>\b</td>
1698 <td>This matches a word boundary.</td>
1699 </tr>
1700 <tr><td>\c</td>
1701 <td><p class="first">A backslash followed by d, D, s, S, w or W, becomes a
1702 character class (both inside and outside sets []).</p>
1703 <ul class="last simple">
1704 <li>d: decimal digits</li>
1705 <li>D: any char except decimal digits</li>
1706 <li>s: whitespace (space, \t \n \r \f \v)</li>
1707 <li>S: any char except whitespace (see above)</li>
1708 <li>w: alphanumeric &amp; underscore</li>
1709 <li>W: any char except alphanumeric &amp; underscore</li>
1710 </ul>
1711 </td>
1712 </tr>
1713 <tr><td>\x</td>
1714 <td>This allows you to use a character x that would otherwise have
1715 a special meaning. For example, \[ would be interpreted as [
1716 and not as the start of a character set. Use \\ for a literal
1717 backslash.</td>
1718 </tr>
1719 <tr><td>[...]</td>
1720 <td><p class="first">Matches one of the characters in the set. If the first
1721 character in the set is ^, it matches the characters NOT in
1722 the set, i.e. complements the set. A shorthand S-E (start
1723 dash end) is used to specify a set of characters S up to E,
1724 inclusive.</p>
1725 <p>The special characters ] and - have no special
1726 meaning if they appear first in the set. - can also be last
1727 in the set. To include both, put ] first: []A-Z-].</p>
1728 <p>Examples:</p>
1729 <pre class="last literal-block">
1730 []|-] matches these 3 chars
1731 []-|] matches from ] to | chars
1732 [a-z] any lowercase alpha
1733 [^]-] any char except - and ]
1734 [^A-Z] any char except uppercase alpha
1735 [a-zA-Z] any alpha
1736 </pre>
1737 </td>
1738 </tr>
1739 <tr><td>^</td>
1740 <td>This matches the start of a line (unless used inside a set, see
1741 above).</td>
1742 </tr>
1743 <tr><td>$</td>
1744 <td>This matches the end of a line.</td>
1745 </tr>
1746 <tr><td>*</td>
1747 <td>This matches 0 or more times. For example, Sa*m matches Sm, Sam,
1748 Saam, Saaam and so on.</td>
1749 </tr>
1750 <tr><td>+</td>
1751 <td>This matches 1 or more times. For example, Sa+m matches Sam,
1752 Saam, Saaam and so on.</td>
1753 </tr>
1754 <tr><td>?</td>
1755 <td>This matches 0 or 1 time(s). For example, Joh?n matches John, Jon.</td>
1756 </tr>
1757 </tbody>
1758 </table>
1759 <div class="note">
1760 <p class="first admonition-title">Note</p>
1761 <p class="last">This table is adapted from Scintilla and SciTE documentation,
1762 distributed under the <a class="reference" href="#license-for-scintilla-and-scite">License for Scintilla and SciTE</a>.</p>
1763 </div>
1764 </div>
1765 </div>
1766 <div class="section">
1767 <h2><a class="toc-backref" href="#id72" id="tags" name="tags">Tags</a></h2>
1768 <p>Tags are information that relates symbols in a program with the
1769 source file location of the declaration and definition.</p>
1770 <p>Geany has built-in functionality for generating tag information (aka
1771 &quot;workspace tags&quot;) for supported filetypes when you open a file. You
1772 can also have Geany automatically load external tag files (aka &quot;global
1773 tags files&quot;) upon startup, or manually using <em>Tools --&gt; Load Tags</em>.</p>
1774 <p>Geany uses its own tag file format, similar to what <tt class="docutils literal"><span class="pre">ctags</span></tt> uses
1775 (but is incompatible with ctags). You use Geany to generate global
1776 tags files, as described below.</p>
1777 <div class="section">
1778 <h3><a class="toc-backref" href="#id73" id="workspace-tags" name="workspace-tags">Workspace tags</a></h3>
1779 <p>Tags for each document are parsed whenever a file is loaded or
1780 saved. These are shown in the Symbol list in the Sidebar. These tags
1781 are also used for autocompletion of symbols and calltips for all documents
1782 open in the current session that have the same filetype.</p>
1783 <p>The <em>Go to Tag</em> commands can be used with all workspace tags. See
1784 <a class="reference" href="#go-to-tag-definition">Go to tag definition</a>.</p>
1785 </div>
1786 <div class="section">
1787 <h3><a class="toc-backref" href="#id74" id="global-tags" name="global-tags">Global tags</a></h3>
1788 <p>Global tags are used to provide autocompletion of symbols and calltips
1789 without having to open the corresponding source files. This is intended
1790 for library APIs, as the tags file only has to be updated when you upgrade
1791 the library.</p>
1792 <p>You can load a custom global tags file in two ways:</p>
1793 <ul class="simple">
1794 <li>Using the <em>Load Tags</em> command in the Tools menu.</li>
1795 <li>By creating a directory <tt class="docutils literal"><span class="pre">~/.config/geany/tags</span></tt>, and moving or symlinking
1796 the tags files there before starting Geany.</li>
1797 <li>By creating a directory <tt class="docutils literal"><span class="pre">$prefix/share/geany/tags</span></tt>, and moving
1798 or symlinking the tags files there before starting Geany.
1799 <tt class="docutils literal"><span class="pre">$prefix</span></tt> is the installation prefix (see <a class="reference" href="#installation-prefix">Installation prefix</a>).</li>
1800 </ul>
1801 <p>You can either download these files or generate your own. They have
1802 the format:</p>
1803 <pre class="literal-block">
1804 name.lang_ext.tags
1805 </pre>
1806 <p><em>lang_ext</em> is one of the extensions set for the filetype associated
1807 with the tags. See the section called <a class="reference" href="#filetype-extensions">Filetype extensions</a> for
1808 more information.</p>
1809 <div class="section">
1810 <h4><a class="toc-backref" href="#id75" id="default-global-tags-files" name="default-global-tags-files">Default global tags files</a></h4>
1811 <p>For some languages, a list of global tags is loaded when the
1812 corresponding filetype is first used. Currently these are for:</p>
1813 <ul class="simple">
1814 <li>C -- GTK+ and GLib</li>
1815 <li>Pascal</li>
1816 <li>PHP</li>
1817 <li>HTML -- &amp;symbol; completion, e.g. for ampersand, copyright, etc.</li>
1818 <li>LaTeX</li>
1819 <li>Python</li>
1820 </ul>
1821 </div>
1822 <div class="section">
1823 <h4><a class="toc-backref" href="#id76" id="global-tags-file-format" name="global-tags-file-format">Global tags file format</a></h4>
1824 <p>Global tags files can have two different formats:</p>
1825 <ul class="simple">
1826 <li>Tagmanager format</li>
1827 <li>Pipe-separated format</li>
1828 </ul>
1829 <p>The first line of global tags files should be a comment, introduced
1830 by <tt class="docutils literal"><span class="pre">#</span></tt> followed by a space and a string like <tt class="docutils literal"><span class="pre">format=pipe</span></tt>
1831 or <tt class="docutils literal"><span class="pre">format=tagmanager</span></tt> respectively, these are case-sensitive.
1832 This helps Geany to read the file properly. If this line
1833 is missing, Geany tries to auto-detect the used format but this
1834 might fail.</p>
1835 <p>The Tagmanager format is a bit more complex and is used for files
1836 created by the <tt class="docutils literal"><span class="pre">geany</span> <span class="pre">-g</span></tt> command. There is one tag per line.
1837 Different tag attributes like the return value or the argument list
1838 are separated with different characters indicating the type of the
1839 following argument.</p>
1840 <p>The Pipe-separated format is easier to read and write.
1841 There is one tag per line and different tag attributes are separated
1842 by the pipe character (<tt class="docutils literal"><span class="pre">|</span></tt>). A line looks like:</p>
1843 <pre class="literal-block">
1844 basename|string|(string path [, string suffix])|
1845 </pre>
1846 <div class="line-block">
1847 <div class="line">The first field is the tag name (usually a function name).</div>
1848 <div class="line">The second field is the type of the return value.</div>
1849 <div class="line">The third field is the argument list for this tag.</div>
1850 <div class="line">The fourth field is the description for this tag but
1851 currently unused and should be left empty.</div>
1852 </div>
1853 <p>Except for the first field (tag name), all other field can be left
1854 empty but the pipe separator must appear for them.</p>
1855 <p>You can easily write your own global tag files using this format.
1856 Just save them in your tags directory, as described earlier in the
1857 section <a class="reference" href="#global-tags">Global tags</a>.</p>
1858 </div>
1859 <div class="section">
1860 <h4><a class="toc-backref" href="#id77" id="generating-a-global-tags-file" name="generating-a-global-tags-file">Generating a global tags file</a></h4>
1861 <p>You can generate your own global tags files by parsing a list of
1862 source files. The command is:</p>
1863 <pre class="literal-block">
1864 geany -g [-P] &lt;Tag File&gt; &lt;File list&gt;
1865 </pre>
1866 <ul class="simple">
1867 <li>Tag File filename should be in the format described earlier --
1868 see the section called <a class="reference" href="#global-tags">Global tags</a>.</li>
1869 <li>File list is a list of filenames, each with a full path (unless
1870 you are generating C/C++ tags and have set the CFLAGS environment
1871 variable appropriately).</li>
1872 <li><tt class="docutils literal"><span class="pre">-P</span></tt> or <tt class="docutils literal"><span class="pre">--no-preprocessing</span></tt> disables using the C pre-processor
1873 to process <tt class="docutils literal"><span class="pre">#include</span></tt> directives for C/C++ source files. Use this
1874 option if you want to specify each source file on the command-line
1875 instead of using a 'master' header file. Also can be useful if you
1876 don't want to specify the CFLAGS environment variable.</li>
1877 </ul>
1878 <p>Example for the wxD library for the D programming language:</p>
1879 <pre class="literal-block">
1880 geany -g wxd.d.tags /home/username/wxd/wx/*.d
1881 </pre>
1882 <p><em>Generating C/C++ tag files:</em></p>
1883 <p>For C/C++ tag files, gcc and grep are required, so that header files
1884 can be preprocessed to include any other headers they depend upon.</p>
1885 <p>For C/C++ files, the environment variable CFLAGS should be set with
1886 appropriate <tt class="docutils literal"><span class="pre">-I/path</span></tt> include paths. The following example works with
1887 the bash shell, generating tags for the GnomeUI library:</p>
1888 <pre class="literal-block">
1889 CFLAGS=`pkg-config --cflags libgnomeui-2.0` geany -g gnomeui.c.tags \
1890 /usr/include/libgnomeui-2.0/gnome.h
1891 </pre>
1892 <p>You can adapt this command to use CFLAGS and header files appropriate
1893 for whichever libraries you want.</p>
1894 <p><em>Replacing the default C/C++ tags file:</em></p>
1895 <p>Geany currently uses a default global tags file c99.tags for
1896 C and C++, commonly installed in /usr/share/geany. This file can
1897 be replaced with one containing tags parsed from a different set
1898 of header files. When Geany is next started, your custom tags file
1899 will be loaded instead of the default c99.tags. You should keep a
1900 copy of the generated tags file because it will get overwritten when
1901 upgrading Geany.</p>
1902 </div>
1903 </div>
1904 <div class="section">
1905 <h3><a class="toc-backref" href="#id78" id="ignore-tags" name="ignore-tags">Ignore tags</a></h3>
1906 <p>You can also ignore certain tags if they would lead to wrong parsing of
1907 the code. Simply create a file called &quot;ignore.tags&quot; in your Geany
1908 configuration directory (usually <tt class="docutils literal"><span class="pre">~/.config/geany/</span></tt>). Then list all tags
1909 you want to ignore in this file, separated by spaces and/or newlines.</p>
1910 <p>More detailed information about the usage from the Exuberant Ctags
1911 manual page:</p>
1912 <pre class="literal-block">
1913 Specifies a list of identifiers which are to be specially handled
1914 while parsing C and C++ source files. This option is specifically
1915 provided to handle special cases arising through the use of
1916 pre-processor macros. When the identifiers listed are simple identifiers,
1917 these identifiers will be ignored during parsing of the source files.
1918 If an identifier is suffixed with a '+' character, ctags will also
1919 ignore any parenthesis-enclosed argument list which may immediately
1920 follow the identifier in the source files.
1921 If two identifiers are separated with the '=' character, the first
1922 identifiers is replaced by the second identifiers for parsing purposes.
1923 </pre>
1924 <p>For even more detailed information please read the manual page of
1925 Exuberant Ctags.</p>
1926 </div>
1927 </div>
1928 <div class="section">
1929 <h2><a class="toc-backref" href="#id79" id="preferences" name="preferences">Preferences</a></h2>
1930 <p>You may adjust Geany's settings using the Edit --&gt; Preferences
1931 dialog. Any changes you make there can be applied by hitting either
1932 the Apply or the OK button. These settings will persist between Geany
1933 sessions. Note that most settings here have descriptive popup bubble
1934 help -- just hover the mouse over the item in question to get help
1935 on it.</p>
1936 <p>You may also adjust some View settings (under the View menu) that
1937 persist between Geany sessions. The settings under the Document menu,
1938 however, are only for the current document and revert to defaults
1939 when restarting Geany.</p>
1940 <p>There are also some rarer <a class="reference" href="#hidden-preferences">Hidden preferences</a>.</p>
1941 <div class="note">
1942 <p class="first admonition-title">Note</p>
1943 <p class="last">In the paragraphs that follow, the text describing a dialog tab
1944 comes after the screenshot of that tab.</p>
1945 </div>
1946 <div class="section">
1947 <h3><a class="toc-backref" href="#id80" id="general-startup-preferences" name="general-startup-preferences">General Startup preferences</a></h3>
1948 <img alt="./images/pref_dialog_gen_startup.png" src="./images/pref_dialog_gen_startup.png" />
1949 <div class="section">
1950 <h4><a class="toc-backref" href="#id81" id="id1" name="id1">Startup</a></h4>
1951 <dl class="docutils">
1952 <dt>Load files from the last session</dt>
1953 <dd>On startup, load the same files you had open the last time you
1954 used Geany.</dd>
1955 <dt>Load virtual terminal support</dt>
1956 <dd>Load the library for running a terminal in the message window area.</dd>
1957 <dt>Enable plugin support</dt>
1958 <dd>Allow plugins to be used in Geany.</dd>
1959 </dl>
1960 </div>
1961 <div class="section">
1962 <h4><a class="toc-backref" href="#id82" id="shutdown" name="shutdown">Shutdown</a></h4>
1963 <dl class="docutils">
1964 <dt>Save window position and geometry</dt>
1965 <dd>Save the current position and size of the main window so next time
1966 you open Geany it's in the same location.</dd>
1967 <dt>Confirm Exit</dt>
1968 <dd>Have a dialog pop up to confirm that you really want to quit Geany.</dd>
1969 </dl>
1970 </div>
1971 <div class="section">
1972 <h4><a class="toc-backref" href="#id83" id="paths" name="paths">Paths</a></h4>
1973 <dl class="docutils">
1974 <dt>Startup path</dt>
1975 <dd>Path to start in when opening or saving files.
1976 It must be an absolute path.
1977 Leave it blank to use the current working directory.</dd>
1978 <dt>Project files</dt>
1979 <dd>Path to start in when opening project files.</dd>
1980 <dt>Extra plugin path</dt>
1981 <dd>By default Geany looks in the global installation path and in the
1982 configuration directory. In addition the path entered here will be searched
1983 for plugins. Usually you do not need to set an additional path to search for
1984 plugins. It might be useful when Geany is installed on a multi-user machine
1985 and additional plugins are available in a common location for all users.
1986 Leave blank to not set an additional lookup path.</dd>
1987 </dl>
1988 </div>
1989 </div>
1990 <div class="section">
1991 <h3><a class="toc-backref" href="#id84" id="general-miscellaneous-preferences" name="general-miscellaneous-preferences">General Miscellaneous preferences</a></h3>
1992 <img alt="./images/pref_dialog_gen_misc.png" src="./images/pref_dialog_gen_misc.png" />
1993 <div class="section">
1994 <h4><a class="toc-backref" href="#id85" id="miscellaneous" name="miscellaneous">Miscellaneous</a></h4>
1995 <dl class="docutils">
1996 <dt>Beep on errors when compilation has finished</dt>
1997 <dd>Have the computer make a beeping sound when compilation of your program
1998 has completed or any errors occurred.</dd>
1999 <dt>Switch status message list at new message</dt>
2000 <dd>Switch to the status message tab (in the notebook window at the bottom)
2001 once a new status message arrives.</dd>
2002 <dt>Suppress status messages in the status bar</dt>
2003 <dd><p class="first">Remove all messages from the status bar. The messages are still displayed
2004 in the status messages window.</p>
2005 <div class="last tip">
2006 <p class="first admonition-title">Tip</p>
2007 <p class="last">Another option is to use the <em>Switch to Editor</em> keybinding - it
2008 reshows the document statistics on the status bar. See <a class="reference" href="#focus-keybindings">Focus
2009 keybindings</a>.</p>
2010 </div>
2011 </dd>
2012 <dt>Use Windows File Open/Save dialogs</dt>
2013 <dd>Defines whether to use the native Windows File Open/Save dialogs or
2014 whether to use the GTK default dialogs.</dd>
2015 <dt>Auto-focus widgets (focus follows mouse)</dt>
2016 <dd>Give the focus automatically to widgets below the mouse cursor.
2017 This works for the main editor widget, the scribble, the toolbar search field
2018 goto line fields and the VTE.</dd>
2019 </dl>
2020 </div>
2021 <div class="section">
2022 <h4><a class="toc-backref" href="#id86" id="search" name="search">Search</a></h4>
2023 <dl class="docutils">
2024 <dt>Always wrap search and hide the Find dialog</dt>
2025 <dd>Always wrap search around the document and hide the Find dialog after clicking
2026 Find Next/Previous.</dd>
2027 <dt>Use the current word under the cursor for Find dialogs</dt>
2028 <dd>Use current word under the cursor when opening the Find, Find in Files or Replace dialog and
2029 there is no selection. When this option is disabled, the search term last used in the
2030 appropriate Find dialog is used.</dd>
2031 <dt>Use the current file's directory for Find in Files</dt>
2032 <dd>When opening the Find in Files dialog, set the directory to search to the directory of the current
2033 active file. When this option is disabled, the directory of the last use of the Find in Files
2034 dialog is used.</dd>
2035 </dl>
2036 </div>
2037 <div class="section">
2038 <h4><a class="toc-backref" href="#id87" id="projects" name="projects">Projects</a></h4>
2039 <dl class="docutils">
2040 <dt>Use project-based session files</dt>
2041 <dd>Save your current session when closing projects. You will be able to
2042 resume different project sessions, automatically opening the files
2043 you had open previously.</dd>
2044 <dt>Store project file inside the project base directory</dt>
2045 <dd>When creating new projects, the default path for the project file contains
2046 the project base path. Without this option enabled, the default project file
2047 path is one level above the project base path.
2048 In either case, you can easily set the final project file path in the
2049 <em>New Project</em> dialog. This option provides the more common
2050 defaults automatically for convenience.</dd>
2051 </dl>
2052 </div>
2053 </div>
2054 <div class="section">
2055 <h3><a class="toc-backref" href="#id88" id="interface-preferences" name="interface-preferences">Interface preferences</a></h3>
2056 <img alt="./images/pref_dialog_interface.png" src="./images/pref_dialog_interface.png" />
2057 <div class="section">
2058 <h4><a class="toc-backref" href="#id89" id="sidebar" name="sidebar">Sidebar</a></h4>
2059 <dl class="docutils">
2060 <dt>Show sidebar</dt>
2061 <dd>Whether to show the sidebar at all.</dd>
2062 <dt>Show symbol list</dt>
2063 <dd>Show the list of functions, variables, and other information in the
2064 current document you are editing.</dd>
2065 <dt>Show documents list</dt>
2066 <dd>Show all the documents you have open currently. This can be used to
2067 change between documents (see <a class="reference" href="#switching-between-documents">Switching between documents</a>) and
2068 to perform some common operations such as saving, closing and reloading.</dd>
2069 <dt>Position</dt>
2070 <dd>Whether to place the sidebar on the left or right of the editor window.</dd>
2071 </dl>
2072 </div>
2073 <div class="section">
2074 <h4><a class="toc-backref" href="#id90" id="fonts" name="fonts">Fonts</a></h4>
2075 <dl class="docutils">
2076 <dt>Editor</dt>
2077 <dd>Change the font used to display documents.</dd>
2078 <dt>Symbol list</dt>
2079 <dd>Change the font used for the Symbols sidebar tab.</dd>
2080 <dt>Message window</dt>
2081 <dd>Change the font used for the message window area.</dd>
2082 </dl>
2083 </div>
2084 <div class="section">
2085 <h4><a class="toc-backref" href="#id91" id="editor-tabs" name="editor-tabs">Editor tabs</a></h4>
2086 <dl class="docutils">
2087 <dt>Show editor tabs</dt>
2088 <dd>Show a notebook tab for all documents so you can switch between them
2089 using the mouse (instead of using the Documents window).</dd>
2090 <dt>Show close buttons</dt>
2091 <dd>Make each tab show a close button so you can easily close open
2092 documents.</dd>
2093 <dt>Placement of new file tabs</dt>
2094 <dd>Whether to create a document with its notebook tab to the left or
2095 right of all existing tabs.</dd>
2096 <dt>Next to current</dt>
2097 <dd>Whether to place file tabs next to the current tab
2098 rather than at the edges of the notebook.</dd>
2099 <dt>Double-clicking hides all additional widgets</dt>
2100 <dd>Whether to call the View-&gt;Toggle All Additional Widgets command
2101 when double-clicking on a notebook tab.</dd>
2102 </dl>
2103 </div>
2104 <div class="section">
2105 <h4><a class="toc-backref" href="#id92" id="tab-positions" name="tab-positions">Tab positions</a></h4>
2106 <dl class="docutils">
2107 <dt>Editor</dt>
2108 <dd>Set the positioning of the editor's notebook tabs to the right,
2109 left, top, or bottom of the editing window.</dd>
2110 <dt>Sidebar</dt>
2111 <dd>Set the positioning of the sidebar's notebook tabs to the right,
2112 left, top, or bottom of the sidebar window.</dd>
2113 <dt>Message window</dt>
2114 <dd>Set the positioning of the message window's notebook tabs to the
2115 right, left, top, or bottom of the message window.</dd>
2116 </dl>
2117 </div>
2118 <div class="section">
2119 <h4><a class="toc-backref" href="#id93" id="id2" name="id2">Miscellaneous</a></h4>
2120 <dl class="docutils">
2121 <dt>Show status bar</dt>
2122 <dd>Show the status bar at the bottom of the main window. It gives information about
2123 the file you are editing like the line and column you are on, whether any
2124 modifications were done, the file encoding, the filetype and other information.</dd>
2125 </dl>
2126 </div>
2127 </div>
2128 <div class="section">
2129 <h3><a class="toc-backref" href="#id94" id="toolbar-preferences" name="toolbar-preferences">Toolbar preferences</a></h3>
2130 <p>Affects the main toolbar underneath the menu bar.</p>
2131 <img alt="./images/pref_dialog_toolbar.png" src="./images/pref_dialog_toolbar.png" />
2132 <div class="section">
2133 <h4><a class="toc-backref" href="#id95" id="toolbar" name="toolbar">Toolbar</a></h4>
2134 <dl class="docutils">
2135 <dt>Show Toolbar</dt>
2136 <dd>Whether to show the toolbar.</dd>
2137 <dt>Append Toolbar to the Menu</dt>
2138 <dd>Allows to append the toolbar to the main menu bar instead of placing it below.
2139 This is useful to save vertical space.</dd>
2140 <dt>Customize Toolbar</dt>
2141 <dd>See <a class="reference" href="#customizing-the-toolbar">Customizing the toolbar</a>.</dd>
2142 </dl>
2143 </div>
2144 <div class="section">
2145 <h4><a class="toc-backref" href="#id96" id="appearance" name="appearance">Appearance</a></h4>
2146 <dl class="docutils">
2147 <dt>Icon Style</dt>
2148 <dd>Select the toolbar icon style to use - either icons and text, just
2149 icons or just text.
2150 The choice System default uses whatever icon style is set by GTK.</dd>
2151 <dt>Icon size</dt>
2152 <dd>Select the size of the icons you see (large, small or very small).
2153 The choice System default uses whatever icon size is set by GTK.</dd>
2154 </dl>
2155 </div>
2156 </div>
2157 <div class="section">
2158 <h3><a class="toc-backref" href="#id97" id="editor-features-preferences" name="editor-features-preferences">Editor Features preferences</a></h3>
2159 <img alt="./images/pref_dialog_edit_features.png" src="./images/pref_dialog_edit_features.png" />
2160 <div class="section">
2161 <h4><a class="toc-backref" href="#id98" id="features" name="features">Features</a></h4>
2162 <dl class="docutils">
2163 <dt>Line wrapping</dt>
2164 <dd>Show long lines wrapped around to new display lines.</dd>
2165 <dt>Enable &quot;smart&quot; home key</dt>
2166 <dd>Whether to move the cursor to the first non-whitespace character
2167 on the line when you hit the home key on your keyboard. Pressing it
2168 again will go to the very start of the line.</dd>
2169 <dt>Disable Drag and Drop</dt>
2170 <dd>Do not allow the dragging and dropping of selected text in documents.</dd>
2171 <dt>Enable folding</dt>
2172 <dd>Allow groups of lines in a document to be collapsed for easier
2173 navigation/editing.</dd>
2174 <dt>Fold/Unfold all children of a fold point</dt>
2175 <dd>Whether to fold/unfold all child fold points when a parent line
2176 is folded.</dd>
2177 <dt>Use indicators to show compile errors</dt>
2178 <dd>Underline lines with compile errors using red squiggles to indicate
2179 them in the editor area.</dd>
2180 <dt>Newline strip trailing spaces</dt>
2181 <dd>Remove any white space at the end of the line when you hit the
2182 Enter/Return key.</dd>
2183 <dt>Line breaking column</dt>
2184 <dd>The editor column number to insert a newline at when Line Breaking
2185 is enabled for the current document.</dd>
2186 <dt>Comment toggle marker</dt>
2187 <dd>A string which is added when toggling a line comment in a source file.
2188 It is used to mark the comment as toggled.</dd>
2189 </dl>
2190 </div>
2191 </div>
2192 <div class="section">
2193 <h3><a class="toc-backref" href="#id99" id="editor-indentation-preferences" name="editor-indentation-preferences">Editor Indentation preferences</a></h3>
2194 <img alt="./images/pref_dialog_edit_indentation.png" src="./images/pref_dialog_edit_indentation.png" />
2195 <div class="section">
2196 <h4><a class="toc-backref" href="#id100" id="indentation-group" name="indentation-group">Indentation group</a></h4>
2197 <p>See <a class="reference" href="#indentation">Indentation</a> for more information.</p>
2198 <dl class="docutils">
2199 <dt>Type</dt>
2200 <dd><p class="first">When Geany inserts indentation, whether to use:</p>
2201 <ul class="simple">
2202 <li>Just Tabs</li>
2203 <li>Just Spaces</li>
2204 <li>Tabs and Spaces, depending on how much indentation is on a line</li>
2205 </ul>
2206 <p class="last">The <em>Tabs and Spaces</em> indent type is also known as <em>Soft tab
2207 support</em> in some other editors.</p>
2208 </dd>
2209 <dt>Width</dt>
2210 <dd>The width of a single indent size in spaces. By default the indent
2211 size is equivalent to 4 spaces.</dd>
2212 <dt>Detect from file</dt>
2213 <dd>Try to detect and set the indent type based on file content, when
2214 a file is opened.</dd>
2215 <dt>Auto-indent mode</dt>
2216 <dd><p class="first">The type of auto-indentation you wish to use after pressing Enter,
2217 if any.</p>
2218 <dl class="last docutils">
2219 <dt>Basic</dt>
2220 <dd>Just add the indentation of the previous line.</dd>
2221 <dt>Current chars</dt>
2222 <dd>Add indentation based on the current filetype and any characters at
2223 the end of the line such as <tt class="docutils literal"><span class="pre">{</span></tt>, <tt class="docutils literal"><span class="pre">}</span></tt> for C, <tt class="docutils literal"><span class="pre">:</span></tt> for Python.</dd>
2224 <dt>Match braces</dt>
2225 <dd>Like <em>Current chars</em> but for C-like languages, make a closing
2226 <tt class="docutils literal"><span class="pre">}</span></tt> brace line up with the matching opening brace.</dd>
2227 </dl>
2228 </dd>
2229 <dt>Tab key indents</dt>
2230 <dd><p class="first">If set, pressing tab will indent the current line or selection, and
2231 unindent when pressing Shift-tab. Otherwise, the tab key will
2232 insert a tab character into the document (which can be different
2233 from indentation, depending on the indent type).</p>
2234 <div class="last note">
2235 <p class="first admonition-title">Note</p>
2236 <p class="last">There are also separate configurable keybindings for indent &amp;
2237 unindent, but this preference allows the tab key to have different
2238 meanings in different contexts - e.g. for snippet completion.</p>
2239 </div>
2240 </dd>
2241 </dl>
2242 </div>
2243 </div>
2244 <div class="section">
2245 <h3><a class="toc-backref" href="#id101" id="editor-completions-preferences" name="editor-completions-preferences">Editor Completions preferences</a></h3>
2246 <img alt="./images/pref_dialog_edit_completions.png" src="./images/pref_dialog_edit_completions.png" />
2247 <div class="section">
2248 <h4><a class="toc-backref" href="#id102" id="completions" name="completions">Completions</a></h4>
2249 <dl class="docutils">
2250 <dt>Snippet Completion</dt>
2251 <dd>Whether to replace special keywords after typing Tab into a
2252 pre-defined text snippet.
2253 See <a class="reference" href="#user-definable-snippets">User-definable snippets</a>.</dd>
2254 <dt>XML tag autocompletion</dt>
2255 <dd>When you open an XML tag automatically generate its completion tag.</dd>
2256 <dt>Automatic continuation multi-line comments</dt>
2257 <dd><p class="first">Continue automatically multi-line comments in languages like C, C++
2258 and Java when a new line is entered inside such a comment.
2259 With this option enabled, Geany will insert a <tt class="docutils literal"><span class="pre">*</span></tt> on every new line
2260 inside a multi-line comment, for example when you press return in the
2261 following C code:</p>
2262 <pre class="literal-block">
2264 * This is a C multi-line comment, press &lt;Return&gt;
2265 </pre>
2266 <p>then Geany would insert:</p>
2267 <pre class="literal-block">
2269 </pre>
2270 <p class="last">on the next line with the correct indentation based on the previous line,
2271 as long as the multi-line is not closed by <tt class="docutils literal"><span class="pre">*/</span></tt>.</p>
2272 </dd>
2273 <dt>Autocomplete symbols</dt>
2274 <dd>When you start to type a symbol name, look for the full string to
2275 allow it to be completed for you.</dd>
2276 <dt>Autocomplete all words in document</dt>
2277 <dd>When you start to type a word, Geany will search the whole document for
2278 words starting with the typed part to complete it, assuming there
2279 are no tag names to show.</dd>
2280 <dt>Drop rest of word on completion</dt>
2281 <dd>Remove any word part to the right of the cursor when choosing a
2282 completion list item.</dd>
2283 <dt>Characters to type for autocompletion</dt>
2284 <dd>Number of characters of a word to type before autocompletion is
2285 displayed.</dd>
2286 <dt>Completion list height</dt>
2287 <dd>The number of rows to display for the autocompletion window.</dd>
2288 <dt>Max. symbol name suggestions</dt>
2289 <dd>The maximum number of items in the autocompletion list.</dd>
2290 </dl>
2291 </div>
2292 <div class="section">
2293 <h4><a class="toc-backref" href="#id103" id="auto-close-quotes-and-brackets" name="auto-close-quotes-and-brackets">Auto-close quotes and brackets</a></h4>
2294 <p>Geany can automatically insert a closing bracket and quote characters when
2295 you open them. For instance, you type a <tt class="docutils literal"><span class="pre">(</span></tt> and Geany will automatically
2296 insert <tt class="docutils literal"><span class="pre">)</span></tt>. With the following options, you can define for which
2297 characters this should work.</p>
2298 <dl class="docutils">
2299 <dt>Parenthesis ( )</dt>
2300 <dd>Auto-close parenthesis when typing an opening one</dd>
2301 <dt>Curly brackets { }</dt>
2302 <dd>Auto-close curly brackets (braces) when typing an opening one</dd>
2303 <dt>Square brackets [ ]</dt>
2304 <dd>Auto-close square brackets when typing an opening one</dd>
2305 <dt>Single quotes ' '</dt>
2306 <dd>Auto-close single quotes when typing an opening one</dd>
2307 <dt>Double quotes &quot; &quot;</dt>
2308 <dd>Auto-close double quotes when typing an opening one</dd>
2309 </dl>
2310 </div>
2311 </div>
2312 <div class="section">
2313 <h3><a class="toc-backref" href="#id104" id="editor-display-preferences" name="editor-display-preferences">Editor Display preferences</a></h3>
2314 <p>This is for visual elements displayed in the editor window.</p>
2315 <img alt="./images/pref_dialog_edit_display.png" src="./images/pref_dialog_edit_display.png" />
2316 <div class="section">
2317 <h4><a class="toc-backref" href="#id105" id="display" name="display">Display</a></h4>
2318 <dl class="docutils">
2319 <dt>Invert syntax highlighting colors</dt>
2320 <dd>Invert all colors, by default this makes white text on a black
2321 background.</dd>
2322 <dt>Show indendation guides</dt>
2323 <dd>Show vertical lines to help show how much leading indentation there
2324 is on each line.</dd>
2325 <dt>Show whitespaces</dt>
2326 <dd>Mark all tabs with an arrow &quot;--&gt;&quot; symbol and spaces with dots to
2327 show which kinds of whitespace are used.</dd>
2328 <dt>Show line endings</dt>
2329 <dd>Display a symbol everywhere that a carriage return or line feed
2330 is present.</dd>
2331 <dt>Show line numbers</dt>
2332 <dd>Show or hide the Line Number margin.</dd>
2333 <dt>Show markers margin</dt>
2334 <dd>Show or hide the small margin right of the line numbers, which is used
2335 to mark lines.</dd>
2336 <dt>Stop scrolling at last line</dt>
2337 <dd>When enabled Geany stops scrolling when at the last line of the document.
2338 Otherwise you can scroll one more page even if there are no real lines.</dd>
2339 </dl>
2340 </div>
2341 <div class="section">
2342 <h4><a class="toc-backref" href="#id106" id="long-line-marker" name="long-line-marker">Long line marker</a></h4>
2343 <p>The long line marker helps to indicate overly-long lines, or as a hint
2344 to the user for when to break the line.</p>
2345 <dl class="docutils">
2346 <dt>Type</dt>
2347 <dd><dl class="first last docutils">
2348 <dt>Line</dt>
2349 <dd>Show a thin vertical line in the editor window at the given column
2350 position.</dd>
2351 <dt>Background</dt>
2352 <dd>Change the background color of characters after the given column
2353 position to the color set below. (This is recommended over the
2354 <em>Line</em> setting if you use proportional fonts).</dd>
2355 <dt>Disabled</dt>
2356 <dd>Don't mark long lines at all.</dd>
2357 </dl>
2358 </dd>
2359 <dt>Long line marker</dt>
2360 <dd>Set this value to a value greater than zero to specify the column
2361 where it should appear.</dd>
2362 <dt>Long line marker color</dt>
2363 <dd>Set the color of the long line marker.</dd>
2364 </dl>
2365 </div>
2366 <div class="section">
2367 <h4><a class="toc-backref" href="#id107" id="virtual-spaces" name="virtual-spaces">Virtual spaces</a></h4>
2368 <p>Virtual space is space beyond the end of each line.
2369 The cursor may be moved into virtual space but no real space will be
2370 added to the document until there is some text typed or some other
2371 text insertion command is used.</p>
2372 <dl class="docutils">
2373 <dt>Disabled</dt>
2374 <dd>Do not show virtual spaces</dd>
2375 <dt>Only for rectangular selections</dt>
2376 <dd>Only show virtual spaces beyond the end of lines when drawing a rectangular selection</dd>
2377 <dt>Always</dt>
2378 <dd>Always show virtual spaces beyond the end of lines</dd>
2379 </dl>
2380 </div>
2381 </div>
2382 <div class="section">
2383 <h3><a class="toc-backref" href="#id108" id="files-preferences" name="files-preferences">Files preferences</a></h3>
2384 <img alt="./images/pref_dialog_files.png" src="./images/pref_dialog_files.png" />
2385 <div class="section">
2386 <h4><a class="toc-backref" href="#id109" id="new-files" name="new-files">New files</a></h4>
2387 <dl class="docutils">
2388 <dt>Open new documents from the command-line</dt>
2389 <dd>Whether to create new documents when passing filenames that don't
2390 exist from the command-line.</dd>
2391 <dt>Default encoding (new files)</dt>
2392 <dd>The type of file encoding you wish to use when creating files.</dd>
2393 <dt>Used fixed encoding when opening files</dt>
2394 <dd>Assume all files you are opening are using the type of encoding specified below.</dd>
2395 <dt>Default encoding (existing files)</dt>
2396 <dd>Opens all files with the specified encoding instead of auto-detecting it.
2397 Use this option when it's not possible for Geany to detect the exact encoding.</dd>
2398 <dt>Default end of line characters</dt>
2399 <dd>The end of line characters to which should be used for new files.
2400 On Windows systems, you generally want to use CR/LF which are the common
2401 characters to mark line breaks.
2402 On Unix-like systems, LF is default and CR is used on MAC systems.</dd>
2403 </dl>
2404 </div>
2405 <div class="section">
2406 <h4><a class="toc-backref" href="#id110" id="saving-files" name="saving-files">Saving files</a></h4>
2407 <p>Perform formatting operations when a document is saved. These
2408 can each be undone with the Undo command.</p>
2409 <dl class="docutils">
2410 <dt>Ensure newline at file end</dt>
2411 <dd>Add a newline at the end of the document if one is missing.</dd>
2412 <dt>Strip trailing spaces</dt>
2413 <dd>Remove the trailing spaces on each line of the document.</dd>
2414 <dt>Replace tabs by space</dt>
2415 <dd><p class="first">Replace all tabs in the document with the equivalent number of spaces.</p>
2416 <div class="last note">
2417 <p class="first admonition-title">Note</p>
2418 <p class="last">It is better to use spaces to indent than use this preference - see
2419 <a class="reference" href="#indentation">Indentation</a>.</p>
2420 </div>
2421 </dd>
2422 </dl>
2423 </div>
2424 <div class="section">
2425 <h4><a class="toc-backref" href="#id111" id="id3" name="id3">Miscellaneous</a></h4>
2426 <dl class="docutils">
2427 <dt>Recent files list length</dt>
2428 <dd>The number of files to remember in the recently used files list.</dd>
2429 <dt>Disk check timeout</dt>
2430 <dd><p class="first">The number of seconds to periodically check the current document's
2431 file on disk in case it has changed. Setting it to 0 will disable
2432 this feature.</p>
2433 <div class="last note">
2434 <p class="first admonition-title">Note</p>
2435 <p class="last">These checks are only performed on local files. Remote files are
2436 not checked for changes due to performance issues
2437 (remote files are files in <tt class="docutils literal"><span class="pre">~/.gvfs/</span></tt>).</p>
2438 </div>
2439 </dd>
2440 </dl>
2441 </div>
2442 </div>
2443 <div class="section">
2444 <h3><a class="toc-backref" href="#id112" id="tools-preferences" name="tools-preferences">Tools preferences</a></h3>
2445 <img alt="./images/pref_dialog_tools.png" src="./images/pref_dialog_tools.png" />
2446 <div class="section">
2447 <h4><a class="toc-backref" href="#id113" id="tool-paths" name="tool-paths">Tool paths</a></h4>
2448 <dl class="docutils">
2449 <dt>Terminal</dt>
2450 <dd>The location of your terminal executable.</dd>
2451 <dt>Browser</dt>
2452 <dd>The location of your web browser executable.</dd>
2453 <dt>Grep</dt>
2454 <dd>The location of the grep executable.</dd>
2455 </dl>
2456 <div class="note">
2457 <p class="first admonition-title">Note</p>
2458 <p class="last">For Windows users: at the time of writing it is recommended to use
2459 the grep.exe from the UnxUtils project
2460 (<a class="reference" href="http://sourceforge.net/projects/unxutils">http://sourceforge.net/projects/unxutils</a>). The grep.exe from the
2461 Mingw project for instance might not work with Geany at the moment.</p>
2462 </div>
2463 </div>
2464 <div class="section">
2465 <h4><a class="toc-backref" href="#id114" id="commands" name="commands">Commands</a></h4>
2466 <dl class="docutils">
2467 <dt>Context action</dt>
2468 <dd>Set this to a command to execute on the current word.
2469 You can use the &quot;%s&quot; wildcard to pass the current word below the cursor
2470 to the specified command.</dd>
2471 </dl>
2472 </div>
2473 </div>
2474 <div class="section">
2475 <h3><a class="toc-backref" href="#id115" id="template-preferences" name="template-preferences">Template preferences</a></h3>
2476 <p>This data is used as meta data for various template text to insert into
2477 a document, such as the file header. You only need to set fields that
2478 you want to use in your template files.</p>
2479 <div class="note">
2480 <p class="first admonition-title">Note</p>
2481 <p class="last">For changes made here to take effect, you must either select
2482 <em>Tools-&gt;Reload Configuration</em> or restart Geany.</p>
2483 </div>
2484 <img alt="./images/pref_dialog_templ.png" src="./images/pref_dialog_templ.png" />
2485 <div class="section">
2486 <h4><a class="toc-backref" href="#id116" id="template-data" name="template-data">Template data</a></h4>
2487 <dl class="docutils">
2488 <dt>Developer</dt>
2489 <dd>The name of the developer who will be creating files.</dd>
2490 <dt>Initials</dt>
2491 <dd>The initials of the developer.</dd>
2492 <dt>Mail address</dt>
2493 <dd><p class="first">The email address of the developer.</p>
2494 <div class="last note">
2495 <p class="first admonition-title">Note</p>
2496 <p class="last">You may wish to add anti-spam markup, e.g. <tt class="docutils literal"><span class="pre">name&lt;at&gt;site&lt;dot&gt;ext</span></tt>.</p>
2497 </div>
2498 </dd>
2499 <dt>Company</dt>
2500 <dd>The company the developer is working for.</dd>
2501 <dt>Initial version</dt>
2502 <dd>The initial version of files you will be creating.</dd>
2503 <dt>Year</dt>
2504 <dd>Specify a format for the the {year} wildcard. You can use any conversion specifiers
2505 which can be used with the ANSI C strftime function. For details please see
2506 <a class="reference" href="http://man.cx/strftime">http://man.cx/strftime</a>.</dd>
2507 <dt>Date</dt>
2508 <dd>Specify a format for the the {date} wildcard. You can use any conversion specifiers
2509 which can be used with the ANSI C strftime function. For details please see
2510 <a class="reference" href="http://man.cx/strftime">http://man.cx/strftime</a>.</dd>
2511 <dt>Date &amp; Time</dt>
2512 <dd>Specify a format for the the {datetime} wildcard. You can use any conversion specifiers
2513 which can be used with the ANSI C strftime function. For details please see
2514 <a class="reference" href="http://man.cx/strftime">http://man.cx/strftime</a>.</dd>
2515 </dl>
2516 </div>
2517 </div>
2518 <div class="section">
2519 <h3><a class="toc-backref" href="#id117" id="keybinding-preferences" name="keybinding-preferences">Keybinding preferences</a></h3>
2520 <img alt="./images/pref_dialog_keys.png" src="./images/pref_dialog_keys.png" />
2521 <p>There are some commands listed in the keybinding dialog that are not, by default,
2522 bound to a key combination, and may not be available as a menu item.</p>
2523 <div class="note">
2524 <p class="first admonition-title">Note</p>
2525 <p class="last">For more information see the section <a class="reference" href="#keybindings">Keybindings</a>.</p>
2526 </div>
2527 </div>
2528 <div class="section">
2529 <h3><a class="toc-backref" href="#id118" id="printing-preferences" name="printing-preferences">Printing preferences</a></h3>
2530 <img alt="./images/pref_dialog_printing.png" src="./images/pref_dialog_printing.png" />
2531 <dl class="docutils">
2532 <dt>Use external command for printing</dt>
2533 <dd>Use a system command to print your file out.</dd>
2534 <dt>Use native GTK printing</dt>
2535 <dd>Let the GTK GUI toolkit handle your print request.</dd>
2536 <dt>Print line numbers</dt>
2537 <dd>Print the line numbers on the left of your paper.</dd>
2538 <dt>Print page number</dt>
2539 <dd>Print the page number on the bottom right of your paper.</dd>
2540 <dt>Print page header</dt>
2541 <dd>Print a header on every page that is sent to the printer.</dd>
2542 <dt>Use base name of the printed file</dt>
2543 <dd>Don't use the entire path for the header, only the filename.</dd>
2544 <dt>Date format</dt>
2545 <dd>How the date should be printed. You can use the same format
2546 specifiers as in the ANSI C function strftime(). For details please
2547 see <a class="reference" href="http://man.cx/strftime">http://man.cx/strftime</a>.</dd>
2548 </dl>
2549 </div>
2550 <div class="section">
2551 <h3><a class="toc-backref" href="#id119" id="terminal-vte-preferences" name="terminal-vte-preferences">Terminal (VTE) preferences</a></h3>
2552 <p>See also: <a class="reference" href="#virtual-terminal-emulator-widget-vte">Virtual terminal emulator widget (VTE)</a>.</p>
2553 <img alt="./images/pref_dialog_vte.png" src="./images/pref_dialog_vte.png" />
2554 <div class="section">
2555 <h4><a class="toc-backref" href="#id120" id="terminal-widget" name="terminal-widget">Terminal widget</a></h4>
2556 <dl class="docutils">
2557 <dt>Terminal font</dt>
2558 <dd>Select the font that will be used in the terminal emulation control.</dd>
2559 <dt>Foreground color</dt>
2560 <dd>Select the font color.</dd>
2561 <dt>Background color</dt>
2562 <dd>Select the background color of the terminal.</dd>
2563 <dt>Scrollback lines</dt>
2564 <dd>The number of lines buffered so that you can scroll though the history.</dd>
2565 <dt>Shell</dt>
2566 <dd>The location of the shell on your system.</dd>
2567 <dt>Scroll on keystroke</dt>
2568 <dd>Scroll the terminal to the prompt line when pressing a key.</dd>
2569 <dt>Scroll on output</dt>
2570 <dd>Scroll the output down.</dd>
2571 <dt>Cursor blinks</dt>
2572 <dd>Let the terminal cursor blink.</dd>
2573 <dt>Override Geany keybindings</dt>
2574 <dd>Allow the VTE to receive keyboard shortcuts (apart from focus commands).</dd>
2575 <dt>Disable menu shortcut key (F10 by default)</dt>
2576 <dd>Disable the menu shortcut when you are in the virtual terminal.</dd>
2577 <dt>Follow path of the current file</dt>
2578 <dd>Make the path of the terminal change according to the path of the
2579 current file.</dd>
2580 <dt>Execute programs in VTE</dt>
2581 <dd>Execute programs in the virtual terminal instead of using the external
2582 terminal tool. Note that if you run multiple execute commands at once
2583 the output may become mixed together in the VTE.</dd>
2584 <dt>Don't use run script</dt>
2585 <dd>Don't use the simple run script which is usually used to display
2586 the exit status of the executed program.
2587 This can be useful if you already have a program running in the VTE
2588 like a Python console (e.g. ipython). Use this with care.</dd>
2589 </dl>
2590 </div>
2591 </div>
2592 </div>
2593 <div class="section">
2594 <h2><a class="toc-backref" href="#id121" id="project-management" name="project-management">Project Management</a></h2>
2595 <p>Project Management is optional in Geany. Currently it can be used for:</p>
2596 <ul class="simple">
2597 <li>Storing and opening session files on a project basis.</li>
2598 <li>Configuring the Build menu on a project basis.</li>
2599 </ul>
2600 <p>A list of session files can be stored and opened with the project
2601 when the <em>Use project-based session files</em> preference is enabled,
2602 in the <em>Project</em> group of the <a class="reference" href="#preferences">Preferences</a> dialog.</p>
2603 <p>As long as a project is open, the Build menu will use
2604 the items defined in project's settings, instead of the defaults.
2605 See <a class="reference" href="#build-menu-configuration">Build Menu Configuration</a> for information on configuring the menu.</p>
2606 <p>The current project's settings are saved when it is closed, or when
2607 Geany is shutdown. When restarting Geany, the previously opened project
2608 file that was in use at the end of the last session will be reopened.</p>
2609 <p>The project menu items are detailed below.</p>
2610 <div class="section">
2611 <h3><a class="toc-backref" href="#id122" id="new-project" name="new-project">New Project</a></h3>
2612 <p>To create a new project, fill in the <em>Name</em> field. By default this
2613 will setup a new project file <tt class="docutils literal"><span class="pre">~/projects/name.geany</span></tt>. Usually it's
2614 best to store all your project files in the same directory (they are
2615 independent of any source directory trees).</p>
2616 <p>The Base path text field is setup to use <tt class="docutils literal"><span class="pre">~/projects/name</span></tt>. This
2617 can safely be set to any existing path -- it will not touch the file
2618 structure contained in it.</p>
2619 </div>
2620 <div class="section">
2621 <h3><a class="toc-backref" href="#id123" id="project-properties" name="project-properties">Project Properties</a></h3>
2622 <p>You can set an optional description for the project, but it is not
2623 used elsewhere by Geany.</p>
2624 <p>The <em>Base path</em> field is used as the directory to run the Build menu commands.
2625 The specified path can be an absolute path or it is considered to be
2626 relative to the project's file name.</p>
2627 <div class="section">
2628 <h4><a class="toc-backref" href="#id124" id="set-base-path-button" name="set-base-path-button">Set Base Path Button</a></h4>
2629 <p>This button is a convenience to set the working directory fields
2630 in the non-filetype Build menu items to %p to use the project base path.</p>
2631 <div class="note">
2632 <p class="first admonition-title">Note</p>
2633 <p class="last">Pressing the 'set' button will override any working directories
2634 you have configured for the project.</p>
2635 </div>
2636 </div>
2637 </div>
2638 <div class="section">
2639 <h3><a class="toc-backref" href="#id125" id="open-project" name="open-project">Open Project</a></h3>
2640 <p>The Open command displays a standard file chooser, starting in
2641 <tt class="docutils literal"><span class="pre">~/projects</span></tt>. Choose a project file named with the <tt class="docutils literal"><span class="pre">.geany</span></tt>
2642 extension.</p>
2643 <p>When project session support is enabled, Geany will close the currently
2644 open files and open the session files associated with the project.</p>
2645 </div>
2646 <div class="section">
2647 <h3><a class="toc-backref" href="#id126" id="close-project" name="close-project">Close Project</a></h3>
2648 <p>Project file settings are saved when the project is closed.</p>
2649 <p>When project session support is enabled, Geany will close the project
2650 session files and open any previously closed default session files.</p>
2651 </div>
2652 </div>
2653 <div class="section">
2654 <h2><a class="toc-backref" href="#id127" id="build-menu" name="build-menu">Build Menu</a></h2>
2655 <p>After editing code with Geany, the next step is to compile, link, build,
2656 interpret, run etc. As Geany supports many languages each with a different
2657 approach to such operations, and as there are also many language independent
2658 software building systems, Geany does not have a built-in build system, nor
2659 does it limit which system you can use. Instead the build menu provides
2660 a configurable and flexible means of running any external commands to
2661 execute your preferred build system.</p>
2662 <p>This section provides a description of the default configuration of the
2663 build menu and then covers how to configure it, and where the defaults fit in.</p>
2664 <p>Running the commands from within Geany has two benefits:</p>
2665 <ul class="simple">
2666 <li>The current file is automatically saved before the command is run.</li>
2667 <li>The output is captured in the Compiler notebook tab and parsed for
2668 warnings or errors.</li>
2669 </ul>
2670 <p>Warnings and errors that can be parsed for line numbers will be shown in
2671 red in the Compiler tab and you can click on them to switch to the relevant
2672 source file (or open it) and mark the line number. Also lines with
2673 warnings or errors are marked in the source, see <a class="reference" href="#indicators">Indicators</a> below.</p>
2674 <div class="tip">
2675 <p class="first admonition-title">Tip</p>
2676 <p class="last">If Geany's default error message parsing does not parse errors for
2677 the tool you're using, you can set a custom regex in the Build Commands
2678 Dialog, see <a class="reference" href="#build-menu-configuration">Build Menu Configuration</a>.</p>
2679 </div>
2680 <div class="section">
2681 <h3><a class="toc-backref" href="#id128" id="indicators" name="indicators">Indicators</a></h3>
2682 <p>Indicators are red squiggly underlines which are used to highlight
2683 errors which occurred while compiling the current file. So you can
2684 easily see where your code failed to compile. You can remove them by
2685 selecting <em>Remove Error Indicators</em> in the Document menu.</p>
2686 <p>If you do not like this feature, you can disable it - see <a class="reference" href="#editor-features-preferences">Editor Features
2687 preferences</a>.</p>
2688 </div>
2689 <div class="section">
2690 <h3><a class="toc-backref" href="#id129" id="default-build-menu-items" name="default-build-menu-items">Default Build Menu Items</a></h3>
2691 <p>Depending on the current file's filetype, the default Build menu will contain
2692 the following items:</p>
2693 <ul class="simple">
2694 <li>Compile</li>
2695 <li>Build</li>
2696 <li>Make All</li>
2697 <li>Make Custom Target</li>
2698 <li>Make Object</li>
2699 <li>Next Error</li>
2700 <li>Previous Error</li>
2701 <li>Execute</li>
2702 <li>Set Build Menu Commands</li>
2703 </ul>
2704 <div class="section">
2705 <h4><a class="toc-backref" href="#id130" id="compile" name="compile">Compile</a></h4>
2706 <p>The Compile command has different uses for different kinds of files.</p>
2707 <p>For compilable languages such as C and C++, the Compile command is
2708 set up to compile the current source file into a binary object file.</p>
2709 <p>Java source files will be compiled to class file bytecode.</p>
2710 <p>Interpreted languages such as Perl, Python, Ruby will compile to
2711 bytecode if the language supports it, or will run a syntax check,
2712 or if that is not available will run the file in its language interpreter.</p>
2713 </div>
2714 <div class="section">
2715 <h4><a class="toc-backref" href="#id131" id="build" name="build">Build</a></h4>
2716 <p>For compilable languages such as C and C++, the Build command will link
2717 the current source file's equivalent object file into an executable. If
2718 the object file does not exist, the source will be compiled and linked
2719 in one step, producing just the executable binary.</p>
2720 <p>Interpreted languages do not use the Build command.</p>
2721 <div class="note">
2722 <p class="first admonition-title">Note</p>
2723 <p class="last">If you need complex settings for your build system, or several
2724 different settings, then writing a Makefile and using the Make
2725 commands is recommended; this will also make it easier for users to
2726 build your software.</p>
2727 </div>
2728 </div>
2729 <div class="section">
2730 <h4><a class="toc-backref" href="#id132" id="make" name="make">Make</a></h4>
2731 <p>This runs &quot;make&quot; in the same directory as the
2732 current file.</p>
2733 </div>
2734 <div class="section">
2735 <h4><a class="toc-backref" href="#id133" id="make-custom-target" name="make-custom-target">Make custom target</a></h4>
2736 <p>This is similar to running 'Make' but you will be prompted for
2737 the make target name to be passed to the Make tool. For example,
2738 typing 'clean' in the dialog prompt will run &quot;make clean&quot;.</p>
2739 </div>
2740 <div class="section">
2741 <h4><a class="toc-backref" href="#id134" id="make-object" name="make-object">Make object</a></h4>
2742 <p>Make object will run &quot;make current_file.o&quot; in the same directory as
2743 the current file, using the filename for 'current_file'. It is useful
2744 for building just the current file without building the whole project.</p>
2745 </div>
2746 <div class="section">
2747 <h4><a class="toc-backref" href="#id135" id="next-error" name="next-error">Next Error</a></h4>
2748 <p>The next error item will move to the next detected error in the file.</p>
2749 </div>
2750 <div class="section">
2751 <h4><a class="toc-backref" href="#id136" id="previous-error" name="previous-error">Previous Error</a></h4>
2752 <p>The previous error item will move to the previous detected error in the file.</p>
2753 </div>
2754 <div class="section">
2755 <h4><a class="toc-backref" href="#id137" id="execute" name="execute">Execute</a></h4>
2756 <p>Execute will run the corresponding executable file, shell script or
2757 interpreted script in a terminal window. Note that the Terminal tool
2758 path must be correctly set in the Tools tab of the Preferences dialog -
2759 you can use any terminal program that runs a Bourne compatible shell
2760 and accept the &quot;-e&quot; command line argument to start a command or can be
2761 selected to use the built-in VTE if it is available - see
2762 <a class="reference" href="#virtual-terminal-emulator-widget-vte">Virtual terminal emulator widget (VTE)</a>.</p>
2763 <p>After your program or script has finished executing, you will be
2764 prompted to press the return key. This allows you to review any text
2765 output from the program before the terminal window is closed.</p>
2766 <div class="note">
2767 <p class="first admonition-title">Note</p>
2768 <p class="last">The execute command output is not parsed for errors.</p>
2769 </div>
2770 </div>
2771 <div class="section">
2772 <h4><a class="toc-backref" href="#id138" id="stopping-running-processes" name="stopping-running-processes">Stopping running processes</a></h4>
2773 <p>When there is a running program, the Execute menu item in the menu and
2774 the Run button in the toolbar
2775 each become a stop button so you can stop the current running program (and
2776 any child processes). This works by sending the SIGQUIT signal to the process.</p>
2777 <p>Depending on the process you started it is possible that the process
2778 cannot be stopped. For example this can happen when the process creates
2779 more than one child process.</p>
2780 <div class="section">
2781 <h5><a class="toc-backref" href="#id139" id="terminal-emulators" name="terminal-emulators">Terminal emulators</a></h5>
2782 <p>Xterm is known to work properly. If you are using &quot;Terminal&quot;
2783 (the terminal program of Xfce), you should add the command line
2784 option <tt class="docutils literal"><span class="pre">--disable-server</span></tt> otherwise the started process cannot be
2785 stopped. Just add this option in the preferences dialog on the Tools
2786 tab in the terminal field.</p>
2787 </div>
2788 </div>
2789 <div class="section">
2790 <h4><a class="toc-backref" href="#id140" id="set-build-commands" name="set-build-commands">Set Build Commands</a></h4>
2791 <p>By default the Compile and Build commands invoke the GCC compiler and
2792 linker with only the basic arguments needed by all programs. Using
2793 <em>Set Build Commands</em> you can add any include paths and compile
2794 flags for the compiler, any library names and paths for the linker,
2795 and any arguments you want to use when running Execute.</p>
2796 </div>
2797 </div>
2798 <div class="section">
2799 <h3><a class="toc-backref" href="#id141" id="build-menu-configuration" name="build-menu-configuration">Build Menu Configuration</a></h3>
2800 <p>The build menu has considerable flexibility and configurability, allowing
2801 both menu labels the commands they execute and the directory they execute
2802 in to be configured.</p>
2803 <p>For example, if you change one of the default make commands to run say 'waf'
2804 you can also change the label to match.</p>
2805 <p>These settings are saved automatically when Geany is shut down.</p>
2806 <p>The build menu is divided into four groups of items each with different
2807 behaviors:</p>
2808 <ul>
2809 <li><p class="first">File items - are configurable and depend on the filetype of the current
2810 document; they capture output in the compiler tab and parse it for
2811 errors.</p>
2812 </li>
2813 <li><p class="first">Non-file items - are configurable and mostly don't depend on the filetype
2814 of the current document; they also capture output in the compiler tab and
2815 parse it for errors.</p>
2816 </li>
2817 <li><p class="first">Execute items - are configurable and intended for executing your
2818 program or other long running programs. The output is not parsed for errors
2819 and is directed to the terminal selected in preferences.</p>
2820 </li>
2821 <li><dl class="first docutils">
2822 <dt>Fixed items - these perform built-in actions:</dt>
2823 <dd><ul class="first last simple">
2824 <li>Go to the next error.</li>
2825 <li>Go to the previous error.</li>
2826 <li>Show the build menu commands dialog.</li>
2827 </ul>
2828 </dd>
2829 </dl>
2830 </li>
2831 </ul>
2832 <p>The maximum numbers of items in each of the configurable groups can be
2833 configured when Geany starts using hidden settings (see <a class="reference" href="#preferences-file-format">Preferences File Format</a>).
2834 Even though the maximum number of items may have been increased, only
2835 those menu items that have values configured are shown in the menu.</p>
2836 <p>The groups of menu items obtain their configuration from four potential
2837 sources. The highest priority source that has the menu item defined will
2838 be used. The sources in decreasing priority are:</p>
2839 <ul class="simple">
2840 <li>A project file if open</li>
2841 <li>The user preferences</li>
2842 <li>The system filetype definitions</li>
2843 <li>The defaults</li>
2844 </ul>
2845 <p>The detailed relationships between sources and the configurable menu item groups
2846 is shown in the following table.</p>
2847 <table border="1" class="docutils">
2848 <colgroup>
2849 <col width="13%" />
2850 <col width="19%" />
2851 <col width="23%" />
2852 <col width="17%" />
2853 <col width="28%" />
2854 </colgroup>
2855 <thead valign="bottom">
2856 <tr><th class="head">Group</th>
2857 <th class="head">Project File</th>
2858 <th class="head">Preferences</th>
2859 <th class="head">System Filetype</th>
2860 <th class="head">Defaults</th>
2861 </tr>
2862 </thead>
2863 <tbody valign="top">
2864 <tr><td>Filetype</td>
2865 <td><p class="first">Loads From: project
2866 file</p>
2867 <p class="last">Saves To: project
2868 file</p>
2869 </td>
2870 <td><p class="first">Loads From:
2871 filetype.xxx file in
2872 ~/.config/geany/filedefs</p>
2873 <p class="last">Saves to: as above,
2874 creating if needed.</p>
2875 </td>
2876 <td><p class="first">Loads From:
2877 filetype.xxx in
2878 Geany install</p>
2879 <p class="last">Saves to: as user
2880 preferences left.</p>
2881 </td>
2882 <td>None</td>
2883 </tr>
2884 <tr><td>Non-Filetype</td>
2885 <td><p class="first">Loads From: project
2886 file</p>
2887 <p class="last">Saves To: project
2888 file</p>
2889 </td>
2890 <td><p class="first">Loads From:
2891 geany.conf file in
2892 ~/.config/geany</p>
2893 <p class="last">Saves to: as above,
2894 creating if needed.</p>
2895 </td>
2896 <td><p class="first">Loads From:
2897 filetype.xxx in
2898 Geany install</p>
2899 <p class="last">Saves to: as user
2900 preferences left.</p>
2901 </td>
2902 <td><dl class="first last docutils">
2903 <dt>1:</dt>
2904 <dd>Label: _Make
2905 Command: make</dd>
2906 <dt>2:</dt>
2907 <dd>Label: Make Custom _Target
2908 Command: make</dd>
2909 <dt>3:</dt>
2910 <dd>Label: Make _Object
2911 Command: make %e.o</dd>
2912 </dl>
2913 </td>
2914 </tr>
2915 <tr><td>Execute</td>
2916 <td><p class="first">Loads From: project
2917 file or else
2918 filetype defined in
2919 project file</p>
2920 <p class="last">Saves To:
2921 project file</p>
2922 </td>
2923 <td><p class="first">Loads From:
2924 geany.conf file in
2925 ~/.config/geany or else
2926 filetype.xxx file in
2927 ~/.config/geany/filedefs</p>
2928 <p class="last">Saves To:
2929 filetype.xxx file in
2930 ~/.config/geany/filedefs</p>
2931 </td>
2932 <td><p class="first">Loads From:
2933 filetype.xxx in
2934 Geany install</p>
2935 <p class="last">Saves To: as user
2936 preferences left</p>
2937 </td>
2938 <td>Label: _Execute Command: ./%e</td>
2939 </tr>
2940 </tbody>
2941 </table>
2942 <p>The following notes on the table reference cells by coordinate as (group,source):</p>
2943 <ul class="simple">
2944 <li>General - for filetype.xxx substitute the filetype name of the
2945 current document for xxx.</li>
2946 <li>System Filetypes - Labels loaded from these sources are locale sensitive
2947 and can contain translations.</li>
2948 <li>(Filetype, Project File) and (Filetype, Preferences) - preferences use a full
2949 filetype file so that users can configure all other filetype preferences
2950 as well. Projects can only configure menu items per filetype. Saving
2951 in the project file means that there is only one file per project not
2952 a whole directory.</li>
2953 <li>(Non-Filetype, System Filetype) - although conceptually strange, defining
2954 non-filetype commands in a filetype file, this provides the ability to
2955 define filetype dependent default menu items.</li>
2956 <li>(Execute, Project File) and (Execute, Preferences) - the project filetype based execute
2957 configuration and preferences non-filetype based execute can only be set by hand editing the
2958 appropriate file, see <a class="reference" href="#preferences-file-format">Preferences File Format</a> and <a class="reference" href="#project-file-format">Project File Format</a>.</li>
2959 </ul>
2960 </div>
2961 <div class="section">
2962 <h3><a class="toc-backref" href="#id142" id="build-menu-commands-dialog" name="build-menu-commands-dialog">Build Menu Commands Dialog</a></h3>
2963 <p>Most of the configuration of the build menu is done through the Build Menu
2964 Commands Dialog. You edit the configuration sourced from preferences in the
2965 dialog opened from the Build-&gt;Build Menu Commands item and you edit the
2966 configuration from the project in the build tab of the project preferences
2967 dialog. Both use the same form shown below.</p>
2968 <img alt="./images/build_menu_commands_dialog.png" src="./images/build_menu_commands_dialog.png" />
2969 <p>The dialog is divided into three sections:</p>
2970 <ul class="simple">
2971 <li>Filetype menu items which will be selected based on the filetype of the
2972 currently open document.</li>
2973 <li>Non-filetype menu items.</li>
2974 <li>Execute menu items.</li>
2975 </ul>
2976 <p>The filetype and non-filetype sections also each contain a field for the regular
2977 expression used for parsing command output for error and warning messages.</p>
2978 <p>The columns in the first three sections allow setting of the label, command,
2979 and working directory to run the command in.</p>
2980 <p>An item with an empty label will not be shown in the menu.</p>
2981 <p>An empty working directory will default to the directory of the current document.
2982 If there is no current document then the command will not run.</p>
2983 <p>The dialog will always show the command selected by priority, not just the
2984 commands configured in this configuration source. This ensures that you always
2985 see what the menu item is going to do if activated.</p>
2986 <p>If the current source of the menu item is higher priority than the
2987 configuration source you are editing then the command will be shown
2988 in the dialog but will be insensitive (greyed out). This can't happen
2989 with the project source but can with the preferences source dialog.</p>
2990 <p>The clear buttons remove the definition from the configuration source you are editing.
2991 When you do this the command from the next lower priority source will be shown.
2992 To hide lower priority menu items without having anything show in the menu
2993 configure with a nothing in the label but at least one character in the command.</p>
2994 <div class="section">
2995 <h4><a class="toc-backref" href="#id143" id="substitutions-in-commands-and-working-directories" name="substitutions-in-commands-and-working-directories">Substitutions in Commands and Working Directories</a></h4>
2996 <p>The first occurance of each of the following character sequences in each of the
2997 command and working directory fields is substituted by the items specified below
2998 before the command is run.</p>
2999 <ul class="simple">
3000 <li>%d - substituted by the absolute path to the directory of the current file.</li>
3001 <li>%e - substituted by the name of the current file without the extension or path.</li>
3002 <li>%f - substituted by the name of the current file without the path.</li>
3003 <li>%p - if a project is open, substituted by the base path from the project.</li>
3004 </ul>
3005 <div class="note">
3006 <p class="first admonition-title">Note</p>
3007 <p class="last">If the basepath set in the project preferences is not an absolute path , then it is
3008 taken as relative to the directory of the project file. This allows a project file
3009 stored in the source tree to specify all commands and working directories relative
3010 to the tree itself, so that the whole tree including the project file, can be moved
3011 and even checked into and out of version control without having to re-configure the
3012 build menu.</p>
3013 </div>
3014 </div>
3015 <div class="section">
3016 <h4><a class="toc-backref" href="#id144" id="build-menu-keyboard-shortcuts" name="build-menu-keyboard-shortcuts">Build Menu Keyboard Shortcuts</a></h4>
3017 <p>Keyboard shortcuts can be defined for the first two filetype menu items, the first three
3018 non-filetype menu items, the first two execute menu items and the fixed menu items.
3019 In the keybindings configuration dialog (see <a class="reference" href="#keybinding-preferences">Keybinding preferences</a>)
3020 these items are identified by the default labels shown in the <a class="reference" href="#build-menu">Build Menu</a> section above.</p>
3021 <p>It is currently not possible to bind keyboard shortcuts to more than these menu items.</p>
3022 <p>You can also use underlines in the labels to set mnemonic characters.</p>
3023 </div>
3024 <div class="section">
3025 <h4><a class="toc-backref" href="#id145" id="configuration-files" name="configuration-files">Configuration Files</a></h4>
3026 <p>The configurable Build Menu capability was introduced in Geany V0.19 and
3027 required a new section to be added to the configuration files (See
3028 <a class="reference" href="#preferences-file-format">Preferences File Format</a>). Geany will still load older format project,
3029 preferences and filetype file settings and will attempt to map them into the new
3030 configuration format. There is not a simple clean mapping between the formats.
3031 The mapping used produces the most sensible results for the majority of cases.
3032 However, if they do not map the way you want, you may have to manually
3033 configure some settings using the Build Commands
3034 Dialog or the Build tab of the project preferences dialog.</p>
3035 <p>Any setting configured in either of these dialogs will override settings mapped from
3036 older format configuration files.</p>
3037 </div>
3038 </div>
3039 </div>
3040 <div class="section">
3041 <h2><a class="toc-backref" href="#id146" id="printing-support" name="printing-support">Printing support</a></h2>
3042 <p>Since Geany 0.13 there has been printing support using GTK's printing API.
3043 The printed page(s) will look nearly the same as on your screen in Geany.
3044 Additionally, there are some options to modify the printed page(s).</p>
3045 <div class="note">
3046 <p class="first admonition-title">Note</p>
3047 <p class="last">The background text color is set to white, except for text with
3048 a white foreground. This allows dark color schemes to save ink
3049 when printing.</p>
3050 </div>
3051 <p>You can define whether to print line numbers, page numbers at the bottom of
3052 each page and whether to print a page header on each page. This header
3053 contains the filename of the printed document, the current page number and
3054 the date and time of printing. By default, the file name of the document
3055 with full path information is added to the header. If you prefer to add
3056 only the basename of the file(without any path information) you can set it
3057 in the preferences dialog. You can also adjust the format of the date and
3058 time added to the page header. The available conversion specifiers are the
3059 same as the ones which can be used with the ANSI C strftime function.</p>
3060 <p>All of these settings can also be changed in the print dialog just before
3061 actual printing is done.
3062 On Unix-like systems the provided print dialog offers a print preview. The
3063 preview file is opened with a PDF viewer and by default GTK uses <tt class="docutils literal"><span class="pre">evince</span></tt>
3064 for print preview. If you have not installed evince or just want to use
3065 another PDF viewer, you can change the program to use in the file
3066 <tt class="docutils literal"><span class="pre">.gtkrc-2.0</span></tt> (usually found in your home directory). Simply add a line
3067 like:</p>
3068 <pre class="literal-block">
3069 gtk-print-preview-command = &quot;epdfview %f&quot;
3070 </pre>
3071 <p>at the end of the file. Of course, you can also use xpdf, kpdf or whatever
3072 as the print preview command.</p>
3073 <p>Unfortunately, native GTK printing support is only available if Geany was
3074 built against GTK 2.10 (or above) <strong>and</strong> is running with GTK 2.10 (or above).
3075 If not, Geany provides basic printing support. This means you can print a
3076 file by passing the filename of the current file to a command which
3077 actually prints the file. However, the printed document contains no syntax
3078 highlighting. You can adjust the command to which the filename is
3079 passed in the preferences dialog. The default command is:</p>
3080 <pre class="literal-block">
3081 % lpr %f
3082 </pre>
3083 <p><tt class="docutils literal"><span class="pre">%f</span></tt> will be substituted by the filename of the current file. Geany
3084 will not show errors from the command itself, so you should make
3085 sure that it works before(e.g. by trying to execute it from the
3086 command line).</p>
3087 <p>A nicer example, which many prefer is:</p>
3088 <pre class="literal-block">
3089 % a2ps -1 --medium=A4 -o - %f | xfprint4
3090 </pre>
3091 <p>But this depends on a2ps and xfprint4. As a replacement for xfprint4,
3092 gtklp or similar programs can be used.</p>
3093 </div>
3094 <div class="section">
3095 <h2><a class="toc-backref" href="#id147" id="plugins" name="plugins">Plugins</a></h2>
3096 <p>Plugins are loaded at startup, if the <em>Enable plugin support</em>
3097 general preference is set. There is also a command-line option,
3098 <tt class="docutils literal"><span class="pre">-p</span></tt>, which prevents plugins being loaded. Plugins are scanned in
3099 the following directories:</p>
3100 <ul class="simple">
3101 <li><tt class="docutils literal"><span class="pre">$prefix/lib/geany</span></tt> (see <a class="reference" href="#installation-prefix">Installation prefix</a>)</li>
3102 <li><tt class="docutils literal"><span class="pre">~/.config/geany/plugins</span></tt></li>
3103 </ul>
3104 <p>Most plugins add menu items to the <em>Tools</em> menu when they are loaded.</p>
3105 <p>Since Geany 0.13, there is a Plugin Manager to let you choose which plugins
3106 should be loaded at startup. You can also load and unload plugins on the
3107 fly using this dialog. Once you click the checkbox for a specific plugin
3108 in the dialog, it is loaded or unloaded according to its previous state.
3109 By default, no plugins are loaded at startup until you select some.
3110 You can also configure some plugin specific options when the plugin
3111 provides some.</p>
3112 <p>See also <a class="reference" href="#plugin-documentation">Plugin documentation</a> for information about single plugins
3113 which are included in Geany.</p>
3114 </div>
3115 <div class="section">
3116 <h2><a class="toc-backref" href="#id148" id="keybindings" name="keybindings">Keybindings</a></h2>
3117 <p>Geany supports the default keyboard shortcuts for the Scintilla
3118 editing widget. For a list of these commands, see <a class="reference" href="#scintilla-keyboard-commands">Scintilla
3119 keyboard commands</a>. The Scintilla keyboard shortcuts will be overridden
3120 by any custom keybindings with the same keyboard shortcut.</p>
3121 <div class="section">
3122 <h3><a class="toc-backref" href="#id149" id="switching-documents" name="switching-documents">Switching documents</a></h3>
3123 <p>There are a few non-configurable bindings to switch between documents,
3124 listed below. These can also be overridden by custom keybindings.</p>
3125 <table border="1" class="docutils">
3126 <colgroup>
3127 <col width="31%" />
3128 <col width="69%" />
3129 </colgroup>
3130 <thead valign="bottom">
3131 <tr><th class="head">Key</th>
3132 <th class="head">Action</th>
3133 </tr>
3134 </thead>
3135 <tbody valign="top">
3136 <tr><td>Alt-[1-9]</td>
3137 <td>Select left-most tab, from 1 to 9.</td>
3138 </tr>
3139 <tr><td>Alt-0</td>
3140 <td>Select right-most tab.</td>
3141 </tr>
3142 <tr><td>Ctrl-Shift-PgUp</td>
3143 <td>Select left-most tab.</td>
3144 </tr>
3145 <tr><td>Ctrl-Shift-PgDn</td>
3146 <td>Select right-most tab.</td>
3147 </tr>
3148 </tbody>
3149 </table>
3150 </div>
3151 <div class="section">
3152 <h3><a class="toc-backref" href="#id150" id="configurable-keybindings" name="configurable-keybindings">Configurable keybindings</a></h3>
3153 <p>For all actions listed below you can define your own keybindings. Open
3154 the Preferences dialog, select the desired action and click on
3155 change. In the resulting dialog you can press the key combination you
3156 want to assign to the action and it will be saved when you press OK.
3157 You can define only one key combination for each action and each key
3158 combination can only be defined for one action.</p>
3159 <p>Some of the default key combinations are common across many
3160 applications, for example <em>Ctrl-N</em> for New and <em>Ctrl-O</em> for Open.
3161 Because they are so common it is not advisable to change these, but
3162 you can add other key combinations for these actions. For example
3163 <em>Ctrl-O</em> is set to execute menu_open by default, but you can also
3164 define <em>Alt-O</em>, so that the file open dialog is shown by pressing
3165 either <em>Ctrl-O</em> or <em>Alt-O</em>.</p>
3166 <p>The following tables list all customizable keyboard shortcuts, those
3167 which are common to many applications are marked with (C) after the
3168 shortcut.</p>
3169 <div class="section">
3170 <h4><a class="toc-backref" href="#id151" id="file-keybindings" name="file-keybindings">File keybindings</a></h4>
3171 <table border="1" class="docutils">
3172 <colgroup>
3173 <col width="29%" />
3174 <col width="24%" />
3175 <col width="47%" />
3176 </colgroup>
3177 <thead valign="bottom">
3178 <tr><th class="head">Action</th>
3179 <th class="head">Default shortcut</th>
3180 <th class="head">Description</th>
3181 </tr>
3182 </thead>
3183 <tbody valign="top">
3184 <tr><td>New</td>
3185 <td>Ctrl-N (C)</td>
3186 <td>Creates a new file.</td>
3187 </tr>
3188 <tr><td>Open</td>
3189 <td>Ctrl-O (C)</td>
3190 <td>Opens a file.</td>
3191 </tr>
3192 <tr><td>Open selected file</td>
3193 <td>Ctrl-Shift-O</td>
3194 <td>Opens the selected filename.</td>
3195 </tr>
3196 <tr><td>Re-open last closed tab</td>
3197 <td>&nbsp;</td>
3198 <td>Re-opens the last closed document tab.</td>
3199 </tr>
3200 <tr><td>Save</td>
3201 <td>Ctrl-S (C)</td>
3202 <td>Saves the current file.</td>
3203 </tr>
3204 <tr><td>Save As</td>
3205 <td>&nbsp;</td>
3206 <td>Saves the current file under a new name.</td>
3207 </tr>
3208 <tr><td>Save all</td>
3209 <td>Ctrl-Shift-S</td>
3210 <td>Saves all open files.</td>
3211 </tr>
3212 <tr><td>Close all</td>
3213 <td>Ctrl-Shift-W</td>
3214 <td>Closes all open files.</td>
3215 </tr>
3216 <tr><td>Close</td>
3217 <td>Ctrl-W (C)</td>
3218 <td>Closes the current file.</td>
3219 </tr>
3220 <tr><td>Reload file</td>
3221 <td>Ctrl-R (C)</td>
3222 <td>Reloads the current file. All unsaved changes
3223 will be lost.</td>
3224 </tr>
3225 <tr><td>Print</td>
3226 <td>Ctrl-P (C)</td>
3227 <td>Prints the current file.</td>
3228 </tr>
3229 </tbody>
3230 </table>
3231 </div>
3232 <div class="section">
3233 <h4><a class="toc-backref" href="#id152" id="editor-keybindings" name="editor-keybindings">Editor keybindings</a></h4>
3234 <table border="1" class="docutils">
3235 <colgroup>
3236 <col width="29%" />
3237 <col width="24%" />
3238 <col width="47%" />
3239 </colgroup>
3240 <thead valign="bottom">
3241 <tr><th class="head">Action</th>
3242 <th class="head">Default shortcut</th>
3243 <th class="head">Description</th>
3244 </tr>
3245 </thead>
3246 <tbody valign="top">
3247 <tr><td>Undo</td>
3248 <td>Ctrl-Z (C)</td>
3249 <td>Un-does the last action.</td>
3250 </tr>
3251 <tr><td>Redo</td>
3252 <td>Ctrl-Y</td>
3253 <td>Re-does the last action.</td>
3254 </tr>
3255 <tr><td>Delete current line(s)</td>
3256 <td>Ctrl-K</td>
3257 <td>Deletes the current line (and any lines with a
3258 selection).</td>
3259 </tr>
3260 <tr><td>Delete to line end</td>
3261 <td>Ctrl-Shift-Delete</td>
3262 <td>Deletes from the current caret position to the
3263 end of the current line.</td>
3264 </tr>
3265 <tr><td>Duplicate line or selection</td>
3266 <td>Ctrl-D</td>
3267 <td>Duplicates the current line or selection.</td>
3268 </tr>
3269 <tr><td>Transpose current line</td>
3270 <td>Ctrl-T</td>
3271 <td>Transposes the current line with the previous one.</td>
3272 </tr>
3273 <tr><td>Scroll to current line</td>
3274 <td>Ctrl-Shift-L</td>
3275 <td>Scrolls the current line into the centre of the
3276 view. The cursor position and or an existing
3277 selection will not be changed.</td>
3278 </tr>
3279 <tr><td>Scroll up by one line</td>
3280 <td>Alt-Up</td>
3281 <td>Scrolls the view.</td>
3282 </tr>
3283 <tr><td>Scroll down by one line</td>
3284 <td>Alt-Down</td>
3285 <td>Scrolls the view.</td>
3286 </tr>
3287 <tr><td>Complete word</td>
3288 <td>Ctrl-Space</td>
3289 <td>Shows the autocompletion list. If already showing
3290 tag completion, it shows document word completion
3291 instead, even if it is not enabled for automatic
3292 completion. Likewise if no tag suggestions are
3293 available, it shows document word completion.</td>
3294 </tr>
3295 <tr><td>Show calltip</td>
3296 <td>Ctrl-Shift-Space</td>
3297 <td>Shows a calltip for the current function or
3298 method.</td>
3299 </tr>
3300 <tr><td>Show macro list</td>
3301 <td>Ctrl-Return</td>
3302 <td>Shows a list of available macros and variables in
3303 the workspace.</td>
3304 </tr>
3305 <tr><td>Complete snippet</td>
3306 <td>Tab</td>
3307 <td>If you type a construct like if or for and press
3308 this key, it will be completed with a matching
3309 template.</td>
3310 </tr>
3311 <tr><td>Suppress snippet completion</td>
3312 <td>&nbsp;</td>
3313 <td>If you type a construct like if or for and press
3314 this key, it will not be completed, and a space or
3315 tab will be inserted, depending on what the
3316 construct completion keybinding is set to. For
3317 example, if you have set the construct completion
3318 keybinding to space, then setting this to
3319 Shift+space will prevent construct completion and
3320 insert a space.</td>
3321 </tr>
3322 <tr><td>Context Action</td>
3323 <td>&nbsp;</td>
3324 <td>Executes a command and passes the current word
3325 (near the cursor position) or selection as an
3326 argument. See the section called <a class="reference" href="#context-actions">Context
3327 actions</a>.</td>
3328 </tr>
3329 <tr><td>Move cursor in snippet</td>
3330 <td>&nbsp;</td>
3331 <td>Jumps to the next defined cursor positions in a
3332 completed snippets if multiple cursor positions
3333 where defined.</td>
3334 </tr>
3335 <tr><td>Word part completion</td>
3336 <td>Tab</td>
3337 <td>When the autocompletion list is visible, complete
3338 the currently selected item up to the next word
3339 part.</td>
3340 </tr>
3341 <tr><td>Move line(s) up</td>
3342 <td>&nbsp;</td>
3343 <td>Move the current line or selected lines up by
3344 one line.</td>
3345 </tr>
3346 <tr><td>Move line(s) down</td>
3347 <td>&nbsp;</td>
3348 <td>Move the current line or selected lines down by
3349 one line.</td>
3350 </tr>
3351 </tbody>
3352 </table>
3353 </div>
3354 <div class="section">
3355 <h4><a class="toc-backref" href="#id153" id="clipboard-keybindings" name="clipboard-keybindings">Clipboard keybindings</a></h4>
3356 <table border="1" class="docutils">
3357 <colgroup>
3358 <col width="29%" />
3359 <col width="23%" />
3360 <col width="48%" />
3361 </colgroup>
3362 <thead valign="bottom">
3363 <tr><th class="head">Action</th>
3364 <th class="head">Default shortcut</th>
3365 <th class="head">Description</th>
3366 </tr>
3367 </thead>
3368 <tbody valign="top">
3369 <tr><td>Cut</td>
3370 <td>Ctrl-X (C)</td>
3371 <td>Cut the current selection to the clipboard.</td>
3372 </tr>
3373 <tr><td>Copy</td>
3374 <td>Ctrl-C (C)</td>
3375 <td>Copy the current selection to the clipboard.</td>
3376 </tr>
3377 <tr><td>Paste</td>
3378 <td>Ctrl-V (C)</td>
3379 <td>Paste the clipboard text into the current document.</td>
3380 </tr>
3381 <tr><td>Cut current line(s)</td>
3382 <td>Ctrl-Shift-X</td>
3383 <td>Cuts the current line (and any lines with a
3384 selection) to the clipboard.</td>
3385 </tr>
3386 <tr><td>Copy current line(s)</td>
3387 <td>Ctrl-Shift-C</td>
3388 <td>Copies the current line (and any lines with a
3389 selection) to the clipboard.</td>
3390 </tr>
3391 </tbody>
3392 </table>
3393 </div>
3394 <div class="section">
3395 <h4><a class="toc-backref" href="#id154" id="select-keybindings" name="select-keybindings">Select keybindings</a></h4>
3396 <table border="1" class="docutils">
3397 <colgroup>
3398 <col width="29%" />
3399 <col width="24%" />
3400 <col width="47%" />
3401 </colgroup>
3402 <thead valign="bottom">
3403 <tr><th class="head">Action</th>
3404 <th class="head">Default shortcut</th>
3405 <th class="head">Description</th>
3406 </tr>
3407 </thead>
3408 <tbody valign="top">
3409 <tr><td>Select all</td>
3410 <td>Ctrl-A (C)</td>
3411 <td>Makes a selection of all text in the current
3412 document.</td>
3413 </tr>
3414 <tr><td>Select current word</td>
3415 <td>Alt-Shift-W</td>
3416 <td>Selects the current word under the cursor.</td>
3417 </tr>
3418 <tr><td>Select current paragraph</td>
3419 <td>Alt-Shift-P</td>
3420 <td>Selects the current paragraph under the cursor
3421 which is defined by two empty lines around it.</td>
3422 </tr>
3423 <tr><td>Select current line(s)</td>
3424 <td>Alt-Shift-L</td>
3425 <td>Selects the current line under the cursor (and any
3426 partially selected lines).</td>
3427 </tr>
3428 <tr><td>Select to previous word part</td>
3429 <td>&nbsp;</td>
3430 <td>(Extend) selection to previous word part boundary.</td>
3431 </tr>
3432 <tr><td>Select to next word part</td>
3433 <td>&nbsp;</td>
3434 <td>(Extend) selection to next word part boundary.</td>
3435 </tr>
3436 </tbody>
3437 </table>
3438 </div>
3439 <div class="section">
3440 <h4><a class="toc-backref" href="#id155" id="insert-keybindings" name="insert-keybindings">Insert keybindings</a></h4>
3441 <table border="1" class="docutils">
3442 <colgroup>
3443 <col width="29%" />
3444 <col width="24%" />
3445 <col width="47%" />
3446 </colgroup>
3447 <thead valign="bottom">
3448 <tr><th class="head">Action</th>
3449 <th class="head">Default shortcut</th>
3450 <th class="head">Description</th>
3451 </tr>
3452 </thead>
3453 <tbody valign="top">
3454 <tr><td>Insert date</td>
3455 <td>Shift-Alt-D</td>
3456 <td>Inserts a customisable date.</td>
3457 </tr>
3458 <tr><td>Insert alternative whitespace</td>
3459 <td>&nbsp;</td>
3460 <td>Inserts a tab character when spaces should
3461 be used for indentation and inserts space
3462 characters of the amount of a tab width when
3463 tabs should be used for indentation.</td>
3464 </tr>
3465 </tbody>
3466 </table>
3467 </div>
3468 <div class="section">
3469 <h4><a class="toc-backref" href="#id156" id="format-keybindings" name="format-keybindings">Format keybindings</a></h4>
3470 <table border="1" class="docutils">
3471 <colgroup>
3472 <col width="29%" />
3473 <col width="24%" />
3474 <col width="47%" />
3475 </colgroup>
3476 <thead valign="bottom">
3477 <tr><th class="head">Action</th>
3478 <th class="head">Default shortcut</th>
3479 <th class="head">Description</th>
3480 </tr>
3481 </thead>
3482 <tbody valign="top">
3483 <tr><td>Toggle case of selection</td>
3484 <td>Ctrl-Alt-U</td>
3485 <td>Changes the case of the selection. A lowercase
3486 selection will be changed into uppercase and vice
3487 versa. If the selection contains lower- and
3488 uppercase characters, all will be converted to
3489 lowercase.</td>
3490 </tr>
3491 <tr><td>Comment line</td>
3492 <td>&nbsp;</td>
3493 <td>Comments current line or selection.</td>
3494 </tr>
3495 <tr><td>Uncomment line</td>
3496 <td>&nbsp;</td>
3497 <td>Uncomments current line or selection.</td>
3498 </tr>
3499 <tr><td>Toggle line commentation</td>
3500 <td>Ctrl-E</td>
3501 <td>Comments a line if it is not commented or removes
3502 a comment if the line is commented.</td>
3503 </tr>
3504 <tr><td>Increase indent</td>
3505 <td>Ctrl-I</td>
3506 <td>Indents the current line or selection by one tab
3507 or by spaces in the amount of the tab width
3508 setting.</td>
3509 </tr>
3510 <tr><td>Decrease indent</td>
3511 <td>Ctrl-U</td>
3512 <td>Removes one tab or the amount of spaces of
3513 the tab width setting from the indentation of the
3514 current line or selection.</td>
3515 </tr>
3516 <tr><td>Increase indent by one space</td>
3517 <td>&nbsp;</td>
3518 <td>Indents the current line or selection by one
3519 space.</td>
3520 </tr>
3521 <tr><td>Decrease indent by one space</td>
3522 <td>&nbsp;</td>
3523 <td>Deindents the current line or selection by one
3524 space.</td>
3525 </tr>
3526 <tr><td>Smart line indent</td>
3527 <td>&nbsp;</td>
3528 <td>Indents the current line or all selected lines
3529 with the same indentation as the previous line.</td>
3530 </tr>
3531 <tr><td>Send to Custom Command 1 (2,3)</td>
3532 <td>Ctrl-1 (2,3)</td>
3533 <td>Passes the current selection to a configured
3534 external command (available for the first
3535 three configured commands, see
3536 <a class="reference" href="#sending-text-through-custom-commands">Sending text through custom commands</a> for
3537 details).</td>
3538 </tr>
3539 <tr><td>Send Selection to Terminal</td>
3540 <td>&nbsp;</td>
3541 <td>Sends the current selection or the current
3542 line (if there is no selection) to the
3543 embedded Terminal (VTE).</td>
3544 </tr>
3545 <tr><td>Reflow lines/block</td>
3546 <td>&nbsp;</td>
3547 <td>Reformat selected lines or current
3548 (indented) text block,
3549 breaking lines at the long line marker or the
3550 line breaking column if line breaking is
3551 enabled for the current document.</td>
3552 </tr>
3553 </tbody>
3554 </table>
3555 </div>
3556 <div class="section">
3557 <h4><a class="toc-backref" href="#id157" id="settings-keybindings" name="settings-keybindings">Settings keybindings</a></h4>
3558 <table border="1" class="docutils">
3559 <colgroup>
3560 <col width="29%" />
3561 <col width="24%" />
3562 <col width="47%" />
3563 </colgroup>
3564 <thead valign="bottom">
3565 <tr><th class="head">Action</th>
3566 <th class="head">Default shortcut</th>
3567 <th class="head">Description</th>
3568 </tr>
3569 </thead>
3570 <tbody valign="top">
3571 <tr><td>Preferences</td>
3572 <td>Ctrl-Alt-P</td>
3573 <td>Opens preferences dialog.</td>
3574 </tr>
3575 <tr><td>Plugin Preferences</td>
3576 <td>&nbsp;</td>
3577 <td>Opens plugin preferences dialog.</td>
3578 </tr>
3579 </tbody>
3580 </table>
3581 </div>
3582 <div class="section">
3583 <h4><a class="toc-backref" href="#id158" id="search-keybindings" name="search-keybindings">Search keybindings</a></h4>
3584 <table border="1" class="docutils">
3585 <colgroup>
3586 <col width="29%" />
3587 <col width="24%" />
3588 <col width="47%" />
3589 </colgroup>
3590 <thead valign="bottom">
3591 <tr><th class="head">Action</th>
3592 <th class="head">Default shortcut</th>
3593 <th class="head">Description</th>
3594 </tr>
3595 </thead>
3596 <tbody valign="top">
3597 <tr><td>Find</td>
3598 <td>Ctrl-F (C)</td>
3599 <td>Opens the Find dialog.</td>
3600 </tr>
3601 <tr><td>Find Next</td>
3602 <td>Ctrl-G</td>
3603 <td>Finds next result.</td>
3604 </tr>
3605 <tr><td>Find Previous</td>
3606 <td>Ctrl-Shift-G</td>
3607 <td>Finds previous result.</td>
3608 </tr>
3609 <tr><td>Replace</td>
3610 <td>Ctrl-H (C)</td>
3611 <td>Opens the Replace dialog.</td>
3612 </tr>
3613 <tr><td>Find in files</td>
3614 <td>Ctrl-Shift-F</td>
3615 <td>Opens the Find in files dialog.</td>
3616 </tr>
3617 <tr><td>Next message</td>
3618 <td>&nbsp;</td>
3619 <td>Jumps to the line with the next message in
3620 the Messages window.</td>
3621 </tr>
3622 <tr><td>Previous message</td>
3623 <td>&nbsp;</td>
3624 <td>Jumps to the line with the previous message
3625 in the Messages window.</td>
3626 </tr>
3627 <tr><td>Find Usage</td>
3628 <td>&nbsp;</td>
3629 <td>Finds all occurrences of the current word (near
3630 the keyboard cursor) or selection in all open
3631 documents and displays them in the messages
3632 window.</td>
3633 </tr>
3634 <tr><td>Find Document Usage</td>
3635 <td>&nbsp;</td>
3636 <td>Finds all occurrences of the current word (near
3637 the keyboard cursor) or selection in the current
3638 document and displays them in the messages
3639 window.</td>
3640 </tr>
3641 <tr><td>Mark All</td>
3642 <td>Ctrl-Shift-M</td>
3643 <td>Highlight all matches of the current
3644 word/selection in the current document
3645 with a colored box. If there's nothing to
3646 find, highlighted matches will be cleared.</td>
3647 </tr>
3648 </tbody>
3649 </table>
3650 </div>
3651 <div class="section">
3652 <h4><a class="toc-backref" href="#id159" id="go-to-keybindings" name="go-to-keybindings">Go to keybindings</a></h4>
3653 <table border="1" class="docutils">
3654 <colgroup>
3655 <col width="29%" />
3656 <col width="24%" />
3657 <col width="47%" />
3658 </colgroup>
3659 <thead valign="bottom">
3660 <tr><th class="head">Action</th>
3661 <th class="head">Default shortcut</th>
3662 <th class="head">Description</th>
3663 </tr>
3664 </thead>
3665 <tbody valign="top">
3666 <tr><td>Navigate forward a location</td>
3667 <td>&nbsp;</td>
3668 <td>Switches to the next location in the navigation
3669 history. See the section called <a class="reference" href="#code-navigation-history">Code Navigation
3670 History</a>.</td>
3671 </tr>
3672 <tr><td>Navigate back a location</td>
3673 <td>&nbsp;</td>
3674 <td>Switches to the previous location in the
3675 navigation history. See the section called
3676 <a class="reference" href="#code-navigation-history">Code navigation history</a>.</td>
3677 </tr>
3678 <tr><td>Go to line</td>
3679 <td>Ctrl-L</td>
3680 <td>Focuses the Go to Line entry (if visible) or
3681 shows the Go to line dialog.</td>
3682 </tr>
3683 <tr><td>Goto matching brace</td>
3684 <td>Ctrl-B</td>
3685 <td>If the cursor is ahead or behind a brace, then it
3686 is moved to the brace which belongs to the current
3687 one. If this keyboard shortcut is pressed again,
3688 the cursor is moved back to the first brace.</td>
3689 </tr>
3690 <tr><td>Toggle marker</td>
3691 <td>Ctrl-M</td>
3692 <td>Set a marker on the current line, or clear the
3693 marker if there already is one.</td>
3694 </tr>
3695 <tr><td>Goto next marker</td>
3696 <td>Ctrl-.</td>
3697 <td>Goto the next marker in the current document.</td>
3698 </tr>
3699 <tr><td>Goto previous marker</td>
3700 <td>Ctrl-,</td>
3701 <td>Goto the previous marker in the current document.</td>
3702 </tr>
3703 <tr><td>Go to tag definition</td>
3704 <td>&nbsp;</td>
3705 <td>Jump to the definition of the current word (near
3706 the keyboard cursor). If the definition cannot be
3707 found (e.g. the relevant file is not open) Geany
3708 will beep and do nothing. See the section called
3709 <a class="reference" href="#go-to-tag-definition">Go to tag definition</a>.</td>
3710 </tr>
3711 <tr><td>Go to tag declaration</td>
3712 <td>&nbsp;</td>
3713 <td>Jump to the declaration of the current word (near
3714 the keyboard cursor). If the declaration cannot be
3715 found (e.g. the relevant file is not open) Geany
3716 will beep and do nothing. See the section called
3717 <a class="reference" href="#go-to-tag-declaration">Go to tag declaration</a>.</td>
3718 </tr>
3719 <tr><td>Go to Start of Line</td>
3720 <td>Home</td>
3721 <td>Move the caret to the end of the line indentation
3722 unless it is already there, in which case it moves
3723 it to the start of the line.</td>
3724 </tr>
3725 <tr><td>Go to End of Line</td>
3726 <td>End</td>
3727 <td>Move the caret to the end of the line.</td>
3728 </tr>
3729 <tr><td>Go to End of Display Line</td>
3730 <td>Alt-End</td>
3731 <td>Move the caret to the end of the display line.
3732 This is useful when you use line wrapping and
3733 want to jump to the end of the wrapped, virtual
3734 line, not the real end of the whole line.
3735 If the line is not wrapped, it behaves like
3736 <cite>Go to End of Line</cite>, see above.</td>
3737 </tr>
3738 <tr><td>Go to Previous Word Part</td>
3739 <td>Ctrl-/</td>
3740 <td>Goto the previous part of the current word.</td>
3741 </tr>
3742 <tr><td>Go to Next Word Part</td>
3743 <td>Ctrl-</td>
3744 <td>Goto the next part of the current word.</td>
3745 </tr>
3746 </tbody>
3747 </table>
3748 </div>
3749 <div class="section">
3750 <h4><a class="toc-backref" href="#id160" id="view-keybindings" name="view-keybindings">View keybindings</a></h4>
3751 <table border="1" class="docutils">
3752 <colgroup>
3753 <col width="29%" />
3754 <col width="24%" />
3755 <col width="47%" />
3756 </colgroup>
3757 <thead valign="bottom">
3758 <tr><th class="head">Action</th>
3759 <th class="head">Default shortcut</th>
3760 <th class="head">Description</th>
3761 </tr>
3762 </thead>
3763 <tbody valign="top">
3764 <tr><td>Fullscreen</td>
3765 <td>F11 (C)</td>
3766 <td>Switches to fullscreen mode.</td>
3767 </tr>
3768 <tr><td>Toggle Messages Window</td>
3769 <td>&nbsp;</td>
3770 <td>Toggles the message window (status and compiler
3771 messages) on and off.</td>
3772 </tr>
3773 <tr><td>Toggle Sidebar</td>
3774 <td>&nbsp;</td>
3775 <td>Shows or hides the sidebar.</td>
3776 </tr>
3777 <tr><td>Toggle all additional widgets</td>
3778 <td>&nbsp;</td>
3779 <td>Hide and show all additional widgets like the
3780 notebook tabs, the toolbar, the messages window
3781 and the status bar.</td>
3782 </tr>
3783 <tr><td>Zoom In</td>
3784 <td>Ctrl-+ (C)</td>
3785 <td>Zooms in the text.</td>
3786 </tr>
3787 <tr><td>Zoom Out</td>
3788 <td>Ctrl-- (C)</td>
3789 <td>Zooms out the text.</td>
3790 </tr>
3791 <tr><td>Zoom Reset</td>
3792 <td>Ctrl-0</td>
3793 <td>Reset any previous zoom on the text.</td>
3794 </tr>
3795 </tbody>
3796 </table>
3797 </div>
3798 <div class="section">
3799 <h4><a class="toc-backref" href="#id161" id="focus-keybindings" name="focus-keybindings">Focus keybindings</a></h4>
3800 <table border="1" class="docutils">
3801 <colgroup>
3802 <col width="30%" />
3803 <col width="23%" />
3804 <col width="47%" />
3805 </colgroup>
3806 <thead valign="bottom">
3807 <tr><th class="head">Action</th>
3808 <th class="head">Default shortcut</th>
3809 <th class="head">Description</th>
3810 </tr>
3811 </thead>
3812 <tbody valign="top">
3813 <tr><td>Switch to Editor</td>
3814 <td>F2</td>
3815 <td>Switches to editor widget.
3816 Also reshows the document statistics line
3817 (after a short timeout).</td>
3818 </tr>
3819 <tr><td>Switch to Scribble</td>
3820 <td>F6</td>
3821 <td>Switches to scribble widget.</td>
3822 </tr>
3823 <tr><td>Switch to VTE</td>
3824 <td>F4</td>
3825 <td>Switches to VTE widget.</td>
3826 </tr>
3827 <tr><td>Switch to Search Bar</td>
3828 <td>F7</td>
3829 <td>Switches to the search bar in the toolbar (if
3830 visible).</td>
3831 </tr>
3832 <tr><td>Switch to Sidebar</td>
3833 <td>&nbsp;</td>
3834 <td>Focus the Sidebar.</td>
3835 </tr>
3836 <tr><td>Switch to Compiler</td>
3837 <td>&nbsp;</td>
3838 <td>Focus the Compiler message window tab.</td>
3839 </tr>
3840 <tr><td>Switch to Messages</td>
3841 <td>&nbsp;</td>
3842 <td>Focus the Messages message window tab.</td>
3843 </tr>
3844 <tr><td>Switch to Message Window</td>
3845 <td>&nbsp;</td>
3846 <td>Focus the Message Window's current tab.</td>
3847 </tr>
3848 <tr><td>Switch to Sidebar Document List</td>
3849 <td>&nbsp;</td>
3850 <td>Focus the Document list tab in the Sidebar
3851 (if visible).</td>
3852 </tr>
3853 <tr><td>Switch to Sidebar Symbol List</td>
3854 <td>&nbsp;</td>
3855 <td>Focus the Symbol list tab in the Sidebar
3856 (if visible).</td>
3857 </tr>
3858 </tbody>
3859 </table>
3860 </div>
3861 <div class="section">
3862 <h4><a class="toc-backref" href="#id162" id="notebook-tab-keybindings" name="notebook-tab-keybindings">Notebook tab keybindings</a></h4>
3863 <table border="1" class="docutils">
3864 <colgroup>
3865 <col width="28%" />
3866 <col width="23%" />
3867 <col width="49%" />
3868 </colgroup>
3869 <thead valign="bottom">
3870 <tr><th class="head">Action</th>
3871 <th class="head">Default shortcut</th>
3872 <th class="head">Description</th>
3873 </tr>
3874 </thead>
3875 <tbody valign="top">
3876 <tr><td>Switch to left document</td>
3877 <td>Ctrl-PageUp (C)</td>
3878 <td>Switches to the previous open document.</td>
3879 </tr>
3880 <tr><td>Switch to right document</td>
3881 <td>Ctrl-PageDown (C)</td>
3882 <td>Switches to the next open document.</td>
3883 </tr>
3884 <tr><td>Switch to last used document</td>
3885 <td>Ctrl-Tab</td>
3886 <td>Switches to the previously shown document (if it's
3887 still open).
3888 Holding Ctrl (or another modifier if the keybinding
3889 has been changed) will show a dialog, then repeated
3890 presses of the keybinding will switch to the 2nd-last
3891 used document, 3rd-last, etc. Also known as
3892 Most-Recently-Used documents switching.</td>
3893 </tr>
3894 <tr><td>Move document left</td>
3895 <td>Alt-PageUp</td>
3896 <td>Changes the current document with the left hand
3897 one.</td>
3898 </tr>
3899 <tr><td>Move document right</td>
3900 <td>Alt-PageDown</td>
3901 <td>Changes the current document with the right hand
3902 one.</td>
3903 </tr>
3904 <tr><td>Move document first</td>
3905 <td>&nbsp;</td>
3906 <td>Moves the current document to the first position.</td>
3907 </tr>
3908 <tr><td>Move document last</td>
3909 <td>&nbsp;</td>
3910 <td>Moves the current document to the last position.</td>
3911 </tr>
3912 </tbody>
3913 </table>
3914 </div>
3915 <div class="section">
3916 <h4><a class="toc-backref" href="#id163" id="document-keybindings" name="document-keybindings">Document keybindings</a></h4>
3917 <table border="1" class="docutils">
3918 <colgroup>
3919 <col width="29%" />
3920 <col width="23%" />
3921 <col width="48%" />
3922 </colgroup>
3923 <thead valign="bottom">
3924 <tr><th class="head">Action</th>
3925 <th class="head">Default shortcut</th>
3926 <th class="head">Description</th>
3927 </tr>
3928 </thead>
3929 <tbody valign="top">
3930 <tr><td>Replace tabs by space</td>
3931 <td>&nbsp;</td>
3932 <td>Replaces all tabs with the right amount of spaces.</td>
3933 </tr>
3934 <tr><td>Replace spaces by tabs</td>
3935 <td>&nbsp;</td>
3936 <td>Replaces all spaces with tab characters.</td>
3937 </tr>
3938 <tr><td>Toggle current fold</td>
3939 <td>&nbsp;</td>
3940 <td>Toggles the folding state of the current code block.</td>
3941 </tr>
3942 <tr><td>Fold all</td>
3943 <td>&nbsp;</td>
3944 <td>Folds all contractible code blocks.</td>
3945 </tr>
3946 <tr><td>Unfold all</td>
3947 <td>&nbsp;</td>
3948 <td>Unfolds all contracted code blocks.</td>
3949 </tr>
3950 <tr><td>Reload symbol list</td>
3951 <td>Ctrl-Shift-R</td>
3952 <td>Reloads the tag/symbol list.</td>
3953 </tr>
3954 <tr><td>Toggle Line wrapping</td>
3955 <td>&nbsp;</td>
3956 <td>Enables or disables wrapping of long lines.</td>
3957 </tr>
3958 <tr><td>Toggle Line breaking</td>
3959 <td>&nbsp;</td>
3960 <td>Enables or disables automatic breaking of long
3961 lines at a configurable column.</td>
3962 </tr>
3963 <tr><td>Remove Markers</td>
3964 <td>&nbsp;</td>
3965 <td>Remove any markers on lines or words which
3966 were set by using 'Mark All' in the
3967 search dialog or by manually marking lines.</td>
3968 </tr>
3969 <tr><td>Remove Error Indicators</td>
3970 <td>&nbsp;</td>
3971 <td>Remove any error indicators in the
3972 current document.</td>
3973 </tr>
3974 </tbody>
3975 </table>
3976 </div>
3977 <div class="section">
3978 <h4><a class="toc-backref" href="#id164" id="build-keybindings" name="build-keybindings">Build keybindings</a></h4>
3979 <table border="1" class="docutils">
3980 <colgroup>
3981 <col width="29%" />
3982 <col width="24%" />
3983 <col width="47%" />
3984 </colgroup>
3985 <thead valign="bottom">
3986 <tr><th class="head">Action</th>
3987 <th class="head">Default shortcut</th>
3988 <th class="head">Description</th>
3989 </tr>
3990 </thead>
3991 <tbody valign="top">
3992 <tr><td>Compile</td>
3993 <td>F8</td>
3994 <td>Compiles the current file.</td>
3995 </tr>
3996 <tr><td>Build</td>
3997 <td>F9</td>
3998 <td>Builds (compiles if necessary and links) the
3999 current file.</td>
4000 </tr>
4001 <tr><td>Make all</td>
4002 <td>Shift-F9</td>
4003 <td>Builds the current file with the Make tool.</td>
4004 </tr>
4005 <tr><td>Make custom target</td>
4006 <td>Ctrl-Shift-F9</td>
4007 <td>Builds the current file with the Make tool and a
4008 given target.</td>
4009 </tr>
4010 <tr><td>Make object</td>
4011 <td>&nbsp;</td>
4012 <td>Compiles the current file with the Make tool.</td>
4013 </tr>
4014 <tr><td>Next error</td>
4015 <td>&nbsp;</td>
4016 <td>Jumps to the line with the next error from the
4017 last build process.</td>
4018 </tr>
4019 <tr><td>Previous error</td>
4020 <td>&nbsp;</td>
4021 <td>Jumps to the line with the previous error from
4022 the last build process.</td>
4023 </tr>
4024 <tr><td>Run</td>
4025 <td>F5</td>
4026 <td>Executes the current file in a terminal emulation.</td>
4027 </tr>
4028 <tr><td>Set Build Commands</td>
4029 <td>&nbsp;</td>
4030 <td>Opens the build commands dialog.</td>
4031 </tr>
4032 </tbody>
4033 </table>
4034 </div>
4035 <div class="section">
4036 <h4><a class="toc-backref" href="#id165" id="tools-keybindings" name="tools-keybindings">Tools keybindings</a></h4>
4037 <table border="1" class="docutils">
4038 <colgroup>
4039 <col width="29%" />
4040 <col width="24%" />
4041 <col width="47%" />
4042 </colgroup>
4043 <thead valign="bottom">
4044 <tr><th class="head">Action</th>
4045 <th class="head">Default shortcut</th>
4046 <th class="head">Description</th>
4047 </tr>
4048 </thead>
4049 <tbody valign="top">
4050 <tr><td>Show Color Chooser</td>
4051 <td>&nbsp;</td>
4052 <td>Opens the Color Chooser dialog.</td>
4053 </tr>
4054 </tbody>
4055 </table>
4056 </div>
4057 <div class="section">
4058 <h4><a class="toc-backref" href="#id166" id="help-keybindings" name="help-keybindings">Help keybindings</a></h4>
4059 <table border="1" class="docutils">
4060 <colgroup>
4061 <col width="29%" />
4062 <col width="24%" />
4063 <col width="47%" />
4064 </colgroup>
4065 <thead valign="bottom">
4066 <tr><th class="head">Action</th>
4067 <th class="head">Default shortcut</th>
4068 <th class="head">Description</th>
4069 </tr>
4070 </thead>
4071 <tbody valign="top">
4072 <tr><td>Help</td>
4073 <td>F1 (C)</td>
4074 <td>Opens the manual.</td>
4075 </tr>
4076 </tbody>
4077 </table>
4078 </div>
4079 </div>
4080 </div>
4081 </div>
4082 <div class="section">
4083 <h1><a class="toc-backref" href="#id167" id="id4" name="id4">Configuration files</a></h1>
4084 <div class="warning">
4085 <p class="first admonition-title">Warning</p>
4086 <p class="last">You must use UTF-8 encoding <em>without BOM</em> for configuration files.</p>
4087 </div>
4088 <div class="section">
4089 <h2><a class="toc-backref" href="#id168" id="tools-menu-items" name="tools-menu-items">Tools menu items</a></h2>
4090 <p>There's a <em>Configuration files</em> submenu in the <em>Tools</em> menu that
4091 contains items for some of the available user configuration files.
4092 Clicking on one opens it in the editor for you to update. Geany will
4093 reload the file after you have saved it.</p>
4094 <div class="note">
4095 <p class="first admonition-title">Note</p>
4096 <p class="last">Other configuration files not shown here will need to be opened
4097 manually, and will not be automatically reloaded when saved.
4098 (see <em>Reload Configuration</em> below).</p>
4099 </div>
4100 <p>There's also a <em>Reload Configuration</em> item which can be used if you
4101 updated one of the other configuration files, or modified or added
4102 template files.</p>
4103 <p><em>Reload Configuration</em> is also necessary to update syntax highlighting colors.</p>
4104 <div class="note">
4105 <p class="first admonition-title">Note</p>
4106 <p class="last">Syntax highlighting colors aren't updated in open documents after
4107 saving filetypes.common as this can possibly take a significant
4108 amount of time.</p>
4109 </div>
4110 </div>
4111 <div class="section">
4112 <h2><a class="toc-backref" href="#id169" id="global-configuration-file" name="global-configuration-file">Global configuration file</a></h2>
4113 <p>There is a global configuration file for Geany which will be used for
4114 any settings not defined in the users local configuration file.
4115 Settings present in the local configuration file override those in the global
4116 file.</p>
4117 <p>The global configuration file is read from
4118 <tt class="docutils literal"><span class="pre">$prefix/share/geany/geany.conf</span></tt> (where <tt class="docutils literal"><span class="pre">$prefix</span></tt> is the path where
4119 Geany is installed, see <a class="reference" href="#installation-prefix">Installation prefix</a>) when starting Geany and
4120 an user configuration file does not exist. It can contain any settings
4121 which are found in the usual configuration file created by Geany but
4122 does not have to contain all settings.</p>
4123 <div class="note">
4124 <p class="first admonition-title">Note</p>
4125 <p class="last">This feature is mainly intended for package maintainers or system
4126 admins who want to set up Geany in a multi user environment and
4127 set some sane default values for this environment. Usually users won't
4128 need to do that.</p>
4129 </div>
4130 </div>
4131 <div class="section">
4132 <h2><a class="toc-backref" href="#id170" id="filetype-definition-files" name="filetype-definition-files">Filetype definition files</a></h2>
4133 <p>All color definitions and other filetype specific settings are
4134 stored in the filetype definition files. Those settings are colors
4135 for syntax highlighting, general settings like comment characters or
4136 word delimiter characters as well as compiler and linker settings.</p>
4137 <div class="section">
4138 <h3><a class="toc-backref" href="#id171" id="custom-filetypes" name="custom-filetypes">Custom filetypes</a></h3>
4139 <p>At startup Geany looks for <tt class="docutils literal"><span class="pre">filetypes.*.conf</span></tt> files in the system and
4140 user filetype paths, adding any filetypes found with the name matching
4141 the '<tt class="docutils literal"><span class="pre">*</span></tt>' wildcard.</p>
4142 <p>Custom filetypes are not as powerful as built-in filetypes, but the following
4143 have been implemented:</p>
4144 <ul>
4145 <li><p class="first">Recognizing and setting the filetype (after the user has manually edited
4146 <tt class="docutils literal"><span class="pre">filetype_extensions.conf</span></tt>).</p>
4147 </li>
4148 <li><dl class="first docutils">
4149 <dt>Filetype settings in the [settings] section (see <a class="reference" href="#format">Format</a>).</dt>
4150 <dd><ul class="first last simple">
4151 <li>Using existing tag parsing (<tt class="docutils literal"><span class="pre">tag_parser</span></tt> key).</li>
4152 <li>Using existing syntax highlighting (<tt class="docutils literal"><span class="pre">lexer_filetype</span></tt> key).</li>
4153 </ul>
4154 </dd>
4155 </dl>
4156 </li>
4157 <li><p class="first">Build commands.</p>
4158 </li>
4159 <li><p class="first">Loading global tags files (namespace will be shared with tag_parser
4160 type).</p>
4161 </li>
4162 </ul>
4163 </div>
4164 <div class="section">
4165 <h3><a class="toc-backref" href="#id172" id="system-files" name="system-files">System files</a></h3>
4166 <p>The system-wide configuration files can be found in
4167 <tt class="docutils literal"><span class="pre">$prefix/share/geany</span></tt> and are called <tt class="docutils literal"><span class="pre">filetypes.$ext</span></tt>,
4168 where <tt class="docutils literal"><span class="pre">$prefix</span></tt> is the path where Geany is installed (see
4169 <a class="reference" href="#installation-prefix">Installation prefix</a>) and $ext is the name of the filetype. For every
4170 filetype there is a corresponding definition file. There is one
4171 exception: <tt class="docutils literal"><span class="pre">filetypes.common</span></tt> -- this file is for general settings,
4172 which are not specific to a certain filetype.</p>
4173 <div class="warning">
4174 <p class="first admonition-title">Warning</p>
4175 <p class="last">It is not recommended that users edit the system-wide files,
4176 because they will be overridden when Geany is updated.</p>
4177 </div>
4178 </div>
4179 <div class="section">
4180 <h3><a class="toc-backref" href="#id173" id="user-files" name="user-files">User files</a></h3>
4181 <p>To change the settings, copy a file from <tt class="docutils literal"><span class="pre">$prefix/share/geany</span></tt> to
4182 the subdirectory filedefs in your configuration directory (usually
4183 <tt class="docutils literal"><span class="pre">~/.config/geany/</span></tt>).</p>
4184 <p>For example:</p>
4185 <pre class="literal-block">
4186 % cp /usr/local/share/geany/filetypes.c /home/username/.config/geany/filedefs/
4187 </pre>
4188 <p>Then you can edit the file and the changes are also
4189 available after an update of Geany because they reside in your
4190 configuration directory. Alternatively, you can create a file
4191 <tt class="docutils literal"><span class="pre">~/.config/geany/filedefs/filetypes.X</span></tt> and add only these settings you want
4192 to change. All missing settings will be read from the corresponding
4193 global definition file in <tt class="docutils literal"><span class="pre">$prefix/share/geany</span></tt>.</p>
4194 <p>As well as the sections listed below, each filetype file can contain
4195 a [build-menu] section as described in <a class="reference" href="#build-menu-section">[build-menu] Section</a>.</p>
4196 </div>
4197 <div class="section">
4198 <h3><a class="toc-backref" href="#id174" id="format" name="format">Format</a></h3>
4199 <div class="section">
4200 <h4><a class="toc-backref" href="#id175" id="styling-section" name="styling-section">[styling] Section</a></h4>
4201 <p>In this section the colors for syntax highlighting are defined. The
4202 manual format is:</p>
4203 <ul class="simple">
4204 <li><tt class="docutils literal"><span class="pre">key=foreground_color;background_color;bold_flag;italic_flag</span></tt></li>
4205 </ul>
4206 <p>Colors have to be specified as RGB hex values prefixed by
4207 0x. For example red is 0xff0000, blue is 0x0000ff. The values are
4208 case-insensitive, but it is a good idea to use small letters. Bold
4209 and italic are flags and should only be &quot;true&quot; or &quot;false&quot;. If their
4210 value is something other than &quot;true&quot; or &quot;false&quot;, &quot;false&quot; is assumed.</p>
4211 <p>You can omit fields to use the values from the style named <tt class="docutils literal"><span class="pre">&quot;default&quot;</span></tt>.</p>
4212 <p>E.g. <tt class="docutils literal"><span class="pre">key=0xff0000;;true</span></tt></p>
4213 <p>This makes the key style have red foreground text, default background
4214 color text and bold emphasis.</p>
4215 <div class="section">
4216 <h5><a class="toc-backref" href="#id176" id="using-a-named-style" name="using-a-named-style">Using a named style</a></h5>
4217 <p>The second format uses a <em>named style</em> name to reference a style
4218 defined in filetypes.common.</p>
4219 <ul class="simple">
4220 <li><tt class="docutils literal"><span class="pre">key=named_style</span></tt></li>
4221 <li><tt class="docutils literal"><span class="pre">key2=named_style2,bold,italic</span></tt></li>
4222 </ul>
4223 <p>The bold and italic parts are optional, and if present are used to
4224 toggle the bold or italic flags to the opposite of the named style's
4225 flags. In contrast to style definition booleans, they are a literal
4226 &quot;,bold,italic&quot; and commas are used instead of semi-colons.</p>
4227 <p>E.g. <tt class="docutils literal"><span class="pre">key=comment,italic</span></tt></p>
4228 <p>This makes the key style match the <tt class="docutils literal"><span class="pre">&quot;comment&quot;</span></tt> named style, but with
4229 italic emphasis.</p>
4230 <p>To define named styles, see the filetypes.common <a class="reference" href="#named-styles-section">[named_styles]
4231 Section</a>.</p>
4232 </div>
4233 </div>
4234 <div class="section">
4235 <h4><a class="toc-backref" href="#id177" id="keywords-section" name="keywords-section">[keywords] Section</a></h4>
4236 <p>This section contains keys for different keyword lists specific to
4237 the filetype. Some filetypes do not support keywords, so adding a
4238 new key will not work. You can only add or remove keywords to/from
4239 an existing list.</p>
4240 <div class="important">
4241 <p class="first admonition-title">Important</p>
4242 <p class="last">The keywords list must be in one line without line ending characters.</p>
4243 </div>
4244 </div>
4245 <div class="section">
4246 <h4><a class="toc-backref" href="#id178" id="lexer-properties-section" name="lexer-properties-section">[lexer_properties] Section</a></h4>
4247 <p>Here any special properties for the Scintilla lexer can be set in the
4248 format <tt class="docutils literal"><span class="pre">key.name.field=some.value</span></tt>.</p>
4249 </div>
4250 <div class="section">
4251 <h4><a class="toc-backref" href="#id179" id="settings-section" name="settings-section">[settings] Section</a></h4>
4252 <dl class="docutils">
4253 <dt>extension</dt>
4254 <dd><p class="first">This is the default file extension used when saving files, not
4255 including the period character (<tt class="docutils literal"><span class="pre">.</span></tt>). The extension used should
4256 match one of the patterns associated with that filetype (see
4257 <a class="reference" href="#filetype-extensions">Filetype extensions</a>).</p>
4258 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">extension=cxx</span></tt></p>
4259 </dd>
4260 <dt>wordchars</dt>
4261 <dd><p class="first">These characters define word boundaries when making selections
4262 and searching using word matching options.</p>
4263 <p class="last"><em>Example:</em> (look at system filetypes.* files)</p>
4264 </dd>
4265 <dt>comment_open</dt>
4266 <dd><p class="first">A character or string which is used to comment code. If you want to
4267 use multiline comments, also set comment_close, otherwise leave it
4268 empty.</p>
4269 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">comment_open=/*</span></tt></p>
4270 </dd>
4271 <dt>comment_close</dt>
4272 <dd><p class="first">If multiline comments are used, this is the character or string to
4273 close the comment.</p>
4274 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">comment_close=*/</span></tt></p>
4275 </dd>
4276 <dt>comment_use_indent</dt>
4277 <dd><p class="first">Set this to false if a comment character or string should start at
4278 column 0 of a line. If set to true it uses any indentation of the
4279 line.</p>
4280 <p>Note: Comment indentation</p>
4281 <p><tt class="docutils literal"><span class="pre">comment_use_indent=true</span></tt> would generate this if a line is
4282 commented (e.g. with Ctrl-D):</p>
4283 <pre class="literal-block">
4284 #command_example();
4285 </pre>
4286 <p><tt class="docutils literal"><span class="pre">comment_use_indent=false</span></tt> would generate this if a line is
4287 commented (e.g. with Ctrl-D):</p>
4288 <pre class="literal-block">
4289 # command_example();
4290 </pre>
4291 <p>Note: This setting only works for single line comments (like '//',
4292 '#' or ';').</p>
4293 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">comment_use_indent=true</span></tt></p>
4294 </dd>
4295 <dt>context_action_cmd</dt>
4296 <dd><p class="first">A command which can be executed on the current word or the current
4297 selection.</p>
4298 <p>Example usage: Open the API documentation for the
4299 current function call at the cursor position.</p>
4300 <p>The command can
4301 be set for every filetype or if not set, a global command will
4302 be used. The command itself can be specified without the full
4303 path, then it is searched in $PATH. But for security reasons,
4304 it is recommended to specify the full path to the command. The
4305 wildcard %s will be replaced by the current word at the cursor
4306 position or by the current selection.</p>
4307 <p>Hint: for PHP files the following could be quite useful:
4308 context_action_cmd=firefox &quot;<a class="reference" href="http://www.php.net/%s">http://www.php.net/%s</a>&quot;</p>
4309 <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>
4310 </dd>
4311 <dt>tag_parser</dt>
4312 <dd>The TagManager language name, e.g. &quot;C&quot;.</dd>
4313 <dt>lexer_filetype</dt>
4314 <dd>A filetype name to setup syntax highlighting from another filetype.
4315 This must not be recursive, i.e. it should be a filetype name that
4316 doesn't use the lexer_filetype key itself.</dd>
4317 </dl>
4318 </div>
4319 <div class="section">
4320 <h4><a class="toc-backref" href="#id180" id="build-settings-section" name="build-settings-section">[build_settings] Section</a></h4>
4321 <p>As of Geany v0.19 this section is supplemented by the <a class="reference" href="#build-menu-section">[build-menu] Section</a>.
4322 Values that are set in the [build-menu] section will override those in this section.</p>
4323 <dl class="docutils">
4324 <dt>error_regex</dt>
4325 <dd><p class="first">This is a GNU-style extended regular expression to parse a filename
4326 and line number from build output. If undefined, Geany will fall
4327 back to its default error message parsing.</p>
4328 <p>Only the first two matches will be read by Geany. Geany will look for
4329 a match that is purely digits, and use this for the line number. The
4330 remaining match will be used as the filename.</p>
4331 <p><em>Example:</em> <tt class="docutils literal"><span class="pre">error_regex=(.+):([0-9]+):[0-9]+</span></tt></p>
4332 <p class="last">This will parse a message such as:
4333 <tt class="docutils literal"><span class="pre">test.py:7:24:</span> <span class="pre">E202</span> <span class="pre">whitespace</span> <span class="pre">before</span> <span class="pre">']'</span></tt></p>
4334 </dd>
4335 </dl>
4336 <p><strong>Build commands</strong></p>
4337 <p>If any build menu item settings have been configured in the Build Menu Commands
4338 dialog or the Build tab of the project preferences dialog then these
4339 settings are stored in the [build-menu] section and override the settings in
4340 this section for that item.</p>
4341 <dl class="docutils">
4342 <dt>compiler</dt>
4343 <dd><p class="first">This item specifies the command to compile source code files. But
4344 it is also possible to use it with interpreted languages like Perl
4345 or Python. With these filetypes you can use this option as a kind of
4346 syntax parser, which sends output to the compiler message window.</p>
4347 <p>You should quote the filename to also support filenames with
4348 spaces. The following wildcards for filenames are available:</p>
4349 <ul class="simple">
4350 <li>%f -- complete filename without path</li>
4351 <li>%e -- filename without path and without extension</li>
4352 </ul>
4353 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">compiler=gcc</span> <span class="pre">-Wall</span> <span class="pre">-c</span> <span class="pre">&quot;%f&quot;</span></tt></p>
4354 </dd>
4355 <dt>linker</dt>
4356 <dd><p class="first">This item specifies the command to link the file. If the file is not
4357 already compiled, it will be compiled while linking. The -o option
4358 is automatically added by Geany. This item works well with GNU gcc,
4359 but may be problematic with other compilers (esp. with the linker).</p>
4360 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">linker=gcc</span> <span class="pre">-Wall</span> <span class="pre">&quot;%f&quot;</span></tt></p>
4361 </dd>
4362 <dt>run_cmd</dt>
4363 <dd><p class="first">Use this item to execute your file. It has to have been built
4364 already. Use the %e wildcard to have only the name of the executable
4365 (i.e. without extension) or use the %f wildcard if you need the
4366 complete filename, e.g. for shell scripts.</p>
4367 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">run_cmd=&quot;./%e&quot;</span></tt></p>
4368 </dd>
4369 </dl>
4370 </div>
4371 </div>
4372 <div class="section">
4373 <h3><a class="toc-backref" href="#id181" id="special-file-filetypes-common" name="special-file-filetypes-common">Special file filetypes.common</a></h3>
4374 <p>There is a special filetype definition file called
4375 filetypes.common. This file defines some general non-filetype-specific
4376 settings.</p>
4377 <p>See the <a class="reference" href="#format">Format</a> section for how to define styles.</p>
4378 <div class="section">
4379 <h4><a class="toc-backref" href="#id182" id="named-styles-section" name="named-styles-section">[named_styles] Section</a></h4>
4380 <p>Named styles declared here can be used in the [styling] section of any
4381 filetypes.* file.</p>
4382 <p>For example:</p>
4383 <p><em>In filetypes.common</em>:</p>
4384 <pre class="literal-block">
4385 [named_styles]
4386 foo=0xc00000;0xffffff;false;true
4387 bar=foo
4388 </pre>
4389 <p><em>In filetypes.c</em>:</p>
4390 <pre class="literal-block">
4391 [styling]
4392 comment=foo
4393 </pre>
4394 <p>This saves copying and pasting the whole style definition into several
4395 different files.</p>
4396 <div class="note">
4397 <p class="first admonition-title">Note</p>
4398 <p class="last">You can define aliases for named styles, as shown with the <tt class="docutils literal"><span class="pre">bar</span></tt>
4399 entry in the above example, but they must be declared after the
4400 original style.</p>
4401 </div>
4402 </div>
4403 <div class="section">
4404 <h4><a class="toc-backref" href="#id183" id="id5" name="id5">[styling] Section</a></h4>
4405 <dl class="docutils">
4406 <dt>default</dt>
4407 <dd><p class="first">This is the default style. It is used for styling files without a
4408 filetype set.</p>
4409 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">default=0x000000;0xffffff;false;false</span></tt></p>
4410 </dd>
4411 <dt>selection</dt>
4412 <dd><p class="first">The style for coloring selected text. The format is:</p>
4413 <ul class="simple">
4414 <li>Foreground color</li>
4415 <li>Background color</li>
4416 <li>Use foreground color</li>
4417 <li>Use background color</li>
4418 </ul>
4419 <p>The colors are only set if the 3rd or 4th argument is true. When
4420 the colors are not overridden, the default is a dark grey
4421 background with syntax highlighted foreground text.</p>
4422 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">selection=0xc0c0c0;0x00007F;true;true</span></tt></p>
4423 </dd>
4424 <dt>brace_good</dt>
4425 <dd><p class="first">The style for brace highlighting when a matching brace was found.</p>
4426 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">brace_good=0xff0000;0xFFFFFF;true;false</span></tt></p>
4427 </dd>
4428 <dt>brace_bad</dt>
4429 <dd><p class="first">The style for brace highlighting when no matching brace was found.</p>
4430 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">brace_bad=0x0000ff;0xFFFFFF;true;false</span></tt></p>
4431 </dd>
4432 <dt>caret</dt>
4433 <dd><p class="first">The style for coloring the caret(the blinking cursor). Only first
4434 and third argument is interpreted.
4435 Set the third argument to true to change the caret into a block caret.</p>
4436 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">caret=0x000000;0x0;false;false</span></tt></p>
4437 </dd>
4438 <dt>caret_width</dt>
4439 <dd><p class="first">The width for the caret(the blinking cursor). Only the first
4440 argument is interpreted. The width is specified in pixels with
4441 a maximum of three pixel. Use the width 0 to make the caret
4442 invisible.</p>
4443 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">caret=1;0;false;false</span></tt></p>
4444 </dd>
4445 <dt>current_line</dt>
4446 <dd><p class="first">The style for coloring the background of the current line. Only
4447 the second and third arguments are interpreted. The second argument
4448 is the background color. Use the third argument to enable or
4449 disable background highlighting for the current line (has to be
4450 true/false).</p>
4451 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">current_line=0x0;0xe5e5e5;true;false</span></tt></p>
4452 </dd>
4453 <dt>indent_guide</dt>
4454 <dd><p class="first">The style for coloring the indentation guides. Only the first and
4455 second arguments are interpreted.</p>
4456 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">indent_guide=0xc0c0c0;0xffffff;false;false</span></tt></p>
4457 </dd>
4458 <dt>white_space</dt>
4459 <dd><p class="first">The style for coloring the white space if it is shown. The first
4460 both arguments define the foreground and background colors, the
4461 third argument sets whether to use the defined foreground color
4462 or to use the color defined by each filetype for the white space.
4463 The fourth argument defines whether to use the background color.</p>
4464 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">white_space=0xc0c0c0;0xffffff;true;true</span></tt></p>
4465 </dd>
4466 </dl>
4467 <dl class="docutils" id="folding-settings">
4468 <dt>folding_style</dt>
4469 <dd><p class="first">The style of folding icons. Only first and second arguments are
4470 used.</p>
4471 <p>Valid values for the first argument are:</p>
4472 <ul class="simple">
4473 <li>1 -- for boxes</li>
4474 <li>2 -- for circles</li>
4475 <li>3 -- for arrows</li>
4476 <li>4 -- for +/-</li>
4477 </ul>
4478 <p>Valid values for the second argument are:</p>
4479 <ul class="simple">
4480 <li>0 -- for no lines</li>
4481 <li>1 -- for straight lines</li>
4482 <li>2 -- for curved lines</li>
4483 </ul>
4484 <p><em>Default:</em> <tt class="docutils literal"><span class="pre">folding_style=1;1;</span></tt></p>
4485 <p class="last"><em>Arrows:</em> <tt class="docutils literal"><span class="pre">folding_style=3;0;</span></tt></p>
4486 </dd>
4487 <dt>folding_horiz_line</dt>
4488 <dd><p class="first">Draw a thin horizontal line at the line where text is folded. Only
4489 first argument is used.</p>
4490 <p>Valid values for the first argument are:</p>
4491 <ul class="simple">
4492 <li>0 -- disable, do not draw a line</li>
4493 <li>1 -- draw the line above folded text</li>
4494 <li>2 -- draw the line below folded text</li>
4495 </ul>
4496 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">folding_horiz_line=0;0;false;false</span></tt></p>
4497 </dd>
4498 <dt>line_wrap_visuals</dt>
4499 <dd><p class="first">First argument: drawing of visual flags to indicate a line is wrapped.
4500 This is a bitmask of the values:</p>
4501 <ul class="simple">
4502 <li>0 -- No visual flags</li>
4503 <li>1 -- Visual flag at end of subline of a wrapped line</li>
4504 <li>2 -- Visual flag at begin of subline of a wrapped line. Subline is
4505 indented by at least 1 to make room for the flag.</li>
4506 </ul>
4507 <p>Second argument: wether the visual flags to indicate a line is wrapped
4508 are drawn near the border or near the text. This is a bitmask of the values:</p>
4509 <ul class="simple">
4510 <li>0 -- Visual flags drawn near border</li>
4511 <li>1 -- Visual flag at end of subline drawn near text</li>
4512 <li>2 -- Visual flag at begin of subline drawn near text</li>
4513 </ul>
4514 <p>Only first and second argument is interpreted.</p>
4515 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">line_wrap_visuals=3;0;false;false</span></tt></p>
4516 </dd>
4517 <dt>line_wrap_indent</dt>
4518 <dd><p class="first">First argument: sets the size of indentation of sublines for wrapped lines
4519 in terms of the width of a space, only used when the second argument is <tt class="docutils literal"><span class="pre">0</span></tt>.</p>
4520 <p>Second argument: wrapped sublines can be indented to the position of their
4521 first subline or one more indent level. Possible values:</p>
4522 <ul class="simple">
4523 <li>0 - Wrapped sublines aligned to left of window plus amount set by the first argument</li>
4524 <li>1 - Wrapped sublines are aligned to first subline indent (use the same indentation)</li>
4525 <li>2 - Wrapped sublines are aligned to first subline indent plus one more level of indentation</li>
4526 </ul>
4527 <p>Only first and second argument is interpreted.</p>
4528 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">line_wrap_indent=0;1;false;false</span></tt></p>
4529 </dd>
4530 <dt>translucency</dt>
4531 <dd><p class="first">Translucency for the current line (first argument) and the selection
4532 (second argument). Values between 0 and 256 are accepted.</p>
4533 <p>Note for Windows 95, 98 and ME users:
4534 keep this value at 256 to disable translucency otherwise Geany might crash.</p>
4535 <p>Only the first and second argument is interpreted.</p>
4536 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">translucency=256;256;false;false</span></tt></p>
4537 </dd>
4538 <dt>marker_line</dt>
4539 <dd><p class="first">The style for a highlighted line (e.g when using Goto line or goto tag).
4540 The foreground color (first argument) is only used when the Markers margin
4541 is enabled (see View menu).</p>
4542 <p>Only the first and second argument is interpreted.</p>
4543 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">marker_line=0x000000;0xffff00;false;false</span></tt></p>
4544 </dd>
4545 <dt>marker_search</dt>
4546 <dd><p class="first">The style for a marked search results (when using &quot;Mark&quot; in Search dialogs).
4547 The second argument sets the background colour for the drawn rectangle.</p>
4548 <p>Only the second argument is interpreted.</p>
4549 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">marker_search=0x000000;0xb8f4b8;false;false</span></tt></p>
4550 </dd>
4551 <dt>marker_mark</dt>
4552 <dd><p class="first">The style for a marked line (e.g when using the &quot;Toggle Marker&quot; keybinding
4553 (Ctrl-M)). The foreground color (first argument) is only used
4554 when the Markers margin is enabled (see View menu).</p>
4555 <p>Only the first and second argument is interpreted.</p>
4556 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">marker_mark=0x000000;0xb8f4b8;false;false</span></tt></p>
4557 </dd>
4558 <dt>marker_translucency</dt>
4559 <dd><p class="first">Translucency for the line marker (first argument) and the search marker
4560 (second argument). Values between 0 and 256 are accepted.</p>
4561 <p>Note for Windows 95, 98 and ME users:
4562 keep this value at 256 to disable translucency otherwise Geany might crash.</p>
4563 <p>Only the first and second argument is interpreted.</p>
4564 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">marker_translucency=256;256;false;false</span></tt></p>
4565 </dd>
4566 <dt>line_height</dt>
4567 <dd><p class="first">Amount of space to be drawn above and below the line's baseline.
4568 The first argument defines the amount of space to be drawn above the line, the second
4569 argument defines the amount of space to be drawn below.</p>
4570 <p>Only the first and second argument is interpreted.</p>
4571 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">line_height=0;0;false;false</span></tt></p>
4572 </dd>
4573 <dt>calltips</dt>
4574 <dd><p class="first">The style for coloring the calltips. The first two arguments
4575 define the foreground and background colors, the third and fourth
4576 arguments set whether to use the defined colors.</p>
4577 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">calltips=0xc0c0c0;0xffffff;false;false</span></tt></p>
4578 </dd>
4579 </dl>
4580 </div>
4581 <div class="section">
4582 <h4><a class="toc-backref" href="#id184" id="id6" name="id6">[settings] Section</a></h4>
4583 <dl class="docutils">
4584 <dt>whitespace_chars</dt>
4585 <dd><p class="first">Characters to treat as whitespace. These characters are ignored
4586 when moving, selecting and deleting across word boundaries
4587 (see <a class="reference" href="#scintilla-keyboard-commands">Scintilla keyboard commands</a>).</p>
4588 <p>This should include space (\s) and tab (\t).</p>
4589 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">whitespace_chars=\s\t!\&quot;#$%&amp;'()*+,-./:;&lt;=&gt;?&#64;[\\]^`{|}~</span></tt></p>
4590 </dd>
4591 </dl>
4592 </div>
4593 </div>
4594 </div>
4595 <div class="section">
4596 <h2><a class="toc-backref" href="#id185" id="filetype-extensions" name="filetype-extensions">Filetype extensions</a></h2>
4597 <p>To change the default filetype extension used when saving a new file,
4598 see <a class="reference" href="#filetype-definition-files">Filetype definition files</a>.</p>
4599 <p>You can override the list of file extensions that Geany uses for each
4600 filetype using the <tt class="docutils literal"><span class="pre">filetype_extensions.conf</span></tt> file.</p>
4601 <p>To override the system-wide configuration file, copy it from
4602 <tt class="docutils literal"><span class="pre">$prefix/share/geany</span></tt> to your configuration directory, usually
4603 <tt class="docutils literal"><span class="pre">~/.config/geany/</span></tt>. <tt class="docutils literal"><span class="pre">$prefix</span></tt> is the path where Geany is installed
4604 (see <a class="reference" href="#installation-prefix">Installation prefix</a>).</p>
4605 <p>For example:</p>
4606 <pre class="literal-block">
4607 % cp /usr/local/share/geany/filetype_extensions.conf /home/username/.config/geany/
4608 </pre>
4609 <p>Then edit it and remove all the lines for filetype extensions that
4610 you do not want to override. The remaining lines can be edited after
4611 the <tt class="docutils literal"><span class="pre">=</span></tt> sign, using a semi-colon separated list of patterns which
4612 should be matched for that filetype.</p>
4613 <p>For example, to set the filetype extensions for Make, the
4614 <tt class="docutils literal"><span class="pre">/home/username/.config/geany/filetype_extensions.conf</span></tt> file should
4615 look like:</p>
4616 <pre class="literal-block">
4617 [Extensions]
4618 Make=Makefile*;*.mk;Buildfile;
4619 </pre>
4620 </div>
4621 <div class="section">
4622 <h2><a class="toc-backref" href="#id186" id="preferences-file-format" name="preferences-file-format">Preferences File Format</a></h2>
4623 <p>The preferences file <tt class="docutils literal"><span class="pre">~/.config/geany/geany.conf</span></tt> holds settings for all the items configured
4624 in the preferences dialog. This file should not be edited while Geany is running
4625 as the file will be overwritten when the preferences in Geany are changed or Geany
4626 is quitted.</p>
4627 <div class="section">
4628 <h3><a class="toc-backref" href="#id187" id="hidden-preferences" name="hidden-preferences">Hidden preferences</a></h3>
4629 <p>There are some rarely used preferences that are not shown in the Preferences
4630 dialog. These can be set by editing the preferences file, then
4631 restarting Geany. Search for the key name, then edit the value. Example:</p>
4632 <blockquote>
4633 <tt class="docutils literal"><span class="pre">brace_match_ltgt=true</span></tt></blockquote>
4634 <p>The table below show the key names of hidden preferences in the
4635 configuration file.</p>
4636 <table border="1" class="docutils">
4637 <colgroup>
4638 <col width="34%" />
4639 <col width="46%" />
4640 <col width="19%" />
4641 </colgroup>
4642 <thead valign="bottom">
4643 <tr><th class="head">Key</th>
4644 <th class="head">Description</th>
4645 <th class="head">Default</th>
4646 </tr>
4647 </thead>
4648 <tbody valign="top">
4649 <tr><td><strong>Editor related</strong></td>
4650 <td>&nbsp;</td>
4651 <td>&nbsp;</td>
4652 </tr>
4653 <tr><td>brace_match_ltgt</td>
4654 <td>Whether to highlight &lt;, &gt; angle brackets.</td>
4655 <td>false</td>
4656 </tr>
4657 <tr><td>show_editor_scrollbars</td>
4658 <td>Whether to display scrollbars. If set to
4659 false, the horizontal and vertical
4660 scrollbars are hidden completely.</td>
4661 <td>true</td>
4662 </tr>
4663 <tr><td>use_gtk_word_boundaries</td>
4664 <td>Whether to look for the end of a word when
4665 using word-boundary related Scintilla
4666 commands (see <a class="reference" href="#scintilla-keyboard-commands">Scintilla keyboard
4667 commands</a>).</td>
4668 <td>true</td>
4669 </tr>
4670 <tr><td>complete_snippets_whilst_editing</td>
4671 <td>Whether to allow completion of snippets
4672 when editing an existing line (i.e. there
4673 is some text after the current cursor
4674 position on the line). Only used when the
4675 keybinding <tt class="docutils literal"><span class="pre">Complete</span> <span class="pre">snippet</span></tt> is set to
4676 <tt class="docutils literal"><span class="pre">Space</span></tt>.</td>
4677 <td>false</td>
4678 </tr>
4679 <tr><td><strong>Interface related</strong></td>
4680 <td>&nbsp;</td>
4681 <td>&nbsp;</td>
4682 </tr>
4683 <tr><td>show_symbol_list_expanders</td>
4684 <td>Whether to show or hide the small expander
4685 icons on the symbol list treeview (only
4686 available with GTK 2.12 or above).</td>
4687 <td>true</td>
4688 </tr>
4689 <tr><td>allow_always_save</td>
4690 <td>Whether files can be saved always, even if
4691 they don't have any changes. By default,
4692 the Save buttons and menu items are
4693 disabled when a file is unchanged. When
4694 setting this option to true, the Save
4695 buttons and menu items are always active
4696 and files can be saved.</td>
4697 <td>false</td>
4698 </tr>
4699 <tr><td>compiler_tab_autoscroll</td>
4700 <td>Whether to automatically scroll to the
4701 last line of the output in the Compiler
4702 tab.</td>
4703 <td>true</td>
4704 </tr>
4705 <tr><td><strong>VTE related</strong></td>
4706 <td>&nbsp;</td>
4707 <td>&nbsp;</td>
4708 </tr>
4709 <tr><td>emulation</td>
4710 <td>Terminal emulation mode. Only change this
4711 if you have VTE termcap files other than
4712 <tt class="docutils literal"><span class="pre">vte/termcap/xterm</span></tt>.</td>
4713 <td>xterm</td>
4714 </tr>
4715 <tr><td>send_selection_unsafe</td>
4716 <td>By default, Geany strips any trailing
4717 newline characters from the current
4718 selection before sending it to the terminal
4719 to not execute arbitrary code. This is
4720 mainly a security feature.
4721 If, for whatever reasons, you really want
4722 it to be executed directly, set this option
4723 to true.</td>
4724 <td>false</td>
4725 </tr>
4726 <tr><td><strong>File related</strong></td>
4727 <td>&nbsp;</td>
4728 <td>&nbsp;</td>
4729 </tr>
4730 <tr><td>use_safe_file_saving</td>
4731 <td>Defines the mode how Geany saves files to
4732 disk. If disabled, Geany directly writes
4733 the content of the document to disk. This
4734 might cause in loss of data when there is
4735 no more free space on disk to save the
4736 file. When set to true, Geany first saves
4737 the contents into a temporary file and if
4738 this succeeded, the temporary file is
4739 moved to the real file to save.
4740 This gives better error checking in case of
4741 no more free disk space. But it also
4742 destroys hard links of the original file
4743 and its permissions (e.g. executable flags
4744 are reset). Use this with care as it can
4745 break things seriously.
4746 The better approach would be to ensure your
4747 disk won't run out of free space.</td>
4748 <td>false</td>
4749 </tr>
4750 <tr><td><strong>Build Menu related</strong></td>
4751 <td>&nbsp;</td>
4752 <td>&nbsp;</td>
4753 </tr>
4754 <tr><td>number_ft_menu_items</td>
4755 <td>The maximum number of menu items in the
4756 filetype section of the Build menu.</td>
4757 <td>2</td>
4758 </tr>
4759 <tr><td>number_non_ft_menu_items</td>
4760 <td>The maximum number of menu items in the
4761 non-filetype section of the Build menu.</td>
4762 <td>3</td>
4763 </tr>
4764 <tr><td>number_exec_menu_items</td>
4765 <td>The maximum number of menu items in the
4766 execute section of the Build menu.</td>
4767 <td>2</td>
4768 </tr>
4769 </tbody>
4770 </table>
4771 </div>
4772 <div class="section">
4773 <h3><a class="toc-backref" href="#id188" id="build-menu-section" name="build-menu-section">[build-menu] Section</a></h3>
4774 <p>The [build-menu] section contains the configuration of the build menu.
4775 This section can occur in filetype, preferences and project files and
4776 always has the format described here. Different menu items are loaded
4777 from different files, see the table in the <a class="reference" href="#build-menu-configuration">Build Menu Configuration</a>
4778 section for details. All the settings can be configured from the dialogs
4779 except the execute command in filetype files and filetype definitions in
4780 the project file, so these are the only ones which need hand editing.</p>
4781 <p>The build-menu section stores one entry for each setting for each menu item that
4782 is configured. The keys for these settings have the format:</p>
4783 <blockquote>
4784 <tt class="docutils literal"><span class="pre">GG_NN_FF</span></tt></blockquote>
4785 <p>where:</p>
4786 <ul class="simple">
4787 <li>GG - is the menu item group,<ul>
4788 <li>FT for filetype</li>
4789 <li>NF for non-filetype</li>
4790 <li>EX for execute</li>
4791 </ul>
4792 </li>
4793 <li>NN - is a two decimal digit number of the item within the group,
4794 starting at 00</li>
4795 <li>FF - is the field,<ul>
4796 <li>LB for label</li>
4797 <li>CM for command</li>
4798 <li>WD for working directory</li>
4799 </ul>
4800 </li>
4801 </ul>
4802 </div>
4803 </div>
4804 <div class="section">
4805 <h2><a class="toc-backref" href="#id189" id="project-file-format" name="project-file-format">Project File Format</a></h2>
4806 <p>The project file contains project related settings and possibly a
4807 record of the current session files.</p>
4808 <div class="section">
4809 <h3><a class="toc-backref" href="#id190" id="build-menu-additions" name="build-menu-additions">[build-menu] Additions</a></h3>
4810 <p>The project file also can have extra fields in the [build-menu] section
4811 in addition to those listed in <a class="reference" href="#build-menu-section">[build-menu] Section</a> above.</p>
4812 <p>When filetype menu items are configured for the project they are stored
4813 in the project file.</p>
4814 <p>The <tt class="docutils literal"><span class="pre">filetypes</span></tt> entry is a list of the filetypes which exist in the
4815 project file.</p>
4816 <p>For each filetype the entries for that filetype have the format defined in
4817 <a class="reference" href="#build-menu-section">[build-menu] Section</a> but the key is prefixed by the name of the filetype
4818 as it appears in the <tt class="docutils literal"><span class="pre">filetypes</span></tt> entry, eg the entry for the label of
4819 filetype menu item 0 for the C filetype would be</p>
4820 <blockquote>
4821 <tt class="docutils literal"><span class="pre">CFT_00_LB=Label</span></tt></blockquote>
4822 </div>
4823 </div>
4824 <div class="section">
4825 <h2><a class="toc-backref" href="#id191" id="templates" name="templates">Templates</a></h2>
4826 <p>Geany supports the following templates:</p>
4827 <ul class="simple">
4828 <li>ChangeLog entry</li>
4829 <li>File header</li>
4830 <li>Function description</li>
4831 <li>Short GPL notice</li>
4832 <li>Short BSD notice</li>
4833 <li>File templates</li>
4834 </ul>
4835 <p>To use these templates, just open the Edit menu or open the popup menu
4836 by right-clicking in the editor widget, and choose &quot;Insert Comments&quot;
4837 and insert templates as you want.</p>
4838 <p>Some templates (like File header or ChangeLog entry) will always be
4839 inserted at the top of the file.</p>
4840 <p>To insert a function description, the cursor must be inside
4841 of the function, so that the function name can be determined
4842 automatically. The description will be positioned correctly one line
4843 above the function, just check it out. If the cursor is not inside
4844 of a function or the function name cannot be determined, the inserted
4845 function description won't contain the correct function name but &quot;unknown&quot;
4846 instead.</p>
4847 <div class="note">
4848 <p class="first admonition-title">Note</p>
4849 <p class="last">Geany automatically reloads template information when it notices you
4850 save a file in the user's template configuration directory. You can
4851 also force this by selecting <em>Tools-&gt;Reload Configuration</em>.</p>
4852 </div>
4853 <div class="section">
4854 <h3><a class="toc-backref" href="#id192" id="template-meta-data" name="template-meta-data">Template meta data</a></h3>
4855 <p>Meta data can be used with all templates, but by default user set
4856 meta data is only used for the ChangeLog and File header templates.</p>
4857 <p>In the configuration dialog you can find a tab &quot;Templates&quot; (see
4858 <a class="reference" href="#template-preferences">Template preferences</a>). You can define the default values
4859 which will be inserted in the templates. You should select
4860 <em>Tools-&gt;Reload Configuration</em> or restart Geany after making changes.</p>
4861 </div>
4862 <div class="section">
4863 <h3><a class="toc-backref" href="#id193" id="file-templates" name="file-templates">File templates</a></h3>
4864 <p>File templates are templates used as the basis of a new file. To
4865 use them, choose the <em>New (with Template)</em> menu item from the <em>File</em>
4866 menu.</p>
4867 <p>By default, file templates are installed for some filetypes. Custom
4868 file templates can be added by creating the appropriate template file. You can
4869 also edit the default file templates.</p>
4870 <p>The file's contents are just the text to place in the document, with
4871 optional template wildcards like <tt class="docutils literal"><span class="pre">{fileheader}</span></tt>. The fileheader
4872 wildcard can be placed anywhere, but it's usually put on the first
4873 line of the file, followed by a blank line.</p>
4874 <div class="section">
4875 <h4><a class="toc-backref" href="#id194" id="custom-file-templates" name="custom-file-templates">Custom file templates</a></h4>
4876 <p>These are read from the following directories:</p>
4877 <ul class="simple">
4878 <li><tt class="docutils literal"><span class="pre">$prefix/share/geany/templates/files</span></tt> (see <a class="reference" href="#installation-prefix">Installation prefix</a>)</li>
4879 <li><tt class="docutils literal"><span class="pre">~/.config/geany/templates/files</span></tt> (created the first time
4880 Geany is started).</li>
4881 </ul>
4882 <p>The filetype to use is detected from the template file's extension, if
4883 any. For example, creating a file <tt class="docutils literal"><span class="pre">module.c</span></tt> would add a menu item
4884 which created a new document with the filetype set to 'C'.</p>
4885 <p>The template file is read from disk when the corresponding menu item is
4886 clicked.</p>
4887 </div>
4888 <div class="section">
4889 <h4><a class="toc-backref" href="#id195" id="filetype-templates" name="filetype-templates">Filetype templates</a></h4>
4890 <div class="note">
4891 <p class="first admonition-title">Note</p>
4892 <p class="last">It's recommended to use custom file templates instead.</p>
4893 </div>
4894 <p>Filetype template files are read from the <tt class="docutils literal"><span class="pre">~/.config/geany/templates</span></tt>
4895 directory, and are named &quot;filetype.&quot; followed by the filetype
4896 name, e.g. &quot;filetype.python&quot;, &quot;filetype.sh&quot;, etc. If you are
4897 unsure about the filetype name extensions, they are the same as
4898 the filetype configuration file extensions, commonly installed in
4899 <tt class="docutils literal"><span class="pre">/usr/share/geany</span></tt>, with the prefix &quot;filetypes.&quot;.</p>
4900 <p>There is also a template file <tt class="docutils literal"><span class="pre">filetype.none</span></tt> which is used when
4901 the New command is used without a filetype. This is empty by default.</p>
4902 </div>
4903 </div>
4904 <div class="section">
4905 <h3><a class="toc-backref" href="#id196" id="customizing-templates" name="customizing-templates">Customizing templates</a></h3>
4906 <p>Each template can be customized to your needs. The templates are
4907 stored in the <tt class="docutils literal"><span class="pre">~/.config/geany/templates/</span></tt> directory (see the section called
4908 <a class="reference" href="#command-line-options">Command line options</a> for further information about the configuration
4909 directory). Just open the desired template with an editor (ideally,
4910 Geany ;-) ) and edit the template to your needs. There are some
4911 wildcards which will be automatically replaced by Geany at startup.</p>
4912 <div class="section">
4913 <h4><a class="toc-backref" href="#id197" id="template-wildcards" name="template-wildcards">Template wildcards</a></h4>
4914 <p>All wildcards must be enclosed by &quot;{&quot; and &quot;}&quot;, e.g. {date}.</p>
4915 <p><strong>Wildcards for character escaping</strong></p>
4916 <table border="1" class="docutils">
4917 <colgroup>
4918 <col width="14%" />
4919 <col width="46%" />
4920 <col width="40%" />
4921 </colgroup>
4922 <thead valign="bottom">
4923 <tr><th class="head">Wildcard</th>
4924 <th class="head">Description</th>
4925 <th class="head">Available in</th>
4926 </tr>
4927 </thead>
4928 <tbody valign="top">
4929 <tr><td>ob</td>
4930 <td>{ Opening Brace (used to prevent other
4931 wildcards being expanded).</td>
4932 <td>file templates, file header, snippets.</td>
4933 </tr>
4934 <tr><td>cb</td>
4935 <td>} Closing Brace.</td>
4936 <td>file templates, file header, snippets.</td>
4937 </tr>
4938 <tr><td>pc</td>
4939 <td>% Percent (used to escape e.g. %block% in
4940 snippets).</td>
4941 <td>snippets.</td>
4942 </tr>
4943 </tbody>
4944 </table>
4945 <p><strong>Global wildcards</strong></p>
4946 <p>These are configurable, see <a class="reference" href="#template-preferences">Template preferences</a>.</p>
4947 <table border="1" class="docutils">
4948 <colgroup>
4949 <col width="14%" />
4950 <col width="46%" />
4951 <col width="40%" />
4952 </colgroup>
4953 <thead valign="bottom">
4954 <tr><th class="head">Wildcard</th>
4955 <th class="head">Description</th>
4956 <th class="head">Available in</th>
4957 </tr>
4958 </thead>
4959 <tbody valign="top">
4960 <tr><td>developer</td>
4961 <td>The name of the developer.</td>
4962 <td>file templates, file header,
4963 function description, ChangeLog entry,
4964 bsd, gpl, snippets.</td>
4965 </tr>
4966 <tr><td>initial</td>
4967 <td>The developer's initials, e.g. &quot;ET&quot; for
4968 Enrico Tröger or &quot;JFD&quot; for John Foobar Doe.</td>
4969 <td>file templates, file header,
4970 function description, ChangeLog entry,
4971 bsd, gpl, snippets.</td>
4972 </tr>
4973 <tr><td>mail</td>
4974 <td>The email address of the developer.</td>
4975 <td>file templates, file header,
4976 function description, ChangeLog entry,
4977 bsd, gpl, snippets.</td>
4978 </tr>
4979 <tr><td>company</td>
4980 <td>The company the developer is working for.</td>
4981 <td>file templates, file header,
4982 function description, ChangeLog entry,
4983 bsd, gpl, snippets.</td>
4984 </tr>
4985 <tr><td>version</td>
4986 <td>The initial version of a new file.</td>
4987 <td>file templates, file header,
4988 function description, ChangeLog entry,
4989 bsd, gpl, snippets.</td>
4990 </tr>
4991 </tbody>
4992 </table>
4993 <p><strong>Date &amp; time wildcards</strong></p>
4994 <p>The format for these wildcards can be changed in the preferences
4995 dialog, see <a class="reference" href="#template-preferences">Template preferences</a>. You can use any conversion
4996 specifiers which can be used with the ANSI C strftime function.
4997 For details please see <a class="reference" href="http://man.cx/strftime">http://man.cx/strftime</a>.</p>
4998 <table border="1" class="docutils">
4999 <colgroup>
5000 <col width="14%" />
5001 <col width="46%" />
5002 <col width="40%" />
5003 </colgroup>
5004 <thead valign="bottom">
5005 <tr><th class="head">Wildcard</th>
5006 <th class="head">Description</th>
5007 <th class="head">Available in</th>
5008 </tr>
5009 </thead>
5010 <tbody valign="top">
5011 <tr><td>year</td>
5012 <td>The current year. Default format is: YYYY.</td>
5013 <td>file templates, file header,
5014 function description, ChangeLog entry,
5015 bsd, gpl, snippets.</td>
5016 </tr>
5017 <tr><td>date</td>
5018 <td>The current date. Default format:
5019 YYYY-MM-DD.</td>
5020 <td>file templates, file header,
5021 function description, ChangeLog entry,
5022 bsd, gpl, snippets.</td>
5023 </tr>
5024 <tr><td>datetime</td>
5025 <td>The current date and time. Default format:
5026 DD.MM.YYYY HH:mm:ss ZZZZ.</td>
5027 <td>file templates, file header,
5028 function description, ChangeLog entry,
5029 bsd, gpl, snippets.</td>
5030 </tr>
5031 </tbody>
5032 </table>
5033 <p><strong>Dynamic wildcards</strong></p>
5034 <table border="1" class="docutils">
5035 <colgroup>
5036 <col width="14%" />
5037 <col width="46%" />
5038 <col width="40%" />
5039 </colgroup>
5040 <thead valign="bottom">
5041 <tr><th class="head">Wildcard</th>
5042 <th class="head">Description</th>
5043 <th class="head">Available in</th>
5044 </tr>
5045 </thead>
5046 <tbody valign="top">
5047 <tr><td>untitled</td>
5048 <td>The string &quot;untitled&quot; (this will be
5049 translated to your locale), used in
5050 file templates.</td>
5051 <td>file templates, file header,
5052 function description, ChangeLog entry,
5053 bsd, gpl, snippets.</td>
5054 </tr>
5055 <tr><td>geanyversion</td>
5056 <td>The actual Geany version, e.g.
5057 &quot;Geany 0.19&quot;.</td>
5058 <td>file templates, file header,
5059 function description, ChangeLog entry,
5060 bsd, gpl, snippets.</td>
5061 </tr>
5062 <tr><td>filename</td>
5063 <td>The filename of the current file.
5064 For new files, it's only replaced when
5065 first saving if found on the first 3 lines
5066 of the file.</td>
5067 <td>file header, snippets, file
5068 templates.</td>
5069 </tr>
5070 <tr><td>project</td>
5071 <td>The current project's name, if any.</td>
5072 <td>file header, snippets, file templates.</td>
5073 </tr>
5074 <tr><td>description</td>
5075 <td>The current project's description, if any.</td>
5076 <td>file header, snippets, file templates.</td>
5077 </tr>
5078 <tr><td>functionname</td>
5079 <td>The function name of the function at the
5080 cursor position. This wildcard will only be
5081 replaced in the function description
5082 template.</td>
5083 <td>function description.</td>
5084 </tr>
5085 <tr><td>command:path</td>
5086 <td>Executes the specified command and replace
5087 the wildcard with the command's standard
5088 output. See <a class="reference" href="#special-command-wildcard">Special {command:} wildcard</a>
5089 for details.</td>
5090 <td>file templates, file header,
5091 function description, ChangeLog entry,
5092 bsd, gpl, snippets.</td>
5093 </tr>
5094 </tbody>
5095 </table>
5096 <p><strong>Template insertion wildcards</strong></p>
5097 <table border="1" class="docutils">
5098 <colgroup>
5099 <col width="14%" />
5100 <col width="46%" />
5101 <col width="40%" />
5102 </colgroup>
5103 <thead valign="bottom">
5104 <tr><th class="head">Wildcard</th>
5105 <th class="head">Description</th>
5106 <th class="head">Available in</th>
5107 </tr>
5108 </thead>
5109 <tbody valign="top">
5110 <tr><td>gpl</td>
5111 <td>This wildcard inserts a short GPL notice.</td>
5112 <td>file header.</td>
5113 </tr>
5114 <tr><td>bsd</td>
5115 <td>This wildcard inserts a BSD licence notice.</td>
5116 <td>file header.</td>
5117 </tr>
5118 <tr><td>fileheader</td>
5119 <td>The file header template. This wildcard
5120 will only be replaced in filetype
5121 templates.</td>
5122 <td>snippets, file templates.</td>
5123 </tr>
5124 </tbody>
5125 </table>
5126 <div class="section">
5127 <h5><a class="toc-backref" href="#id198" id="special-command-wildcard" name="special-command-wildcard">Special {command:} wildcard</a></h5>
5128 <p>The {command:} wildcard is a special one because it can execute
5129 a specified command and put the command's output (stdout) into
5130 the template.</p>
5131 <p>Example:</p>
5132 <pre class="literal-block">
5133 {command:uname -a}
5134 </pre>
5135 <p>will result in:</p>
5136 <pre class="literal-block">
5137 Linux localhost 2.6.9-023stab046.2-smp #1 SMP Mon Dec 10 15:04:55 MSK 2007 x86_64 GNU/Linux
5138 </pre>
5139 <p>Using this wildcard you can insert nearly any arbitrary text into the
5140 template.</p>
5141 <p>In the environment of the executed command the variables
5142 <tt class="docutils literal"><span class="pre">GEANY_FILENAME</span></tt>, <tt class="docutils literal"><span class="pre">GEANY_FILETYPE</span></tt> and <tt class="docutils literal"><span class="pre">GEANY_FUNCNAME</span></tt> are set.
5143 The value of these variables is filled in only if Geany knows about it.
5144 For example, <tt class="docutils literal"><span class="pre">GEANY_FUNCNAME</span></tt> is only filled within the function
5145 description template. However, these variables are <tt class="docutils literal"><span class="pre">always</span></tt> set,
5146 just maybe with an empty value.
5147 You can easily access them e.g. within an executed shell script using:</p>
5148 <pre class="literal-block">
5149 $GEANY_FILENAME
5150 </pre>
5151 <div class="note">
5152 <p class="first admonition-title">Note</p>
5153 <p class="last">If the specified command could not be found or not executed, the wildcard is substituted
5154 by an empty string. In such cases, you can find the occurred error message on Geany's
5155 standard error and in the Help-&gt;Debug Messages dialog.</p>
5156 </div>
5157 </div>
5158 </div>
5159 </div>
5160 </div>
5161 <div class="section">
5162 <h2><a class="toc-backref" href="#id199" id="customizing-the-toolbar" name="customizing-the-toolbar">Customizing the toolbar</a></h2>
5163 <p>You can add, remove and reorder the elements in the toolbar by using the toolbar editor
5164 by manually editing the file <tt class="docutils literal"><span class="pre">ui_toolbar.xml</span></tt>.</p>
5165 <p>The toolbar editor can be opened from the preferences editor on the Toolbar tab or
5166 by right-clicking on the toolbar itself and choosing it from the menu.</p>
5167 <div class="section">
5168 <h3><a class="toc-backref" href="#id200" id="manually-editing-of-the-toolbar-layout" name="manually-editing-of-the-toolbar-layout">Manually editing of the toolbar layout</a></h3>
5169 <p>To override the system-wide configuration file, copy it from
5170 <tt class="docutils literal"><span class="pre">$prefix/share/geany</span></tt> to your configuration directory, usually
5171 <tt class="docutils literal"><span class="pre">~/.config/geany/</span></tt>. <tt class="docutils literal"><span class="pre">$prefix</span></tt> is the path where Geany is installed
5172 (see <a class="reference" href="#installation-prefix">Installation prefix</a>).</p>
5173 <p>For example:</p>
5174 <pre class="literal-block">
5175 % cp /usr/local/share/geany/ui_toolbar.xml /home/username/.config/geany/
5176 </pre>
5177 <p>Then edit it and add any of the available elements listed in the file or remove
5178 any of the existing elements. Of course, you can also reorder the elements as
5179 you wish and add or remove additional separators.
5180 This file must be valid XML, otherwise the global toolbar UI definition
5181 will be used instead.</p>
5182 <p>Your changes are applied once you save the file.</p>
5183 <div class="note">
5184 <p class="first admonition-title">Note</p>
5185 <ol class="last arabic simple">
5186 <li>You cannot add new actions which are not listed below.</li>
5187 <li>Everything you add or change must be inside the /ui/toolbar/ path.</li>
5188 </ol>
5189 </div>
5190 </div>
5191 <div class="section">
5192 <h3><a class="toc-backref" href="#id201" id="available-toolbar-elements" name="available-toolbar-elements">Available toolbar elements</a></h3>
5193 <table border="1" class="docutils">
5194 <colgroup>
5195 <col width="19%" />
5196 <col width="81%" />
5197 </colgroup>
5198 <thead valign="bottom">
5199 <tr><th class="head">Element name</th>
5200 <th class="head">Description</th>
5201 </tr>
5202 </thead>
5203 <tbody valign="top">
5204 <tr><td>New</td>
5205 <td>Create a new file</td>
5206 </tr>
5207 <tr><td>Open</td>
5208 <td>Open an existing file</td>
5209 </tr>
5210 <tr><td>Save</td>
5211 <td>Save the current file</td>
5212 </tr>
5213 <tr><td>SaveAll</td>
5214 <td>Save all open files</td>
5215 </tr>
5216 <tr><td>Reload</td>
5217 <td>Reload the current file from disk</td>
5218 </tr>
5219 <tr><td>Close</td>
5220 <td>Close the current file</td>
5221 </tr>
5222 <tr><td>CloseAll</td>
5223 <td>Close all open files</td>
5224 </tr>
5225 <tr><td>Print</td>
5226 <td>Print the current file</td>
5227 </tr>
5228 <tr><td>Cut</td>
5229 <td>Cut the current selection</td>
5230 </tr>
5231 <tr><td>Copy</td>
5232 <td>Copy the current selection</td>
5233 </tr>
5234 <tr><td>Paste</td>
5235 <td>Paste the contents of the clipboard</td>
5236 </tr>
5237 <tr><td>Delete</td>
5238 <td>Delete the current selection</td>
5239 </tr>
5240 <tr><td>Undo</td>
5241 <td>Undo the last modification</td>
5242 </tr>
5243 <tr><td>Redo</td>
5244 <td>Redo the last modification</td>
5245 </tr>
5246 <tr><td>NavBack</td>
5247 <td>Navigate back a location</td>
5248 </tr>
5249 <tr><td>NavFor</td>
5250 <td>Navigate forward a location</td>
5251 </tr>
5252 <tr><td>Compile</td>
5253 <td>Compile the current file</td>
5254 </tr>
5255 <tr><td>Build</td>
5256 <td>Build the current file, includes a submenu for Make commands. Geany
5257 remembers the last chosen action from the submenu and uses this as default
5258 action when the button itself is clicked.</td>
5259 </tr>
5260 <tr><td>Run</td>
5261 <td>Run or view the current file</td>
5262 </tr>
5263 <tr><td>Color</td>
5264 <td>Open a color chooser dialog, to interactively pick colors from a palette</td>
5265 </tr>
5266 <tr><td>ZoomIn</td>
5267 <td>Zoom in the text</td>
5268 </tr>
5269 <tr><td>ZoomOut</td>
5270 <td>Zoom out the text</td>
5271 </tr>
5272 <tr><td>UnIndent</td>
5273 <td>Decrease indentation</td>
5274 </tr>
5275 <tr><td>Indent</td>
5276 <td>Increase indentation</td>
5277 </tr>
5278 <tr><td>Replace</td>
5279 <td>Replace text in the current document</td>
5280 </tr>
5281 <tr><td>SearchEntry</td>
5282 <td>The search field belonging to the 'Search' element (can be used alone)</td>
5283 </tr>
5284 <tr><td>Search</td>
5285 <td>Find the entered text in the current file (only useful if you also
5286 use 'SearchEntry')</td>
5287 </tr>
5288 <tr><td>GotoEntry</td>
5289 <td>The goto field belonging to the 'Goto' element (can be used alone)</td>
5290 </tr>
5291 <tr><td>Goto</td>
5292 <td>Jump to the entered line number (only useful if you also use 'GotoEntry')</td>
5293 </tr>
5294 <tr><td>Preferences</td>
5295 <td>Show the preferences dialog</td>
5296 </tr>
5297 <tr><td>Quit</td>
5298 <td>Quit Geany</td>
5299 </tr>
5300 </tbody>
5301 </table>
5302 </div>
5303 </div>
5304 </div>
5305 <div class="section">
5306 <h1><a class="toc-backref" href="#id202" id="plugin-documentation" name="plugin-documentation">Plugin documentation</a></h1>
5307 <div class="section">
5308 <h2><a class="toc-backref" href="#id203" id="save-actions" name="save-actions">Save Actions</a></h2>
5309 <div class="section">
5310 <h3><a class="toc-backref" href="#id204" id="instant-save" name="instant-save">Instant Save</a></h3>
5311 <p>This plugin sets on every new file (File-&gt;New or File-&gt; New (with template))
5312 a randomly chosen filename and set its filetype appropriate to the used template
5313 or when no template was used, to a configurable default filetype.
5314 This enables you to quickly compile, build and/or run the new file without the
5315 need to give it an explicit filename using the Save As dialog. This might be
5316 useful when you often create new files just for testing some code or something
5317 similar.</p>
5318 </div>
5319 <div class="section">
5320 <h3><a class="toc-backref" href="#id205" id="backup-copy" name="backup-copy">Backup Copy</a></h3>
5321 <p>This plugin creates a backup copy of the current file in Geany when it is
5322 saved. You can specify the directory where the backup copy is saved and
5323 you can configure the automatically added extension in the configure dialog
5324 in Geany's plugin manager.</p>
5325 <p>After the plugin was loaded in Geany's plugin manager, every file is
5326 copied into the configured backup directory when the file is saved in Geany.</p>
5327 </div>
5328 </div>
5329 </div>
5330 <div class="section">
5331 <h1><a class="toc-backref" href="#id206" id="contributing-to-this-document" name="contributing-to-this-document">Contributing to this document</a></h1>
5332 <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>
5333 (or &quot;reST&quot;). The source file for it is located in Geany's <tt class="docutils literal"><span class="pre">doc</span></tt>
5334 subdirectory. If you intend on making changes, you should grab the
5335 source right from SVN to make sure you've got the newest version. After
5336 editing the file, to build the HTML document to see how your changes
5337 look, run &quot;<tt class="docutils literal"><span class="pre">make</span> <span class="pre">doc</span></tt>&quot; in the subdirectory <tt class="docutils literal"><span class="pre">doc</span></tt> of Geany's source
5338 directory. This regenerates the <tt class="docutils literal"><span class="pre">geany.html</span></tt> file. To generate a PDF
5339 file, use the command &quot;<tt class="docutils literal"><span class="pre">make</span> <span class="pre">pdf</span></tt>&quot; which should generate a file called
5340 geany-0.19.pdf.</p>
5341 <p>After you are happy with your changes, create a patch:</p>
5342 <pre class="literal-block">
5343 % svn diff geany.txt &gt; foo.patch
5344 </pre>
5345 <p>and then submit that file to the mailing list for review.</p>
5346 <p>Note, you will need the Python docutils software package installed
5347 to build the docs. The package is named <tt class="docutils literal"><span class="pre">python-docutils</span></tt> on Debian
5348 and Fedora systems.</p>
5349 </div>
5350 <div class="section">
5351 <h1><a class="toc-backref" href="#id207" id="scintilla-keyboard-commands" name="scintilla-keyboard-commands">Scintilla keyboard commands</a></h1>
5352 <p>Copyright © 1998, 2006 Neil Hodgson &lt;neilh(at)scintilla(dot)org&gt;</p>
5353 <p>This appendix is distributed under the terms of the License for
5354 Scintilla and SciTE. A copy of this license can be found in the file
5355 <tt class="docutils literal"><span class="pre">scintilla/License.txt</span></tt> included with the source code of this
5356 program and in the appendix of this document. See <a class="reference" href="#license-for-scintilla-and-scite">License for
5357 Scintilla and SciTE</a>.</p>
5358 <p>20 June 2006</p>
5359 <div class="section">
5360 <h2><a class="toc-backref" href="#id208" id="keyboard-commands" name="keyboard-commands">Keyboard commands</a></h2>
5361 <p>Keyboard commands for Scintilla mostly follow common Windows and GTK+
5362 conventions. All move keys (arrows, page up/down, home and end)
5363 allows to extend or reduce the stream selection when holding the
5364 Shift key, and the rectangular selection when holding the Shift and
5365 Ctrl keys. Some keys may not be available with some national keyboards
5366 or because they are taken by the system such as by a window manager
5367 or GTK. Keyboard equivalents of menu commands are listed in the
5368 menus. Some less common commands with no menu equivalent are:</p>
5369 <table border="1" class="docutils">
5370 <colgroup>
5371 <col width="67%" />
5372 <col width="33%" />
5373 </colgroup>
5374 <thead valign="bottom">
5375 <tr><th class="head">Action</th>
5376 <th class="head">Shortcut key</th>
5377 </tr>
5378 </thead>
5379 <tbody valign="top">
5380 <tr><td>Magnify text size.</td>
5381 <td>Ctrl+Keypad+</td>
5382 </tr>
5383 <tr><td>Reduce text size.</td>
5384 <td>Ctrl+Keypad-</td>
5385 </tr>
5386 <tr><td>Restore text size to normal.</td>
5387 <td>Ctrl+Keypad/</td>
5388 </tr>
5389 <tr><td>Indent block.</td>
5390 <td>Tab</td>
5391 </tr>
5392 <tr><td>Dedent block.</td>
5393 <td>Shift+Tab</td>
5394 </tr>
5395 <tr><td>Delete to start of word.</td>
5396 <td>Ctrl+BackSpace</td>
5397 </tr>
5398 <tr><td>Delete to end of word.</td>
5399 <td>Ctrl+Delete</td>
5400 </tr>
5401 <tr><td>Delete to start of line.</td>
5402 <td>Ctrl+Shift+BackSpace</td>
5403 </tr>
5404 <tr><td>Go to start of document.</td>
5405 <td>Ctrl+Home</td>
5406 </tr>
5407 <tr><td>Extend selection to start of document.</td>
5408 <td>Ctrl+Shift+Home</td>
5409 </tr>
5410 <tr><td>Go to start of display line.</td>
5411 <td>Alt+Home</td>
5412 </tr>
5413 <tr><td>Extend selection to start of display line.</td>
5414 <td>Alt+Shift+Home</td>
5415 </tr>
5416 <tr><td>Go to end of document.</td>
5417 <td>Ctrl+End</td>
5418 </tr>
5419 <tr><td>Extend selection to end of document.</td>
5420 <td>Ctrl+Shift+End</td>
5421 </tr>
5422 <tr><td>Extend selection to end of display line.</td>
5423 <td>Alt+Shift+End</td>
5424 </tr>
5425 <tr><td>Previous paragraph. Shift extends selection.</td>
5426 <td>Ctrl+Up</td>
5427 </tr>
5428 <tr><td>Next paragraph. Shift extends selection.</td>
5429 <td>Ctrl+Down</td>
5430 </tr>
5431 <tr><td>Previous word. Shift extends selection.</td>
5432 <td>Ctrl+Left</td>
5433 </tr>
5434 <tr><td>Next word. Shift extends selection.</td>
5435 <td>Ctrl+Right</td>
5436 </tr>
5437 </tbody>
5438 </table>
5439 </div>
5440 </div>
5441 <div class="section">
5442 <h1><a class="toc-backref" href="#id209" id="tips-and-tricks" name="tips-and-tricks">Tips and tricks</a></h1>
5443 <div class="section">
5444 <h2><a class="toc-backref" href="#id210" id="document-notebook" name="document-notebook">Document notebook</a></h2>
5445 <ul class="simple">
5446 <li>Double-click on empty space in the notebook tab bar to open a
5447 new document.</li>
5448 <li>Middle-click on a document's notebook tab to close the document.</li>
5449 <li>Hold <cite>Ctrl</cite> and click on any notebook tab to switch to the last used
5450 document.</li>
5451 <li>Double-click on a document's notebook tab to toggle all additional
5452 widgets (to show them again use the View menu or the keyboard
5453 shortcut). The interface pref must be enabled for this to work.</li>
5454 </ul>
5455 </div>
5456 <div class="section">
5457 <h2><a class="toc-backref" href="#id211" id="editor" name="editor">Editor</a></h2>
5458 <ul class="simple">
5459 <li>Alt-scroll wheel moves up/down a page.</li>
5460 <li>Ctrl-scroll wheel zooms in/out.</li>
5461 <li>Shift-scroll wheel scrolls 8 characters right/left.</li>
5462 <li>Ctrl-click on a word in a document to perform <em>Go to Tag Definition</em>.</li>
5463 <li>Ctrl-click on a bracket/brace to perform <em>Go to Matching Brace</em>.</li>
5464 </ul>
5465 </div>
5466 <div class="section">
5467 <h2><a class="toc-backref" href="#id212" id="interface" name="interface">Interface</a></h2>
5468 <ul class="simple">
5469 <li>Double-click on a symbol-list group to expand or compact it.</li>
5470 </ul>
5471 </div>
5472 <div class="section">
5473 <h2><a class="toc-backref" href="#id213" id="gtk-related" name="gtk-related">GTK-related</a></h2>
5474 <ul class="simple">
5475 <li>Scrolling the mouse wheel over a notebook tab bar will switch
5476 notebook pages.</li>
5477 </ul>
5478 <p>The following are derived from X-Windows features (but GTK still supports
5479 them on Windows):</p>
5480 <ul class="simple">
5481 <li>Middle-click pastes the last selected text.</li>
5482 <li>Middle-click on a scrollbar moves the scrollbar to that
5483 position without having to drag it.</li>
5484 </ul>
5485 </div>
5486 </div>
5487 <div class="section">
5488 <h1><a class="toc-backref" href="#id214" id="compile-time-options" name="compile-time-options">Compile-time options</a></h1>
5489 <p>There are some options which can only be changed at compile time,
5490 and some options which are used as the default for configurable
5491 options. To change these options, edit the appropriate source file
5492 in the <tt class="docutils literal"><span class="pre">src</span></tt> subdirectory. Look for a block of lines starting with
5493 <tt class="docutils literal"><span class="pre">#define</span> <span class="pre">GEANY_*</span></tt>. Any definitions which are not listed here should
5494 not be changed.</p>
5495 <div class="note">
5496 <p class="first admonition-title">Note</p>
5497 <p class="last">Most users should not need to change these options.</p>
5498 </div>
5499 <div class="section">
5500 <h2><a class="toc-backref" href="#id215" id="src-geany-h" name="src-geany-h">src/geany.h</a></h2>
5501 <table border="1" class="docutils">
5502 <colgroup>
5503 <col width="33%" />
5504 <col width="48%" />
5505 <col width="20%" />
5506 </colgroup>
5507 <thead valign="bottom">
5508 <tr><th class="head">Option</th>
5509 <th class="head">Description</th>
5510 <th class="head">Default</th>
5511 </tr>
5512 </thead>
5513 <tbody valign="top">
5514 <tr><td>GEANY_STRING_UNTITLED</td>
5515 <td>A string used as the default name for new
5516 files. Be aware that the string can be
5517 translated, so change it only if you know
5518 what you are doing.</td>
5519 <td>untitled</td>
5520 </tr>
5521 <tr><td>GEANY_WINDOW_MINIMAL_WIDTH</td>
5522 <td>The minimal width of the main window.</td>
5523 <td>620</td>
5524 </tr>
5525 <tr><td>GEANY_WINDOW_MINIMAL_HEIGHT</td>
5526 <td>The minimal height of the main window.</td>
5527 <td>440</td>
5528 </tr>
5529 <tr><td>GEANY_WINDOW_DEFAULT_WIDTH</td>
5530 <td>The default width of the main window at the
5531 first start.</td>
5532 <td>900</td>
5533 </tr>
5534 <tr><td>GEANY_WINDOW_DEFAULT_HEIGHT</td>
5535 <td>The default height of the main window at the
5536 first start.</td>
5537 <td>600</td>
5538 </tr>
5539 <tr><td><strong>Windows specific</strong></td>
5540 <td>&nbsp;</td>
5541 <td>&nbsp;</td>
5542 </tr>
5543 <tr><td>GEANY_USE_WIN32_DIALOG</td>
5544 <td>Set this to 1 if you want to use the default
5545 Windows file open and save dialogs instead
5546 GTK's file open and save dialogs. The
5547 default Windows file dialogs are missing
5548 some nice features like choosing a filetype
5549 or an encoding. <em>Do not touch this setting
5550 when building on a non-Win32 system.</em></td>
5551 <td>0</td>
5552 </tr>
5553 </tbody>
5554 </table>
5555 </div>
5556 <div class="section">
5557 <h2><a class="toc-backref" href="#id216" id="project-h" name="project-h">project.h</a></h2>
5558 <table border="1" class="docutils">
5559 <colgroup>
5560 <col width="33%" />
5561 <col width="48%" />
5562 <col width="20%" />
5563 </colgroup>
5564 <thead valign="bottom">
5565 <tr><th class="head">Option</th>
5566 <th class="head">Description</th>
5567 <th class="head">Default</th>
5568 </tr>
5569 </thead>
5570 <tbody valign="top">
5571 <tr><td>GEANY_PROJECT_EXT</td>
5572 <td>The default filename extension for Geany
5573 project files. It is used when creating new
5574 projects and as filter mask for the project
5575 open dialog.</td>
5576 <td>geany</td>
5577 </tr>
5578 </tbody>
5579 </table>
5580 </div>
5581 <div class="section">
5582 <h2><a class="toc-backref" href="#id217" id="editor-h" name="editor-h">editor.h</a></h2>
5583 <table border="1" class="docutils">
5584 <colgroup>
5585 <col width="33%" />
5586 <col width="48%" />
5587 <col width="20%" />
5588 </colgroup>
5589 <thead valign="bottom">
5590 <tr><th class="head">Option</th>
5591 <th class="head">Description</th>
5592 <th class="head">Default</th>
5593 </tr>
5594 </thead>
5595 <tbody valign="top">
5596 <tr><td>GEANY_WORDCHARS</td>
5597 <td>These characters define word boundaries when
5598 making selections and searching using word
5599 matching options.</td>
5600 <td>a string with:
5601 a-z, A-Z, 0-9 and
5602 underscore.</td>
5603 </tr>
5604 </tbody>
5605 </table>
5606 </div>
5607 <div class="section">
5608 <h2><a class="toc-backref" href="#id218" id="keyfile-c" name="keyfile-c">keyfile.c</a></h2>
5609 <p>These are default settings that can be overridden in the <a class="reference" href="#preferences">Preferences</a> dialog.</p>
5610 <table border="1" class="docutils">
5611 <colgroup>
5612 <col width="33%" />
5613 <col width="48%" />
5614 <col width="20%" />
5615 </colgroup>
5616 <thead valign="bottom">
5617 <tr><th class="head">Option</th>
5618 <th class="head">Description</th>
5619 <th class="head">Default</th>
5620 </tr>
5621 </thead>
5622 <tbody valign="top">
5623 <tr><td>GEANY_MIN_SYMBOLLIST_CHARS</td>
5624 <td>How many characters you need to type to
5625 trigger the autocompletion list.</td>
5626 <td>4</td>
5627 </tr>
5628 <tr><td>GEANY_DISK_CHECK_TIMEOUT</td>
5629 <td>Time in seconds between checking a file for
5630 external changes.</td>
5631 <td>30</td>
5632 </tr>
5633 <tr><td>GEANY_DEFAULT_TOOLS_MAKE</td>
5634 <td>The make tool. This can also include a path.</td>
5635 <td>&quot;make&quot;</td>
5636 </tr>
5637 <tr><td>GEANY_DEFAULT_TOOLS_TERMINAL</td>
5638 <td>A terminal emulator. It has to accept the
5639 command line option &quot;-e&quot;. This can also
5640 include a path.</td>
5641 <td>&quot;xterm&quot;</td>
5642 </tr>
5643 <tr><td>GEANY_DEFAULT_TOOLS_BROWSER</td>
5644 <td>A web browser. This can also include a path.</td>
5645 <td>&quot;firefox&quot;</td>
5646 </tr>
5647 <tr><td>GEANY_DEFAULT_TOOLS_PRINTCMD</td>
5648 <td>A printing tool. It should be able to accept
5649 and process plain text files. This can also
5650 include a path.</td>
5651 <td>&quot;lpr&quot;</td>
5652 </tr>
5653 <tr><td>GEANY_DEFAULT_TOOLS_GREP</td>
5654 <td>A grep tool. It should be compatible with
5655 GNU grep. This can also include a path.</td>
5656 <td>&quot;grep&quot;</td>
5657 </tr>
5658 <tr><td>GEANY_DEFAULT_MRU_LENGTH</td>
5659 <td>The length of the &quot;Recent files&quot; list.</td>
5660 <td>10</td>
5661 </tr>
5662 <tr><td>GEANY_DEFAULT_FONT_SYMBOL_LIST</td>
5663 <td>The font used in sidebar to show symbols and
5664 open files.</td>
5665 <td>&quot;Sans 9&quot;</td>
5666 </tr>
5667 <tr><td>GEANY_DEFAULT_FONT_MSG_WINDOW</td>
5668 <td>The font used in the messages window.</td>
5669 <td>&quot;Sans 9&quot;</td>
5670 </tr>
5671 <tr><td>GEANY_DEFAULT_FONT_EDITOR</td>
5672 <td>The font used in the editor window.</td>
5673 <td>&quot;Monospace 10&quot;</td>
5674 </tr>
5675 <tr><td>GEANY_TOGGLE_MARK</td>
5676 <td>A string which is used to mark a toggled
5677 comment.</td>
5678 <td>&quot;~ &quot;</td>
5679 </tr>
5680 <tr><td>GEANY_MAX_AUTOCOMPLETE_WORDS</td>
5681 <td>How many autocompletion suggestions should
5682 Geany provide.</td>
5683 <td>30</td>
5684 </tr>
5685 </tbody>
5686 </table>
5687 </div>
5688 <div class="section">
5689 <h2><a class="toc-backref" href="#id219" id="build-c" name="build-c">build.c</a></h2>
5690 <table border="1" class="docutils">
5691 <colgroup>
5692 <col width="33%" />
5693 <col width="48%" />
5694 <col width="20%" />
5695 </colgroup>
5696 <thead valign="bottom">
5697 <tr><th class="head">Option</th>
5698 <th class="head">Description</th>
5699 <th class="head">Default</th>
5700 </tr>
5701 </thead>
5702 <tbody valign="top">
5703 <tr><td>GEANY_BUILD_ERR_HIGHLIGHT_MAX</td>
5704 <td>Amount of build error indicators to
5705 be shown in the editor window.
5706 This affects the special coloring
5707 when Geany detects a compiler output line as
5708 an error message and then highlights the
5709 corresponding line in the source code.
5710 Usually only the first few messages are
5711 interesting because following errors are
5712 just after-effects.
5713 All errors in the Compiler window are parsed
5714 and unaffected by this value.</td>
5715 <td>50</td>
5716 </tr>
5717 <tr><td>PRINTBUILDCMDS</td>
5718 <td>Every time a build menu item priority
5719 calculation is run, print the state of the
5720 menu item table in the form of the table
5721 in <a class="reference" href="#build-menu-configuration">Build Menu Configuration</a>. May be
5722 useful to debug configuration file
5723 overloading. Warning produces a lot of
5724 output. Can also be enabled/disabled by the
5725 debugger by setting printbuildcmds to 1/0
5726 overriding the compile setting.</td>
5727 <td>FALSE</td>
5728 </tr>
5729 </tbody>
5730 </table>
5731 </div>
5732 </div>
5733 <div class="section">
5734 <h1><a class="toc-backref" href="#id220" id="gnu-general-public-license" name="gnu-general-public-license">GNU General Public License</a></h1>
5735 <pre class="literal-block">
5736 GNU GENERAL PUBLIC LICENSE
5737 Version 2, June 1991
5739 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5740 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
5741 Everyone is permitted to copy and distribute verbatim copies
5742 of this license document, but changing it is not allowed.
5744 Preamble
5746 The licenses for most software are designed to take away your
5747 freedom to share and change it. By contrast, the GNU General Public
5748 License is intended to guarantee your freedom to share and change free
5749 software--to make sure the software is free for all its users. This
5750 General Public License applies to most of the Free Software
5751 Foundation's software and to any other program whose authors commit to
5752 using it. (Some other Free Software Foundation software is covered by
5753 the GNU Library General Public License instead.) You can apply it to
5754 your programs, too.
5756 When we speak of free software, we are referring to freedom, not
5757 price. Our General Public Licenses are designed to make sure that you
5758 have the freedom to distribute copies of free software (and charge for
5759 this service if you wish), that you receive source code or can get it
5760 if you want it, that you can change the software or use pieces of it
5761 in new free programs; and that you know you can do these things.
5763 To protect your rights, we need to make restrictions that forbid
5764 anyone to deny you these rights or to ask you to surrender the rights.
5765 These restrictions translate to certain responsibilities for you if you
5766 distribute copies of the software, or if you modify it.
5768 For example, if you distribute copies of such a program, whether
5769 gratis or for a fee, you must give the recipients all the rights that
5770 you have. You must make sure that they, too, receive or can get the
5771 source code. And you must show them these terms so they know their
5772 rights.
5774 We protect your rights with two steps: (1) copyright the software, and
5775 (2) offer you this license which gives you legal permission to copy,
5776 distribute and/or modify the software.
5778 Also, for each author's protection and ours, we want to make certain
5779 that everyone understands that there is no warranty for this free
5780 software. If the software is modified by someone else and passed on, we
5781 want its recipients to know that what they have is not the original, so
5782 that any problems introduced by others will not reflect on the original
5783 authors' reputations.
5785 Finally, any free program is threatened constantly by software
5786 patents. We wish to avoid the danger that redistributors of a free
5787 program will individually obtain patent licenses, in effect making the
5788 program proprietary. To prevent this, we have made it clear that any
5789 patent must be licensed for everyone's free use or not licensed at all.
5791 The precise terms and conditions for copying, distribution and
5792 modification follow.
5794 GNU GENERAL PUBLIC LICENSE
5795 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
5797 0. This License applies to any program or other work which contains
5798 a notice placed by the copyright holder saying it may be distributed
5799 under the terms of this General Public License. The &quot;Program&quot;, below,
5800 refers to any such program or work, and a &quot;work based on the Program&quot;
5801 means either the Program or any derivative work under copyright law:
5802 that is to say, a work containing the Program or a portion of it,
5803 either verbatim or with modifications and/or translated into another
5804 language. (Hereinafter, translation is included without limitation in
5805 the term &quot;modification&quot;.) Each licensee is addressed as &quot;you&quot;.
5807 Activities other than copying, distribution and modification are not
5808 covered by this License; they are outside its scope. The act of
5809 running the Program is not restricted, and the output from the Program
5810 is covered only if its contents constitute a work based on the
5811 Program (independent of having been made by running the Program).
5812 Whether that is true depends on what the Program does.
5814 1. You may copy and distribute verbatim copies of the Program's
5815 source code as you receive it, in any medium, provided that you
5816 conspicuously and appropriately publish on each copy an appropriate
5817 copyright notice and disclaimer of warranty; keep intact all the
5818 notices that refer to this License and to the absence of any warranty;
5819 and give any other recipients of the Program a copy of this License
5820 along with the Program.
5822 You may charge a fee for the physical act of transferring a copy, and
5823 you may at your option offer warranty protection in exchange for a fee.
5825 2. You may modify your copy or copies of the Program or any portion
5826 of it, thus forming a work based on the Program, and copy and
5827 distribute such modifications or work under the terms of Section 1
5828 above, provided that you also meet all of these conditions:
5830 a) You must cause the modified files to carry prominent notices
5831 stating that you changed the files and the date of any change.
5833 b) You must cause any work that you distribute or publish, that in
5834 whole or in part contains or is derived from the Program or any
5835 part thereof, to be licensed as a whole at no charge to all third
5836 parties under the terms of this License.
5838 c) If the modified program normally reads commands interactively
5839 when run, you must cause it, when started running for such
5840 interactive use in the most ordinary way, to print or display an
5841 announcement including an appropriate copyright notice and a
5842 notice that there is no warranty (or else, saying that you provide
5843 a warranty) and that users may redistribute the program under
5844 these conditions, and telling the user how to view a copy of this
5845 License. (Exception: if the Program itself is interactive but
5846 does not normally print such an announcement, your work based on
5847 the Program is not required to print an announcement.)
5849 These requirements apply to the modified work as a whole. If
5850 identifiable sections of that work are not derived from the Program,
5851 and can be reasonably considered independent and separate works in
5852 themselves, then this License, and its terms, do not apply to those
5853 sections when you distribute them as separate works. But when you
5854 distribute the same sections as part of a whole which is a work based
5855 on the Program, the distribution of the whole must be on the terms of
5856 this License, whose permissions for other licensees extend to the
5857 entire whole, and thus to each and every part regardless of who wrote it.
5859 Thus, it is not the intent of this section to claim rights or contest
5860 your rights to work written entirely by you; rather, the intent is to
5861 exercise the right to control the distribution of derivative or
5862 collective works based on the Program.
5864 In addition, mere aggregation of another work not based on the Program
5865 with the Program (or with a work based on the Program) on a volume of
5866 a storage or distribution medium does not bring the other work under
5867 the scope of this License.
5869 3. You may copy and distribute the Program (or a work based on it,
5870 under Section 2) in object code or executable form under the terms of
5871 Sections 1 and 2 above provided that you also do one of the following:
5873 a) Accompany it with the complete corresponding machine-readable
5874 source code, which must be distributed under the terms of Sections
5875 1 and 2 above on a medium customarily used for software interchange; or,
5877 b) Accompany it with a written offer, valid for at least three
5878 years, to give any third party, for a charge no more than your
5879 cost of physically performing source distribution, a complete
5880 machine-readable copy of the corresponding source code, to be
5881 distributed under the terms of Sections 1 and 2 above on a medium
5882 customarily used for software interchange; or,
5884 c) Accompany it with the information you received as to the offer
5885 to distribute corresponding source code. (This alternative is
5886 allowed only for noncommercial distribution and only if you
5887 received the program in object code or executable form with such
5888 an offer, in accord with Subsection b above.)
5890 The source code for a work means the preferred form of the work for
5891 making modifications to it. For an executable work, complete source
5892 code means all the source code for all modules it contains, plus any
5893 associated interface definition files, plus the scripts used to
5894 control compilation and installation of the executable. However, as a
5895 special exception, the source code distributed need not include
5896 anything that is normally distributed (in either source or binary
5897 form) with the major components (compiler, kernel, and so on) of the
5898 operating system on which the executable runs, unless that component
5899 itself accompanies the executable.
5901 If distribution of executable or object code is made by offering
5902 access to copy from a designated place, then offering equivalent
5903 access to copy the source code from the same place counts as
5904 distribution of the source code, even though third parties are not
5905 compelled to copy the source along with the object code.
5907 4. You may not copy, modify, sublicense, or distribute the Program
5908 except as expressly provided under this License. Any attempt
5909 otherwise to copy, modify, sublicense or distribute the Program is
5910 void, and will automatically terminate your rights under this License.
5911 However, parties who have received copies, or rights, from you under
5912 this License will not have their licenses terminated so long as such
5913 parties remain in full compliance.
5915 5. You are not required to accept this License, since you have not
5916 signed it. However, nothing else grants you permission to modify or
5917 distribute the Program or its derivative works. These actions are
5918 prohibited by law if you do not accept this License. Therefore, by
5919 modifying or distributing the Program (or any work based on the
5920 Program), you indicate your acceptance of this License to do so, and
5921 all its terms and conditions for copying, distributing or modifying
5922 the Program or works based on it.
5924 6. Each time you redistribute the Program (or any work based on the
5925 Program), the recipient automatically receives a license from the
5926 original licensor to copy, distribute or modify the Program subject to
5927 these terms and conditions. You may not impose any further
5928 restrictions on the recipients' exercise of the rights granted herein.
5929 You are not responsible for enforcing compliance by third parties to
5930 this License.
5932 7. If, as a consequence of a court judgment or allegation of patent
5933 infringement or for any other reason (not limited to patent issues),
5934 conditions are imposed on you (whether by court order, agreement or
5935 otherwise) that contradict the conditions of this License, they do not
5936 excuse you from the conditions of this License. If you cannot
5937 distribute so as to satisfy simultaneously your obligations under this
5938 License and any other pertinent obligations, then as a consequence you
5939 may not distribute the Program at all. For example, if a patent
5940 license would not permit royalty-free redistribution of the Program by
5941 all those who receive copies directly or indirectly through you, then
5942 the only way you could satisfy both it and this License would be to
5943 refrain entirely from distribution of the Program.
5945 If any portion of this section is held invalid or unenforceable under
5946 any particular circumstance, the balance of the section is intended to
5947 apply and the section as a whole is intended to apply in other
5948 circumstances.
5950 It is not the purpose of this section to induce you to infringe any
5951 patents or other property right claims or to contest validity of any
5952 such claims; this section has the sole purpose of protecting the
5953 integrity of the free software distribution system, which is
5954 implemented by public license practices. Many people have made
5955 generous contributions to the wide range of software distributed
5956 through that system in reliance on consistent application of that
5957 system; it is up to the author/donor to decide if he or she is willing
5958 to distribute software through any other system and a licensee cannot
5959 impose that choice.
5961 This section is intended to make thoroughly clear what is believed to
5962 be a consequence of the rest of this License.
5964 8. If the distribution and/or use of the Program is restricted in
5965 certain countries either by patents or by copyrighted interfaces, the
5966 original copyright holder who places the Program under this License
5967 may add an explicit geographical distribution limitation excluding
5968 those countries, so that distribution is permitted only in or among
5969 countries not thus excluded. In such case, this License incorporates
5970 the limitation as if written in the body of this License.
5972 9. The Free Software Foundation may publish revised and/or new versions
5973 of the General Public License from time to time. Such new versions will
5974 be similar in spirit to the present version, but may differ in detail to
5975 address new problems or concerns.
5977 Each version is given a distinguishing version number. If the Program
5978 specifies a version number of this License which applies to it and &quot;any
5979 later version&quot;, you have the option of following the terms and conditions
5980 either of that version or of any later version published by the Free
5981 Software Foundation. If the Program does not specify a version number of
5982 this License, you may choose any version ever published by the Free Software
5983 Foundation.
5985 10. If you wish to incorporate parts of the Program into other free
5986 programs whose distribution conditions are different, write to the author
5987 to ask for permission. For software which is copyrighted by the Free
5988 Software Foundation, write to the Free Software Foundation; we sometimes
5989 make exceptions for this. Our decision will be guided by the two goals
5990 of preserving the free status of all derivatives of our free software and
5991 of promoting the sharing and reuse of software generally.
5993 NO WARRANTY
5995 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
5996 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
5997 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
5998 PROVIDE THE PROGRAM &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
5999 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
6000 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
6001 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
6002 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
6003 REPAIR OR CORRECTION.
6005 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
6006 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
6007 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
6008 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
6009 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
6010 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
6011 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
6012 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
6013 POSSIBILITY OF SUCH DAMAGES.
6015 END OF TERMS AND CONDITIONS
6017 How to Apply These Terms to Your New Programs
6019 If you develop a new program, and you want it to be of the greatest
6020 possible use to the public, the best way to achieve this is to make it
6021 free software which everyone can redistribute and change under these terms.
6023 To do so, attach the following notices to the program. It is safest
6024 to attach them to the start of each source file to most effectively
6025 convey the exclusion of warranty; and each file should have at least
6026 the &quot;copyright&quot; line and a pointer to where the full notice is found.
6028 &lt;one line to give the program's name and a brief idea of what it does.&gt;
6029 Copyright (C) &lt;year&gt; &lt;name of author&gt;
6031 This program is free software; you can redistribute it and/or modify
6032 it under the terms of the GNU General Public License as published by
6033 the Free Software Foundation; either version 2 of the License, or
6034 (at your option) any later version.
6036 This program is distributed in the hope that it will be useful,
6037 but WITHOUT ANY WARRANTY; without even the implied warranty of
6038 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6039 GNU General Public License for more details.
6041 You should have received a copy of the GNU General Public License
6042 along with this program; if not, write to the Free Software
6043 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
6046 Also add information on how to contact you by electronic and paper mail.
6048 If the program is interactive, make it output a short notice like this
6049 when it starts in an interactive mode:
6051 Gnomovision version 69, Copyright (C) year name of author
6052 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
6053 This is free software, and you are welcome to redistribute it
6054 under certain conditions; type `show c' for details.
6056 The hypothetical commands `show w' and `show c' should show the appropriate
6057 parts of the General Public License. Of course, the commands you use may
6058 be called something other than `show w' and `show c'; they could even be
6059 mouse-clicks or menu items--whatever suits your program.
6061 You should also get your employer (if you work as a programmer) or your
6062 school, if any, to sign a &quot;copyright disclaimer&quot; for the program, if
6063 necessary. Here is a sample; alter the names:
6065 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
6066 `Gnomovision' (which makes passes at compilers) written by James Hacker.
6068 &lt;signature of Ty Coon&gt;, 1 April 1989
6069 Ty Coon, President of Vice
6071 This General Public License does not permit incorporating your program into
6072 proprietary programs. If your program is a subroutine library, you may
6073 consider it more useful to permit linking proprietary applications with the
6074 library. If this is what you want to do, use the GNU Library General
6075 Public License instead of this License.
6076 </pre>
6077 </div>
6078 <div class="section">
6079 <h1><a class="toc-backref" href="#id221" id="license-for-scintilla-and-scite" name="license-for-scintilla-and-scite">License for Scintilla and SciTE</a></h1>
6080 <p>Copyright 1998-2003 by Neil Hodgson &lt;neilh(at)scintilla(dot)org&gt;</p>
6081 <p>All Rights Reserved</p>
6082 <p>Permission to use, copy, modify, and distribute this software and
6083 its documentation for any purpose and without fee is hereby granted,
6084 provided that the above copyright notice appear in all copies and
6085 that both that copyright notice and this permission notice appear in
6086 supporting documentation.</p>
6087 <p>NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
6088 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
6089 NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
6090 CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
6091 OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
6092 OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
6093 USE OR PERFORMANCE OF THIS SOFTWARE.</p>
6094 </div>
6095 </div>
6096 <div class="footer">
6097 <hr class="footer" />
6098 <a class="reference" href="geany.txt">View document source</a>.
6099 Generated on: 2010-08-11 14:31 UTC.
6100 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.
6102 </div>
6103 </body>
6104 </html>