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