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