FreeBasic: Update keywords
[geany-mirror.git] / doc / geany.html
blob3d77bcce2132aaf74119aba20ce8cefc1fe2371c
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.11: 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="2014-04-16" />
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>2014-04-16</td></tr>
145 <tr><th class="docinfo-name">Version:</th>
146 <td>1.24.1</td></tr>
147 </tbody>
148 </table>
149 <!-- -*- reStructuredText -*- -->
150 <p>Copyright © 2005-2014</p>
151 <p>This document is distributed under the terms of the GNU General Public
152 License as published by the Free Software Foundation; either version 2
153 of the License, or (at your option) any later version. A copy of this
154 license can be found in the file COPYING included with the source code
155 of this program, and also in the chapter <a class="reference internal" href="#gnu-general-public-license">GNU General Public License</a>.</p>
156 <div class="contents topic" id="contents">
157 <p class="topic-title first">Contents</p>
158 <ul class="simple">
159 <li><a class="reference internal" href="#introduction" id="id7">Introduction</a><ul>
160 <li><a class="reference internal" href="#about-geany" id="id8">About Geany</a></li>
161 <li><a class="reference internal" href="#where-to-get-it" id="id9">Where to get it</a></li>
162 <li><a class="reference internal" href="#license" id="id10">License</a></li>
163 <li><a class="reference internal" href="#about-this-document" id="id11">About this document</a></li>
164 </ul>
165 </li>
166 <li><a class="reference internal" href="#installation" id="id12">Installation</a><ul>
167 <li><a class="reference internal" href="#requirements" id="id13">Requirements</a></li>
168 <li><a class="reference internal" href="#binary-packages" id="id14">Binary packages</a></li>
169 <li><a class="reference internal" href="#source-compilation" id="id15">Source compilation</a><ul>
170 <li><a class="reference internal" href="#autotools-based-build-system" id="id16">Autotools based build system</a></li>
171 <li><a class="reference internal" href="#waf-based-build-system" id="id17">Waf based build system</a><ul>
172 <li><a class="reference internal" href="#waf-cache" id="id18">Waf cache</a><ul>
173 <li><a class="reference internal" href="#cleaning-the-cache" id="id19">Cleaning the cache</a></li>
174 </ul>
175 </li>
176 </ul>
177 </li>
178 <li><a class="reference internal" href="#custom-installation" id="id20">Custom installation</a></li>
179 <li><a class="reference internal" href="#dynamic-linking-loader-support-and-vte" id="id21">Dynamic linking loader support and VTE</a></li>
180 <li><a class="reference internal" href="#build-problems" id="id22">Build problems</a></li>
181 </ul>
182 </li>
183 <li><a class="reference internal" href="#installation-prefix" id="id23">Installation prefix</a></li>
184 </ul>
185 </li>
186 <li><a class="reference internal" href="#usage" id="id24">Usage</a><ul>
187 <li><a class="reference internal" href="#getting-started" id="id25">Getting started</a></li>
188 <li><a class="reference internal" href="#the-geany-workspace" id="id26">The Geany workspace</a></li>
189 <li><a class="reference internal" href="#command-line-options" id="id27">Command line options</a></li>
190 <li><a class="reference internal" href="#general" id="id28">General</a><ul>
191 <li><a class="reference internal" href="#startup" id="id29">Startup</a></li>
192 <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>
193 <li><a class="reference internal" href="#virtual-terminal-emulator-widget-vte" id="id31">Virtual terminal emulator widget (VTE)</a></li>
194 <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>
195 </ul>
196 </li>
197 <li><a class="reference internal" href="#documents" id="id33">Documents</a><ul>
198 <li><a class="reference internal" href="#switching-between-documents" id="id34">Switching between documents</a></li>
199 <li><a class="reference internal" href="#cloning-documents" id="id35">Cloning documents</a></li>
200 </ul>
201 </li>
202 <li><a class="reference internal" href="#character-sets-and-unicode-byte-order-mark-bom" id="id36">Character sets and Unicode Byte-Order-Mark (BOM)</a><ul>
203 <li><a class="reference internal" href="#using-character-sets" id="id37">Using character sets</a></li>
204 <li><a class="reference internal" href="#in-file-encoding-specification" id="id38">In-file encoding specification</a></li>
205 <li><a class="reference internal" href="#special-encoding-none" id="id39">Special encoding &quot;None&quot;</a></li>
206 <li><a class="reference internal" href="#unicode-byte-order-mark-bom" id="id40">Unicode Byte-Order-Mark (BOM)</a></li>
207 </ul>
208 </li>
209 <li><a class="reference internal" href="#editing" id="id41">Editing</a><ul>
210 <li><a class="reference internal" href="#folding" id="id42">Folding</a></li>
211 <li><a class="reference internal" href="#column-mode-editing-rectangular-selections" id="id43">Column mode editing (rectangular selections)</a></li>
212 <li><a class="reference internal" href="#drag-and-drop-of-text" id="id44">Drag and drop of text</a></li>
213 <li><a class="reference internal" href="#indentation" id="id45">Indentation</a><ul>
214 <li><a class="reference internal" href="#applying-new-indentation-settings" id="id46">Applying new indentation settings</a></li>
215 <li><a class="reference internal" href="#detecting-indent-type" id="id47">Detecting indent type</a></li>
216 </ul>
217 </li>
218 <li><a class="reference internal" href="#auto-indentation" id="id48">Auto-indentation</a></li>
219 <li><a class="reference internal" href="#bookmarks" id="id49">Bookmarks</a></li>
220 <li><a class="reference internal" href="#code-navigation-history" id="id50">Code navigation history</a></li>
221 <li><a class="reference internal" href="#sending-text-through-custom-commands" id="id51">Sending text through custom commands</a></li>
222 <li><a class="reference internal" href="#context-actions" id="id52">Context actions</a></li>
223 <li><a class="reference internal" href="#autocompletion" id="id53">Autocompletion</a><ul>
224 <li><a class="reference internal" href="#word-part-completion" id="id54">Word part completion</a></li>
225 <li><a class="reference internal" href="#scope-autocompletion" id="id55">Scope autocompletion</a></li>
226 </ul>
227 </li>
228 <li><a class="reference internal" href="#user-definable-snippets" id="id56">User-definable snippets</a><ul>
229 <li><a class="reference internal" href="#snippet-keybindings" id="id57">Snippet keybindings</a></li>
230 </ul>
231 </li>
232 <li><a class="reference internal" href="#inserting-unicode-characters" id="id58">Inserting Unicode characters</a></li>
233 </ul>
234 </li>
235 <li><a class="reference internal" href="#search-replace-and-go-to" id="id59">Search, replace and go to</a><ul>
236 <li><a class="reference internal" href="#toolbar-entries" id="id60">Toolbar entries</a><ul>
237 <li><a class="reference internal" href="#search-bar" id="id61">Search bar</a></li>
238 </ul>
239 </li>
240 <li><a class="reference internal" href="#find" id="id62">Find</a><ul>
241 <li><a class="reference internal" href="#matching-options" id="id63">Matching options</a></li>
242 <li><a class="reference internal" href="#find-all" id="id64">Find all</a></li>
243 <li><a class="reference internal" href="#change-font-in-search-dialog-text-fields" id="id65">Change font in search dialog text fields</a></li>
244 </ul>
245 </li>
246 <li><a class="reference internal" href="#find-selection" id="id66">Find selection</a></li>
247 <li><a class="reference internal" href="#find-usage" id="id67">Find usage</a></li>
248 <li><a class="reference internal" href="#find-in-files" id="id68">Find in files</a><ul>
249 <li><a class="reference internal" href="#filtering-out-version-control-files" id="id69">Filtering out version control files</a></li>
250 </ul>
251 </li>
252 <li><a class="reference internal" href="#replace" id="id70">Replace</a><ul>
253 <li><a class="reference internal" href="#replace-all" id="id71">Replace all</a></li>
254 </ul>
255 </li>
256 <li><a class="reference internal" href="#go-to-tag-definition" id="id72">Go to tag definition</a></li>
257 <li><a class="reference internal" href="#go-to-tag-declaration" id="id73">Go to tag declaration</a></li>
258 <li><a class="reference internal" href="#go-to-line" id="id74">Go to line</a></li>
259 <li><a class="reference internal" href="#regular-expressions" id="id75">Regular expressions</a></li>
260 </ul>
261 </li>
262 <li><a class="reference internal" href="#view-menu" id="id76">View menu</a><ul>
263 <li><a class="reference internal" href="#color-schemes-menu" id="id77">Color schemes menu</a></li>
264 </ul>
265 </li>
266 <li><a class="reference internal" href="#tags" id="id78">Tags</a><ul>
267 <li><a class="reference internal" href="#workspace-tags" id="id79">Workspace tags</a></li>
268 <li><a class="reference internal" href="#global-tags" id="id80">Global tags</a><ul>
269 <li><a class="reference internal" href="#default-global-tags-files" id="id81">Default global tags files</a></li>
270 <li><a class="reference internal" href="#global-tags-file-format" id="id82">Global tags file format</a><ul>
271 <li><a class="reference internal" href="#pipe-separated-format" id="id83">Pipe-separated format</a></li>
272 <li><a class="reference internal" href="#ctags-format" id="id84">CTags format</a></li>
273 </ul>
274 </li>
275 <li><a class="reference internal" href="#generating-a-global-tags-file" id="id85">Generating a global tags file</a><ul>
276 <li><a class="reference internal" href="#generating-c-c-tag-files" id="id86">Generating C/C++ tag files</a></li>
277 <li><a class="reference internal" href="#generating-tag-files-on-windows" id="id87">Generating tag files on Windows</a></li>
278 </ul>
279 </li>
280 </ul>
281 </li>
282 <li><a class="reference internal" href="#c-ignore-tags" id="id88">C ignore.tags</a></li>
283 </ul>
284 </li>
285 <li><a class="reference internal" href="#preferences" id="id89">Preferences</a><ul>
286 <li><a class="reference internal" href="#general-startup-preferences" id="id90">General Startup preferences</a><ul>
287 <li><a class="reference internal" href="#id1" id="id91">Startup</a></li>
288 <li><a class="reference internal" href="#shutdown" id="id92">Shutdown</a></li>
289 <li><a class="reference internal" href="#paths" id="id93">Paths</a></li>
290 </ul>
291 </li>
292 <li><a class="reference internal" href="#general-miscellaneous-preferences" id="id94">General Miscellaneous preferences</a><ul>
293 <li><a class="reference internal" href="#miscellaneous" id="id95">Miscellaneous</a></li>
294 <li><a class="reference internal" href="#search" id="id96">Search</a></li>
295 <li><a class="reference internal" href="#projects" id="id97">Projects</a></li>
296 </ul>
297 </li>
298 <li><a class="reference internal" href="#interface-preferences" id="id98">Interface preferences</a><ul>
299 <li><a class="reference internal" href="#sidebar" id="id99">Sidebar</a></li>
300 <li><a class="reference internal" href="#fonts" id="id100">Fonts</a></li>
301 <li><a class="reference internal" href="#id2" id="id101">Miscellaneous</a></li>
302 </ul>
303 </li>
304 <li><a class="reference internal" href="#interface-notebook-tab-preferences" id="id102">Interface Notebook tab preferences</a><ul>
305 <li><a class="reference internal" href="#editor-tabs" id="id103">Editor tabs</a></li>
306 <li><a class="reference internal" href="#tab-positions" id="id104">Tab positions</a></li>
307 </ul>
308 </li>
309 <li><a class="reference internal" href="#interface-toolbar-preferences" id="id105">Interface Toolbar preferences</a><ul>
310 <li><a class="reference internal" href="#toolbar" id="id106">Toolbar</a></li>
311 <li><a class="reference internal" href="#appearance" id="id107">Appearance</a></li>
312 </ul>
313 </li>
314 <li><a class="reference internal" href="#editor-features-preferences" id="id108">Editor Features preferences</a><ul>
315 <li><a class="reference internal" href="#features" id="id109">Features</a></li>
316 </ul>
317 </li>
318 <li><a class="reference internal" href="#editor-indentation-preferences" id="id110">Editor Indentation preferences</a><ul>
319 <li><a class="reference internal" href="#indentation-group" id="id111">Indentation group</a></li>
320 </ul>
321 </li>
322 <li><a class="reference internal" href="#editor-completions-preferences" id="id112">Editor Completions preferences</a><ul>
323 <li><a class="reference internal" href="#completions" id="id113">Completions</a></li>
324 <li><a class="reference internal" href="#auto-close-quotes-and-brackets" id="id114">Auto-close quotes and brackets</a></li>
325 </ul>
326 </li>
327 <li><a class="reference internal" href="#editor-display-preferences" id="id115">Editor Display preferences</a><ul>
328 <li><a class="reference internal" href="#display" id="id116">Display</a></li>
329 <li><a class="reference internal" href="#long-line-marker" id="id117">Long line marker</a></li>
330 <li><a class="reference internal" href="#virtual-spaces" id="id118">Virtual spaces</a></li>
331 </ul>
332 </li>
333 <li><a class="reference internal" href="#files-preferences" id="id119">Files preferences</a><ul>
334 <li><a class="reference internal" href="#new-files" id="id120">New files</a></li>
335 <li><a class="reference internal" href="#saving-files" id="id121">Saving files</a></li>
336 <li><a class="reference internal" href="#id3" id="id122">Miscellaneous</a></li>
337 </ul>
338 </li>
339 <li><a class="reference internal" href="#tools-preferences" id="id123">Tools preferences</a><ul>
340 <li><a class="reference internal" href="#tool-paths" id="id124">Tool paths</a></li>
341 <li><a class="reference internal" href="#commands" id="id125">Commands</a></li>
342 </ul>
343 </li>
344 <li><a class="reference internal" href="#template-preferences" id="id126">Template preferences</a><ul>
345 <li><a class="reference internal" href="#template-data" id="id127">Template data</a></li>
346 </ul>
347 </li>
348 <li><a class="reference internal" href="#keybinding-preferences" id="id128">Keybinding preferences</a></li>
349 <li><a class="reference internal" href="#printing-preferences" id="id129">Printing preferences</a></li>
350 <li><a class="reference internal" href="#various-preferences" id="id130">Various preferences</a><ul>
351 <li><a class="reference internal" href="#statusbar-templates" id="id131">Statusbar Templates</a></li>
352 </ul>
353 </li>
354 <li><a class="reference internal" href="#terminal-vte-preferences" id="id132">Terminal (VTE) preferences</a><ul>
355 <li><a class="reference internal" href="#terminal-widget" id="id133">Terminal widget</a></li>
356 </ul>
357 </li>
358 </ul>
359 </li>
360 <li><a class="reference internal" href="#project-management" id="id134">Project management</a><ul>
361 <li><a class="reference internal" href="#new-project" id="id135">New project</a></li>
362 <li><a class="reference internal" href="#project-properties" id="id136">Project properties</a></li>
363 <li><a class="reference internal" href="#open-project" id="id137">Open project</a></li>
364 <li><a class="reference internal" href="#close-project" id="id138">Close project</a></li>
365 </ul>
366 </li>
367 <li><a class="reference internal" href="#build-menu" id="id139">Build menu</a><ul>
368 <li><a class="reference internal" href="#indicators" id="id140">Indicators</a></li>
369 <li><a class="reference internal" href="#default-build-menu-items" id="id141">Default build menu items</a><ul>
370 <li><a class="reference internal" href="#compile" id="id142">Compile</a></li>
371 <li><a class="reference internal" href="#build" id="id143">Build</a></li>
372 <li><a class="reference internal" href="#make" id="id144">Make</a></li>
373 <li><a class="reference internal" href="#make-custom-target" id="id145">Make custom target</a></li>
374 <li><a class="reference internal" href="#make-object" id="id146">Make object</a></li>
375 <li><a class="reference internal" href="#next-error" id="id147">Next error</a></li>
376 <li><a class="reference internal" href="#previous-error" id="id148">Previous error</a></li>
377 <li><a class="reference internal" href="#execute" id="id149">Execute</a></li>
378 <li><a class="reference internal" href="#stopping-running-processes" id="id150">Stopping running processes</a><ul>
379 <li><a class="reference internal" href="#terminal-emulators" id="id151">Terminal emulators</a></li>
380 </ul>
381 </li>
382 <li><a class="reference internal" href="#set-build-commands" id="id152">Set build commands</a></li>
383 </ul>
384 </li>
385 <li><a class="reference internal" href="#build-menu-configuration" id="id153">Build menu configuration</a></li>
386 <li><a class="reference internal" href="#build-menu-commands-dialog" id="id154">Build menu commands dialog</a><ul>
387 <li><a class="reference internal" href="#substitutions-in-commands-and-working-directories" id="id155">Substitutions in commands and working directories</a></li>
388 <li><a class="reference internal" href="#build-menu-keyboard-shortcuts" id="id156">Build menu keyboard shortcuts</a></li>
389 <li><a class="reference internal" href="#old-settings" id="id157">Old settings</a></li>
390 </ul>
391 </li>
392 </ul>
393 </li>
394 <li><a class="reference internal" href="#printing-support" id="id158">Printing support</a></li>
395 <li><a class="reference internal" href="#plugins" id="id159">Plugins</a><ul>
396 <li><a class="reference internal" href="#plugin-manager" id="id160">Plugin manager</a></li>
397 </ul>
398 </li>
399 <li><a class="reference internal" href="#keybindings" id="id161">Keybindings</a><ul>
400 <li><a class="reference internal" href="#switching-documents" id="id162">Switching documents</a></li>
401 <li><a class="reference internal" href="#configurable-keybindings" id="id163">Configurable keybindings</a><ul>
402 <li><a class="reference internal" href="#file-keybindings" id="id164">File keybindings</a></li>
403 <li><a class="reference internal" href="#editor-keybindings" id="id165">Editor keybindings</a></li>
404 <li><a class="reference internal" href="#clipboard-keybindings" id="id166">Clipboard keybindings</a></li>
405 <li><a class="reference internal" href="#select-keybindings" id="id167">Select keybindings</a></li>
406 <li><a class="reference internal" href="#insert-keybindings" id="id168">Insert keybindings</a></li>
407 <li><a class="reference internal" href="#format-keybindings" id="id169">Format keybindings</a></li>
408 <li><a class="reference internal" href="#settings-keybindings" id="id170">Settings keybindings</a></li>
409 <li><a class="reference internal" href="#search-keybindings" id="id171">Search keybindings</a></li>
410 <li><a class="reference internal" href="#go-to-keybindings" id="id172">Go to keybindings</a></li>
411 <li><a class="reference internal" href="#view-keybindings" id="id173">View keybindings</a></li>
412 <li><a class="reference internal" href="#focus-keybindings" id="id174">Focus keybindings</a></li>
413 <li><a class="reference internal" href="#notebook-tab-keybindings" id="id175">Notebook tab keybindings</a></li>
414 <li><a class="reference internal" href="#document-keybindings" id="id176">Document keybindings</a></li>
415 <li><a class="reference internal" href="#project-keybindings" id="id177">Project keybindings</a></li>
416 <li><a class="reference internal" href="#build-keybindings" id="id178">Build keybindings</a></li>
417 <li><a class="reference internal" href="#tools-keybindings" id="id179">Tools keybindings</a></li>
418 <li><a class="reference internal" href="#help-keybindings" id="id180">Help keybindings</a></li>
419 </ul>
420 </li>
421 </ul>
422 </li>
423 </ul>
424 </li>
425 <li><a class="reference internal" href="#configuration-files" id="id181">Configuration files</a><ul>
426 <li><a class="reference internal" href="#configuration-file-paths" id="id182">Configuration file paths</a><ul>
427 <li><a class="reference internal" href="#paths-on-unix-like-systems" id="id183">Paths on Unix-like systems</a></li>
428 <li><a class="reference internal" href="#paths-on-windows" id="id184">Paths on Windows</a></li>
429 </ul>
430 </li>
431 <li><a class="reference internal" href="#tools-menu-items" id="id185">Tools menu items</a></li>
432 <li><a class="reference internal" href="#global-configuration-file" id="id186">Global configuration file</a></li>
433 <li><a class="reference internal" href="#filetype-definition-files" id="id187">Filetype definition files</a><ul>
434 <li><a class="reference internal" href="#filenames" id="id188">Filenames</a></li>
435 <li><a class="reference internal" href="#system-files" id="id189">System files</a></li>
436 <li><a class="reference internal" href="#user-files" id="id190">User files</a></li>
437 <li><a class="reference internal" href="#custom-filetypes" id="id191">Custom filetypes</a><ul>
438 <li><a class="reference internal" href="#creating-a-custom-filetype-from-an-existing-filetype" id="id192">Creating a custom filetype from an existing filetype</a></li>
439 </ul>
440 </li>
441 <li><a class="reference internal" href="#filetype-configuration" id="id193">Filetype configuration</a><ul>
442 <li><a class="reference internal" href="#styling-section" id="id194">[styling] section</a><ul>
443 <li><a class="reference internal" href="#using-a-named-style" id="id195">Using a named style</a></li>
444 <li><a class="reference internal" href="#reading-styles-from-another-filetype" id="id196">Reading styles from another filetype</a></li>
445 </ul>
446 </li>
447 <li><a class="reference internal" href="#keywords-section" id="id197">[keywords] section</a></li>
448 <li><a class="reference internal" href="#lexer-properties-section" id="id198">[lexer_properties] section</a></li>
449 <li><a class="reference internal" href="#settings-section" id="id199">[settings] section</a></li>
450 <li><a class="reference internal" href="#indentation-section" id="id200">[indentation] section</a></li>
451 <li><a class="reference internal" href="#build-settings-section" id="id201">[build_settings] section</a></li>
452 </ul>
453 </li>
454 <li><a class="reference internal" href="#special-file-filetypes-common" id="id202">Special file filetypes.common</a><ul>
455 <li><a class="reference internal" href="#named-styles-section" id="id203">[named_styles] section</a></li>
456 <li><a class="reference internal" href="#named-colors-section" id="id204">[named_colors] section</a></li>
457 <li><a class="reference internal" href="#id4" id="id205">[styling] section</a></li>
458 <li><a class="reference internal" href="#id5" id="id206">[settings] section</a></li>
459 </ul>
460 </li>
461 </ul>
462 </li>
463 <li><a class="reference internal" href="#filetype-extensions" id="id207">Filetype extensions</a><ul>
464 <li><a class="reference internal" href="#filetype-group-membership" id="id208">Filetype group membership</a></li>
465 </ul>
466 </li>
467 <li><a class="reference internal" href="#preferences-file-format" id="id209">Preferences file format</a><ul>
468 <li><a class="reference internal" href="#build-menu-section" id="id210">[build-menu] section</a></li>
469 </ul>
470 </li>
471 <li><a class="reference internal" href="#project-file-format" id="id211">Project file format</a><ul>
472 <li><a class="reference internal" href="#build-menu-additions" id="id212">[build-menu] additions</a></li>
473 </ul>
474 </li>
475 <li><a class="reference internal" href="#templates" id="id213">Templates</a><ul>
476 <li><a class="reference internal" href="#template-meta-data" id="id214">Template meta data</a></li>
477 <li><a class="reference internal" href="#file-templates" id="id215">File templates</a><ul>
478 <li><a class="reference internal" href="#adding-file-templates" id="id216">Adding file templates</a></li>
479 </ul>
480 </li>
481 <li><a class="reference internal" href="#customizing-templates" id="id217">Customizing templates</a><ul>
482 <li><a class="reference internal" href="#template-wildcards" id="id218">Template wildcards</a><ul>
483 <li><a class="reference internal" href="#special-command-wildcard" id="id219">Special {command:} wildcard</a></li>
484 </ul>
485 </li>
486 </ul>
487 </li>
488 </ul>
489 </li>
490 <li><a class="reference internal" href="#customizing-the-toolbar" id="id220">Customizing the toolbar</a><ul>
491 <li><a class="reference internal" href="#manually-editing-the-toolbar-layout" id="id221">Manually editing the toolbar layout</a></li>
492 <li><a class="reference internal" href="#available-toolbar-elements" id="id222">Available toolbar elements</a></li>
493 </ul>
494 </li>
495 </ul>
496 </li>
497 <li><a class="reference internal" href="#plugin-documentation" id="id223">Plugin documentation</a><ul>
498 <li><a class="reference internal" href="#html-characters" id="id224">HTML Characters</a><ul>
499 <li><a class="reference internal" href="#insert-entity-dialog" id="id225">Insert entity dialog</a></li>
500 <li><a class="reference internal" href="#replace-special-chars-by-its-entity" id="id226">Replace special chars by its entity</a><ul>
501 <li><a class="reference internal" href="#at-typing-time" id="id227">At typing time</a></li>
502 <li><a class="reference internal" href="#bulk-replacement" id="id228">Bulk replacement</a></li>
503 </ul>
504 </li>
505 </ul>
506 </li>
507 <li><a class="reference internal" href="#save-actions" id="id229">Save Actions</a><ul>
508 <li><a class="reference internal" href="#auto-save" id="id230">Auto Save</a></li>
509 <li><a class="reference internal" href="#save-on-focus-out" id="id231">Save on focus out</a></li>
510 <li><a class="reference internal" href="#instant-save" id="id232">Instant Save</a></li>
511 <li><a class="reference internal" href="#backup-copy" id="id233">Backup Copy</a></li>
512 </ul>
513 </li>
514 </ul>
515 </li>
516 <li><a class="reference internal" href="#contributing-to-this-document" id="id234">Contributing to this document</a></li>
517 <li><a class="reference internal" href="#scintilla-keyboard-commands" id="id235">Scintilla keyboard commands</a><ul>
518 <li><a class="reference internal" href="#keyboard-commands" id="id236">Keyboard commands</a></li>
519 </ul>
520 </li>
521 <li><a class="reference internal" href="#tips-and-tricks" id="id237">Tips and tricks</a><ul>
522 <li><a class="reference internal" href="#document-notebook" id="id238">Document notebook</a></li>
523 <li><a class="reference internal" href="#editor" id="id239">Editor</a></li>
524 <li><a class="reference internal" href="#interface" id="id240">Interface</a></li>
525 <li><a class="reference internal" href="#gtk-related" id="id241">GTK-related</a></li>
526 </ul>
527 </li>
528 <li><a class="reference internal" href="#compile-time-options" id="id242">Compile-time options</a><ul>
529 <li><a class="reference internal" href="#src-geany-h" id="id243">src/geany.h</a></li>
530 <li><a class="reference internal" href="#project-h" id="id244">project.h</a></li>
531 <li><a class="reference internal" href="#filetypes-c" id="id245">filetypes.c</a></li>
532 <li><a class="reference internal" href="#editor-h" id="id246">editor.h</a></li>
533 <li><a class="reference internal" href="#keyfile-c" id="id247">keyfile.c</a></li>
534 <li><a class="reference internal" href="#build-c" id="id248">build.c</a></li>
535 </ul>
536 </li>
537 <li><a class="reference internal" href="#gnu-general-public-license" id="id249">GNU General Public License</a></li>
538 <li><a class="reference internal" href="#license-for-scintilla-and-scite" id="id250">License for Scintilla and SciTE</a></li>
539 </ul>
540 </div>
541 <div class="section" id="introduction">
542 <h1><a class="toc-backref" href="#id7">Introduction</a></h1>
543 <div class="section" id="about-geany">
544 <h2><a class="toc-backref" href="#id8">About Geany</a></h2>
545 <p>Geany is a small and lightweight Integrated Development Environment. It
546 was developed to provide a small and fast IDE, which has only a few
547 dependencies on other packages. Another goal was to be as independent
548 as possible from a particular Desktop Environment like KDE or GNOME -
549 Geany only requires the GTK2 runtime libraries.</p>
550 <p>Some basic features of Geany:</p>
551 <ul class="simple">
552 <li>Syntax highlighting</li>
553 <li>Code folding</li>
554 <li>Autocompletion of symbols/words</li>
555 <li>Construct completion/snippets</li>
556 <li>Auto-closing of XML and HTML tags</li>
557 <li>Calltips</li>
558 <li>Many supported filetypes including C, Java, PHP, HTML, Python, Perl,
559 Pascal, and others</li>
560 <li>Symbol lists</li>
561 <li>Code navigation</li>
562 <li>Build system to compile and execute your code</li>
563 <li>Simple project management</li>
564 <li>Plugin interface</li>
565 </ul>
566 </div>
567 <div class="section" id="where-to-get-it">
568 <h2><a class="toc-backref" href="#id9">Where to get it</a></h2>
569 <p>You can obtain Geany from <a class="reference external" href="http://www.geany.org/">http://www.geany.org/</a> or perhaps also from
570 your distribution. For a list of available packages, please see
571 <a class="reference external" href="http://www.geany.org/Download/ThirdPartyPackages">http://www.geany.org/Download/ThirdPartyPackages</a>.</p>
572 </div>
573 <div class="section" id="license">
574 <h2><a class="toc-backref" href="#id10">License</a></h2>
575 <p>Geany is distributed under the terms of the GNU General Public License
576 as published by the Free Software Foundation; either version 2 of
577 the License, or (at your option) any later version. A copy of this
578 license can be found in the file COPYING included with the source
579 code of this program and in the chapter, <a class="reference internal" href="#gnu-general-public-license">GNU General Public License</a>.</p>
580 <p>The included Scintilla library (found in the subdirectory
581 <tt class="docutils literal">scintilla/</tt>) has its own license, which can be found in the chapter,
582 <a class="reference internal" href="#license-for-scintilla-and-scite">License for Scintilla and SciTE</a>.</p>
583 </div>
584 <div class="section" id="about-this-document">
585 <h2><a class="toc-backref" href="#id11">About this document</a></h2>
586 <p>This documentation is available in HTML and text formats.
587 The latest version can always be found at <a class="reference external" href="http://www.geany.org/">http://www.geany.org/</a>.</p>
588 <p>If you want to contribute to it, see <a class="reference internal" href="#contributing-to-this-document">Contributing to this document</a>.</p>
589 </div>
590 </div>
591 <div class="section" id="installation">
592 <h1><a class="toc-backref" href="#id12">Installation</a></h1>
593 <div class="section" id="requirements">
594 <h2><a class="toc-backref" href="#id13">Requirements</a></h2>
595 <p>You will need the GTK (&gt;= 2.16.0) libraries and their dependencies
596 (Pango, GLib and ATK). Your distro should provide packages for these,
597 usually installed by default. For Windows, you can download an installer
598 from the website which bundles these libraries.</p>
599 </div>
600 <div class="section" id="binary-packages">
601 <h2><a class="toc-backref" href="#id14">Binary packages</a></h2>
602 <p>There are many binary packages available. For an up-to-date but maybe
603 incomplete list see <a class="reference external" href="http://www.geany.org/Download/ThirdPartyPackages">http://www.geany.org/Download/ThirdPartyPackages</a>.</p>
604 </div>
605 <div class="section" id="source-compilation">
606 <h2><a class="toc-backref" href="#id15">Source compilation</a></h2>
607 <p>Compiling Geany is quite easy.
608 To do so, you need the GTK (&gt;= 2.16.0) libraries and header files.
609 You also need the Pango, GLib and ATK libraries and header files.
610 All these files are available at <a class="reference external" href="http://www.gtk.org">http://www.gtk.org</a>, but very often
611 your distro will provide development packages to save the trouble of
612 building these yourself.</p>
613 <p>Furthermore you need, of course, a C and C++ compiler. The GNU versions
614 of these tools are recommended.</p>
615 <div class="section" id="autotools-based-build-system">
616 <h3><a class="toc-backref" href="#id16">Autotools based build system</a></h3>
617 <p>The Autotools based build system is very mature and has been well tested.
618 To use it, you just need the Make tool, preferably GNU Make.</p>
619 <p>Then run the following commands:</p>
620 <pre class="literal-block">
621 $ ./configure
622 $ make
623 </pre>
624 <p>Then as root:</p>
625 <pre class="literal-block">
626 % make install
627 </pre>
628 <p>Or via sudo:</p>
629 <pre class="literal-block">
630 % sudo make install
631 </pre>
632 </div>
633 <div class="section" id="waf-based-build-system">
634 <h3><a class="toc-backref" href="#id17">Waf based build system</a></h3>
635 <p>The Waf build system is still quite young and under heavy development but already in a
636 usable state. In contrast to the Autotools system, Waf needs Python. So before using Waf, you need
637 to install Python on your system.
638 The advantage of the Waf build system over the Autotools based build system is that the whole
639 build process might be a bit faster. Especially when you use the Waf
640 cache feature for repetitive builds (e.g. when changing only a few source files
641 to test something) will become much faster since Waf will cache and re-use the
642 unchanged built files and only compile the changed code again. See <a class="reference internal" href="#waf-cache">Waf Cache</a> for details.
643 To build Geany with Waf as run:</p>
644 <pre class="literal-block">
645 $ ./waf configure
646 $ ./waf build
647 </pre>
648 <p>Then as root:</p>
649 <pre class="literal-block">
650 % ./waf install
651 </pre>
652 <div class="section" id="waf-cache">
653 <h4><a class="toc-backref" href="#id18">Waf cache</a></h4>
654 <p>The Waf build system has a nice and interesting feature which can help to avoid
655 a lot of unnecessary rebuilding of unchanged code. This often happens when developing new features
656 or trying to debug something in Geany.
657 Waf is able to store and retrieve the object files from a cache. This cache is declared
658 using the environment variable <tt class="docutils literal">WAFCACHE</tt>.
659 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
660 this, you first need to create this directory:</p>
661 <pre class="literal-block">
662 $ mkdir -p ~/.cache/waf
663 </pre>
664 <p>then add the environment variable to your shell configuration (the following example is for
665 Bash and should be adjusted to your used shell):</p>
666 <pre class="literal-block">
667 export WAFCACHE=/home/username/.cache/waf
668 </pre>
669 <p>Remember to replace <tt class="docutils literal">username</tt> with your actual username.</p>
670 <p>More information about the Waf cache feature are available at
671 <a class="reference external" href="http://code.google.com/p/waf/wiki/CacheObjectFiles">http://code.google.com/p/waf/wiki/CacheObjectFiles</a>.</p>
672 <div class="section" id="cleaning-the-cache">
673 <h5><a class="toc-backref" href="#id19">Cleaning the cache</a></h5>
674 <p>You should be careful about the size of the cache directory as it may
675 grow rapidly over time.
676 Waf doesn't do any cleaning or other house-keeping of the cache yet, so you need to keep it
677 clean by yourself.
678 An easy way to keep it clean is to run the following command regularly to remove old
679 cached files:</p>
680 <pre class="literal-block">
681 $ find /home/username/.cache/waf -mtime +14 -exec rm {} \;
682 </pre>
683 <p>This will delete all files in the cache directory which are older than 14 days.</p>
684 <p>For details about the <tt class="docutils literal">find</tt> command and its options, check its manual page.</p>
685 </div>
686 </div>
687 </div>
688 <div class="section" id="custom-installation">
689 <h3><a class="toc-backref" href="#id20">Custom installation</a></h3>
690 <p>The configure script supports several common options, for a detailed
691 list, type:</p>
692 <pre class="literal-block">
693 $ ./configure --help
694 </pre>
695 <p>or:</p>
696 <pre class="literal-block">
697 $ ./waf --help
698 </pre>
699 <p>(depending on which build system you use).</p>
700 <p>You may also want to read the INSTALL file for advanced installation
701 options.</p>
702 <ul class="simple">
703 <li>See also <a class="reference internal" href="#compile-time-options">Compile-time options</a>.</li>
704 </ul>
705 </div>
706 <div class="section" id="dynamic-linking-loader-support-and-vte">
707 <h3><a class="toc-backref" href="#id21">Dynamic linking loader support and VTE</a></h3>
708 <p>In the case that your system lacks dynamic linking loader support, you
709 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>
710 script. This prevents compiling Geany with dynamic linking loader
711 support for automatically loading <tt class="docutils literal">libvte.so.4</tt> if available.</p>
712 </div>
713 <div class="section" id="build-problems">
714 <h3><a class="toc-backref" href="#id22">Build problems</a></h3>
715 <p>If there are any errors during compilation, check your build
716 environment and try to find the error, otherwise contact the mailing
717 list or one the authors. Sometimes you might need to ask for specific
718 help from your distribution.</p>
719 </div>
720 </div>
721 <div class="section" id="installation-prefix">
722 <h2><a class="toc-backref" href="#id23">Installation prefix</a></h2>
723 <p>If you want to find Geany's system files after installation you may
724 want to know the installation prefix.</p>
725 <p>Pass the <tt class="docutils literal"><span class="pre">--print-prefix</span></tt> option to Geany to check this - see
726 <a class="reference internal" href="#command-line-options">Command line options</a>. The first path is the prefix.</p>
727 <p>On Unix-like systems this is commonly <tt class="docutils literal">/usr</tt> if you installed from
728 a binary package, or <tt class="docutils literal">/usr/local</tt> if you build from source.</p>
729 <div class="note">
730 <p class="first admonition-title">Note</p>
731 <p class="last">Editing system files is not necessary as you should use the
732 per-user configuration files instead, which don't need root
733 permissions. See <a class="reference internal" href="#configuration-files">Configuration files</a>.</p>
734 </div>
735 </div>
736 </div>
737 <div class="section" id="usage">
738 <h1><a class="toc-backref" href="#id24">Usage</a></h1>
739 <div class="section" id="getting-started">
740 <h2><a class="toc-backref" href="#id25">Getting started</a></h2>
741 <p>You can start Geany in the following ways:</p>
742 <ul>
743 <li><p class="first">From the Desktop Environment menu:</p>
744 <p>Choose in your application menu of your used Desktop Environment:
745 Development --&gt; Geany.</p>
746 <p>At Windows-systems you will find Geany after installation inside
747 the application menu within its special folder.</p>
748 </li>
749 <li><p class="first">From the command line:</p>
750 <p>To start Geany from a command line, type the following and press
751 Return:</p>
752 <pre class="literal-block">
753 % geany
754 </pre>
755 </li>
756 </ul>
757 </div>
758 <div class="section" id="the-geany-workspace">
759 <h2><a class="toc-backref" href="#id26">The Geany workspace</a></h2>
760 <p>The Geany window is shown in the following figure:</p>
761 <img alt="./images/main_window.png" src="./images/main_window.png" />
762 <p>The workspace has the following parts:</p>
763 <ul class="simple">
764 <li>The menu.</li>
765 <li>An optional toolbar.</li>
766 <li>An optional sidebar that can show the following tabs:<ul>
767 <li>Documents - A document list, and</li>
768 <li>Symbols - A list of symbols in your code.</li>
769 </ul>
770 </li>
771 <li>The main editor window.</li>
772 <li>An optional message window which can show the following tabs:<ul>
773 <li>Status - A list of status messages.</li>
774 <li>Compiler - The output of compiling or building programs.</li>
775 <li>Messages - Results of 'Find Usage', 'Find in Files' and other actions</li>
776 <li>Scribble - A text scratchpad for any use.</li>
777 <li>Terminal - An optional terminal window.</li>
778 </ul>
779 </li>
780 <li>A status bar</li>
781 </ul>
782 <p>Most of these can be configured in the <a class="reference internal" href="#interface-preferences">Interface preferences</a>, the
783 <a class="reference internal" href="#view-menu">View menu</a>, or the popup menu for the relevant area.</p>
784 <p>Additional tabs may be added to the sidebar and message window by plugins.</p>
785 <p>The position of the tabs can be selected in the interface preferences.</p>
786 <p>The sizes of the sidebar and message window can be adjusted by
787 dragging the dividers.</p>
788 </div>
789 <div class="section" id="command-line-options">
790 <h2><a class="toc-backref" href="#id27">Command line options</a></h2>
791 <table border="1" class="docutils">
792 <colgroup>
793 <col width="9%" />
794 <col width="18%" />
795 <col width="72%" />
796 </colgroup>
797 <thead valign="bottom">
798 <tr><th class="head">Short option</th>
799 <th class="head">Long option</th>
800 <th class="head">Function</th>
801 </tr>
802 </thead>
803 <tbody valign="top">
804 <tr><td><em>none</em></td>
805 <td>+number</td>
806 <td>Set initial line number for the first opened file
807 (same as --line, do not put a space between the + sign
808 and the number). E.g. &quot;geany +7 foo.bar&quot; will open the
809 file foo.bar and place the cursor in line 7.</td>
810 </tr>
811 <tr><td><em>none</em></td>
812 <td>--column</td>
813 <td>Set initial column number for the first opened file.</td>
814 </tr>
815 <tr><td>-c dir_name</td>
816 <td>--config=directory_name</td>
817 <td>Use an alternate configuration directory. The default
818 configuration directory is <tt class="docutils literal"><span class="pre">~/.config/geany/</span></tt> and that
819 is where <tt class="docutils literal">geany.conf</tt> and other configuration files
820 reside.</td>
821 </tr>
822 <tr><td><em>none</em></td>
823 <td>--ft-names</td>
824 <td>Print a list of Geany's internal filetype names (useful
825 for snippets configuration).</td>
826 </tr>
827 <tr><td>-g</td>
828 <td>--generate-tags</td>
829 <td>Generate a global tags file (see
830 <a class="reference internal" href="#generating-a-global-tags-file">Generating a global tags file</a>).</td>
831 </tr>
832 <tr><td>-P</td>
833 <td>--no-preprocessing</td>
834 <td>Don't preprocess C/C++ files when generating tags.</td>
835 </tr>
836 <tr><td>-i</td>
837 <td>--new-instance</td>
838 <td>Do not open files in a running instance, force opening
839 a new instance. Only available if Geany was compiled
840 with support for Sockets.</td>
841 </tr>
842 <tr><td>-l</td>
843 <td>--line</td>
844 <td>Set initial line number for the first opened file.</td>
845 </tr>
846 <tr><td><em>none</em></td>
847 <td>--list-documents</td>
848 <td>Return a list of open documents in a running Geany
849 instance.
850 This can be used to read the currently opened documents in
851 Geany from an external script or tool. The returned list
852 is separated by newlines (LF) and consists of the full,
853 UTF-8 encoded filenames of the documents.
854 Only available if Geany was compiled with support for
855 Sockets.</td>
856 </tr>
857 <tr><td>-m</td>
858 <td>--no-msgwin</td>
859 <td>Do not show the message window. Use this option if you
860 do not need compiler messages or VTE support.</td>
861 </tr>
862 <tr><td>-n</td>
863 <td>--no-ctags</td>
864 <td>Do not load symbol completion and call tip data. Use this
865 option if you do not want to use them.</td>
866 </tr>
867 <tr><td>-p</td>
868 <td>--no-plugins</td>
869 <td>Do not load plugins or plugin support.</td>
870 </tr>
871 <tr><td><em>none</em></td>
872 <td>--print-prefix</td>
873 <td>Print installation prefix, the data directory, the lib
874 directory and the locale directory (in that order) to
875 stdout, one line each. This is mainly intended for plugin
876 authors to detect installation paths.</td>
877 </tr>
878 <tr><td>-r</td>
879 <td>--read-only</td>
880 <td>Open all files given on the command line in read-only mode.
881 This only applies to files opened explicitly from the command
882 line, so files from previous sessions or project files are
883 unaffected.</td>
884 </tr>
885 <tr><td>-s</td>
886 <td>--no-session</td>
887 <td>Do not load the previous session's files.</td>
888 </tr>
889 <tr><td>-t</td>
890 <td>--no-terminal</td>
891 <td>Do not load terminal support. Use this option if you do
892 not want to load the virtual terminal emulator widget
893 at startup. If you do not have <tt class="docutils literal">libvte.so.4</tt> installed,
894 then terminal-support is automatically disabled. Only
895 available if Geany was compiled with support for VTE.</td>
896 </tr>
897 <tr><td><em>none</em></td>
898 <td>--socket-file</td>
899 <td><p class="first">Use this socket filename for communication with a
900 running Geany instance. This can be used with the following
901 command to execute Geany on the current workspace:</p>
902 <pre class="last literal-block">
903 geany --socket-file=/tmp/geany-sock-$(xprop -root _NET_CURRENT_DESKTOP | awk '{print $3}')
904 </pre>
905 </td>
906 </tr>
907 <tr><td><em>none</em></td>
908 <td>--vte-lib</td>
909 <td>Specify explicitly the path including filename or only
910 the filename to the VTE library, e.g.
911 <tt class="docutils literal">/usr/lib/libvte.so</tt> or <tt class="docutils literal">libvte.so</tt>. This option is
912 only needed when the auto-detection does not work. Only
913 available if Geany was compiled with support for VTE.</td>
914 </tr>
915 <tr><td>-v</td>
916 <td>--verbose</td>
917 <td>Be verbose (print useful status messages).</td>
918 </tr>
919 <tr><td>-V</td>
920 <td>--version</td>
921 <td>Show version information and exit.</td>
922 </tr>
923 <tr><td>-?</td>
924 <td>--help</td>
925 <td>Show help information and exit.</td>
926 </tr>
927 <tr><td><em>none</em></td>
928 <td>[files ...]</td>
929 <td><p class="first">Open all given files at startup. This option causes
930 Geany to ignore loading stored files from the last
931 session (if enabled).
932 Geany also recognizes line and column information when
933 appended to the filename with colons, e.g.
934 &quot;geany foo.bar:10:5&quot; will open the file foo.bar and
935 place the cursor in line 10 at column 5.</p>
936 <p class="last">Projects can also be opened but a project file (*.geany)
937 must be the first non-option argument. All additionally
938 given files are ignored.</p>
939 </td>
940 </tr>
941 </tbody>
942 </table>
943 <p>You can also pass line number and column number information, e.g.:</p>
944 <pre class="literal-block">
945 geany some_file.foo:55:4
946 </pre>
947 <p>Geany supports all generic GTK options, a list is available on the
948 help screen.</p>
949 </div>
950 <div class="section" id="general">
951 <h2><a class="toc-backref" href="#id28">General</a></h2>
952 <div class="section" id="startup">
953 <h3><a class="toc-backref" href="#id29">Startup</a></h3>
954 <p>At startup, Geany loads all files from the last time Geany was
955 launched. You can disable this feature in the preferences dialog
956 (see <a class="reference internal" href="#general-startup-preferences">General Startup preferences</a>).</p>
957 <p>You can start several instances of Geany, but only the first will
958 load files from the last session. In the subsequent instances, you
959 can find these files in the file menu under the &quot;Recent files&quot; item.
960 By default this contains the last 10 recently opened files. You can
961 change the number of recently opened files in the preferences dialog.</p>
962 <p>To run a second instance of Geany, do not specify any filenames on
963 the command-line, or disable opening files in a running instance
964 using the appropriate command line option.</p>
965 </div>
966 <div class="section" id="opening-files-from-the-command-line-in-a-running-instance">
967 <h3><a class="toc-backref" href="#id30">Opening files from the command-line in a running instance</a></h3>
968 <p>Geany detects if there is an an instance of itself already running and opens files
969 from the command-line in that instance. So, Geany can
970 be used to view and edit files by opening them from other programs
971 such as a file manager.</p>
972 <p>You can also pass line number and column number information, e.g.:</p>
973 <pre class="literal-block">
974 geany some_file.foo:55:4
975 </pre>
976 <p>This would open the file <tt class="docutils literal">some_file.foo</tt> with the cursor on line 55,
977 column 4.</p>
978 <p>If you do not like this for some reason, you can disable using the first
979 instance by using the appropriate command line option -- see the section
980 called <a class="reference internal" href="#command-line-options">Command line options</a>.</p>
981 </div>
982 <div class="section" id="virtual-terminal-emulator-widget-vte">
983 <h3><a class="toc-backref" href="#id31">Virtual terminal emulator widget (VTE)</a></h3>
984 <p>If you have installed <tt class="docutils literal">libvte.so</tt> on your system, it is loaded
985 automatically by Geany, and you will have a terminal widget in the
986 notebook at the bottom.</p>
987 <p>If Geany cannot find any <tt class="docutils literal">libvte.so</tt> at startup, the terminal widget
988 will not be loaded. So there is no need to install the package containing
989 this file in order to run Geany. Additionally, you can disable the use
990 of the terminal widget by command line option, for more information
991 see the section called <a class="reference internal" href="#command-line-options">Command line options</a>.</p>
992 <p>You can use this terminal (from now on called VTE) much as you would
993 a terminal program like xterm. There is basic clipboard support. You
994 can paste the contents of the clipboard by pressing the right mouse
995 button to open the popup menu, and choosing Paste. To copy text from
996 the VTE, just select the desired text and then press the right mouse
997 button and choose Copy from the popup menu. On systems running the
998 X Window System you can paste the last selected text by pressing the
999 middle mouse button in the VTE (on 2-button mice, the middle button
1000 can often be simulated by pressing both mouse buttons together).</p>
1001 <p>In the preferences dialog you can specify a shell which should be
1002 started in the VTE. To make the specified shell a login shell just
1003 use the appropriate command line options for the shell. These options
1004 should be found in the manual page of the shell. For zsh and bash
1005 you can use the argument <tt class="docutils literal"><span class="pre">--login</span></tt>.</p>
1006 <div class="note">
1007 <p class="first admonition-title">Note</p>
1008 <p class="last">Geany tries to load <tt class="docutils literal">libvte.so</tt>. If this fails, it tries to load
1009 some other filenames. If this fails too, you should check whether you
1010 installed libvte correctly. Again note, Geany will run without this
1011 library.</p>
1012 </div>
1013 <p>It could be, that the library is called something else than
1014 <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
1015 please set a link to the correct file (as root):</p>
1016 <pre class="literal-block">
1017 # ln -s /usr/lib/libvte.so.X /usr/lib/libvte.so
1018 </pre>
1019 <p>Obviously, you have to adjust the paths and set X to the number of your
1020 <tt class="docutils literal">libvte.so</tt>.</p>
1021 <p>You can also specify the filename of the VTE library to use on the command
1022 line (see the section called <a class="reference internal" href="#command-line-options">Command line options</a>) or at compile time
1023 by specifying the command line option <tt class="docutils literal"><span class="pre">--with-vte-module-path</span></tt> to
1024 ./configure.</p>
1025 </div>
1026 <div class="section" id="defining-own-widget-styles-using-gtkrc-2-0">
1027 <h3><a class="toc-backref" href="#id32">Defining own widget styles using .gtkrc-2.0</a></h3>
1028 <p>You can define your widget style for many of Geany's GUI parts. To
1029 do this, just edit your <tt class="docutils literal"><span class="pre">.gtkrc-2.0</span></tt> (usually found in your home
1030 directory on UNIX-like systems and in the etc subdirectory of your
1031 Geany installation on Windows).</p>
1032 <p>To have a defined style used by Geany you must assign it to
1033 at least one of Geany's widgets. For example use the following line:</p>
1034 <pre class="literal-block">
1035 widget &quot;Geany*&quot; style &quot;geanyStyle&quot;
1036 </pre>
1037 <p>This would assign your style &quot;geany_style&quot; to all Geany
1038 widgets. You can also assign styles only to specific widgets. At the
1039 moment you can use the following widgets:</p>
1040 <ul class="simple">
1041 <li>GeanyMainWindow</li>
1042 <li>GeanyEditMenu</li>
1043 <li>GeanyToolbarMenu</li>
1044 <li>GeanyDialog</li>
1045 <li>GeanyDialogPrefs</li>
1046 <li>GeanyDialogProject</li>
1047 <li>GeanyDialogSearch</li>
1048 <li>GeanyMenubar</li>
1049 <li>GeanyToolbar</li>
1050 </ul>
1051 <p>An example of a simple <tt class="docutils literal"><span class="pre">.gtkrc-2.0</span></tt>:</p>
1052 <pre class="literal-block">
1053 style &quot;geanyStyle&quot;
1055 font_name=&quot;Sans 12&quot;
1057 widget &quot;GeanyMainWindow&quot; style &quot;geanyStyle&quot;
1059 style &quot;geanyStyle&quot;
1061 font_name=&quot;Sans 10&quot;
1063 widget &quot;GeanyPrefsDialog&quot; style &quot;geanyStyle&quot;
1064 </pre>
1065 </div>
1066 </div>
1067 <div class="section" id="documents">
1068 <h2><a class="toc-backref" href="#id33">Documents</a></h2>
1069 <div class="section" id="switching-between-documents">
1070 <h3><a class="toc-backref" href="#id34">Switching between documents</a></h3>
1071 <p>The documents list and the editor tabs are two different ways
1072 to switch between documents using the mouse. When you hit the key
1073 combination to move between tabs, the order is determined by the tab
1074 order. It is not alphabetical as shown in the documents list
1075 (regardless of whether or not editor tabs are visible).</p>
1076 <p>See the <a class="reference internal" href="#notebook-tab-keybindings">Notebook tab keybindings</a> section for useful
1077 shortcuts including for Most-Recently-Used document switching.</p>
1078 </div>
1079 <div class="section" id="cloning-documents">
1080 <h3><a class="toc-backref" href="#id35">Cloning documents</a></h3>
1081 <p>The <cite>Document-&gt;Clone</cite> menu item copies the current document's text,
1082 cursor position and properties into a new untitled document. If
1083 there is a selection, only the selected text is copied. This can be
1084 useful when making temporary copies of text or for creating
1085 documents with similar or identical contents.</p>
1086 </div>
1087 </div>
1088 <div class="section" id="character-sets-and-unicode-byte-order-mark-bom">
1089 <h2><a class="toc-backref" href="#id36">Character sets and Unicode Byte-Order-Mark (BOM)</a></h2>
1090 <div class="section" id="using-character-sets">
1091 <h3><a class="toc-backref" href="#id37">Using character sets</a></h3>
1092 <p>Geany provides support for detecting and converting character sets. So
1093 you can open and save files in different character sets, and even
1094 convert a file from one character set to another. To do this,
1095 Geany uses the character conversion capabilities of the GLib library.</p>
1096 <p>Only text files are supported, i.e. opening files which contain
1097 NULL-bytes may fail. Geany will try to open the file anyway but it is
1098 likely that the file will be truncated because it can only be read up
1099 to the first occurrence of a NULL-byte. All characters after this
1100 position are lost and are not written when you save the file.</p>
1101 <p>Geany tries to detect the encoding of a file while opening it, but
1102 auto-detecting the encoding of a file is not easy and sometimes an
1103 encoding might not be detected correctly. In this case you have to
1104 set the encoding of the file manually in order to display it
1105 correctly. You can this in the file open dialog by selecting an
1106 encoding in the drop down box or by reloading the file with the
1107 file menu item &quot;Reload as&quot;. The auto-detection works well for most
1108 encodings but there are also some encodings where it is known that
1109 auto-detection has problems.</p>
1110 <p>There are different ways to set different encodings in Geany:</p>
1111 <ul>
1112 <li><p class="first">Using the file open dialog</p>
1113 <p>This opens the file with the encoding specified in the encoding drop
1114 down box. If the encoding is set to &quot;Detect from file&quot; auto-detection
1115 will be used. If the encoding is set to &quot;Without encoding (None)&quot; the
1116 file will be opened without any character conversion and Geany will
1117 not try to auto-detect the encoding (see below for more information).</p>
1118 </li>
1119 <li><p class="first">Using the &quot;Reload as&quot; menu item</p>
1120 <p>This item reloads the current file with the specified encoding. It can
1121 help if you opened a file and found out that the wrong encoding was used.</p>
1122 </li>
1123 <li><p class="first">Using the &quot;Set encoding&quot; menu item</p>
1124 <p>Contrary to the above two options, this will not change or reload
1125 the current file unless you save it. It is useful when you want to
1126 change the encoding of the file.</p>
1127 </li>
1128 <li><p class="first">Specifying the encoding in the file itself</p>
1129 <p>As mentioned above, auto-detecting the encoding of a file may fail on
1130 some encodings. If you know that Geany doesn't open a certain file,
1131 you can add the specification line, described in the next section,
1132 to the beginning of the file to force Geany to use a specific
1133 encoding when opening the file.</p>
1134 </li>
1135 </ul>
1136 </div>
1137 <div class="section" id="in-file-encoding-specification">
1138 <h3><a class="toc-backref" href="#id38">In-file encoding specification</a></h3>
1139 <p>Geany detects meta tags of HTML files which contain charset information
1140 like:</p>
1141 <pre class="literal-block">
1142 &lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=ISO-8859-15&quot; /&gt;
1143 </pre>
1144 <p>and the specified charset is used when opening the file. This is useful if the
1145 encoding of the file cannot be detected properly.
1146 For non-HTML files you can also define a line like:</p>
1147 <pre class="literal-block">
1148 /* geany_encoding=ISO-8859-15 */
1149 </pre>
1150 <p>or:</p>
1151 <pre class="literal-block">
1152 # geany_encoding=ISO-8859-15 #
1153 </pre>
1154 <p>to force an encoding to be used. The #, /* and */ are examples
1155 of filetype-specific comment characters. It doesn't matter which
1156 characters are around the string &quot; geany_encoding=ISO-8859-15 &quot; as long
1157 as there is at least one whitespace character before and after this
1158 string. Whitespace characters are in this case a space or tab character.
1159 An example to use this could be you have a file with ISO-8859-15
1160 encoding but Geany constantly detects the file encoding as ISO-8859-1.
1161 Then you simply add such a line to the file and Geany will open it
1162 correctly the next time.</p>
1163 <p>Since Geany 0.15 you can also use lines which match the
1164 regular expression used to find the encoding string:
1165 <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>
1166 <div class="note">
1167 <p class="first admonition-title">Note</p>
1168 <p class="last">These specifications must be in the first 512 bytes of the file.
1169 Anything after the first 512 bytes will not be recognized.</p>
1170 </div>
1171 <p>Some examples are:</p>
1172 <pre class="literal-block">
1173 # encoding = ISO-8859-15
1174 </pre>
1175 <p>or:</p>
1176 <pre class="literal-block">
1177 # coding: ISO-8859-15
1178 </pre>
1179 </div>
1180 <div class="section" id="special-encoding-none">
1181 <h3><a class="toc-backref" href="#id39">Special encoding &quot;None&quot;</a></h3>
1182 <p>There is a special encoding &quot;None&quot; which uses no
1183 encoding. It is useful when you know that Geany cannot auto-detect
1184 the encoding of a file and it is not displayed correctly. Especially
1185 when the file contains NULL-bytes this can be useful to skip auto
1186 detection and open the file properly at least until the occurrence
1187 of the first NULL-byte. Using this encoding opens the file as it is
1188 without any character conversion.</p>
1189 </div>
1190 <div class="section" id="unicode-byte-order-mark-bom">
1191 <h3><a class="toc-backref" href="#id40">Unicode Byte-Order-Mark (BOM)</a></h3>
1192 <p>Furthermore, Geany detects a Unicode Byte Order Mark (see
1193 <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,
1194 this feature is only available if the opened file is in a Unicode
1195 encoding. The Byte Order Mark helps to detect the encoding of a file,
1196 e.g. whether it is UTF-16LE or UTF-16BE and so on. On Unix-like systems
1197 using a Byte Order Mark could cause some problems for programs not
1198 expecting it, e.g. the compiler gcc stops
1199 with stray errors, PHP does not parse a script containing a BOM and
1200 script files starting with a she-bang maybe cannot be started. In the
1201 status bar you can easily see whether the file starts with a BOM or
1202 not.</p>
1203 <p>If you want to set a BOM for a file or if you want to remove it
1204 from a file, just use the document menu and toggle the checkbox.</p>
1205 <div class="note">
1206 <p class="first admonition-title">Note</p>
1207 <p class="last">If you are unsure what a BOM is or if you do not understand where
1208 to use it, then it is probably not important for you and you can
1209 safely ignore it.</p>
1210 </div>
1211 </div>
1212 </div>
1213 <div class="section" id="editing">
1214 <h2><a class="toc-backref" href="#id41">Editing</a></h2>
1215 <div class="section" id="folding">
1216 <h3><a class="toc-backref" href="#id42">Folding</a></h3>
1217 <p>Geany provides basic code folding support. Folding means the ability to
1218 show and hide parts of the text in the current file. You can hide
1219 unimportant code sections and concentrate on the parts you are working on
1220 and later you can show hidden sections again. In the editor window there is
1221 a small grey margin on the left side with [+] and [-] symbols which
1222 show hidden parts and hide parts of the file respectively. By
1223 clicking on these icons you can simply show and hide sections which are
1224 marked by vertical lines within this margin. For many filetypes nested
1225 folding is supported, so there may be several fold points within other
1226 fold points.</p>
1227 <div class="note">
1228 <p class="first admonition-title">Note</p>
1229 <p class="last">You can customize the folding icon and line styles - see the
1230 filetypes.common <a class="reference internal" href="#folding-settings">Folding Settings</a>.</p>
1231 </div>
1232 <p>If you don't like it or don't need it at all, you can simply disable
1233 folding support completely in the preferences dialog.</p>
1234 <p>The folding behaviour can be changed with the &quot;Fold/Unfold all children of
1235 a fold point&quot; option in the preference dialog. If activated, Geany will
1236 unfold all nested fold points below the current one if they are already
1237 folded (when clicking on a [+] symbol).
1238 When clicking on a [-] symbol, Geany will fold all nested fold points
1239 below the current one if they are unfolded.</p>
1240 <p>This option can be inverted by pressing the Shift
1241 key while clicking on a fold symbol. That means, if the &quot;Fold/Unfold all
1242 children of a fold point&quot; option is enabled, pressing Shift will disable
1243 it for this click and vice versa.</p>
1244 </div>
1245 <div class="section" id="column-mode-editing-rectangular-selections">
1246 <h3><a class="toc-backref" href="#id43">Column mode editing (rectangular selections)</a></h3>
1247 <p>There is basic support for column mode editing. To use it, create a
1248 rectangular selection by holding down the Control and Shift keys
1249 (or Alt and Shift on Windows) while selecting some text.
1250 Once a rectangular selection exists you can start editing the text within
1251 this selection and the modifications will be done for every line in the
1252 selection.</p>
1253 <p>It is also possible to create a zero-column selection - this is
1254 useful to insert text on multiple lines.</p>
1255 </div>
1256 <div class="section" id="drag-and-drop-of-text">
1257 <h3><a class="toc-backref" href="#id44">Drag and drop of text</a></h3>
1258 <p>If you drag selected text in the editor widget of Geany the text is
1259 moved to the position where the mouse pointer is when releasing the
1260 mouse button. Holding Control when releasing the mouse button will
1261 copy the text instead. This behaviour was changed in Geany 0.11 -
1262 before the selected text was copied to the new position.</p>
1263 </div>
1264 <div class="section" id="indentation">
1265 <h3><a class="toc-backref" href="#id45">Indentation</a></h3>
1266 <p>Geany allows each document to indent either with a tab character,
1267 multiple spaces or a combination of both.</p>
1268 <p>The <em>Tabs</em> setting indents with one tab character per indent level, and
1269 displays tabs as the indent width.</p>
1270 <p>The <em>Spaces</em> setting indents with the number of spaces set in the indent
1271 width for each level.</p>
1272 <p>The <em>Tabs and Spaces</em> setting indents with spaces as above, then converts
1273 as many spaces as it can to tab characters at the rate of one tab for
1274 each multiple of the <cite>Various preference</cite> setting
1275 <em>indent_hard_tab_width</em> (default 8) and displays tabs as the
1276 <em>indent_hard_tab_width</em> value.</p>
1277 <p>The default indent settings are set in <a class="reference internal" href="#editor-indentation-preferences">Editor Indentation
1278 preferences</a> (see the link for more information).</p>
1279 <p>The default settings can be overridden per-document using the
1280 Document menu. They can also be overridden by projects - see
1281 <a class="reference internal" href="#project-management">Project management</a>.</p>
1282 <p>The indent mode for the current document is shown on the status bar
1283 as follows:</p>
1284 <dl class="docutils">
1285 <dt>TAB</dt>
1286 <dd>Indent with Tab characters.</dd>
1287 <dt>SP</dt>
1288 <dd>Indent with spaces.</dd>
1289 <dt>T/S</dt>
1290 <dd>Indent with tabs and spaces, depending on how much indentation is
1291 on a line.</dd>
1292 </dl>
1293 <div class="section" id="applying-new-indentation-settings">
1294 <h4><a class="toc-backref" href="#id46">Applying new indentation settings</a></h4>
1295 <p>After changing the default settings you may wish to apply the new
1296 settings to every document in the current session. To do this use the
1297 <em>Project-&gt;Apply Default Indentation</em> menu item.</p>
1298 </div>
1299 <div class="section" id="detecting-indent-type">
1300 <h4><a class="toc-backref" href="#id47">Detecting indent type</a></h4>
1301 <p>The <em>Detect from file</em> indentation preference can be used to
1302 scan each file as it's opened and set the indent type based on
1303 how many lines start with a tab vs. 2 or more spaces.</p>
1304 </div>
1305 </div>
1306 <div class="section" id="auto-indentation">
1307 <h3><a class="toc-backref" href="#id48">Auto-indentation</a></h3>
1308 <p>When enabled, auto-indentation happens when pressing <em>Enter</em> in the
1309 Editor. It adds a certain amount of indentation to the new line so the
1310 user doesn't always have to indent each line manually.</p>
1311 <p>Geany has four types of auto-indentation:</p>
1312 <dl class="docutils">
1313 <dt>None</dt>
1314 <dd>Disables auto-indentation completely.</dd>
1315 <dt>Basic</dt>
1316 <dd>Adds the same amount of whitespace on a new line as on the previous line.
1317 For the <em>Tabs</em> and the <em>Spaces</em> indent types the indentation will use the
1318 same combination of characters as the previous line. The
1319 <em>Tabs and Spaces</em> indentation type converts as explained above.</dd>
1320 <dt>Current chars</dt>
1321 <dd>Does the same as <em>Basic</em> but also indents a new line after an opening
1322 brace '{', and de-indents when typing a closing brace '}'. For Python,
1323 a new line will be indented after typing ':' at the end of the
1324 previous line.</dd>
1325 <dt>Match braces</dt>
1326 <dd>Similar to <em>Current chars</em> but the closing brace will be aligned to
1327 match the indentation of the line with the opening brace. This
1328 requires the filetype to be one where Geany knows that the Scintilla
1329 lexer understands matching braces (C, C++, D, HTML, Pascal, Bash,
1330 Perl, TCL).</dd>
1331 </dl>
1332 <p>There is also XML-tag auto-indentation. This is enabled when the
1333 mode is more than just Basic, and is also controlled by a filetype
1334 setting - see <a class="reference internal" href="#xml-indent-tags">xml_indent_tags</a>.</p>
1335 </div>
1336 <div class="section" id="bookmarks">
1337 <h3><a class="toc-backref" href="#id49">Bookmarks</a></h3>
1338 <p>Geany provides a handy bookmarking feature that lets you mark one
1339 or more lines in a document, and return the cursor to them using a
1340 key combination.</p>
1341 <p>To place a mark on a line, either left-mouse-click in the left margin
1342 of the editor window, or else use Ctrl-m. This will
1343 produce a small green plus symbol in the margin. You can have as many
1344 marks in a document as you like. Click again (or use Ctrl-m again)
1345 to remove the bookmark. To remove all the marks in a given document,
1346 use &quot;Remove Markers&quot; in the Document menu.</p>
1347 <p>To navigate down your document, jumping from one mark to the next,
1348 use Ctrl-. (control period). To go in the opposite direction on
1349 the page, use Ctrl-, (control comma). Using the bookmarking feature
1350 together with the commands to switch from one editor tab to another
1351 (Ctrl-PgUp/PgDn and Ctrl-Tab) provides a particularly fast way to
1352 navigate around multiple files.</p>
1353 </div>
1354 <div class="section" id="code-navigation-history">
1355 <h3><a class="toc-backref" href="#id50">Code navigation history</a></h3>
1356 <p>To ease navigation in source files and especially between
1357 different files, Geany lets you jump between different navigation
1358 points. Currently, this works for the following:</p>
1359 <ul class="simple">
1360 <li><a class="reference internal" href="#go-to-tag-declaration">Go to tag declaration</a></li>
1361 <li><a class="reference internal" href="#go-to-tag-definition">Go to tag definition</a></li>
1362 <li>Symbol list items</li>
1363 <li>Build errors</li>
1364 <li>Message items</li>
1365 </ul>
1366 <p>When using one of these actions, Geany remembers your current position
1367 and jumps to the new one. If you decide to go back to your previous
1368 position in the file, just use &quot;Navigate back a location&quot;. To
1369 get back to the new position again, just use &quot;Navigate forward a
1370 location&quot;. This makes it easier to navigate in e.g. foreign code
1371 and between different files.</p>
1372 </div>
1373 <div class="section" id="sending-text-through-custom-commands">
1374 <h3><a class="toc-backref" href="#id51">Sending text through custom commands</a></h3>
1375 <p>You can define several custom commands in Geany and send the current
1376 selection to one of these commands using the <em>Edit-&gt;Format-&gt;Send
1377 Selection to</em> menu or keybindings. The output of the command will be
1378 used to replace the current selection. This makes it possible to use
1379 text formatting tools with Geany in a general way.</p>
1380 <p>The selected text will be sent to the standard input of the executed
1381 command, so the command should be able to read from it and it should
1382 print all results to its standard output which will be read by
1383 Geany. To help finding errors in executing the command, the output
1384 of the program's standard error will be printed on Geany's standard
1385 output.</p>
1386 <p>If there is no selection, the whole current line is used instead.</p>
1387 <p>To add a custom command, use the <em>Send Selection to-&gt;Set Custom
1388 Commands</em> menu item. Click on <em>Add</em> to get a new item and type the
1389 command. You can also specify some command line options. Empty
1390 commands are not saved.</p>
1391 <p>Normal shell quoting is supported, so you can do things like:</p>
1392 <ul class="simple">
1393 <li><tt class="docutils literal">sed <span class="pre">'s/\./(dot)/g'</span></tt></li>
1394 </ul>
1395 <p>The above example would normally be done with the <a class="reference internal" href="#replace-all">Replace all</a>
1396 function, but it can be handy to have common commands already set up.</p>
1397 <p>Note that the command is not run in a shell, so if you want to use
1398 shell features like pipes and command chains, you need to explicitly
1399 launch the shell and pass it your command:</p>
1400 <ul class="simple">
1401 <li><tt class="docutils literal">sh <span class="pre">-c</span> 'sort | uniq'</tt></li>
1402 </ul>
1403 </div>
1404 <div class="section" id="context-actions">
1405 <h3><a class="toc-backref" href="#id52">Context actions</a></h3>
1406 <p>You can execute the context action command on the current word at the
1407 cursor position or the available selection. This word or selection
1408 can be used as an argument to the command.
1409 The context action is invoked by a menu entry in the popup menu of the
1410 editor and also a keyboard shortcut (see the section called
1411 <a class="reference internal" href="#keybindings">Keybindings</a>).</p>
1412 <p>The command can be specified in the preferences dialog and also for
1413 each filetype (see &quot;context_action_cmd&quot; in the section called
1414 <a class="reference internal" href="#filetype-configuration">Filetype configuration</a>). When the context action is invoked, the filetype
1415 specific command is used if available, otherwise the command
1416 specified in the preferences dialog is executed.</p>
1417 <p>The current word or selection can be referred with the wildcard &quot;%s&quot;
1418 in the command, it will be replaced by the current word or
1419 selection before the command is executed.</p>
1420 <p>For example a context action can be used to open API documentation
1421 in a browser window, the command to open the PHP API documentation
1422 would be:</p>
1423 <pre class="literal-block">
1424 firefox &quot;http://www.php.net/%s&quot;
1425 </pre>
1426 <p>when executing the command, the %s is substituted by the word near
1427 the cursor position or by the current selection. If the cursor is at
1428 the word &quot;echo&quot;, a browser window will open(assumed your browser is
1429 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>
1430 </div>
1431 <div class="section" id="autocompletion">
1432 <h3><a class="toc-backref" href="#id53">Autocompletion</a></h3>
1433 <p>Geany can offer a list of possible completions for symbols defined in the
1434 tags and for all words in a document.</p>
1435 <p>The autocompletion list for symbols is presented when the first few
1436 characters of the symbol are typed (configurable, see <a class="reference internal" href="#editor-completions-preferences">Editor Completions
1437 preferences</a>, default 4) or when the <em>Complete word</em>
1438 keybinding is pressed (configurable, see <a class="reference internal" href="#editor-keybindings">Editor keybindings</a>,
1439 default Ctrl-Space).</p>
1440 <p>When the defined keybinding is typed and the <em>Autocomplete all words in
1441 document</em> preference (in <a class="reference internal" href="#editor-completions-preferences">Editor Completions preferences</a>)
1442 is selected then the autocompletion list will show all matching words
1443 in the document, if there are no matching symbols.</p>
1444 <p>If you don't want to use autocompletion it can be dismissed until
1445 the next symbol by pressing Escape. The autocompletion list is updated
1446 as more characters are typed so that it only shows completions that start
1447 with the characters typed so far. If no symbols begin with the sequence,
1448 the autocompletion window is closed.</p>
1449 <p>The up and down arrows will move the selected item. The highlighted
1450 item on the autocompletion list can be chosen from the list by pressing
1451 Enter/Return. You can also double-click to select an item. The sequence
1452 will be completed to match the chosen item, and if the <em>Drop rest of
1453 word on completion</em> preference is set (in <a class="reference internal" href="#editor-completions-preferences">Editor Completions
1454 preferences</a>) then any characters after the cursor that match
1455 a symbol or word are deleted.</p>
1456 <div class="section" id="word-part-completion">
1457 <h4><a class="toc-backref" href="#id54">Word part completion</a></h4>
1458 <p>By default, pressing Tab will complete the selected item by word part;
1459 useful e.g. for adding the prefix <tt class="docutils literal">gtk_combo_box_entry_</tt> without typing it
1460 manually:</p>
1461 <ul class="simple">
1462 <li>gtk_com&lt;TAB&gt;</li>
1463 <li>gtk_combo_&lt;TAB&gt;</li>
1464 <li>gtk_combo_box_&lt;e&gt;&lt;TAB&gt;</li>
1465 <li>gtk_combo_box_entry_&lt;s&gt;&lt;ENTER&gt;</li>
1466 <li>gtk_combo_box_entry_set_text_column</li>
1467 </ul>
1468 <p>The key combination can be changed from Tab - See <a class="reference internal" href="#editor-keybindings">Editor keybindings</a>.
1469 If you clear/change the key combination for word part completion, Tab
1470 will complete the whole word instead, like Enter.</p>
1471 </div>
1472 <div class="section" id="scope-autocompletion">
1473 <h4><a class="toc-backref" href="#id55">Scope autocompletion</a></h4>
1474 <p>E.g.:</p>
1475 <pre class="literal-block">
1476 struct
1478 int i;
1479 char c;
1480 } foo;
1481 </pre>
1482 <p>When you type <tt class="docutils literal">foo.</tt> it will show an autocompletion list with 'i' and
1483 'c' symbols.</p>
1484 <p>It only works for languages that set parent scope names for e.g. struct
1485 members. Currently this means C-like languages. The C tag parser only
1486 parses global scopes, so this won't work for structs or objects declared
1487 in local scope.</p>
1488 </div>
1489 </div>
1490 <div class="section" id="user-definable-snippets">
1491 <h3><a class="toc-backref" href="#id56">User-definable snippets</a></h3>
1492 <p>Snippets are small strings or code constructs which can be replaced or
1493 completed to a more complex string. So you can save a lot of time when
1494 typing common strings and letting Geany do the work for you.
1495 To know what to complete or replace Geany reads a configuration file
1496 called <tt class="docutils literal">snippets.conf</tt> at startup.</p>
1497 <p>Maybe you need to often type your name, so define a snippet like this:</p>
1498 <pre class="literal-block">
1499 [Default]
1500 myname=Enrico Tröger
1501 </pre>
1502 <p>Every time you write <tt class="docutils literal">myname</tt> &lt;TAB&gt; in Geany, it will replace &quot;myname&quot;
1503 with &quot;Enrico Tröger&quot;. The key to start autocompletion can be changed
1504 in the preferences dialog, by default it is TAB. The corresponding keybinding
1505 is called <cite>Complete snippet</cite>.</p>
1506 <p><strong>Paths</strong></p>
1507 <p>You can override the default snippets using the user
1508 <tt class="docutils literal">snippets.conf</tt> file. Use the <em>Tools-&gt;Configuration
1509 Files-&gt;snippets.conf</em> menu item. See also <a class="reference internal" href="#configuration-file-paths">Configuration file paths</a>.</p>
1510 <p>This adds the default settings to the user file if the file doesn't
1511 exist. Alternatively the file can be created manually, adding only
1512 the settings you want to change. All missing settings will be read
1513 from the system snippets file.</p>
1514 <p><strong>Snippet groups</strong></p>
1515 <p>The file <tt class="docutils literal">snippets.conf</tt> contains sections defining snippets that
1516 are available for particular filetypes and in general.</p>
1517 <p>The two sections &quot;Default&quot; and &quot;Special&quot; apply to all filetypes.
1518 &quot;Default&quot; contains all snippets which are available for every
1519 filetype and &quot;Special&quot; contains snippets which can only be used in
1520 other snippets. So you can define often used parts of snippets and
1521 just use the special snippet as a placeholder (see the
1522 <tt class="docutils literal">snippets.conf</tt> for details).</p>
1523 <p>You can define sections with the name of a filetype eg &quot;C++&quot;. The
1524 snippets in that section are only available for use in files with that
1525 filetype. Snippets in filetype sections will hide snippets with the
1526 same name in the &quot;Default&quot; section when used in a file of that
1527 filetype.</p>
1528 <p><strong>Substitution sequences for snippets</strong></p>
1529 <p>To define snippets you can use several special character sequences which
1530 will be replaced when using the snippet:</p>
1531 <table border="1" class="docutils">
1532 <colgroup>
1533 <col width="22%" />
1534 <col width="78%" />
1535 </colgroup>
1536 <tbody valign="top">
1537 <tr><td>\n or %newline%</td>
1538 <td>Insert a new line (it will be replaced by the used EOL
1539 char(s): LF, CR/LF, or CR).</td>
1540 </tr>
1541 <tr><td>\t or %ws%</td>
1542 <td>Insert an indentation step, it will be replaced according
1543 to the current document's indent mode.</td>
1544 </tr>
1545 <tr><td>\s</td>
1546 <td>\s to force whitespace at beginning or end of a value
1547 ('key= value' won't work, use 'key=\svalue')</td>
1548 </tr>
1549 <tr><td>%cursor%</td>
1550 <td>Place the cursor at this position after completion has
1551 been done. You can define multiple %cursor% wildcards
1552 and use the keybinding <cite>Move cursor in snippet</cite> to jump
1553 to the next defined cursor position in the completed
1554 snippet.</td>
1555 </tr>
1556 <tr><td>%...%</td>
1557 <td>&quot;...&quot; means the name of a key in the &quot;Special&quot; section.
1558 If you have defined a key &quot;brace_open&quot; in the &quot;Special&quot;
1559 section you can use %brace_open% in any other snippet.</td>
1560 </tr>
1561 </tbody>
1562 </table>
1563 <p>Snippet names must not contain spaces otherwise they won't
1564 work correctly. But beside that you can define almost any
1565 string as a snippet and use it later in Geany. It is not limited
1566 to existing contructs of certain programming languages(like <tt class="docutils literal">if</tt>,
1567 <tt class="docutils literal">for</tt>, <tt class="docutils literal">switch</tt>). Define whatever you need.</p>
1568 <p><strong>Template wildcards</strong></p>
1569 <p>Since Geany 0.15 you can also use most of the available templates wildcards
1570 listed in <a class="reference internal" href="#template-wildcards">Template wildcards</a>. All wildcards which are listed as
1571 <cite>available in snippets</cite> can be used. For instance to improve the above example:</p>
1572 <pre class="literal-block">
1573 [Default]
1574 myname=My name is {developer}
1575 mysystem=My system: {command:uname -a}
1576 </pre>
1577 <p>this will replace <tt class="docutils literal">myname</tt> with &quot;My name is &quot; and the value of the template
1578 preference <tt class="docutils literal">developer</tt>.</p>
1579 <p><strong>Word characters</strong></p>
1580 <p>You can change the way Geany recognizes the word to complete,
1581 that is how the start and end of a word is recognised when the
1582 snippet completion is requested. The section &quot;Special&quot; may
1583 contain a key &quot;wordchars&quot; which lists all characters a string may contain
1584 to be recognized as a word for completion. Leave it commented to use
1585 default characters or define it to add or remove characters to fit your
1586 needs.</p>
1587 <div class="section" id="snippet-keybindings">
1588 <h4><a class="toc-backref" href="#id57">Snippet keybindings</a></h4>
1589 <p>Normally you would type the snippet name and press Tab. However, you
1590 can define keybindings for snippets under the <em>Keybindings</em> group in
1591 <tt class="docutils literal">snippets.conf</tt>:</p>
1592 <pre class="literal-block">
1593 [Keybindings]
1594 for=&lt;Ctrl&gt;7
1595 block_cursor=&lt;Ctrl&gt;8
1596 </pre>
1597 <div class="note">
1598 <p class="first admonition-title">Note</p>
1599 <p class="last">Snippet keybindings may be overridden by Geany's configurable
1600 keybindings.</p>
1601 </div>
1602 </div>
1603 </div>
1604 <div class="section" id="inserting-unicode-characters">
1605 <h3><a class="toc-backref" href="#id58">Inserting Unicode characters</a></h3>
1606 <p>You can insert Unicode code points by hitting Ctrl-Shift-u, then still holding
1607 Ctrl-Shift, type some hex digits representing the code point for the character
1608 you want and hit Enter or Return (still holding Ctrl-Shift). If you release
1609 Ctrl-Shift before hitting Enter or Return (or any other character), the code
1610 insertion is completed, but the typed character is also entered. In the case
1611 of Enter/Return, it is a newline, as you might expect.</p>
1612 <p>In some earlier versions of Geany, you might need to first unbind Ctrl-Shift-u
1613 in the <a class="reference internal" href="#keybinding-preferences">keybinding preferences</a>, then select <em>Tools-&gt;Reload Configuration</em>
1614 or restart Geany. Note that it works slightly differently from other GTK
1615 applications, in that you'll need to continue to hold down the Ctrl and Shift
1616 keys while typing the code point hex digits (and the Enter or Return to finish the code point).</p>
1617 </div>
1618 </div>
1619 <div class="section" id="search-replace-and-go-to">
1620 <h2><a class="toc-backref" href="#id59">Search, replace and go to</a></h2>
1621 <p>This section describes search-related commands from the Search menu
1622 and the editor window's popup menu:</p>
1623 <ul class="simple">
1624 <li>Find</li>
1625 <li>Find selection</li>
1626 <li>Find usage</li>
1627 <li>Find in files</li>
1628 <li>Replace</li>
1629 <li>Go to tag definition</li>
1630 <li>Go to tag declaration</li>
1631 <li>Go to line</li>
1632 </ul>
1633 <p>See also <a class="reference internal" href="#search">Search</a> preferences.</p>
1634 <div class="section" id="toolbar-entries">
1635 <h3><a class="toc-backref" href="#id60">Toolbar entries</a></h3>
1636 <p>There are also two toolbar entries:</p>
1637 <ul class="simple">
1638 <li>Search bar</li>
1639 <li>Go to line entry</li>
1640 </ul>
1641 <p>There are keybindings to focus each of these - see <a class="reference internal" href="#focus-keybindings">Focus
1642 keybindings</a>. Pressing Escape will then focus the editor.</p>
1643 <div class="section" id="search-bar">
1644 <h4><a class="toc-backref" href="#id61">Search bar</a></h4>
1645 <p>The quickest way to find some text is to use the search bar entry in
1646 the toolbar. This performs a case-insensitive search in the current
1647 document whilst you type. Pressing Enter will search again, and pressing
1648 Shift-Enter will search backwards.</p>
1649 </div>
1650 </div>
1651 <div class="section" id="find">
1652 <h3><a class="toc-backref" href="#id62">Find</a></h3>
1653 <p>The Find dialog is used for finding text in one or more open documents.</p>
1654 <img alt="./images/find_dialog.png" src="./images/find_dialog.png" />
1655 <div class="section" id="matching-options">
1656 <h4><a class="toc-backref" href="#id63">Matching options</a></h4>
1657 <p>The syntax for the <em>Use regular expressions</em> option is shown in
1658 <a class="reference internal" href="#regular-expressions">Regular expressions</a>.</p>
1659 <div class="note">
1660 <p class="first admonition-title">Note</p>
1661 <p class="last"><em>Use escape sequences</em> is implied for regular expressions.</p>
1662 </div>
1663 <p>The <em>Use escape sequences</em> option will transform any escaped characters
1664 into their UTF-8 equivalent. For example, \t will be transformed into
1665 a tab character. Other recognized symbols are: \\, \n, \r, \uXXXX
1666 (Unicode characters).</p>
1667 </div>
1668 <div class="section" id="find-all">
1669 <h4><a class="toc-backref" href="#id64">Find all</a></h4>
1670 <p>To find all matches, click on the Find All expander. This will reveal
1671 several options:</p>
1672 <ul class="simple">
1673 <li>In Document</li>
1674 <li>In Session</li>
1675 <li>Mark</li>
1676 </ul>
1677 <p>Find All In Document will show a list of matching lines in the
1678 current document in the Messages tab of the Message Window. <em>Find All
1679 In Session</em> does the same for all open documents.</p>
1680 <p>Mark will highlight all matches in the current document with a
1681 colored box. These markers can be removed by selecting the
1682 Remove Markers command from the Document menu.</p>
1683 </div>
1684 <div class="section" id="change-font-in-search-dialog-text-fields">
1685 <h4><a class="toc-backref" href="#id65">Change font in search dialog text fields</a></h4>
1686 <p>All search related dialogs use a Monospace for the text input fields to
1687 increase the readability of input text. This is useful when you are
1688 typing input such as regular expressions with spaces, periods and commas which
1689 might it hard to read with a proportional font.</p>
1690 <p>If you want to change the font, you can do this easily
1691 by inserting the following style into your <tt class="docutils literal"><span class="pre">.gtkrc-2.0</span></tt>
1692 (usually found in your home directory on UNIX-like systems and in the
1693 etc subdirectory of your Geany installation on Windows):</p>
1694 <pre class="literal-block">
1695 style &quot;search_style&quot;
1697 font_name=&quot;Monospace 8&quot;
1699 widget &quot;GeanyDialogSearch.*.GtkEntry&quot; style:highest &quot;search_style&quot;
1700 </pre>
1701 <p>Please note the addition of &quot;:highest&quot; in the last line which sets the priority
1702 of this style to the highest available. Otherwise, the style is ignored
1703 for the search dialogs.</p>
1704 </div>
1705 </div>
1706 <div class="section" id="find-selection">
1707 <h3><a class="toc-backref" href="#id66">Find selection</a></h3>
1708 <p>The <em>Find Next/Previous Selection</em> commands perform a search for the
1709 current selected text. If nothing is selected, by default the current
1710 word is used instead. This can be customized by the
1711 <em>find_selection_type</em> preference - see <a class="reference internal" href="#various-preferences">Various preferences</a>.</p>
1712 <table border="1" class="docutils">
1713 <colgroup>
1714 <col width="10%" />
1715 <col width="90%" />
1716 </colgroup>
1717 <thead valign="bottom">
1718 <tr><th class="head">Value</th>
1719 <th class="head"><em>find_selection_type</em> behaviour</th>
1720 </tr>
1721 </thead>
1722 <tbody valign="top">
1723 <tr><td>0</td>
1724 <td>Use the current word (default).</td>
1725 </tr>
1726 <tr><td>1</td>
1727 <td>Try the X selection first, then current word.</td>
1728 </tr>
1729 <tr><td>2</td>
1730 <td>Repeat last search.</td>
1731 </tr>
1732 </tbody>
1733 </table>
1734 </div>
1735 <div class="section" id="find-usage">
1736 <h3><a class="toc-backref" href="#id67">Find usage</a></h3>
1737 <p><em>Find Usage</em> searches all open files. It is similar to the <em>Find All In
1738 Session</em> option in the Find dialog.</p>
1739 <p>If there is a selection, then it is used as the search text; otherwise
1740 the current word is used. The current word is either taken from the
1741 word nearest the edit cursor, or the word underneath the popup menu
1742 click position when the popup menu is used. The search results are
1743 shown in the Messages tab of the Message Window.</p>
1744 <div class="note">
1745 <p class="first admonition-title">Note</p>
1746 <p class="last">You can also use Find Usage for symbol list items from the popup
1747 menu.</p>
1748 </div>
1749 </div>
1750 <div class="section" id="find-in-files">
1751 <h3><a class="toc-backref" href="#id68">Find in files</a></h3>
1752 <p><em>Find in Files</em> is a more powerful version of <em>Find Usage</em> that searches
1753 all files in a certain directory using the Grep tool. The Grep tool
1754 must be correctly set in Preferences to the path of the system's Grep
1755 utility. GNU Grep is recommended (see note below).</p>
1756 <img alt="./images/find_in_files_dialog.png" src="./images/find_in_files_dialog.png" />
1757 <p>The <em>Search</em> field is initially set to the current word in the editor
1758 (depending on <a class="reference internal" href="#search">Search</a> preferences).</p>
1759 <p>The <em>Files</em> setting allows to choose which files are included in the
1760 search, depending on the mode:</p>
1761 <dl class="docutils">
1762 <dt>All</dt>
1763 <dd>Search in all files;</dd>
1764 <dt>Project</dt>
1765 <dd>Use the current project's patterns, see <a class="reference internal" href="#project-properties">Project properties</a>;</dd>
1766 <dt>Custom</dt>
1767 <dd>Use custom patterns.</dd>
1768 </dl>
1769 <p>Both project and custom patterns use a glob-style syntax, each
1770 pattern separated by a space. To search all <tt class="docutils literal">.c</tt> and <tt class="docutils literal">.h</tt> files,
1771 use: <tt class="docutils literal">*.c *.h</tt>.
1772 Note that an empty pattern list searches in all files rather
1773 than none.</p>
1774 <p>The <em>Directory</em> field is initially set to the current document's directory,
1775 unless this field has already been edited and the current document has
1776 not changed. Otherwise, the current document's directory is prepended to
1777 the drop-down history. This can be disabled - see <a class="reference internal" href="#search">Search</a> preferences.</p>
1778 <p>The <em>Encoding</em> field can be used to define the encoding of the files
1779 to be searched. The entered search text is converted to the chosen encoding
1780 and the search results are converted back to UTF-8.</p>
1781 <p>The <em>Extra options</em> field is used to pass any additional arguments to
1782 the grep tool.</p>
1783 <div class="note">
1784 <p class="first admonition-title">Note</p>
1785 <p class="last">The <em>Files</em> setting uses <tt class="docutils literal"><span class="pre">--include=</span></tt> when searching recursively,
1786 <em>Recurse in subfolders</em> uses <tt class="docutils literal"><span class="pre">-r</span></tt>; both are GNU Grep options and may
1787 not work with other Grep implementations.</p>
1788 </div>
1789 <div class="section" id="filtering-out-version-control-files">
1790 <h4><a class="toc-backref" href="#id69">Filtering out version control files</a></h4>
1791 <p>When using the <em>Recurse in subfolders</em> option with a directory that's
1792 under version control, you can set the <em>Extra options</em> field to filter
1793 out version control files.</p>
1794 <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>
1795 argument to filter out CVS and hidden directories like <tt class="docutils literal">.svn</tt>.</p>
1796 <p>Example: <tt class="docutils literal"><span class="pre">--exclude-dir=.svn</span> <span class="pre">--exclude-dir=CVS</span></tt></p>
1797 <p>If you have an older Grep, you can try using the <tt class="docutils literal"><span class="pre">--exclude</span></tt> flag
1798 to filter out filenames.</p>
1799 <p>SVN Example: <tt class="docutils literal"><span class="pre">--exclude=*.svn-base</span></tt></p>
1800 <p>The --exclude argument only matches the file name part, not the path.</p>
1801 </div>
1802 </div>
1803 <div class="section" id="replace">
1804 <h3><a class="toc-backref" href="#id70">Replace</a></h3>
1805 <p>The Replace dialog is used for replacing text in one or more open
1806 documents.</p>
1807 <img alt="./images/replace_dialog.png" src="./images/replace_dialog.png" />
1808 <p>The Replace dialog has the same options for matching text as the Find
1809 dialog. See the section <a class="reference internal" href="#matching-options">Matching options</a>.</p>
1810 <p>The <em>Use regular expressions</em> option allows regular expressions to
1811 be used in the search string and back references in the replacement
1812 text -- see the entry for '\n' in <a class="reference internal" href="#regular-expressions">Regular expressions</a>.</p>
1813 <div class="section" id="replace-all">
1814 <h4><a class="toc-backref" href="#id71">Replace all</a></h4>
1815 <p>To replace several matches, click on the <em>Replace All</em> expander. This
1816 will reveal several options:</p>
1817 <ul class="simple">
1818 <li>In Document</li>
1819 <li>In Session</li>
1820 <li>In Selection</li>
1821 </ul>
1822 <p><em>Replace All In Document</em> will replace all matching text in the
1823 current document. <em>Replace All In Session</em> does the same for all open
1824 documents. <em>Replace All In Selection</em> will replace all matching text
1825 in the current selection of the current document.</p>
1826 </div>
1827 </div>
1828 <div class="section" id="go-to-tag-definition">
1829 <h3><a class="toc-backref" href="#id72">Go to tag definition</a></h3>
1830 <p>If the current word or selection is the name of a tag definition
1831 (e.g. a function name) and the file containing the tag definition is
1832 open, this command will switch to that file and go to the
1833 corresponding line number. The current word is either the word
1834 nearest the edit cursor, or the word underneath the popup menu click
1835 position when the popup menu is used.</p>
1836 <div class="note">
1837 <p class="first admonition-title">Note</p>
1838 <p class="last">If the corresponding tag is on the current line, Geany will first
1839 look for a tag declaration instead, as this is more useful.
1840 Likewise <em>Go to tag declaration</em> will search for a tag definition
1841 first in this case also.</p>
1842 </div>
1843 </div>
1844 <div class="section" id="go-to-tag-declaration">
1845 <h3><a class="toc-backref" href="#id73">Go to tag declaration</a></h3>
1846 <p>Like <em>Go to tag definition</em>, but for a forward declaration such as a
1847 C function prototype or <tt class="docutils literal">extern</tt> declaration instead of a function
1848 body.</p>
1849 </div>
1850 <div class="section" id="go-to-line">
1851 <h3><a class="toc-backref" href="#id74">Go to line</a></h3>
1852 <p>Go to a particular line number in the current file.</p>
1853 </div>
1854 <div class="section" id="regular-expressions">
1855 <h3><a class="toc-backref" href="#id75">Regular expressions</a></h3>
1856 <p>You can use regular expressions in the Find and Replace dialogs
1857 by selecting the <em>Use regular expressions</em> check box (see <a class="reference internal" href="#matching-options">Matching
1858 options</a>). The syntax is Perl compatible. Basic syntax is described
1859 in the table below. For full details, see
1860 <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>
1861 <div class="note">
1862 <p class="first admonition-title">Note</p>
1863 <ol class="last arabic simple">
1864 <li>The <em>Use escape sequences</em> dialog option always applies for regular
1865 expressions.</li>
1866 <li>Searching backwards with regular expressions is not supported.</li>
1867 </ol>
1868 </div>
1869 <p><strong>In a regular expression, the following characters are interpreted:</strong></p>
1870 <table border="1" class="docutils">
1871 <colgroup>
1872 <col width="10%" />
1873 <col width="90%" />
1874 </colgroup>
1875 <tbody valign="top">
1876 <tr><td>.</td>
1877 <td>Matches any character.</td>
1878 </tr>
1879 <tr><td>(</td>
1880 <td>This marks the start of a region for tagging a match.</td>
1881 </tr>
1882 <tr><td>)</td>
1883 <td>This marks the end of a tagged region.</td>
1884 </tr>
1885 <tr><td>\n</td>
1886 <td><p class="first">Where n is 1 through 9 refers to the first through ninth tagged
1887 region when searching or replacing.</p>
1888 <p>Searching for (Wiki)\1 matches WikiWiki.</p>
1889 <p class="last">If the search string was Fred([1-9])XXX and the
1890 replace string was Sam\1YYY, when applied to Fred2XXX this
1891 would generate Sam2YYY.</p>
1892 </td>
1893 </tr>
1894 <tr><td>\0</td>
1895 <td>When replacing, the whole matching text.</td>
1896 </tr>
1897 <tr><td>\b</td>
1898 <td>This matches a word boundary.</td>
1899 </tr>
1900 <tr><td>\c</td>
1901 <td><p class="first">A backslash followed by d, D, s, S, w or W, becomes a
1902 character class (both inside and outside sets []).</p>
1903 <ul class="last simple">
1904 <li>d: decimal digits</li>
1905 <li>D: any char except decimal digits</li>
1906 <li>s: whitespace (space, \t \n \r \f \v)</li>
1907 <li>S: any char except whitespace (see above)</li>
1908 <li>w: alphanumeric &amp; underscore</li>
1909 <li>W: any char except alphanumeric &amp; underscore</li>
1910 </ul>
1911 </td>
1912 </tr>
1913 <tr><td>\x</td>
1914 <td>This allows you to use a character x that would otherwise have
1915 a special meaning. For example, \[ would be interpreted as [
1916 and not as the start of a character set. Use \\ for a literal
1917 backslash.</td>
1918 </tr>
1919 <tr><td>[...]</td>
1920 <td><p class="first">Matches one of the characters in the set. If the first
1921 character in the set is ^, it matches the characters NOT in
1922 the set, i.e. complements the set. A shorthand S-E (start
1923 dash end) is used to specify a set of characters S up to E,
1924 inclusive.</p>
1925 <p>The special characters ] and - have no special
1926 meaning if they appear first in the set. - can also be last
1927 in the set. To include both, put ] first: []A-Z-].</p>
1928 <p>Examples:</p>
1929 <pre class="last literal-block">
1930 []|-] matches these 3 chars
1931 []-|] matches from ] to | chars
1932 [a-z] any lowercase alpha
1933 [^]-] any char except - and ]
1934 [^A-Z] any char except uppercase alpha
1935 [a-zA-Z] any alpha
1936 </pre>
1937 </td>
1938 </tr>
1939 <tr><td>^</td>
1940 <td>This matches the start of a line (unless used inside a set, see
1941 above).</td>
1942 </tr>
1943 <tr><td>$</td>
1944 <td>This matches the end of a line.</td>
1945 </tr>
1946 <tr><td>*</td>
1947 <td>This matches 0 or more times. For example, Sa*m matches Sm, Sam,
1948 Saam, Saaam and so on.</td>
1949 </tr>
1950 <tr><td>+</td>
1951 <td>This matches 1 or more times. For example, Sa+m matches Sam,
1952 Saam, Saaam and so on.</td>
1953 </tr>
1954 <tr><td>?</td>
1955 <td>This matches 0 or 1 time(s). For example, Joh?n matches John, Jon.</td>
1956 </tr>
1957 </tbody>
1958 </table>
1959 <div class="note">
1960 <p class="first admonition-title">Note</p>
1961 <p class="last">This table is adapted from Scintilla and SciTE documentation,
1962 distributed under the <a class="reference internal" href="#license-for-scintilla-and-scite">License for Scintilla and SciTE</a>.</p>
1963 </div>
1964 </div>
1965 </div>
1966 <div class="section" id="view-menu">
1967 <h2><a class="toc-backref" href="#id76">View menu</a></h2>
1968 <p>The View menu allows various elements of the main window to be shown
1969 or hidden, and also provides various display-related editor options.</p>
1970 <div class="section" id="color-schemes-menu">
1971 <h3><a class="toc-backref" href="#id77">Color schemes menu</a></h3>
1972 <p>The Color schemes menu is available under the <em>View-&gt;Editor</em> submenu.
1973 It lists various color schemes for editor highlighting styles,
1974 including the default scheme first. Other items are available based
1975 on what color scheme files Geany found at startup.</p>
1976 <p>Color scheme files are read from the <a class="reference internal" href="#configuration-file-paths">Configuration file paths</a> under
1977 the <tt class="docutils literal">colorschemes</tt> subdirectory. They should have the extension
1978 <tt class="docutils literal">.conf</tt>. The default color scheme
1979 is read from <tt class="docutils literal">filetypes.common</tt>.</p>
1980 <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
1981 same as for <tt class="docutils literal">filetypes.common</tt>.</p>
1982 <p>The <tt class="docutils literal">[theme_info]</tt> section can contain information about the
1983 theme. The <tt class="docutils literal">name</tt> and <tt class="docutils literal">description</tt> keys are read to set the
1984 menu item text and tooltip, respectively. These keys can have
1985 translations, e.g.:</p>
1986 <pre class="literal-block">
1987 key=Hello
1988 key[de]=Hallo
1989 key[fr_FR]=Bonjour
1990 </pre>
1991 </div>
1992 </div>
1993 <div class="section" id="tags">
1994 <h2><a class="toc-backref" href="#id78">Tags</a></h2>
1995 <p>Tags are information that relates symbols in a program with the
1996 source file location of the declaration and definition.</p>
1997 <p>Geany has built-in functionality for generating tag information (aka
1998 &quot;workspace tags&quot;) for supported filetypes when you open a file. You
1999 can also have Geany automatically load external tag files (aka &quot;global
2000 tags files&quot;) upon startup, or manually using <em>Tools --&gt; Load Tags</em>.</p>
2001 <p>Geany uses its own tag file format, similar to what <tt class="docutils literal">ctags</tt> uses
2002 (but is incompatible with ctags). You use Geany to generate global
2003 tags files, as described below.</p>
2004 <div class="section" id="workspace-tags">
2005 <h3><a class="toc-backref" href="#id79">Workspace tags</a></h3>
2006 <p>Tags for each document are parsed whenever a file is loaded, saved or
2007 modified (see <em>Symbol list update frequency</em> preference in the <a class="reference internal" href="#editor-completions-preferences">Editor
2008 Completions preferences</a>). These are shown in the Symbol list in the
2009 Sidebar. These tags are also used for autocompletion of symbols and calltips
2010 for all documents open in the current session that have the same filetype.</p>
2011 <p>The <em>Go to Tag</em> commands can be used with all workspace tags. See
2012 <a class="reference internal" href="#go-to-tag-definition">Go to tag definition</a>.</p>
2013 </div>
2014 <div class="section" id="global-tags">
2015 <h3><a class="toc-backref" href="#id80">Global tags</a></h3>
2016 <p>Global tags are used to provide autocompletion of symbols and calltips
2017 without having to open the corresponding source files. This is intended
2018 for library APIs, as the tags file only has to be updated when you upgrade
2019 the library.</p>
2020 <p>You can load a custom global tags file in two ways:</p>
2021 <ul class="simple">
2022 <li>Using the <em>Load Tags</em> command in the Tools menu.</li>
2023 <li>By moving or symlinking tags files to the <tt class="docutils literal">tags</tt> subdirectory of
2024 one of the <a class="reference internal" href="#configuration-file-paths">configuration file paths</a> before starting Geany.</li>
2025 </ul>
2026 <p>You can either download these files or generate your own. They have
2027 the format:</p>
2028 <pre class="literal-block">
2029 name.lang_ext.tags
2030 </pre>
2031 <p><em>lang_ext</em> is one of the extensions set for the filetype associated
2032 with the tags. See the section called <a class="reference internal" href="#filetype-extensions">Filetype extensions</a> for
2033 more information.</p>
2034 <div class="section" id="default-global-tags-files">
2035 <h4><a class="toc-backref" href="#id81">Default global tags files</a></h4>
2036 <p>For some languages, a list of global tags is loaded when the
2037 corresponding filetype is first used. Currently these are for:</p>
2038 <ul class="simple">
2039 <li>C</li>
2040 <li>Pascal</li>
2041 <li>PHP</li>
2042 <li>HTML -- &amp;symbol; completion, e.g. for ampersand, copyright, etc.</li>
2043 <li>LaTeX</li>
2044 <li>Python</li>
2045 </ul>
2046 </div>
2047 <div class="section" id="global-tags-file-format">
2048 <h4><a class="toc-backref" href="#id82">Global tags file format</a></h4>
2049 <p>Global tags files can have three different formats:</p>
2050 <ul class="simple">
2051 <li>Tagmanager format</li>
2052 <li>Pipe-separated format</li>
2053 <li>CTags format</li>
2054 </ul>
2055 <p>The first line of global tags files should be a comment, introduced
2056 by <tt class="docutils literal">#</tt> followed by a space and a string like <tt class="docutils literal">format=pipe</tt>,
2057 <tt class="docutils literal">format=ctags</tt> or <tt class="docutils literal">format=tagmanager</tt> respectively, these are
2058 case-sensitive. This helps Geany to read the file properly. If this
2059 line is missing, Geany tries to auto-detect the used format but this
2060 might fail.</p>
2061 <p>The Tagmanager format is a bit more complex and is used for files
2062 created by the <tt class="docutils literal">geany <span class="pre">-g</span></tt> command. There is one tag per line.
2063 Different tag attributes like the return value or the argument list
2064 are separated with different characters indicating the type of the
2065 following argument. This is the more complete and recommended tag
2066 format.</p>
2067 <div class="section" id="pipe-separated-format">
2068 <h5><a class="toc-backref" href="#id83">Pipe-separated format</a></h5>
2069 <p>The Pipe-separated format is easier to read and write.
2070 There is one tag per line and different tag attributes are separated
2071 by the pipe character (<tt class="docutils literal">|</tt>). A line looks like:</p>
2072 <pre class="literal-block">
2073 basename|string|(string path [, string suffix])|
2074 </pre>
2075 <div class="line-block">
2076 <div class="line">The first field is the tag name (usually a function name).</div>
2077 <div class="line">The second field is the type of the return value.</div>
2078 <div class="line">The third field is the argument list for this tag.</div>
2079 <div class="line">The fourth field is the description for this tag but
2080 currently unused and should be left empty.</div>
2081 </div>
2082 <p>Except for the first field (tag name), all other field can be left
2083 empty but the pipe separator must appear for them.</p>
2084 <p>You can easily write your own global tag files using this format.
2085 Just save them in your tags directory, as described earlier in the
2086 section <a class="reference internal" href="#global-tags">Global tags</a>.</p>
2087 </div>
2088 <div class="section" id="ctags-format">
2089 <h5><a class="toc-backref" href="#id84">CTags format</a></h5>
2090 <p>This is the format that ctags generates, and that is used by Vim.
2091 This format is compatible with the format historically used by Vi.</p>
2092 <p>The format is described at <a class="reference external" href="http://ctags.sourceforge.net/FORMAT">http://ctags.sourceforge.net/FORMAT</a>, but
2093 for the full list of existing extensions please refer to ctags.
2094 However, note that Geany may actually only honor a subset of the
2095 existing extensions.</p>
2096 </div>
2097 </div>
2098 <div class="section" id="generating-a-global-tags-file">
2099 <h4><a class="toc-backref" href="#id85">Generating a global tags file</a></h4>
2100 <p>You can generate your own global tags files by parsing a list of
2101 source files. The command is:</p>
2102 <pre class="literal-block">
2103 geany -g [-P] &lt;Tag File&gt; &lt;File list&gt;
2104 </pre>
2105 <ul class="simple">
2106 <li>Tag File filename should be in the format described earlier --
2107 see the section called <a class="reference internal" href="#global-tags">Global tags</a>.</li>
2108 <li>File list is a list of filenames, each with a full path (unless
2109 you are generating C/C++ tags and have set the CFLAGS environment
2110 variable appropriately).</li>
2111 <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
2112 to process <tt class="docutils literal">#include</tt> directives for C/C++ source files. Use this
2113 option if you want to specify each source file on the command-line
2114 instead of using a 'master' header file. Also can be useful if you
2115 don't want to specify the CFLAGS environment variable.</li>
2116 </ul>
2117 <p>Example for the wxD library for the D programming language:</p>
2118 <pre class="literal-block">
2119 geany -g wxd.d.tags /home/username/wxd/wx/*.d
2120 </pre>
2121 <div class="section" id="generating-c-c-tag-files">
2122 <h5><a class="toc-backref" href="#id86">Generating C/C++ tag files</a></h5>
2123 <p>You may need to first setup the <a class="reference internal" href="#c-ignore-tags">C ignore.tags</a> file.</p>
2124 <p>For C/C++ tag files gcc is required by default, so that header files
2125 can be preprocessed to include any other headers they depend upon. If
2126 you do not want this, use the <tt class="docutils literal"><span class="pre">-P</span></tt> option described above.</p>
2127 <p>For preprocessing, the environment variable CFLAGS should be set with
2128 appropriate <tt class="docutils literal"><span class="pre">-I/path</span></tt> include paths. The following example works with
2129 the bash shell, generating tags for the GnomeUI library:</p>
2130 <pre class="literal-block">
2131 CFLAGS=`pkg-config --cflags libgnomeui-2.0` geany -g gnomeui.c.tags \
2132 /usr/include/libgnomeui-2.0/gnome.h
2133 </pre>
2134 <p>You can adapt this command to use CFLAGS and header files appropriate
2135 for whichever libraries you want.</p>
2136 </div>
2137 <div class="section" id="generating-tag-files-on-windows">
2138 <h5><a class="toc-backref" href="#id87">Generating tag files on Windows</a></h5>
2139 <p>This works basically the same as on other platforms:</p>
2140 <pre class="literal-block">
2141 &quot;c:\program files\geany\bin\geany&quot; -g c:\mytags.php.tags c:\code\somefile.php
2142 </pre>
2143 </div>
2144 </div>
2145 </div>
2146 <div class="section" id="c-ignore-tags">
2147 <h3><a class="toc-backref" href="#id88">C ignore.tags</a></h3>
2148 <p>You can ignore certain tags for C-based languages if they would lead
2149 to wrong parsing of the code. Use the <em>Tools-&gt;Configuration
2150 Files-&gt;ignore.tags</em> menu item to open the user <tt class="docutils literal">ignore.tags</tt> file.
2151 See also <a class="reference internal" href="#configuration-file-paths">Configuration file paths</a>.</p>
2152 <p>List all tag names you want to ignore in this file, separated by spaces
2153 and/or newlines.</p>
2154 <p>Example:</p>
2155 <pre class="literal-block">
2156 G_GNUC_NULL_TERMINATED
2157 G_GNUC_PRINTF
2158 G_GNUC_WARN_UNUSED_RESULT
2159 </pre>
2160 <p>This will parse code like:</p>
2161 <p><tt class="docutils literal">gchar **utils_strv_new(const gchar *first, <span class="pre">...)</span>
2162 G_GNUC_NULL_TERMINATED;</tt></p>
2163 <p>More detailed information about ignore tags usage from the Exuberant Ctags
2164 manual page:</p>
2165 <blockquote>
2166 Specifies a list of identifiers which are to be specially handled
2167 while parsing C and C++ source files. This option is specifically
2168 provided to handle special cases arising through the use of
2169 pre-processor macros. When the identifiers listed are simple identifiers,
2170 these identifiers will be ignored during parsing of the source files.
2171 If an identifier is suffixed with a '+' character, ctags will also
2172 ignore any parenthesis-enclosed argument list which may immediately
2173 follow the identifier in the source files.
2174 If two identifiers are separated with the '=' character, the first
2175 identifiers is replaced by the second identifiers for parsing purposes.</blockquote>
2176 <p>For even more detailed information please read the manual page of
2177 Exuberant Ctags.</p>
2178 <p>Geany extends Ctags with a '*' character suffix - this means use
2179 prefix matching, e.g. G_GNUC_* will match G_GNUC_NULL_TERMINATED, etc.
2180 Note that prefix match items should be put after other items to ensure
2181 that items like G_GNUC_PRINTF+ get parsed correctly.</p>
2182 </div>
2183 </div>
2184 <div class="section" id="preferences">
2185 <h2><a class="toc-backref" href="#id89">Preferences</a></h2>
2186 <p>You may adjust Geany's settings using the Edit --&gt; Preferences
2187 dialog. Any changes you make there can be applied by hitting either
2188 the Apply or the OK button. These settings will persist between Geany
2189 sessions. Note that most settings here have descriptive popup bubble
2190 help -- just hover the mouse over the item in question to get help
2191 on it.</p>
2192 <p>You may also adjust some View settings (under the View menu) that
2193 persist between Geany sessions. The settings under the Document menu,
2194 however, are only for the current document and revert to defaults
2195 when restarting Geany.</p>
2196 <div class="note">
2197 <p class="first admonition-title">Note</p>
2198 <p class="last">In the paragraphs that follow, the text describing a dialog tab
2199 comes after the screenshot of that tab.</p>
2200 </div>
2201 <div class="section" id="general-startup-preferences">
2202 <h3><a class="toc-backref" href="#id90">General Startup preferences</a></h3>
2203 <img alt="./images/pref_dialog_gen_startup.png" src="./images/pref_dialog_gen_startup.png" />
2204 <div class="section" id="id1">
2205 <h4><a class="toc-backref" href="#id91">Startup</a></h4>
2206 <dl class="docutils">
2207 <dt>Load files from the last session</dt>
2208 <dd>On startup, load the same files you had open the last time you
2209 used Geany.</dd>
2210 <dt>Load virtual terminal support</dt>
2211 <dd>Load the library for running a terminal in the message window area.</dd>
2212 <dt>Enable plugin support</dt>
2213 <dd>Allow plugins to be used in Geany.</dd>
2214 </dl>
2215 </div>
2216 <div class="section" id="shutdown">
2217 <h4><a class="toc-backref" href="#id92">Shutdown</a></h4>
2218 <dl class="docutils">
2219 <dt>Save window position and geometry</dt>
2220 <dd>Save the current position and size of the main window so next time
2221 you open Geany it's in the same location.</dd>
2222 <dt>Confirm Exit</dt>
2223 <dd>Have a dialog pop up to confirm that you really want to quit Geany.</dd>
2224 </dl>
2225 </div>
2226 <div class="section" id="paths">
2227 <h4><a class="toc-backref" href="#id93">Paths</a></h4>
2228 <dl class="docutils">
2229 <dt>Startup path</dt>
2230 <dd>Path to start in when opening or saving files.
2231 It must be an absolute path.</dd>
2232 <dt>Project files</dt>
2233 <dd>Path to start in when opening project files.</dd>
2234 <dt>Extra plugin path</dt>
2235 <dd>By default Geany looks in the system installation and the user
2236 configuration - see <a class="reference internal" href="#plugins">Plugins</a>. In addition the path entered here will be
2237 searched.
2238 Usually you do not need to set an additional path to search for
2239 plugins. It might be useful when Geany is installed on a multi-user machine
2240 and additional plugins are available in a common location for all users.
2241 Leave blank to not set an additional lookup path.</dd>
2242 </dl>
2243 </div>
2244 </div>
2245 <div class="section" id="general-miscellaneous-preferences">
2246 <h3><a class="toc-backref" href="#id94">General Miscellaneous preferences</a></h3>
2247 <img alt="./images/pref_dialog_gen_misc.png" src="./images/pref_dialog_gen_misc.png" />
2248 <div class="section" id="miscellaneous">
2249 <h4><a class="toc-backref" href="#id95">Miscellaneous</a></h4>
2250 <dl class="docutils">
2251 <dt>Beep on errors when compilation has finished</dt>
2252 <dd>Have the computer make a beeping sound when compilation of your program
2253 has completed or any errors occurred.</dd>
2254 <dt>Switch status message list at new message</dt>
2255 <dd>Switch to the status message tab (in the notebook window at the bottom)
2256 once a new status message arrives.</dd>
2257 <dt>Suppress status messages in the status bar</dt>
2258 <dd><p class="first">Remove all messages from the status bar. The messages are still displayed
2259 in the status messages window.</p>
2260 <div class="tip last">
2261 <p class="first admonition-title">Tip</p>
2262 <p class="last">Another option is to use the <em>Switch to Editor</em> keybinding - it
2263 reshows the document statistics on the status bar. See <a class="reference internal" href="#focus-keybindings">Focus
2264 keybindings</a>.</p>
2265 </div>
2266 </dd>
2267 <dt>Use Windows File Open/Save dialogs</dt>
2268 <dd>Defines whether to use the native Windows File Open/Save dialogs or
2269 whether to use the GTK default dialogs.</dd>
2270 <dt>Auto-focus widgets (focus follows mouse)</dt>
2271 <dd>Give the focus automatically to widgets below the mouse cursor.
2272 This works for the main editor widget, the scribble, the toolbar search field
2273 goto line fields and the VTE.</dd>
2274 </dl>
2275 </div>
2276 <div class="section" id="search">
2277 <h4><a class="toc-backref" href="#id96">Search</a></h4>
2278 <dl class="docutils">
2279 <dt>Always wrap search</dt>
2280 <dd>Always wrap search around the document when finding a match.</dd>
2281 <dt>Hide the Find dialog</dt>
2282 <dd>Hide the <a class="reference internal" href="#find">Find</a> dialog after clicking Find Next/Previous.</dd>
2283 <dt>Use the current word under the cursor for Find dialogs</dt>
2284 <dd>Use current word under the cursor when opening the Find, Find in Files or Replace dialog and
2285 there is no selection. When this option is disabled, the search term last used in the
2286 appropriate Find dialog is used.</dd>
2287 <dt>Use the current file's directory for Find in Files</dt>
2288 <dd>When opening the Find in Files dialog, set the directory to search to the directory of the current
2289 active file. When this option is disabled, the directory of the last use of the Find in Files
2290 dialog is used. See <a class="reference internal" href="#find-in-files">Find in Files</a> for details.</dd>
2291 </dl>
2292 </div>
2293 <div class="section" id="projects">
2294 <h4><a class="toc-backref" href="#id97">Projects</a></h4>
2295 <dl class="docutils">
2296 <dt>Use project-based session files</dt>
2297 <dd>Save your current session when closing projects. You will be able to
2298 resume different project sessions, automatically opening the files
2299 you had open previously.</dd>
2300 <dt>Store project file inside the project base directory</dt>
2301 <dd>When creating new projects, the default path for the project file contains
2302 the project base path. Without this option enabled, the default project file
2303 path is one level above the project base path.
2304 In either case, you can easily set the final project file path in the
2305 <em>New Project</em> dialog. This option provides the more common
2306 defaults automatically for convenience.</dd>
2307 </dl>
2308 </div>
2309 </div>
2310 <div class="section" id="interface-preferences">
2311 <h3><a class="toc-backref" href="#id98">Interface preferences</a></h3>
2312 <img alt="./images/pref_dialog_interface_interface.png" src="./images/pref_dialog_interface_interface.png" />
2313 <div class="section" id="sidebar">
2314 <h4><a class="toc-backref" href="#id99">Sidebar</a></h4>
2315 <dl class="docutils">
2316 <dt>Show sidebar</dt>
2317 <dd>Whether to show the sidebar at all.</dd>
2318 <dt>Show symbol list</dt>
2319 <dd>Show the list of functions, variables, and other information in the
2320 current document you are editing.</dd>
2321 <dt>Show documents list</dt>
2322 <dd>Show all the documents you have open currently. This can be used to
2323 change between documents (see <a class="reference internal" href="#switching-between-documents">Switching between documents</a>) and
2324 to perform some common operations such as saving, closing and reloading.</dd>
2325 <dt>Position</dt>
2326 <dd>Whether to place the sidebar on the left or right of the editor window.</dd>
2327 </dl>
2328 </div>
2329 <div class="section" id="fonts">
2330 <h4><a class="toc-backref" href="#id100">Fonts</a></h4>
2331 <dl class="docutils">
2332 <dt>Editor</dt>
2333 <dd>Change the font used to display documents.</dd>
2334 <dt>Symbol list</dt>
2335 <dd>Change the font used for the Symbols sidebar tab.</dd>
2336 <dt>Message window</dt>
2337 <dd>Change the font used for the message window area.</dd>
2338 </dl>
2339 </div>
2340 <div class="section" id="id2">
2341 <h4><a class="toc-backref" href="#id101">Miscellaneous</a></h4>
2342 <dl class="docutils">
2343 <dt>Show status bar</dt>
2344 <dd>Show the status bar at the bottom of the main window. It gives information about
2345 the file you are editing like the line and column you are on, whether any
2346 modifications were done, the file encoding, the filetype and other information.</dd>
2347 </dl>
2348 </div>
2349 </div>
2350 <div class="section" id="interface-notebook-tab-preferences">
2351 <h3><a class="toc-backref" href="#id102">Interface Notebook tab preferences</a></h3>
2352 <img alt="./images/pref_dialog_interface_notebook.png" src="./images/pref_dialog_interface_notebook.png" />
2353 <div class="section" id="editor-tabs">
2354 <h4><a class="toc-backref" href="#id103">Editor tabs</a></h4>
2355 <dl class="docutils">
2356 <dt>Show editor tabs</dt>
2357 <dd>Show a notebook tab for all documents so you can switch between them
2358 using the mouse (instead of using the Documents window).</dd>
2359 <dt>Show close buttons</dt>
2360 <dd>Make each tab show a close button so you can easily close open
2361 documents.</dd>
2362 <dt>Placement of new file tabs</dt>
2363 <dd>Whether to create a document with its notebook tab to the left or
2364 right of all existing tabs.</dd>
2365 <dt>Next to current</dt>
2366 <dd>Whether to place file tabs next to the current tab
2367 rather than at the edges of the notebook.</dd>
2368 <dt>Double-clicking hides all additional widgets</dt>
2369 <dd>Whether to call the View-&gt;Toggle All Additional Widgets command
2370 when double-clicking on a notebook tab.</dd>
2371 </dl>
2372 </div>
2373 <div class="section" id="tab-positions">
2374 <h4><a class="toc-backref" href="#id104">Tab positions</a></h4>
2375 <dl class="docutils">
2376 <dt>Editor</dt>
2377 <dd>Set the positioning of the editor's notebook tabs to the right,
2378 left, top, or bottom of the editing window.</dd>
2379 <dt>Sidebar</dt>
2380 <dd>Set the positioning of the sidebar's notebook tabs to the right,
2381 left, top, or bottom of the sidebar window.</dd>
2382 <dt>Message window</dt>
2383 <dd>Set the positioning of the message window's notebook tabs to the
2384 right, left, top, or bottom of the message window.</dd>
2385 </dl>
2386 </div>
2387 </div>
2388 <div class="section" id="interface-toolbar-preferences">
2389 <h3><a class="toc-backref" href="#id105">Interface Toolbar preferences</a></h3>
2390 <p>Affects the main toolbar underneath the menu bar.</p>
2391 <img alt="./images/pref_dialog_interface_toolbar.png" src="./images/pref_dialog_interface_toolbar.png" />
2392 <div class="section" id="toolbar">
2393 <h4><a class="toc-backref" href="#id106">Toolbar</a></h4>
2394 <dl class="docutils">
2395 <dt>Show Toolbar</dt>
2396 <dd>Whether to show the toolbar.</dd>
2397 <dt>Append Toolbar to the Menu</dt>
2398 <dd>Allows to append the toolbar to the main menu bar instead of placing it below.
2399 This is useful to save vertical space.</dd>
2400 <dt>Customize Toolbar</dt>
2401 <dd>See <a class="reference internal" href="#customizing-the-toolbar">Customizing the toolbar</a>.</dd>
2402 </dl>
2403 </div>
2404 <div class="section" id="appearance">
2405 <h4><a class="toc-backref" href="#id107">Appearance</a></h4>
2406 <dl class="docutils">
2407 <dt>Icon Style</dt>
2408 <dd>Select the toolbar icon style to use - either icons and text, just
2409 icons or just text.
2410 The choice System default uses whatever icon style is set by GTK.</dd>
2411 <dt>Icon size</dt>
2412 <dd>Select the size of the icons you see (large, small or very small).
2413 The choice System default uses whatever icon size is set by GTK.</dd>
2414 </dl>
2415 </div>
2416 </div>
2417 <div class="section" id="editor-features-preferences">
2418 <h3><a class="toc-backref" href="#id108">Editor Features preferences</a></h3>
2419 <img alt="./images/pref_dialog_edit_features.png" src="./images/pref_dialog_edit_features.png" />
2420 <div class="section" id="features">
2421 <h4><a class="toc-backref" href="#id109">Features</a></h4>
2422 <dl class="docutils">
2423 <dt>Line wrapping</dt>
2424 <dd>Show long lines wrapped around to new display lines.</dd>
2425 </dl>
2426 <dl class="docutils" id="smart-home-key">
2427 <dt>&quot;Smart&quot; home key</dt>
2428 <dd>Whether to move the cursor to the first non-whitespace character
2429 on the line when you hit the home key on your keyboard. Pressing it
2430 again will go to the very start of the line.</dd>
2431 <dt>Disable Drag and Drop</dt>
2432 <dd>Do not allow the dragging and dropping of selected text in documents.</dd>
2433 <dt>Code folding</dt>
2434 <dd>Allow groups of lines in a document to be collapsed for easier
2435 navigation/editing.</dd>
2436 <dt>Fold/Unfold all children of a fold point</dt>
2437 <dd>Whether to fold/unfold all child fold points when a parent line
2438 is folded.</dd>
2439 <dt>Use indicators to show compile errors</dt>
2440 <dd>Underline lines with compile errors using red squiggles to indicate
2441 them in the editor area.</dd>
2442 <dt>Newline strips trailing spaces</dt>
2443 <dd>Remove any whitespace at the end of the line when you hit the
2444 Enter/Return key. See also <a class="reference internal" href="#strip-trailing-spaces">Strip trailing spaces</a>. Note
2445 auto indentation is calculated before stripping, so although this
2446 setting will clear a blank line, it will not set the next line
2447 indentation back to zero.</dd>
2448 <dt>Line breaking column</dt>
2449 <dd>The editor column number to insert a newline at when Line Breaking
2450 is enabled for the current document.</dd>
2451 <dt>Comment toggle marker</dt>
2452 <dd>A string which is added when toggling a line comment in a source file.
2453 It is used to mark the comment as toggled.</dd>
2454 </dl>
2455 </div>
2456 </div>
2457 <div class="section" id="editor-indentation-preferences">
2458 <h3><a class="toc-backref" href="#id110">Editor Indentation preferences</a></h3>
2459 <img alt="./images/pref_dialog_edit_indentation.png" src="./images/pref_dialog_edit_indentation.png" />
2460 <div class="section" id="indentation-group">
2461 <h4><a class="toc-backref" href="#id111">Indentation group</a></h4>
2462 <p>See <a class="reference internal" href="#indentation">Indentation</a> for more information.</p>
2463 <dl class="docutils">
2464 <dt>Width</dt>
2465 <dd>The width of a single indent size in spaces. By default the indent
2466 size is equivalent to 4 spaces.</dd>
2467 <dt>Detect width from file</dt>
2468 <dd>Try to detect and set the indent width based on file content, when
2469 a file is opened.</dd>
2470 <dt>Type</dt>
2471 <dd><p class="first">When Geany inserts indentation, whether to use:</p>
2472 <ul class="simple">
2473 <li>Just Tabs</li>
2474 <li>Just Spaces</li>
2475 <li>Tabs and Spaces, depending on how much indentation is on a line</li>
2476 </ul>
2477 <p class="last">The <em>Tabs and Spaces</em> indent type is also known as <em>Soft tab
2478 support</em> in some other editors.</p>
2479 </dd>
2480 <dt>Detect type from file</dt>
2481 <dd>Try to detect and set the indent type based on file content, when
2482 a file is opened.</dd>
2483 <dt>Auto-indent mode</dt>
2484 <dd><p class="first">The type of auto-indentation you wish to use after pressing Enter,
2485 if any.</p>
2486 <dl class="last docutils">
2487 <dt>Basic</dt>
2488 <dd>Just add the indentation of the previous line.</dd>
2489 <dt>Current chars</dt>
2490 <dd>Add indentation based on the current filetype and any characters at
2491 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>
2492 <dt>Match braces</dt>
2493 <dd>Like <em>Current chars</em> but for C-like languages, make a closing
2494 <tt class="docutils literal">}</tt> brace line up with the matching opening brace.</dd>
2495 </dl>
2496 </dd>
2497 <dt>Tab key indents</dt>
2498 <dd><p class="first">If set, pressing tab will indent the current line or selection, and
2499 unindent when pressing Shift-tab. Otherwise, the tab key will
2500 insert a tab character into the document (which can be different
2501 from indentation, depending on the indent type).</p>
2502 <div class="note last">
2503 <p class="first admonition-title">Note</p>
2504 <p class="last">There are also separate configurable keybindings for indent &amp;
2505 unindent, but this preference allows the tab key to have different
2506 meanings in different contexts - e.g. for snippet completion.</p>
2507 </div>
2508 </dd>
2509 </dl>
2510 </div>
2511 </div>
2512 <div class="section" id="editor-completions-preferences">
2513 <h3><a class="toc-backref" href="#id112">Editor Completions preferences</a></h3>
2514 <img alt="./images/pref_dialog_edit_completions.png" src="./images/pref_dialog_edit_completions.png" />
2515 <div class="section" id="completions">
2516 <h4><a class="toc-backref" href="#id113">Completions</a></h4>
2517 <dl class="docutils">
2518 <dt>Snippet Completion</dt>
2519 <dd>Whether to replace special keywords after typing Tab into a
2520 pre-defined text snippet.
2521 See <a class="reference internal" href="#user-definable-snippets">User-definable snippets</a>.</dd>
2522 <dt>XML/HTML tag auto-closing</dt>
2523 <dd>When you open an XML/HTML tag automatically generate its
2524 completion tag.</dd>
2525 <dt>Automatic continuation multi-line comments</dt>
2526 <dd><p class="first">Continue automatically multi-line comments in languages like C, C++
2527 and Java when a new line is entered inside such a comment.
2528 With this option enabled, Geany will insert a <tt class="docutils literal">*</tt> on every new line
2529 inside a multi-line comment, for example when you press return in the
2530 following C code:</p>
2531 <pre class="literal-block">
2533 * This is a C multi-line comment, press &lt;Return&gt;
2534 </pre>
2535 <p>then Geany would insert:</p>
2536 <pre class="literal-block">
2538 </pre>
2539 <p class="last">on the next line with the correct indentation based on the previous line,
2540 as long as the multi-line is not closed by <tt class="docutils literal">*/</tt>.</p>
2541 </dd>
2542 <dt>Autocomplete symbols</dt>
2543 <dd>When you start to type a symbol name, look for the full string to
2544 allow it to be completed for you.</dd>
2545 <dt>Autocomplete all words in document</dt>
2546 <dd>When you start to type a word, Geany will search the whole document for
2547 words starting with the typed part to complete it, assuming there
2548 are no tag names to show.</dd>
2549 <dt>Drop rest of word on completion</dt>
2550 <dd>Remove any word part to the right of the cursor when choosing a
2551 completion list item.</dd>
2552 <dt>Characters to type for autocompletion</dt>
2553 <dd>Number of characters of a word to type before autocompletion is
2554 displayed.</dd>
2555 <dt>Completion list height</dt>
2556 <dd>The number of rows to display for the autocompletion window.</dd>
2557 <dt>Max. symbol name suggestions</dt>
2558 <dd>The maximum number of items in the autocompletion list.</dd>
2559 <dt>Symbol list update frequency</dt>
2560 <dd><p class="first">The minimum delay (in milliseconds) between two symbol list updates.</p>
2561 <p>This option determines how frequently the tag list is updated for the
2562 current document. The smaller the delay, the more up-to-date the symbol
2563 list (and then the completions); but rebuilding the symbol list has a
2564 cost in performance, especially with large files.</p>
2565 <p>The default value is 250ms, which means the symbol list will be updated
2566 at most four times per second, even if the document changes continuously.</p>
2567 <p class="last">A value of 0 disables automatic updates, so the symbol list will only be
2568 updated upon document saving.</p>
2569 </dd>
2570 </dl>
2571 </div>
2572 <div class="section" id="auto-close-quotes-and-brackets">
2573 <h4><a class="toc-backref" href="#id114">Auto-close quotes and brackets</a></h4>
2574 <p>Geany can automatically insert a closing bracket and quote characters when
2575 you open them. For instance, you type a <tt class="docutils literal">(</tt> and Geany will automatically
2576 insert <tt class="docutils literal">)</tt>. With the following options, you can define for which
2577 characters this should work.</p>
2578 <dl class="docutils">
2579 <dt>Parenthesis ( )</dt>
2580 <dd>Auto-close parenthesis when typing an opening one</dd>
2581 <dt>Curly brackets { }</dt>
2582 <dd>Auto-close curly brackets (braces) when typing an opening one</dd>
2583 <dt>Square brackets [ ]</dt>
2584 <dd>Auto-close square brackets when typing an opening one</dd>
2585 <dt>Single quotes ' '</dt>
2586 <dd>Auto-close single quotes when typing an opening one</dd>
2587 <dt>Double quotes &quot; &quot;</dt>
2588 <dd>Auto-close double quotes when typing an opening one</dd>
2589 </dl>
2590 </div>
2591 </div>
2592 <div class="section" id="editor-display-preferences">
2593 <h3><a class="toc-backref" href="#id115">Editor Display preferences</a></h3>
2594 <p>This is for visual elements displayed in the editor window.</p>
2595 <img alt="./images/pref_dialog_edit_display.png" src="./images/pref_dialog_edit_display.png" />
2596 <div class="section" id="display">
2597 <h4><a class="toc-backref" href="#id116">Display</a></h4>
2598 <dl class="docutils">
2599 <dt>Invert syntax highlighting colors</dt>
2600 <dd>Invert all colors, by default this makes white text on a black
2601 background.</dd>
2602 <dt>Show indendation guides</dt>
2603 <dd>Show vertical lines to help show how much leading indentation there
2604 is on each line.</dd>
2605 <dt>Show whitespaces</dt>
2606 <dd>Mark all tabs with an arrow &quot;--&gt;&quot; symbol and spaces with dots to
2607 show which kinds of whitespace are used.</dd>
2608 <dt>Show line endings</dt>
2609 <dd>Display a symbol everywhere that a carriage return or line feed
2610 is present.</dd>
2611 <dt>Show line numbers</dt>
2612 <dd>Show or hide the Line Number margin.</dd>
2613 <dt>Show markers margin</dt>
2614 <dd>Show or hide the small margin right of the line numbers, which is used
2615 to mark lines.</dd>
2616 <dt>Stop scrolling at last line</dt>
2617 <dd>When enabled Geany stops scrolling when at the last line of the document.
2618 Otherwise you can scroll one more page even if there are no real lines.</dd>
2619 </dl>
2620 </div>
2621 <div class="section" id="long-line-marker">
2622 <h4><a class="toc-backref" href="#id117">Long line marker</a></h4>
2623 <p>The long line marker helps to indicate overly-long lines, or as a hint
2624 to the user for when to break the line.</p>
2625 <dl class="docutils">
2626 <dt>Type</dt>
2627 <dd><dl class="first last docutils">
2628 <dt>Line</dt>
2629 <dd>Show a thin vertical line in the editor window at the given column
2630 position.</dd>
2631 <dt>Background</dt>
2632 <dd>Change the background color of characters after the given column
2633 position to the color set below. (This is recommended over the
2634 <em>Line</em> setting if you use proportional fonts).</dd>
2635 <dt>Disabled</dt>
2636 <dd>Don't mark long lines at all.</dd>
2637 </dl>
2638 </dd>
2639 <dt>Long line marker</dt>
2640 <dd>Set this value to a value greater than zero to specify the column
2641 where it should appear.</dd>
2642 <dt>Long line marker color</dt>
2643 <dd>Set the color of the long line marker.</dd>
2644 </dl>
2645 </div>
2646 <div class="section" id="virtual-spaces">
2647 <h4><a class="toc-backref" href="#id118">Virtual spaces</a></h4>
2648 <p>Virtual space is space beyond the end of each line.
2649 The cursor may be moved into virtual space but no real space will be
2650 added to the document until there is some text typed or some other
2651 text insertion command is used.</p>
2652 <dl class="docutils">
2653 <dt>Disabled</dt>
2654 <dd>Do not show virtual spaces</dd>
2655 <dt>Only for rectangular selections</dt>
2656 <dd>Only show virtual spaces beyond the end of lines when drawing a rectangular selection</dd>
2657 <dt>Always</dt>
2658 <dd>Always show virtual spaces beyond the end of lines</dd>
2659 </dl>
2660 </div>
2661 </div>
2662 <div class="section" id="files-preferences">
2663 <h3><a class="toc-backref" href="#id119">Files preferences</a></h3>
2664 <img alt="./images/pref_dialog_files.png" src="./images/pref_dialog_files.png" />
2665 <div class="section" id="new-files">
2666 <h4><a class="toc-backref" href="#id120">New files</a></h4>
2667 <dl class="docutils">
2668 <dt>Open new documents from the command-line</dt>
2669 <dd>Whether to create new documents when passing filenames that don't
2670 exist from the command-line.</dd>
2671 <dt>Default encoding (new files)</dt>
2672 <dd>The type of file encoding you wish to use when creating files.</dd>
2673 <dt>Used fixed encoding when opening files</dt>
2674 <dd>Assume all files you are opening are using the type of encoding specified below.</dd>
2675 <dt>Default encoding (existing files)</dt>
2676 <dd>Opens all files with the specified encoding instead of auto-detecting it.
2677 Use this option when it's not possible for Geany to detect the exact encoding.</dd>
2678 <dt>Default end of line characters</dt>
2679 <dd>The end of line characters to which should be used for new files.
2680 On Windows systems, you generally want to use CR/LF which are the common
2681 characters to mark line breaks.
2682 On Unix-like systems, LF is default and CR is used on MAC systems.</dd>
2683 </dl>
2684 </div>
2685 <div class="section" id="saving-files">
2686 <h4><a class="toc-backref" href="#id121">Saving files</a></h4>
2687 <p>Perform formatting operations when a document is saved. These
2688 can each be undone with the Undo command.</p>
2689 <dl class="docutils">
2690 <dt>Ensure newline at file end</dt>
2691 <dd>Add a newline at the end of the document if one is missing.</dd>
2692 <dt>Ensure consistent line endings</dt>
2693 <dd>Ensures that newline characters always get converted before
2694 saving, avoiding mixed line endings in the same file.</dd>
2695 </dl>
2696 <dl class="docutils" id="strip-trailing-spaces">
2697 <dt>Strip trailing spaces</dt>
2698 <dd><p class="first">Remove any whitespace at the end of each document line.</p>
2699 <div class="note last">
2700 <p class="first admonition-title">Note</p>
2701 <p class="last">This does not apply to Diff documents, e.g. patch files.</p>
2702 </div>
2703 </dd>
2704 <dt>Replace tabs with space</dt>
2705 <dd><p class="first">Replace all tabs in the document with the equivalent number of spaces.</p>
2706 <div class="note last">
2707 <p class="first admonition-title">Note</p>
2708 <p class="last">It is better to use spaces to indent than use this preference - see
2709 <a class="reference internal" href="#indentation">Indentation</a>.</p>
2710 </div>
2711 </dd>
2712 </dl>
2713 </div>
2714 <div class="section" id="id3">
2715 <h4><a class="toc-backref" href="#id122">Miscellaneous</a></h4>
2716 <dl class="docutils">
2717 <dt>Recent files list length</dt>
2718 <dd>The number of files to remember in the recently used files list.</dd>
2719 <dt>Disk check timeout</dt>
2720 <dd><p class="first">The number of seconds to periodically check the current document's
2721 file on disk in case it has changed. Setting it to 0 will disable
2722 this feature.</p>
2723 <div class="note last">
2724 <p class="first admonition-title">Note</p>
2725 <p class="last">These checks are only performed on local files. Remote files are
2726 not checked for changes due to performance issues
2727 (remote files are files in <tt class="docutils literal"><span class="pre">~/.gvfs/</span></tt>).</p>
2728 </div>
2729 </dd>
2730 </dl>
2731 </div>
2732 </div>
2733 <div class="section" id="tools-preferences">
2734 <h3><a class="toc-backref" href="#id123">Tools preferences</a></h3>
2735 <img alt="./images/pref_dialog_tools.png" src="./images/pref_dialog_tools.png" />
2736 <div class="section" id="tool-paths">
2737 <h4><a class="toc-backref" href="#id124">Tool paths</a></h4>
2738 <dl class="docutils">
2739 <dt>Terminal</dt>
2740 <dd>The command to execute a script in a terminal. Occurrences of %c
2741 in the command are substituted with the run script name, see
2742 <a class="reference internal" href="#terminal-emulators">Terminal emulators</a>.</dd>
2743 <dt>Browser</dt>
2744 <dd>The location of your web browser executable.</dd>
2745 <dt>Grep</dt>
2746 <dd>The location of the grep executable.</dd>
2747 </dl>
2748 <div class="note">
2749 <p class="first admonition-title">Note</p>
2750 <p class="last">For Windows users: at the time of writing it is recommended to use
2751 the grep.exe from the UnxUtils project
2752 (<a class="reference external" href="http://sourceforge.net/projects/unxutils">http://sourceforge.net/projects/unxutils</a>). The grep.exe from the
2753 Mingw project for instance might not work with Geany at the moment.</p>
2754 </div>
2755 </div>
2756 <div class="section" id="commands">
2757 <h4><a class="toc-backref" href="#id125">Commands</a></h4>
2758 <dl class="docutils">
2759 <dt>Context action</dt>
2760 <dd>Set this to a command to execute on the current word.
2761 You can use the &quot;%s&quot; wildcard to pass the current word below the cursor
2762 to the specified command.</dd>
2763 </dl>
2764 </div>
2765 </div>
2766 <div class="section" id="template-preferences">
2767 <h3><a class="toc-backref" href="#id126">Template preferences</a></h3>
2768 <p>This data is used as meta data for various template text to insert into
2769 a document, such as the file header. You only need to set fields that
2770 you want to use in your template files.</p>
2771 <img alt="./images/pref_dialog_templ.png" src="./images/pref_dialog_templ.png" />
2772 <div class="section" id="template-data">
2773 <h4><a class="toc-backref" href="#id127">Template data</a></h4>
2774 <dl class="docutils">
2775 <dt>Developer</dt>
2776 <dd>The name of the developer who will be creating files.</dd>
2777 <dt>Initials</dt>
2778 <dd>The initials of the developer.</dd>
2779 <dt>Mail address</dt>
2780 <dd><p class="first">The email address of the developer.</p>
2781 <div class="note last">
2782 <p class="first admonition-title">Note</p>
2783 <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>
2784 </div>
2785 </dd>
2786 <dt>Company</dt>
2787 <dd>The company the developer is working for.</dd>
2788 <dt>Initial version</dt>
2789 <dd>The initial version of files you will be creating.</dd>
2790 <dt>Year</dt>
2791 <dd>Specify a format for the the {year} wildcard. You can use any conversion specifiers
2792 which can be used with the ANSI C strftime function. For details please see
2793 <a class="reference external" href="http://man.cx/strftime">http://man.cx/strftime</a>.</dd>
2794 <dt>Date</dt>
2795 <dd>Specify a format for the the {date} wildcard. You can use any conversion specifiers
2796 which can be used with the ANSI C strftime function. For details please see
2797 <a class="reference external" href="http://man.cx/strftime">http://man.cx/strftime</a>.</dd>
2798 <dt>Date &amp; Time</dt>
2799 <dd>Specify a format for the the {datetime} wildcard. You can use any conversion specifiers
2800 which can be used with the ANSI C strftime function. For details please see
2801 <a class="reference external" href="http://man.cx/strftime">http://man.cx/strftime</a>.</dd>
2802 </dl>
2803 </div>
2804 </div>
2805 <div class="section" id="keybinding-preferences">
2806 <h3><a class="toc-backref" href="#id128">Keybinding preferences</a></h3>
2807 <img alt="./images/pref_dialog_keys.png" src="./images/pref_dialog_keys.png" />
2808 <p>There are some commands listed in the keybinding dialog that are not, by default,
2809 bound to a key combination, and may not be available as a menu item.</p>
2810 <div class="note">
2811 <p class="first admonition-title">Note</p>
2812 <p class="last">For more information see the section <a class="reference internal" href="#keybindings">Keybindings</a>.</p>
2813 </div>
2814 </div>
2815 <div class="section" id="printing-preferences">
2816 <h3><a class="toc-backref" href="#id129">Printing preferences</a></h3>
2817 <img alt="./images/pref_dialog_printing.png" src="./images/pref_dialog_printing.png" />
2818 <dl class="docutils">
2819 <dt>Use external command for printing</dt>
2820 <dd>Use a system command to print your file out.</dd>
2821 <dt>Use native GTK printing</dt>
2822 <dd>Let the GTK GUI toolkit handle your print request.</dd>
2823 <dt>Print line numbers</dt>
2824 <dd>Print the line numbers on the left of your paper.</dd>
2825 <dt>Print page number</dt>
2826 <dd>Print the page number on the bottom right of your paper.</dd>
2827 <dt>Print page header</dt>
2828 <dd>Print a header on every page that is sent to the printer.</dd>
2829 <dt>Use base name of the printed file</dt>
2830 <dd>Don't use the entire path for the header, only the filename.</dd>
2831 <dt>Date format</dt>
2832 <dd>How the date should be printed. You can use the same format
2833 specifiers as in the ANSI C function strftime(). For details please
2834 see <a class="reference external" href="http://man.cx/strftime">http://man.cx/strftime</a>.</dd>
2835 </dl>
2836 </div>
2837 <div class="section" id="various-preferences">
2838 <h3><a class="toc-backref" href="#id130">Various preferences</a></h3>
2839 <img alt="./images/pref_dialog_various.png" src="./images/pref_dialog_various.png" />
2840 <p>Rarely used preferences, explained in the table below. A few of them require
2841 restart to take effect, and a few other will only affect newly opened or created
2842 documents before restart.</p>
2843 <table border="1" class="docutils">
2844 <colgroup>
2845 <col width="33%" />
2846 <col width="45%" />
2847 <col width="10%" />
2848 <col width="11%" />
2849 </colgroup>
2850 <thead valign="bottom">
2851 <tr><th class="head">Key</th>
2852 <th class="head">Description</th>
2853 <th class="head">Default</th>
2854 <th class="head">Applies</th>
2855 </tr>
2856 </thead>
2857 <tbody valign="top">
2858 <tr><td><strong>Editor related</strong></td>
2859 <td>&nbsp;</td>
2860 <td>&nbsp;</td>
2861 <td>&nbsp;</td>
2862 </tr>
2863 <tr><td>use_gtk_word_boundaries</td>
2864 <td>Whether to look for the end of a word
2865 when using word-boundary related
2866 Scintilla commands (see <a class="reference internal" href="#scintilla-keyboard-commands">Scintilla
2867 keyboard commands</a>).</td>
2868 <td>true</td>
2869 <td>to new
2870 documents</td>
2871 </tr>
2872 <tr><td>brace_match_ltgt</td>
2873 <td>Whether to highlight &lt;, &gt; angle brackets.</td>
2874 <td>false</td>
2875 <td>immediately</td>
2876 </tr>
2877 <tr><td>complete_snippets_whilst_editing</td>
2878 <td>Whether to allow completion of snippets
2879 when editing an existing line (i.e. there
2880 is some text after the current cursor
2881 position on the line). Only used when the
2882 keybinding <cite>Complete snippet</cite> is set to
2883 <tt class="docutils literal">Space</tt>.</td>
2884 <td>false</td>
2885 <td>immediately</td>
2886 </tr>
2887 <tr><td>show_editor_scrollbars</td>
2888 <td>Whether to display scrollbars. If set to
2889 false, the horizontal and vertical
2890 scrollbars are hidden completely.</td>
2891 <td>true</td>
2892 <td>immediately</td>
2893 </tr>
2894 <tr><td>indent_hard_tab_width</td>
2895 <td>The size of a tab character. Don't change
2896 it unless you really need to; use the
2897 indentation settings instead.</td>
2898 <td>8</td>
2899 <td>immediately</td>
2900 </tr>
2901 <tr><td><strong>Interface related</strong></td>
2902 <td>&nbsp;</td>
2903 <td>&nbsp;</td>
2904 <td>&nbsp;</td>
2905 </tr>
2906 <tr><td>show_symbol_list_expanders</td>
2907 <td>Whether to show or hide the small
2908 expander icons on the symbol list
2909 treeview.</td>
2910 <td>true</td>
2911 <td>to new
2912 documents</td>
2913 </tr>
2914 <tr><td>allow_always_save</td>
2915 <td>Whether files can be saved always, even
2916 if they don't have any changes.
2917 By default, the Save button and menu
2918 item are disabled when a file is
2919 unchanged. When setting this option to
2920 true, the Save button and menu item are
2921 always active and files can be saved.</td>
2922 <td>false</td>
2923 <td>immediately</td>
2924 </tr>
2925 <tr><td>compiler_tab_autoscroll</td>
2926 <td>Whether to automatically scroll to the
2927 last line of the output in the Compiler
2928 tab.</td>
2929 <td>true</td>
2930 <td>immediately</td>
2931 </tr>
2932 <tr><td>statusbar_template</td>
2933 <td>The status bar statistics line format.
2934 (See <a class="reference internal" href="#statusbar-templates">Statusbar Templates</a> for details).</td>
2935 <td>See below.</td>
2936 <td>immediately</td>
2937 </tr>
2938 <tr><td>new_document_after_close</td>
2939 <td>Whether to open a new document after all
2940 documents have been closed.</td>
2941 <td>false</td>
2942 <td>immediately</td>
2943 </tr>
2944 <tr><td>msgwin_status_visible</td>
2945 <td>Whether to show the Status tab in the
2946 Messages Window</td>
2947 <td>true</td>
2948 <td>immediately</td>
2949 </tr>
2950 <tr><td>msgwin_compiler_visible</td>
2951 <td>Whether to show the Compiler tab in the
2952 Messages Window</td>
2953 <td>true</td>
2954 <td>immediately</td>
2955 </tr>
2956 <tr><td>msgwin_messages_visible</td>
2957 <td>Whether to show the Messages tab in the
2958 Messages Window</td>
2959 <td>true</td>
2960 <td>immediately</td>
2961 </tr>
2962 <tr><td>msgwin_scribble_visible</td>
2963 <td>Whether to show the Scribble tab in the
2964 Messages Window</td>
2965 <td>true</td>
2966 <td>immediately</td>
2967 </tr>
2968 <tr><td><strong>VTE related</strong></td>
2969 <td>&nbsp;</td>
2970 <td>&nbsp;</td>
2971 <td>&nbsp;</td>
2972 </tr>
2973 <tr><td>emulation</td>
2974 <td>Terminal emulation mode. Only change this
2975 if you have VTE termcap files other than
2976 <tt class="docutils literal">vte/termcap/xterm</tt>.</td>
2977 <td>xterm</td>
2978 <td>immediately</td>
2979 </tr>
2980 <tr><td>send_selection_unsafe</td>
2981 <td>By default, Geany strips any trailing
2982 newline characters from the current
2983 selection before sending it to the terminal
2984 to not execute arbitrary code. This is
2985 mainly a security feature.
2986 If, for whatever reasons, you really want
2987 it to be executed directly, set this option
2988 to true.</td>
2989 <td>false</td>
2990 <td>immediately</td>
2991 </tr>
2992 <tr><td>send_cmd_prefix</td>
2993 <td>String with which prefix the commands sent
2994 to the shell. This may be used to tell
2995 some shells (BASH with <tt class="docutils literal">HISTCONTROL</tt> set
2996 to <tt class="docutils literal">ignorespace</tt>, ZSH with
2997 <tt class="docutils literal">HIST_IGNORE_SPACE</tt> enabled, etc.) from
2998 putting these commands in their history by
2999 setting this to a space. Note that leading
3000 spaces must be escaped using <cite>s</cite> in the
3001 configuration file.</td>
3002 <td>Empty</td>
3003 <td>immediately</td>
3004 </tr>
3005 <tr><td><strong>File related</strong></td>
3006 <td>&nbsp;</td>
3007 <td>&nbsp;</td>
3008 <td>&nbsp;</td>
3009 </tr>
3010 <tr><td>use_atomic_file_saving</td>
3011 <td>Defines the mode how Geany saves files to
3012 disk. If disabled, Geany directly writes
3013 the content of the document to disk. This
3014 might cause loss of data when there is
3015 no more free space on disk to save the
3016 file. When set to true, Geany first saves
3017 the contents into a temporary file and if
3018 this succeeded, the temporary file is
3019 moved to the real file to save.
3020 This gives better error checking in case of
3021 no more free disk space. But it also
3022 destroys hard links of the original file
3023 and its permissions (e.g. executable flags
3024 are reset). Use this with care as it can
3025 break things seriously.
3026 The better approach would be to ensure your
3027 disk won't run out of free space.</td>
3028 <td>false</td>
3029 <td>immediately</td>
3030 </tr>
3031 <tr><td>use_gio_unsafe_file_saving</td>
3032 <td>Whether to use GIO as the unsafe file
3033 saving backend. It is better on most
3034 situations but is known not to work
3035 correctly on some complex setups.</td>
3036 <td>true</td>
3037 <td>immediately</td>
3038 </tr>
3039 <tr><td>gio_unsafe_save_backup</td>
3040 <td>Make a backup when using GIO unsafe file
3041 saving. Backup is named <cite>filename~</cite>.</td>
3042 <td>false</td>
3043 <td>immediately</td>
3044 </tr>
3045 <tr><td><strong>Filetype related</strong></td>
3046 <td>&nbsp;</td>
3047 <td>&nbsp;</td>
3048 <td>&nbsp;</td>
3049 </tr>
3050 <tr><td>extract_filetype_regex</td>
3051 <td>Regex to extract filetype name from file
3052 via capture group one.</td>
3053 <td>See below.</td>
3054 <td>immediately</td>
3055 </tr>
3056 <tr><td><strong>Search related</strong></td>
3057 <td>&nbsp;</td>
3058 <td>&nbsp;</td>
3059 <td>&nbsp;</td>
3060 </tr>
3061 <tr><td>find_selection_type</td>
3062 <td>See <a class="reference internal" href="#find-selection">Find selection</a>.</td>
3063 <td>0</td>
3064 <td>immediately</td>
3065 </tr>
3066 <tr><td><strong>Build Menu related</strong></td>
3067 <td>&nbsp;</td>
3068 <td>&nbsp;</td>
3069 <td>&nbsp;</td>
3070 </tr>
3071 <tr><td>number_ft_menu_items</td>
3072 <td>The maximum number of menu items in the
3073 filetype section of the Build menu.</td>
3074 <td>2</td>
3075 <td>on restart</td>
3076 </tr>
3077 <tr><td>number_non_ft_menu_items</td>
3078 <td>The maximum number of menu items in the
3079 independent section of the Build menu.</td>
3080 <td>3</td>
3081 <td>on restart</td>
3082 </tr>
3083 <tr><td>number_exec_menu_items</td>
3084 <td>The maximum number of menu items in the
3085 execute section of the Build menu.</td>
3086 <td>2</td>
3087 <td>on restart</td>
3088 </tr>
3089 </tbody>
3090 </table>
3091 <p>The extract_filetype_regex has the default value GEANY_DEFAULT_FILETYPE_REGEX.</p>
3092 <div class="section" id="statusbar-templates">
3093 <h4><a class="toc-backref" href="#id131">Statusbar Templates</a></h4>
3094 <p>The default statusbar template is (note <tt class="docutils literal">\t</tt> = tab):</p>
3095 <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>
3096 <p>Settings the preference to an empty string will also cause Geany to use this
3097 internal default.</p>
3098 <p>The following format characters are available for the statusbar template:</p>
3099 <table border="1" class="docutils">
3100 <colgroup>
3101 <col width="17%" />
3102 <col width="83%" />
3103 </colgroup>
3104 <thead valign="bottom">
3105 <tr><th class="head">Placeholder</th>
3106 <th class="head">Description</th>
3107 </tr>
3108 </thead>
3109 <tbody valign="top">
3110 <tr><td><tt class="docutils literal">%l</tt></td>
3111 <td>The current line number starting at 1</td>
3112 </tr>
3113 <tr><td><tt class="docutils literal">%L</tt></td>
3114 <td>The total number of lines</td>
3115 </tr>
3116 <tr><td><tt class="docutils literal">%c</tt></td>
3117 <td>The current column number starting at 0</td>
3118 </tr>
3119 <tr><td><tt class="docutils literal">%C</tt></td>
3120 <td>The current column number starting at 1</td>
3121 </tr>
3122 <tr><td><tt class="docutils literal">%s</tt></td>
3123 <td>The number of selected characters or if only whole lines
3124 selected, the number of selected lines.</td>
3125 </tr>
3126 <tr><td><tt class="docutils literal">%w</tt></td>
3127 <td>Shows <tt class="docutils literal">RO</tt> when the document is in read-only mode,
3128 otherwise shows whether the editor is in overtype (OVR)
3129 or insert (INS) mode.</td>
3130 </tr>
3131 <tr><td><tt class="docutils literal">%t</tt></td>
3132 <td>Shows the indentation mode, either tabs (TAB),
3133 spaces (SP) or both (T/S).</td>
3134 </tr>
3135 <tr><td><tt class="docutils literal">%m</tt></td>
3136 <td>Shows whether the document is modified (MOD) or nothing.</td>
3137 </tr>
3138 <tr><td><tt class="docutils literal">%M</tt></td>
3139 <td>The name of the document's line-endings (ex. <tt class="docutils literal">Unix (LF)</tt>)</td>
3140 </tr>
3141 <tr><td><tt class="docutils literal">%e</tt></td>
3142 <td>The name of the document's encoding (ex. UTF-8).</td>
3143 </tr>
3144 <tr><td><tt class="docutils literal">%f</tt></td>
3145 <td>The filetype of the document (ex. None, Python, C, etc).</td>
3146 </tr>
3147 <tr><td><tt class="docutils literal">%S</tt></td>
3148 <td>The name of the scope where the caret is located.</td>
3149 </tr>
3150 <tr><td><tt class="docutils literal">%p</tt></td>
3151 <td>The caret position in the entire document starting at 0.</td>
3152 </tr>
3153 <tr><td><tt class="docutils literal">%r</tt></td>
3154 <td>Shows whether the document is read-only (RO) or nothing.</td>
3155 </tr>
3156 <tr><td><tt class="docutils literal">%Y</tt></td>
3157 <td>The Scintilla style number at the caret position. This is
3158 useful if you're debugging color schemes or related code.</td>
3159 </tr>
3160 </tbody>
3161 </table>
3162 </div>
3163 </div>
3164 <div class="section" id="terminal-vte-preferences">
3165 <h3><a class="toc-backref" href="#id132">Terminal (VTE) preferences</a></h3>
3166 <p>See also: <a class="reference internal" href="#virtual-terminal-emulator-widget-vte">Virtual terminal emulator widget (VTE)</a>.</p>
3167 <img alt="./images/pref_dialog_vte.png" src="./images/pref_dialog_vte.png" />
3168 <div class="section" id="terminal-widget">
3169 <h4><a class="toc-backref" href="#id133">Terminal widget</a></h4>
3170 <dl class="docutils">
3171 <dt>Terminal font</dt>
3172 <dd>Select the font that will be used in the terminal emulation control.</dd>
3173 <dt>Foreground color</dt>
3174 <dd>Select the font color.</dd>
3175 <dt>Background color</dt>
3176 <dd>Select the background color of the terminal.</dd>
3177 <dt>Background image</dt>
3178 <dd>Select the background image to show behind the terminal's text.</dd>
3179 <dt>Scrollback lines</dt>
3180 <dd>The number of lines buffered so that you can scroll though the history.</dd>
3181 <dt>Shell</dt>
3182 <dd>The location of the shell on your system.</dd>
3183 <dt>Scroll on keystroke</dt>
3184 <dd>Scroll the terminal to the prompt line when pressing a key.</dd>
3185 <dt>Scroll on output</dt>
3186 <dd>Scroll the output down.</dd>
3187 <dt>Cursor blinks</dt>
3188 <dd>Let the terminal cursor blink.</dd>
3189 <dt>Override Geany keybindings</dt>
3190 <dd>Allow the VTE to receive keyboard shortcuts (apart from focus commands).</dd>
3191 <dt>Disable menu shortcut key (F10 by default)</dt>
3192 <dd>Disable the menu shortcut when you are in the virtual terminal.</dd>
3193 <dt>Follow path of the current file</dt>
3194 <dd>Make the path of the terminal change according to the path of the
3195 current file.</dd>
3196 <dt>Execute programs in VTE</dt>
3197 <dd>Execute programs in the virtual terminal instead of using the external
3198 terminal tool. Note that if you run multiple execute commands at once
3199 the output may become mixed together in the VTE.</dd>
3200 <dt>Don't use run script</dt>
3201 <dd>Don't use the simple run script which is usually used to display
3202 the exit status of the executed program.
3203 This can be useful if you already have a program running in the VTE
3204 like a Python console (e.g. ipython). Use this with care.</dd>
3205 </dl>
3206 </div>
3207 </div>
3208 </div>
3209 <div class="section" id="project-management">
3210 <h2><a class="toc-backref" href="#id134">Project management</a></h2>
3211 <p>Project management is optional in Geany. Currently it can be used for:</p>
3212 <ul class="simple">
3213 <li>Storing and opening session files on a project basis.</li>
3214 <li>Overriding default settings with project equivalents.</li>
3215 <li>Configuring the Build menu on a project basis.</li>
3216 </ul>
3217 <p>A list of session files can be stored and opened with the project
3218 when the <em>Use project-based session files</em> preference is enabled,
3219 in the <em>Project</em> group of the <a class="reference internal" href="#preferences">Preferences</a> dialog.</p>
3220 <p>As long as a project is open, the Build menu will use
3221 the items defined in project's settings, instead of the defaults.
3222 See <a class="reference internal" href="#build-menu-configuration">Build Menu Configuration</a> for information on configuring the menu.</p>
3223 <p>The current project's settings are saved when it is closed, or when
3224 Geany is shutdown. When restarting Geany, the previously opened project
3225 file that was in use at the end of the last session will be reopened.</p>
3226 <p>The project menu items are detailed below.</p>
3227 <div class="section" id="new-project">
3228 <h3><a class="toc-backref" href="#id135">New project</a></h3>
3229 <p>To create a new project, fill in the <em>Name</em> field. By default this
3230 will setup a new project file <tt class="docutils literal">~/projects/name.geany</tt>. Usually it's
3231 best to store all your project files in the same directory (they are
3232 independent of any source directory trees).</p>
3233 <p>The Base path text field is setup to use <tt class="docutils literal">~/projects/name</tt>. This
3234 can safely be set to any existing path -- it will not touch the file
3235 structure contained in it.</p>
3236 </div>
3237 <div class="section" id="project-properties">
3238 <h3><a class="toc-backref" href="#id136">Project properties</a></h3>
3239 <p>You can set an optional description for the project. Currently it's
3240 only used for a template wildcard - see <a class="reference internal" href="#template-wildcards">Template wildcards</a>.</p>
3241 <p>The <em>Base path</em> field is used as the directory to run the Build menu commands.
3242 The specified path can be an absolute path or it is considered to be
3243 relative to the project's file name.</p>
3244 <p>The <em>File patterns</em> field allows to specify a list of file patterns for the
3245 project, which can be used in the <a class="reference internal" href="#find-in-files">Find in files</a> dialog.</p>
3246 <p>The <em>Indentation</em> tab allows you to override the default
3247 <a class="reference internal" href="#indentation">Indentation</a> settings.</p>
3248 </div>
3249 <div class="section" id="open-project">
3250 <h3><a class="toc-backref" href="#id137">Open project</a></h3>
3251 <p>The Open command displays a standard file chooser, starting in
3252 <tt class="docutils literal">~/projects</tt>. Choose a project file named with the <tt class="docutils literal">.geany</tt>
3253 extension.</p>
3254 <p>When project session support is enabled, Geany will close the currently
3255 open files and open the session files associated with the project.</p>
3256 </div>
3257 <div class="section" id="close-project">
3258 <h3><a class="toc-backref" href="#id138">Close project</a></h3>
3259 <p>Project file settings are saved when the project is closed.</p>
3260 <p>When project session support is enabled, Geany will close the project
3261 session files and open any previously closed default session files.</p>
3262 </div>
3263 </div>
3264 <div class="section" id="build-menu">
3265 <h2><a class="toc-backref" href="#id139">Build menu</a></h2>
3266 <p>After editing code with Geany, the next step is to compile, link, build,
3267 interpret, run etc. As Geany supports many languages each with a different
3268 approach to such operations, and as there are also many language independent
3269 software building systems, Geany does not have a built-in build system, nor
3270 does it limit which system you can use. Instead the build menu provides
3271 a configurable and flexible means of running any external commands to
3272 execute your preferred build system.</p>
3273 <p>This section provides a description of the default configuration of the
3274 build menu and then covers how to configure it, and where the defaults fit in.</p>
3275 <p>Running the commands from within Geany has two benefits:</p>
3276 <ul class="simple">
3277 <li>The current file is automatically saved before the command is run.</li>
3278 <li>The output is captured in the Compiler notebook tab and parsed for
3279 warnings or errors.</li>
3280 </ul>
3281 <p>Warnings and errors that can be parsed for line numbers will be shown in
3282 red in the Compiler tab and you can click on them to switch to the relevant
3283 source file (or open it) and mark the line number. Also lines with
3284 warnings or errors are marked in the source, see <a class="reference internal" href="#indicators">Indicators</a> below.</p>
3285 <div class="tip">
3286 <p class="first admonition-title">Tip</p>
3287 <p class="last">If Geany's default error message parsing does not parse errors for
3288 the tool you're using, you can set a custom regex in the Build Commands
3289 Dialog, see <a class="reference internal" href="#build-menu-configuration">Build Menu Configuration</a>.</p>
3290 </div>
3291 <div class="section" id="indicators">
3292 <h3><a class="toc-backref" href="#id140">Indicators</a></h3>
3293 <p>Indicators are red squiggly underlines which are used to highlight
3294 errors which occurred while compiling the current file. So you can
3295 easily see where your code failed to compile. You can remove them by
3296 selecting <em>Remove Error Indicators</em> in the Document menu.</p>
3297 <p>If you do not like this feature, you can disable it - see <a class="reference internal" href="#editor-features-preferences">Editor Features
3298 preferences</a>.</p>
3299 </div>
3300 <div class="section" id="default-build-menu-items">
3301 <h3><a class="toc-backref" href="#id141">Default build menu items</a></h3>
3302 <p>Depending on the current file's filetype, the default Build menu will contain
3303 the following items:</p>
3304 <ul class="simple">
3305 <li>Compile</li>
3306 <li>Build</li>
3307 <li>Make All</li>
3308 <li>Make Custom Target</li>
3309 <li>Make Object</li>
3310 <li>Next Error</li>
3311 <li>Previous Error</li>
3312 <li>Execute</li>
3313 <li>Set Build Menu Commands</li>
3314 </ul>
3315 <div class="section" id="compile">
3316 <h4><a class="toc-backref" href="#id142">Compile</a></h4>
3317 <p>The Compile command has different uses for different kinds of files.</p>
3318 <p>For compilable languages such as C and C++, the Compile command is
3319 set up to compile the current source file into a binary object file.</p>
3320 <p>Java source files will be compiled to class file bytecode.</p>
3321 <p>Interpreted languages such as Perl, Python, Ruby will compile to
3322 bytecode if the language supports it, or will run a syntax check,
3323 or if that is not available will run the file in its language interpreter.</p>
3324 </div>
3325 <div class="section" id="build">
3326 <h4><a class="toc-backref" href="#id143">Build</a></h4>
3327 <p>For compilable languages such as C and C++, the Build command will link
3328 the current source file's equivalent object file into an executable. If
3329 the object file does not exist, the source will be compiled and linked
3330 in one step, producing just the executable binary.</p>
3331 <p>Interpreted languages do not use the Build command.</p>
3332 <div class="note">
3333 <p class="first admonition-title">Note</p>
3334 <p class="last">If you need complex settings for your build system, or several
3335 different settings, then writing a Makefile and using the Make
3336 commands is recommended; this will also make it easier for users to
3337 build your software.</p>
3338 </div>
3339 </div>
3340 <div class="section" id="make">
3341 <h4><a class="toc-backref" href="#id144">Make</a></h4>
3342 <p>This runs &quot;make&quot; in the same directory as the
3343 current file.</p>
3344 </div>
3345 <div class="section" id="make-custom-target">
3346 <h4><a class="toc-backref" href="#id145">Make custom target</a></h4>
3347 <p>This is similar to running 'Make' but you will be prompted for
3348 the make target name to be passed to the Make tool. For example,
3349 typing 'clean' in the dialog prompt will run &quot;make clean&quot;.</p>
3350 </div>
3351 <div class="section" id="make-object">
3352 <h4><a class="toc-backref" href="#id146">Make object</a></h4>
3353 <p>Make object will run &quot;make current_file.o&quot; in the same directory as
3354 the current file, using the filename for 'current_file'. It is useful
3355 for building just the current file without building the whole project.</p>
3356 </div>
3357 <div class="section" id="next-error">
3358 <h4><a class="toc-backref" href="#id147">Next error</a></h4>
3359 <p>The next error item will move to the next detected error in the file.</p>
3360 </div>
3361 <div class="section" id="previous-error">
3362 <h4><a class="toc-backref" href="#id148">Previous error</a></h4>
3363 <p>The previous error item will move to the previous detected error in the file.</p>
3364 </div>
3365 <div class="section" id="execute">
3366 <h4><a class="toc-backref" href="#id149">Execute</a></h4>
3367 <p>Execute will run the corresponding executable file, shell script or
3368 interpreted script in a terminal window. The command set in the
3369 &quot;Set Build Commands&quot; dialog is run in a script to ensure the terminal
3370 stays open after execution completes. Note: see <a class="reference internal" href="#terminal-emulators">Terminal emulators</a>
3371 below for the command format. Alternatively the built-in VTE can be used
3372 if it is available - see <a class="reference internal" href="#virtual-terminal-emulator-widget-vte">Virtual terminal emulator widget (VTE)</a>.</p>
3373 <p>After your program or script has finished executing, the run script will
3374 prompt you to press the return key. This allows you to review any text
3375 output from the program before the terminal window is closed.</p>
3376 <div class="note">
3377 <p class="first admonition-title">Note</p>
3378 <p class="last">The execute command output is not parsed for errors.</p>
3379 </div>
3380 </div>
3381 <div class="section" id="stopping-running-processes">
3382 <h4><a class="toc-backref" href="#id150">Stopping running processes</a></h4>
3383 <p>When there is a running program, the Execute menu item in the menu and
3384 the Run button in the toolbar
3385 each become a stop button so you can stop the current running program (and
3386 any child processes). This works by sending the SIGQUIT signal to the process.</p>
3387 <p>Depending on the process you started it is possible that the process
3388 cannot be stopped. For example this can happen when the process creates
3389 more than one child process.</p>
3390 <div class="section" id="terminal-emulators">
3391 <h5><a class="toc-backref" href="#id151">Terminal emulators</a></h5>
3392 <p>The Terminal field of the tools preferences tab requires a command to
3393 execute the terminal program and to pass it the name of the Geany run
3394 script that it should execute in a Bourne compatible shell (eg /bin/sh).
3395 The marker &quot;%c&quot; is substituted with the name of the Geany run script,
3396 which is created in the working directory set in the Build commands
3397 dialog, see <a class="reference internal" href="#build-menu-commands-dialog">Build menu commands dialog</a> for details.</p>
3398 <p>As an example the default (Linux) command is:</p>
3399 <pre class="literal-block">
3400 xterm -e &quot;/bin/sh %c&quot;
3401 </pre>
3402 </div>
3403 </div>
3404 <div class="section" id="set-build-commands">
3405 <h4><a class="toc-backref" href="#id152">Set build commands</a></h4>
3406 <p>By default Compile, Build and Execute are fairly basic commands. You
3407 may wish to customise them using <em>Set Build Commands</em>.</p>
3408 <p>E.g. for C you can add any include paths and compile flags for the
3409 compiler, any library names and paths for the linker, and any
3410 arguments you want to use when running Execute.</p>
3411 </div>
3412 </div>
3413 <div class="section" id="build-menu-configuration">
3414 <h3><a class="toc-backref" href="#id153">Build menu configuration</a></h3>
3415 <p>The build menu has considerable flexibility and configurability, allowing
3416 both menu labels the commands they execute and the directory they execute
3417 in to be configured.</p>
3418 <p>For example, if you change one of the default make commands to run say 'waf'
3419 you can also change the label to match.</p>
3420 <p>These settings are saved automatically when Geany is shut down.</p>
3421 <p>The build menu is divided into four groups of items each with different
3422 behaviors:</p>
3423 <ul class="simple">
3424 <li>Filetype build commands - are configurable and depend on the filetype of the
3425 current document; they capture output in the compiler tab and parse it for
3426 errors.</li>
3427 <li>Independent build commands - are configurable and mostly don't depend on the
3428 filetype of the current document; they also capture output in the
3429 compiler tab and parse it for errors.</li>
3430 <li>Execute commands - are configurable and intended for executing your
3431 program or other long running programs. The output is not parsed for errors
3432 and is directed to the terminal command selected in preferences.</li>
3433 <li>Fixed commands - these perform built-in actions:<ul>
3434 <li>Go to the next error.</li>
3435 <li>Go to the previous error.</li>
3436 <li>Show the build menu commands dialog.</li>
3437 </ul>
3438 </li>
3439 </ul>
3440 <p>The maximum numbers of items in each of the configurable groups can be
3441 configured in the <a class="reference internal" href="#various-preferences">Various preferences</a>. Even though the maximum number of
3442 items may have been increased, only those menu items that have values
3443 configured are shown in the menu.</p>
3444 <p>The groups of menu items obtain their configuration from four potential
3445 sources. The highest priority source that has the menu item defined will
3446 be used. The sources in decreasing priority are:</p>
3447 <ul class="simple">
3448 <li>A project file if open</li>
3449 <li>The user preferences</li>
3450 <li>The system filetype definitions</li>
3451 <li>The defaults</li>
3452 </ul>
3453 <p>The detailed relationships between sources and the configurable menu item groups
3454 is shown in the following table.</p>
3455 <table border="1" class="docutils">
3456 <colgroup>
3457 <col width="13%" />
3458 <col width="19%" />
3459 <col width="23%" />
3460 <col width="17%" />
3461 <col width="28%" />
3462 </colgroup>
3463 <thead valign="bottom">
3464 <tr><th class="head">Group</th>
3465 <th class="head">Project File</th>
3466 <th class="head">Preferences</th>
3467 <th class="head">System Filetype</th>
3468 <th class="head">Defaults</th>
3469 </tr>
3470 </thead>
3471 <tbody valign="top">
3472 <tr><td>Filetype</td>
3473 <td><p class="first">Loads From: project
3474 file</p>
3475 <p class="last">Saves To: project
3476 file</p>
3477 </td>
3478 <td><p class="first">Loads From:
3479 filetypes.xxx file in
3480 ~/.config/geany/filedefs</p>
3481 <p class="last">Saves to: as above,
3482 creating if needed.</p>
3483 </td>
3484 <td><p class="first">Loads From:
3485 filetypes.xxx in
3486 Geany install</p>
3487 <p class="last">Saves to: as user
3488 preferences left.</p>
3489 </td>
3490 <td>None</td>
3491 </tr>
3492 <tr><td>Filetype
3493 Independent</td>
3494 <td><p class="first">Loads From: project
3495 file</p>
3496 <p class="last">Saves To: project
3497 file</p>
3498 </td>
3499 <td><p class="first">Loads From:
3500 geany.conf file in
3501 ~/.config/geany</p>
3502 <p class="last">Saves to: as above,
3503 creating if needed.</p>
3504 </td>
3505 <td><p class="first">Loads From:
3506 filetypes.xxx in
3507 Geany install</p>
3508 <p class="last">Saves to: as user
3509 preferences left.</p>
3510 </td>
3511 <td><dl class="first last docutils">
3512 <dt>1:</dt>
3513 <dd>Label: _Make
3514 Command: make</dd>
3515 <dt>2:</dt>
3516 <dd>Label: Make Custom _Target
3517 Command: make</dd>
3518 <dt>3:</dt>
3519 <dd>Label: Make _Object
3520 Command: make %e.o</dd>
3521 </dl>
3522 </td>
3523 </tr>
3524 <tr><td>Execute</td>
3525 <td><p class="first">Loads From: project
3526 file or else
3527 filetype defined in
3528 project file</p>
3529 <p class="last">Saves To:
3530 project file</p>
3531 </td>
3532 <td><p class="first">Loads From:
3533 geany.conf file in
3534 ~/.config/geany or else
3535 filetypes.xxx file in
3536 ~/.config/geany/filedefs</p>
3537 <p class="last">Saves To:
3538 filetypes.xxx file in
3539 ~/.config/geany/filedefs</p>
3540 </td>
3541 <td><p class="first">Loads From:
3542 filetypes.xxx in
3543 Geany install</p>
3544 <p class="last">Saves To: as user
3545 preferences left.</p>
3546 </td>
3547 <td>Label: _Execute
3548 Command: ./%e</td>
3549 </tr>
3550 </tbody>
3551 </table>
3552 <p>The following notes on the table reference cells by coordinate as (group,source):</p>
3553 <ul class="simple">
3554 <li>General - for filetypes.xxx substitute the appropriate extension for
3555 the filetype of the current document for xxx - see <a class="reference internal" href="#filenames">filenames</a>.</li>
3556 <li>System Filetypes - Labels loaded from these sources are locale sensitive
3557 and can contain translations.</li>
3558 <li>(Filetype, Project File) and (Filetype, Preferences) - preferences use a full
3559 filetype file so that users can configure all other filetype preferences
3560 as well. Projects can only configure menu items per filetype. Saving
3561 in the project file means that there is only one file per project not
3562 a whole directory.</li>
3563 <li>(Filetype-Independent, System Filetype) - although conceptually strange, defining
3564 filetype-independent commands in a filetype file, this provides the ability to
3565 define filetype dependent default menu items.</li>
3566 <li>(Execute, Project File) and (Execute, Preferences) - the project independent
3567 execute and preferences independent execute commands can only be set by hand
3568 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
3569 format</a>.</li>
3570 </ul>
3571 </div>
3572 <div class="section" id="build-menu-commands-dialog">
3573 <h3><a class="toc-backref" href="#id154">Build menu commands dialog</a></h3>
3574 <p>Most of the configuration of the build menu is done through the Build Menu
3575 Commands Dialog. You edit the configuration sourced from preferences in the
3576 dialog opened from the Build-&gt;Build Menu Commands item and you edit the
3577 configuration from the project in the build tab of the project preferences
3578 dialog. Both use the same form shown below.</p>
3579 <img alt="./images/build_menu_commands_dialog.png" src="./images/build_menu_commands_dialog.png" />
3580 <p>The dialog is divided into three sections:</p>
3581 <ul class="simple">
3582 <li>Filetype build commands (selected based on the current document's filetype).</li>
3583 <li>Independent build commands (available regardless of filetype).</li>
3584 <li>Filetype execute commands.</li>
3585 </ul>
3586 <p>The filetype and independent sections also each contain a field for the regular
3587 expression used for parsing command output for error and warning messages.</p>
3588 <p>The columns in the first three sections allow setting of the label, command,
3589 and working directory to run the command in.</p>
3590 <p>An item with an empty label will not be shown in the menu.</p>
3591 <p>An empty working directory will default to the directory of the current document.
3592 If there is no current document then the command will not run.</p>
3593 <p>The dialog will always show the command selected by priority, not just the
3594 commands configured in this configuration source. This ensures that you always
3595 see what the menu item is going to do if activated.</p>
3596 <p>If the current source of the menu item is higher priority than the
3597 configuration source you are editing then the command will be shown
3598 in the dialog but will be insensitive (greyed out). This can't happen
3599 with the project source but can with the preferences source dialog.</p>
3600 <p>The clear buttons remove the definition from the configuration source you are editing.
3601 When you do this the command from the next lower priority source will be shown.
3602 To hide lower priority menu items without having anything show in the menu
3603 configure with a nothing in the label but at least one character in the command.</p>
3604 <div class="section" id="substitutions-in-commands-and-working-directories">
3605 <h4><a class="toc-backref" href="#id155">Substitutions in commands and working directories</a></h4>
3606 <p>The first occurence of each of the following character sequences in each of the
3607 command and working directory fields is substituted by the items specified below
3608 before the command is run.</p>
3609 <ul class="simple">
3610 <li>%d - substituted by the absolute path to the directory of the current file.</li>
3611 <li>%e - substituted by the name of the current file without the extension or path.</li>
3612 <li>%f - substituted by the name of the current file without the path.</li>
3613 <li>%p - if a project is open, substituted by the base path from the project.</li>
3614 </ul>
3615 <div class="note">
3616 <p class="first admonition-title">Note</p>
3617 <p class="last">If the basepath set in the project preferences is not an absolute path , then it is
3618 taken as relative to the directory of the project file. This allows a project file
3619 stored in the source tree to specify all commands and working directories relative
3620 to the tree itself, so that the whole tree including the project file, can be moved
3621 and even checked into and out of version control without having to re-configure the
3622 build menu.</p>
3623 </div>
3624 </div>
3625 <div class="section" id="build-menu-keyboard-shortcuts">
3626 <h4><a class="toc-backref" href="#id156">Build menu keyboard shortcuts</a></h4>
3627 <p>Keyboard shortcuts can be defined for the first two filetype menu items, the first three
3628 independent menu items, the first two execute menu items and the fixed menu items.
3629 In the keybindings configuration dialog (see <a class="reference internal" href="#keybinding-preferences">Keybinding preferences</a>)
3630 these items are identified by the default labels shown in the <a class="reference internal" href="#build-menu">Build Menu</a> section above.</p>
3631 <p>It is currently not possible to bind keyboard shortcuts to more than these menu items.</p>
3632 <p>You can also use underlines in the labels to set mnemonic characters.</p>
3633 </div>
3634 <div class="section" id="old-settings">
3635 <h4><a class="toc-backref" href="#id157">Old settings</a></h4>
3636 <p>The configurable Build Menu capability was introduced in Geany 0.19 and
3637 required a new section to be added to the configuration files (See
3638 <a class="reference internal" href="#preferences-file-format">Preferences file format</a>). Geany will still load older format project,
3639 preferences and filetype file settings and will attempt to map them into the new
3640 configuration format. There is not a simple clean mapping between the formats.
3641 The mapping used produces the most sensible results for the majority of cases.
3642 However, if they do not map the way you want, you may have to manually
3643 configure some settings using the Build Commands
3644 Dialog or the Build tab of the project preferences dialog.</p>
3645 <p>Any setting configured in either of these dialogs will override settings mapped from
3646 older format configuration files.</p>
3647 </div>
3648 </div>
3649 </div>
3650 <div class="section" id="printing-support">
3651 <h2><a class="toc-backref" href="#id158">Printing support</a></h2>
3652 <p>Since Geany 0.13 there has been printing support using GTK's printing API.
3653 The printed page(s) will look nearly the same as on your screen in Geany.
3654 Additionally, there are some options to modify the printed page(s).</p>
3655 <div class="note">
3656 <p class="first admonition-title">Note</p>
3657 <p class="last">The background text color is set to white, except for text with
3658 a white foreground. This allows dark color schemes to save ink
3659 when printing.</p>
3660 </div>
3661 <p>You can define whether to print line numbers, page numbers at the bottom of
3662 each page and whether to print a page header on each page. This header
3663 contains the filename of the printed document, the current page number and
3664 the date and time of printing. By default, the file name of the document
3665 with full path information is added to the header. If you prefer to add
3666 only the basename of the file(without any path information) you can set it
3667 in the preferences dialog. You can also adjust the format of the date and
3668 time added to the page header. The available conversion specifiers are the
3669 same as the ones which can be used with the ANSI C strftime function.</p>
3670 <p>All of these settings can also be changed in the print dialog just before
3671 actual printing is done.
3672 On Unix-like systems the provided print dialog offers a print preview. The
3673 preview file is opened with a PDF viewer and by default GTK uses <tt class="docutils literal">evince</tt>
3674 for print preview. If you have not installed evince or just want to use
3675 another PDF viewer, you can change the program to use in the file
3676 <tt class="docutils literal"><span class="pre">.gtkrc-2.0</span></tt> (usually found in your home directory). Simply add a line
3677 like:</p>
3678 <pre class="literal-block">
3679 gtk-print-preview-command = &quot;epdfview %f&quot;
3680 </pre>
3681 <p>at the end of the file. Of course, you can also use xpdf, kpdf or whatever
3682 as the print preview command.</p>
3683 <p>Geany also provides an alternative basic printing support using a custom
3684 print command. However, the printed document contains no syntax highlighting.
3685 You can adjust the command to which the filename is passed in the preferences
3686 dialog. The default command is:</p>
3687 <pre class="literal-block">
3688 % lpr %f
3689 </pre>
3690 <p><tt class="docutils literal">%f</tt> will be substituted by the filename of the current file. Geany
3691 will not show errors from the command itself, so you should make
3692 sure that it works before(e.g. by trying to execute it from the
3693 command line).</p>
3694 <p>A nicer example, which many prefer is:</p>
3695 <pre class="literal-block">
3696 % a2ps -1 --medium=A4 -o - %f | xfprint4
3697 </pre>
3698 <p>But this depends on a2ps and xfprint4. As a replacement for xfprint4,
3699 gtklp or similar programs can be used.</p>
3700 </div>
3701 <div class="section" id="plugins">
3702 <h2><a class="toc-backref" href="#id159">Plugins</a></h2>
3703 <p>Plugins are loaded at startup, if the <em>Enable plugin support</em>
3704 general preference is set. There is also a command-line option,
3705 <tt class="docutils literal"><span class="pre">-p</span></tt>, which prevents plugins being loaded. Plugins are scanned in
3706 the following directories:</p>
3707 <ul class="simple">
3708 <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>
3709 <li>The <tt class="docutils literal">lib</tt> subfolder of the installation path on Windows.</li>
3710 <li>The <tt class="docutils literal">plugins</tt> subfolder of the user configuration directory - see
3711 <a class="reference internal" href="#configuration-file-paths">Configuration file paths</a>.</li>
3712 <li>The <cite>Extra plugin path</cite> preference (usually blank) - see <a class="reference internal" href="#paths">Paths</a>.</li>
3713 </ul>
3714 <p>Most plugins add menu items to the <em>Tools</em> menu when they are loaded.</p>
3715 <p>See also <a class="reference internal" href="#plugin-documentation">Plugin documentation</a> for information about single plugins
3716 which are included in Geany.</p>
3717 <div class="section" id="plugin-manager">
3718 <h3><a class="toc-backref" href="#id160">Plugin manager</a></h3>
3719 <p>The Plugin Manager dialog lets you choose which plugins
3720 should be loaded at startup. You can also load and unload plugins on the
3721 fly using this dialog. Once you click the checkbox for a specific plugin
3722 in the dialog, it is loaded or unloaded according to its previous state.
3723 By default, no plugins are loaded at startup until you select some.
3724 You can also configure some plugin specific options if the plugin
3725 provides any.</p>
3726 </div>
3727 </div>
3728 <div class="section" id="keybindings">
3729 <h2><a class="toc-backref" href="#id161">Keybindings</a></h2>
3730 <p>Geany supports the default keyboard shortcuts for the Scintilla
3731 editing widget. For a list of these commands, see <a class="reference internal" href="#scintilla-keyboard-commands">Scintilla
3732 keyboard commands</a>. The Scintilla keyboard shortcuts will be overridden
3733 by any custom keybindings with the same keyboard shortcut.</p>
3734 <div class="section" id="switching-documents">
3735 <h3><a class="toc-backref" href="#id162">Switching documents</a></h3>
3736 <p>There are some non-configurable bindings to switch between documents,
3737 listed below. These can also be overridden by custom keybindings.</p>
3738 <table border="1" class="docutils">
3739 <colgroup>
3740 <col width="31%" />
3741 <col width="69%" />
3742 </colgroup>
3743 <thead valign="bottom">
3744 <tr><th class="head">Key</th>
3745 <th class="head">Action</th>
3746 </tr>
3747 </thead>
3748 <tbody valign="top">
3749 <tr><td>Alt-[1-9]</td>
3750 <td>Select left-most tab, from 1 to 9.</td>
3751 </tr>
3752 <tr><td>Alt-0</td>
3753 <td>Select right-most tab.</td>
3754 </tr>
3755 </tbody>
3756 </table>
3757 <p>See also <a class="reference internal" href="#notebook-tab-keybindings">Notebook tab keybindings</a>.</p>
3758 </div>
3759 <div class="section" id="configurable-keybindings">
3760 <h3><a class="toc-backref" href="#id163">Configurable keybindings</a></h3>
3761 <p>For all actions listed below you can define your own keybindings. Open
3762 the Preferences dialog, select the desired action and click on
3763 change. In the resulting dialog you can press the key combination you
3764 want to assign to the action and it will be saved when you press OK.
3765 You can define only one key combination for each action and each key
3766 combination can only be defined for one action.</p>
3767 <p>The following tables list all customizable keyboard shortcuts, those
3768 which are common to many applications are marked with (C) after the
3769 shortcut.</p>
3770 <div class="section" id="file-keybindings">
3771 <h4><a class="toc-backref" href="#id164">File keybindings</a></h4>
3772 <table border="1" class="docutils">
3773 <colgroup>
3774 <col width="29%" />
3775 <col width="24%" />
3776 <col width="47%" />
3777 </colgroup>
3778 <thead valign="bottom">
3779 <tr><th class="head">Action</th>
3780 <th class="head">Default shortcut</th>
3781 <th class="head">Description</th>
3782 </tr>
3783 </thead>
3784 <tbody valign="top">
3785 <tr><td>New</td>
3786 <td>Ctrl-N (C)</td>
3787 <td>Creates a new file.</td>
3788 </tr>
3789 <tr><td>Open</td>
3790 <td>Ctrl-O (C)</td>
3791 <td>Opens a file.</td>
3792 </tr>
3793 <tr><td>Open selected file</td>
3794 <td>Ctrl-Shift-O</td>
3795 <td>Opens the selected filename.</td>
3796 </tr>
3797 <tr><td>Re-open last closed tab</td>
3798 <td>&nbsp;</td>
3799 <td>Re-opens the last closed document tab.</td>
3800 </tr>
3801 <tr><td>Save</td>
3802 <td>Ctrl-S (C)</td>
3803 <td>Saves the current file.</td>
3804 </tr>
3805 <tr><td>Save As</td>
3806 <td>&nbsp;</td>
3807 <td>Saves the current file under a new name.</td>
3808 </tr>
3809 <tr><td>Save all</td>
3810 <td>Ctrl-Shift-S</td>
3811 <td>Saves all open files.</td>
3812 </tr>
3813 <tr><td>Close all</td>
3814 <td>Ctrl-Shift-W</td>
3815 <td>Closes all open files.</td>
3816 </tr>
3817 <tr><td>Close</td>
3818 <td>Ctrl-W (C)</td>
3819 <td>Closes the current file.</td>
3820 </tr>
3821 <tr><td>Reload file</td>
3822 <td>Ctrl-R (C)</td>
3823 <td>Reloads the current file. All unsaved changes
3824 will be lost.</td>
3825 </tr>
3826 <tr><td>Print</td>
3827 <td>Ctrl-P (C)</td>
3828 <td>Prints the current file.</td>
3829 </tr>
3830 <tr><td>Quit</td>
3831 <td>Ctrl-Q (C)</td>
3832 <td>Quits Geany.</td>
3833 </tr>
3834 </tbody>
3835 </table>
3836 </div>
3837 <div class="section" id="editor-keybindings">
3838 <h4><a class="toc-backref" href="#id165">Editor keybindings</a></h4>
3839 <table border="1" class="docutils">
3840 <colgroup>
3841 <col width="29%" />
3842 <col width="24%" />
3843 <col width="47%" />
3844 </colgroup>
3845 <thead valign="bottom">
3846 <tr><th class="head">Action</th>
3847 <th class="head">Default shortcut</th>
3848 <th class="head">Description</th>
3849 </tr>
3850 </thead>
3851 <tbody valign="top">
3852 <tr><td>Undo</td>
3853 <td>Ctrl-Z (C)</td>
3854 <td>Un-does the last action.</td>
3855 </tr>
3856 <tr><td>Redo</td>
3857 <td>Ctrl-Y</td>
3858 <td>Re-does the last action.</td>
3859 </tr>
3860 <tr><td>Delete current line(s)</td>
3861 <td>Ctrl-K</td>
3862 <td>Deletes the current line (and any lines with a
3863 selection).</td>
3864 </tr>
3865 <tr><td>Delete to line end</td>
3866 <td>Ctrl-Shift-Delete</td>
3867 <td>Deletes from the current caret position to the
3868 end of the current line.</td>
3869 </tr>
3870 <tr><td>Duplicate line or selection</td>
3871 <td>Ctrl-D</td>
3872 <td>Duplicates the current line or selection.</td>
3873 </tr>
3874 <tr><td>Transpose current line</td>
3875 <td>&nbsp;</td>
3876 <td>Transposes the current line with the previous one.</td>
3877 </tr>
3878 <tr><td>Scroll to current line</td>
3879 <td>Ctrl-Shift-L</td>
3880 <td>Scrolls the current line into the centre of the
3881 view. The cursor position and or an existing
3882 selection will not be changed.</td>
3883 </tr>
3884 <tr><td>Scroll up by one line</td>
3885 <td>Alt-Up</td>
3886 <td>Scrolls the view.</td>
3887 </tr>
3888 <tr><td>Scroll down by one line</td>
3889 <td>Alt-Down</td>
3890 <td>Scrolls the view.</td>
3891 </tr>
3892 <tr><td>Complete word</td>
3893 <td>Ctrl-Space</td>
3894 <td>Shows the autocompletion list. If already showing
3895 tag completion, it shows document word completion
3896 instead, even if it is not enabled for automatic
3897 completion. Likewise if no tag suggestions are
3898 available, it shows document word completion.</td>
3899 </tr>
3900 <tr><td>Show calltip</td>
3901 <td>Ctrl-Shift-Space</td>
3902 <td>Shows a calltip for the current function or
3903 method.</td>
3904 </tr>
3905 <tr><td>Show macro list</td>
3906 <td>Ctrl-Return</td>
3907 <td>Shows a list of available macros and variables in
3908 the workspace.</td>
3909 </tr>
3910 <tr><td>Complete snippet</td>
3911 <td>Tab</td>
3912 <td>If you type a construct like if or for and press
3913 this key, it will be completed with a matching
3914 template.</td>
3915 </tr>
3916 <tr><td>Suppress snippet completion</td>
3917 <td>&nbsp;</td>
3918 <td>If you type a construct like if or for and press
3919 this key, it will not be completed, and a space or
3920 tab will be inserted, depending on what the
3921 construct completion keybinding is set to. For
3922 example, if you have set the construct completion
3923 keybinding to space, then setting this to
3924 Shift+space will prevent construct completion and
3925 insert a space.</td>
3926 </tr>
3927 <tr><td>Context Action</td>
3928 <td>&nbsp;</td>
3929 <td>Executes a command and passes the current word
3930 (near the cursor position) or selection as an
3931 argument. See the section called <a class="reference internal" href="#context-actions">Context
3932 actions</a>.</td>
3933 </tr>
3934 <tr><td>Move cursor in snippet</td>
3935 <td>&nbsp;</td>
3936 <td>Jumps to the next defined cursor positions in a
3937 completed snippets if multiple cursor positions
3938 where defined.</td>
3939 </tr>
3940 <tr><td>Word part completion</td>
3941 <td>Tab</td>
3942 <td>When the autocompletion list is visible, complete
3943 the currently selected item up to the next word
3944 part.</td>
3945 </tr>
3946 <tr><td>Move line(s) up</td>
3947 <td>Alt-PageUp</td>
3948 <td>Move the current line or selected lines up by
3949 one line.</td>
3950 </tr>
3951 <tr><td>Move line(s) down</td>
3952 <td>Alt-PageDown</td>
3953 <td>Move the current line or selected lines down by
3954 one line.</td>
3955 </tr>
3956 </tbody>
3957 </table>
3958 </div>
3959 <div class="section" id="clipboard-keybindings">
3960 <h4><a class="toc-backref" href="#id166">Clipboard keybindings</a></h4>
3961 <table border="1" class="docutils">
3962 <colgroup>
3963 <col width="29%" />
3964 <col width="23%" />
3965 <col width="48%" />
3966 </colgroup>
3967 <thead valign="bottom">
3968 <tr><th class="head">Action</th>
3969 <th class="head">Default shortcut</th>
3970 <th class="head">Description</th>
3971 </tr>
3972 </thead>
3973 <tbody valign="top">
3974 <tr><td>Cut</td>
3975 <td>Ctrl-X (C)</td>
3976 <td>Cut the current selection to the clipboard.</td>
3977 </tr>
3978 <tr><td>Copy</td>
3979 <td>Ctrl-C (C)</td>
3980 <td>Copy the current selection to the clipboard.</td>
3981 </tr>
3982 <tr><td>Paste</td>
3983 <td>Ctrl-V (C)</td>
3984 <td>Paste the clipboard text into the current document.</td>
3985 </tr>
3986 <tr><td>Cut current line(s)</td>
3987 <td>Ctrl-Shift-X</td>
3988 <td>Cuts the current line (and any lines with a
3989 selection) to the clipboard.</td>
3990 </tr>
3991 <tr><td>Copy current line(s)</td>
3992 <td>Ctrl-Shift-C</td>
3993 <td>Copies the current line (and any lines with a
3994 selection) to the clipboard.</td>
3995 </tr>
3996 </tbody>
3997 </table>
3998 </div>
3999 <div class="section" id="select-keybindings">
4000 <h4><a class="toc-backref" href="#id167">Select keybindings</a></h4>
4001 <table border="1" class="docutils">
4002 <colgroup>
4003 <col width="29%" />
4004 <col width="24%" />
4005 <col width="47%" />
4006 </colgroup>
4007 <thead valign="bottom">
4008 <tr><th class="head">Action</th>
4009 <th class="head">Default shortcut</th>
4010 <th class="head">Description</th>
4011 </tr>
4012 </thead>
4013 <tbody valign="top">
4014 <tr><td>Select all</td>
4015 <td>Ctrl-A (C)</td>
4016 <td>Makes a selection of all text in the current
4017 document.</td>
4018 </tr>
4019 <tr><td>Select current word</td>
4020 <td>Alt-Shift-W</td>
4021 <td>Selects the current word under the cursor.</td>
4022 </tr>
4023 <tr><td>Select current paragraph</td>
4024 <td>Alt-Shift-P</td>
4025 <td>Selects the current paragraph under the cursor
4026 which is defined by two empty lines around it.</td>
4027 </tr>
4028 <tr><td>Select current line(s)</td>
4029 <td>Alt-Shift-L</td>
4030 <td>Selects the current line under the cursor (and any
4031 partially selected lines).</td>
4032 </tr>
4033 <tr><td>Select to previous word part</td>
4034 <td>&nbsp;</td>
4035 <td>(Extend) selection to previous word part boundary.</td>
4036 </tr>
4037 <tr><td>Select to next word part</td>
4038 <td>&nbsp;</td>
4039 <td>(Extend) selection to next word part boundary.</td>
4040 </tr>
4041 </tbody>
4042 </table>
4043 </div>
4044 <div class="section" id="insert-keybindings">
4045 <h4><a class="toc-backref" href="#id168">Insert keybindings</a></h4>
4046 <table border="1" class="docutils">
4047 <colgroup>
4048 <col width="29%" />
4049 <col width="24%" />
4050 <col width="47%" />
4051 </colgroup>
4052 <thead valign="bottom">
4053 <tr><th class="head">Action</th>
4054 <th class="head">Default shortcut</th>
4055 <th class="head">Description</th>
4056 </tr>
4057 </thead>
4058 <tbody valign="top">
4059 <tr><td>Insert date</td>
4060 <td>Shift-Alt-D</td>
4061 <td>Inserts a customisable date.</td>
4062 </tr>
4063 <tr><td>Insert alternative whitespace</td>
4064 <td>&nbsp;</td>
4065 <td>Inserts a tab character when spaces should
4066 be used for indentation and inserts space
4067 characters of the amount of a tab width when
4068 tabs should be used for indentation.</td>
4069 </tr>
4070 <tr><td>Insert New Line Before Current</td>
4071 <td>&nbsp;</td>
4072 <td>Inserts a new line with indentation.</td>
4073 </tr>
4074 <tr><td>Insert New Line After Current</td>
4075 <td>&nbsp;</td>
4076 <td>Inserts a new line with indentation.</td>
4077 </tr>
4078 </tbody>
4079 </table>
4080 </div>
4081 <div class="section" id="format-keybindings">
4082 <h4><a class="toc-backref" href="#id169">Format keybindings</a></h4>
4083 <table border="1" class="docutils">
4084 <colgroup>
4085 <col width="29%" />
4086 <col width="24%" />
4087 <col width="47%" />
4088 </colgroup>
4089 <thead valign="bottom">
4090 <tr><th class="head">Action</th>
4091 <th class="head">Default shortcut</th>
4092 <th class="head">Description</th>
4093 </tr>
4094 </thead>
4095 <tbody valign="top">
4096 <tr><td>Toggle case of selection</td>
4097 <td>Ctrl-Alt-U</td>
4098 <td>Changes the case of the selection. A lowercase
4099 selection will be changed into uppercase and vice
4100 versa. If the selection contains lower- and
4101 uppercase characters, all will be converted to
4102 lowercase.</td>
4103 </tr>
4104 <tr><td>Comment line</td>
4105 <td>&nbsp;</td>
4106 <td>Comments current line or selection.</td>
4107 </tr>
4108 <tr><td>Uncomment line</td>
4109 <td>&nbsp;</td>
4110 <td>Uncomments current line or selection.</td>
4111 </tr>
4112 <tr><td>Toggle line commentation</td>
4113 <td>Ctrl-E</td>
4114 <td>Comments a line if it is not commented or removes
4115 a comment if the line is commented.</td>
4116 </tr>
4117 <tr><td>Increase indent</td>
4118 <td>Ctrl-I</td>
4119 <td>Indents the current line or selection by one tab
4120 or with spaces in the amount of the tab width
4121 setting.</td>
4122 </tr>
4123 <tr><td>Decrease indent</td>
4124 <td>Ctrl-U</td>
4125 <td>Removes one tab or the amount of spaces of
4126 the tab width setting from the indentation of the
4127 current line or selection.</td>
4128 </tr>
4129 <tr><td>Increase indent by one space</td>
4130 <td>&nbsp;</td>
4131 <td>Indents the current line or selection by one
4132 space.</td>
4133 </tr>
4134 <tr><td>Decrease indent by one space</td>
4135 <td>&nbsp;</td>
4136 <td>Deindents the current line or selection by one
4137 space.</td>
4138 </tr>
4139 <tr><td>Smart line indent</td>
4140 <td>&nbsp;</td>
4141 <td>Indents the current line or all selected lines
4142 with the same indentation as the previous line.</td>
4143 </tr>
4144 <tr><td>Send to Custom Command 1 (2,3)</td>
4145 <td>Ctrl-1 (2,3)</td>
4146 <td>Passes the current selection to a configured
4147 external command (available for the first
4148 three configured commands, see
4149 <a class="reference internal" href="#sending-text-through-custom-commands">Sending text through custom commands</a> for
4150 details).</td>
4151 </tr>
4152 <tr><td>Send Selection to Terminal</td>
4153 <td>&nbsp;</td>
4154 <td>Sends the current selection or the current
4155 line (if there is no selection) to the
4156 embedded Terminal (VTE).</td>
4157 </tr>
4158 <tr><td>Reflow lines/block</td>
4159 <td>&nbsp;</td>
4160 <td>Reformat selected lines or current
4161 (indented) text block,
4162 breaking lines at the long line marker or the
4163 line breaking column if line breaking is
4164 enabled for the current document.</td>
4165 </tr>
4166 </tbody>
4167 </table>
4168 </div>
4169 <div class="section" id="settings-keybindings">
4170 <h4><a class="toc-backref" href="#id170">Settings keybindings</a></h4>
4171 <table border="1" class="docutils">
4172 <colgroup>
4173 <col width="29%" />
4174 <col width="24%" />
4175 <col width="47%" />
4176 </colgroup>
4177 <thead valign="bottom">
4178 <tr><th class="head">Action</th>
4179 <th class="head">Default shortcut</th>
4180 <th class="head">Description</th>
4181 </tr>
4182 </thead>
4183 <tbody valign="top">
4184 <tr><td>Preferences</td>
4185 <td>Ctrl-Alt-P</td>
4186 <td>Opens preferences dialog.</td>
4187 </tr>
4188 <tr><td>Plugin Preferences</td>
4189 <td>&nbsp;</td>
4190 <td>Opens plugin preferences dialog.</td>
4191 </tr>
4192 </tbody>
4193 </table>
4194 </div>
4195 <div class="section" id="search-keybindings">
4196 <h4><a class="toc-backref" href="#id171">Search keybindings</a></h4>
4197 <table border="1" class="docutils">
4198 <colgroup>
4199 <col width="29%" />
4200 <col width="24%" />
4201 <col width="47%" />
4202 </colgroup>
4203 <thead valign="bottom">
4204 <tr><th class="head">Action</th>
4205 <th class="head">Default shortcut</th>
4206 <th class="head">Description</th>
4207 </tr>
4208 </thead>
4209 <tbody valign="top">
4210 <tr><td>Find</td>
4211 <td>Ctrl-F (C)</td>
4212 <td>Opens the Find dialog.</td>
4213 </tr>
4214 <tr><td>Find Next</td>
4215 <td>Ctrl-G</td>
4216 <td>Finds next result.</td>
4217 </tr>
4218 <tr><td>Find Previous</td>
4219 <td>Ctrl-Shift-G</td>
4220 <td>Finds previous result.</td>
4221 </tr>
4222 <tr><td>Find Next Selection</td>
4223 <td>&nbsp;</td>
4224 <td>Finds next occurence of selected text.</td>
4225 </tr>
4226 <tr><td>Find Previous Selection</td>
4227 <td>&nbsp;</td>
4228 <td>Finds previous occurence of selected text.</td>
4229 </tr>
4230 <tr><td>Replace</td>
4231 <td>Ctrl-H (C)</td>
4232 <td>Opens the Replace dialog.</td>
4233 </tr>
4234 <tr><td>Find in files</td>
4235 <td>Ctrl-Shift-F</td>
4236 <td>Opens the Find in files dialog.</td>
4237 </tr>
4238 <tr><td>Next message</td>
4239 <td>&nbsp;</td>
4240 <td>Jumps to the line with the next message in
4241 the Messages window.</td>
4242 </tr>
4243 <tr><td>Previous message</td>
4244 <td>&nbsp;</td>
4245 <td>Jumps to the line with the previous message
4246 in the Messages window.</td>
4247 </tr>
4248 <tr><td>Find Usage</td>
4249 <td>Ctrl-Shift-E</td>
4250 <td>Finds all occurrences of the current word (near
4251 the keyboard cursor) or selection in all open
4252 documents and displays them in the messages
4253 window.</td>
4254 </tr>
4255 <tr><td>Find Document Usage</td>
4256 <td>Ctrl-Shift-D</td>
4257 <td>Finds all occurrences of the current word (near
4258 the keyboard cursor) or selection in the current
4259 document and displays them in the messages
4260 window.</td>
4261 </tr>
4262 <tr><td>Mark All</td>
4263 <td>Ctrl-Shift-M</td>
4264 <td>Highlight all matches of the current
4265 word/selection in the current document
4266 with a colored box. If there's nothing to
4267 find, or the cursor is next to an existing match,
4268 the highlighted matches will be cleared.</td>
4269 </tr>
4270 </tbody>
4271 </table>
4272 </div>
4273 <div class="section" id="go-to-keybindings">
4274 <h4><a class="toc-backref" href="#id172">Go to keybindings</a></h4>
4275 <table border="1" class="docutils">
4276 <colgroup>
4277 <col width="29%" />
4278 <col width="24%" />
4279 <col width="47%" />
4280 </colgroup>
4281 <thead valign="bottom">
4282 <tr><th class="head">Action</th>
4283 <th class="head">Default shortcut</th>
4284 <th class="head">Description</th>
4285 </tr>
4286 </thead>
4287 <tbody valign="top">
4288 <tr><td>Navigate forward a location</td>
4289 <td>Alt-Right (C)</td>
4290 <td>Switches to the next location in the navigation
4291 history. See the section called <a class="reference internal" href="#code-navigation-history">Code Navigation
4292 History</a>.</td>
4293 </tr>
4294 <tr><td>Navigate back a location</td>
4295 <td>Alt-Left (C)</td>
4296 <td>Switches to the previous location in the
4297 navigation history. See the section called
4298 <a class="reference internal" href="#code-navigation-history">Code navigation history</a>.</td>
4299 </tr>
4300 <tr><td>Go to line</td>
4301 <td>Ctrl-L</td>
4302 <td>Focuses the Go to Line entry (if visible) or
4303 shows the Go to line dialog.</td>
4304 </tr>
4305 <tr><td>Goto matching brace</td>
4306 <td>Ctrl-B</td>
4307 <td>If the cursor is ahead or behind a brace, then it
4308 is moved to the brace which belongs to the current
4309 one. If this keyboard shortcut is pressed again,
4310 the cursor is moved back to the first brace.</td>
4311 </tr>
4312 <tr><td>Toggle marker</td>
4313 <td>Ctrl-M</td>
4314 <td>Set a marker on the current line, or clear the
4315 marker if there already is one.</td>
4316 </tr>
4317 <tr><td>Goto next marker</td>
4318 <td>Ctrl-.</td>
4319 <td>Goto the next marker in the current document.</td>
4320 </tr>
4321 <tr><td>Goto previous marker</td>
4322 <td>Ctrl-,</td>
4323 <td>Goto the previous marker in the current document.</td>
4324 </tr>
4325 <tr><td>Go to tag definition</td>
4326 <td>Ctrl-T</td>
4327 <td>Jump to the definition of the current word or
4328 selection. See <a class="reference internal" href="#go-to-tag-definition">Go to tag definition</a>.</td>
4329 </tr>
4330 <tr><td>Go to tag declaration</td>
4331 <td>Ctrl-Shift-T</td>
4332 <td>Jump to the declaration of the current word or
4333 selection. See <a class="reference internal" href="#go-to-tag-declaration">Go to tag declaration</a>.</td>
4334 </tr>
4335 <tr><td>Go to Start of Line</td>
4336 <td>Home</td>
4337 <td>Move the caret to the start of the line.
4338 Behaves differently if <a class="reference internal" href="#smart-home-key">smart_home_key</a> is set.</td>
4339 </tr>
4340 <tr><td>Go to End of Line</td>
4341 <td>End</td>
4342 <td>Move the caret to the end of the line.</td>
4343 </tr>
4344 <tr><td>Go to Start of Display Line</td>
4345 <td>Alt-Home</td>
4346 <td>Move the caret to the start of the display line.
4347 This is useful when you use line wrapping and
4348 want to jump to the start of the wrapped, virtual
4349 line, not the real start of the whole line.
4350 If the line is not wrapped, it behaves like
4351 <cite>Go to Start of Line</cite>.</td>
4352 </tr>
4353 <tr><td>Go to End of Display Line</td>
4354 <td>Alt-End</td>
4355 <td>Move the caret to the end of the display line.
4356 If the line is not wrapped, it behaves like
4357 <cite>Go to End of Line</cite>.</td>
4358 </tr>
4359 <tr><td>Go to Previous Word Part</td>
4360 <td>Ctrl-/</td>
4361 <td>Goto the previous part of the current word.</td>
4362 </tr>
4363 <tr><td>Go to Next Word Part</td>
4364 <td>Ctrl-\</td>
4365 <td>Goto the next part of the current word.</td>
4366 </tr>
4367 </tbody>
4368 </table>
4369 </div>
4370 <div class="section" id="view-keybindings">
4371 <h4><a class="toc-backref" href="#id173">View keybindings</a></h4>
4372 <table border="1" class="docutils">
4373 <colgroup>
4374 <col width="29%" />
4375 <col width="24%" />
4376 <col width="47%" />
4377 </colgroup>
4378 <thead valign="bottom">
4379 <tr><th class="head">Action</th>
4380 <th class="head">Default shortcut</th>
4381 <th class="head">Description</th>
4382 </tr>
4383 </thead>
4384 <tbody valign="top">
4385 <tr><td>Fullscreen</td>
4386 <td>F11 (C)</td>
4387 <td>Switches to fullscreen mode.</td>
4388 </tr>
4389 <tr><td>Toggle Messages Window</td>
4390 <td>&nbsp;</td>
4391 <td>Toggles the message window (status and compiler
4392 messages) on and off.</td>
4393 </tr>
4394 <tr><td>Toggle Sidebar</td>
4395 <td>&nbsp;</td>
4396 <td>Shows or hides the sidebar.</td>
4397 </tr>
4398 <tr><td>Toggle all additional widgets</td>
4399 <td>&nbsp;</td>
4400 <td>Hide and show all additional widgets like the
4401 notebook tabs, the toolbar, the messages window
4402 and the status bar.</td>
4403 </tr>
4404 <tr><td>Zoom In</td>
4405 <td>Ctrl-+ (C)</td>
4406 <td>Zooms in the text.</td>
4407 </tr>
4408 <tr><td>Zoom Out</td>
4409 <td>Ctrl-- (C)</td>
4410 <td>Zooms out the text.</td>
4411 </tr>
4412 <tr><td>Zoom Reset</td>
4413 <td>Ctrl-0</td>
4414 <td>Reset any previous zoom on the text.</td>
4415 </tr>
4416 </tbody>
4417 </table>
4418 </div>
4419 <div class="section" id="focus-keybindings">
4420 <h4><a class="toc-backref" href="#id174">Focus keybindings</a></h4>
4421 <table border="1" class="docutils">
4422 <colgroup>
4423 <col width="30%" />
4424 <col width="23%" />
4425 <col width="47%" />
4426 </colgroup>
4427 <thead valign="bottom">
4428 <tr><th class="head">Action</th>
4429 <th class="head">Default shortcut</th>
4430 <th class="head">Description</th>
4431 </tr>
4432 </thead>
4433 <tbody valign="top">
4434 <tr><td>Switch to Editor</td>
4435 <td>F2</td>
4436 <td>Switches to editor widget.
4437 Also reshows the document statistics line
4438 (after a short timeout).</td>
4439 </tr>
4440 <tr><td>Switch to Search Bar</td>
4441 <td>F7</td>
4442 <td>Switches to the search bar in the toolbar (if
4443 visible).</td>
4444 </tr>
4445 <tr><td>Switch to Message Window</td>
4446 <td>&nbsp;</td>
4447 <td>Focus the Message Window's current tab.</td>
4448 </tr>
4449 <tr><td>Switch to Compiler</td>
4450 <td>&nbsp;</td>
4451 <td>Focus the Compiler message window tab.</td>
4452 </tr>
4453 <tr><td>Switch to Messages</td>
4454 <td>&nbsp;</td>
4455 <td>Focus the Messages message window tab.</td>
4456 </tr>
4457 <tr><td>Switch to Scribble</td>
4458 <td>F6</td>
4459 <td>Switches to scribble widget.</td>
4460 </tr>
4461 <tr><td>Switch to VTE</td>
4462 <td>F4</td>
4463 <td>Switches to VTE widget.</td>
4464 </tr>
4465 <tr><td>Switch to Sidebar</td>
4466 <td>&nbsp;</td>
4467 <td>Focus the Sidebar.</td>
4468 </tr>
4469 <tr><td>Switch to Sidebar Symbol List</td>
4470 <td>&nbsp;</td>
4471 <td>Focus the Symbol list tab in the Sidebar
4472 (if visible).</td>
4473 </tr>
4474 <tr><td>Switch to Sidebar Document List</td>
4475 <td>&nbsp;</td>
4476 <td>Focus the Document list tab in the Sidebar
4477 (if visible).</td>
4478 </tr>
4479 </tbody>
4480 </table>
4481 </div>
4482 <div class="section" id="notebook-tab-keybindings">
4483 <h4><a class="toc-backref" href="#id175">Notebook tab keybindings</a></h4>
4484 <table border="1" class="docutils">
4485 <colgroup>
4486 <col width="28%" />
4487 <col width="23%" />
4488 <col width="49%" />
4489 </colgroup>
4490 <thead valign="bottom">
4491 <tr><th class="head">Action</th>
4492 <th class="head">Default shortcut</th>
4493 <th class="head">Description</th>
4494 </tr>
4495 </thead>
4496 <tbody valign="top">
4497 <tr><td>Switch to left document</td>
4498 <td>Ctrl-PageUp (C)</td>
4499 <td>Switches to the previous open document.</td>
4500 </tr>
4501 <tr><td>Switch to right document</td>
4502 <td>Ctrl-PageDown (C)</td>
4503 <td>Switches to the next open document.</td>
4504 </tr>
4505 <tr><td>Switch to last used document</td>
4506 <td>Ctrl-Tab</td>
4507 <td>Switches to the previously shown document (if it's
4508 still open).
4509 Holding Ctrl (or another modifier if the keybinding
4510 has been changed) will show a dialog, then repeated
4511 presses of the keybinding will switch to the 2nd-last
4512 used document, 3rd-last, etc. Also known as
4513 Most-Recently-Used documents switching.</td>
4514 </tr>
4515 <tr><td>Move document left</td>
4516 <td>Ctrl-Shift-PageUp</td>
4517 <td>Changes the current document with the left hand
4518 one.</td>
4519 </tr>
4520 <tr><td>Move document right</td>
4521 <td>Ctrl-Shift-PageDown</td>
4522 <td>Changes the current document with the right hand
4523 one.</td>
4524 </tr>
4525 <tr><td>Move document first</td>
4526 <td>&nbsp;</td>
4527 <td>Moves the current document to the first position.</td>
4528 </tr>
4529 <tr><td>Move document last</td>
4530 <td>&nbsp;</td>
4531 <td>Moves the current document to the last position.</td>
4532 </tr>
4533 </tbody>
4534 </table>
4535 </div>
4536 <div class="section" id="document-keybindings">
4537 <h4><a class="toc-backref" href="#id176">Document keybindings</a></h4>
4538 <table border="1" class="docutils">
4539 <colgroup>
4540 <col width="33%" />
4541 <col width="19%" />
4542 <col width="48%" />
4543 </colgroup>
4544 <thead valign="bottom">
4545 <tr><th class="head">Action</th>
4546 <th class="head">Default shortcut</th>
4547 <th class="head">Description</th>
4548 </tr>
4549 </thead>
4550 <tbody valign="top">
4551 <tr><td>Clone</td>
4552 <td>&nbsp;</td>
4553 <td>See <a class="reference internal" href="#cloning-documents">Cloning documents</a>.</td>
4554 </tr>
4555 <tr><td>Replace tabs with space</td>
4556 <td>&nbsp;</td>
4557 <td>Replaces all tabs with the right amount of spaces.</td>
4558 </tr>
4559 <tr><td>Replace spaces with tabs</td>
4560 <td>&nbsp;</td>
4561 <td>Replaces leading spaces with tab characters.</td>
4562 </tr>
4563 <tr><td>Toggle current fold</td>
4564 <td>&nbsp;</td>
4565 <td>Toggles the folding state of the current code block.</td>
4566 </tr>
4567 <tr><td>Fold all</td>
4568 <td>&nbsp;</td>
4569 <td>Folds all contractible code blocks.</td>
4570 </tr>
4571 <tr><td>Unfold all</td>
4572 <td>&nbsp;</td>
4573 <td>Unfolds all contracted code blocks.</td>
4574 </tr>
4575 <tr><td>Reload symbol list</td>
4576 <td>Ctrl-Shift-R</td>
4577 <td>Reloads the tag/symbol list.</td>
4578 </tr>
4579 <tr><td>Toggle Line wrapping</td>
4580 <td>&nbsp;</td>
4581 <td>Enables or disables wrapping of long lines.</td>
4582 </tr>
4583 <tr><td>Toggle Line breaking</td>
4584 <td>&nbsp;</td>
4585 <td>Enables or disables automatic breaking of long
4586 lines at a configurable column.</td>
4587 </tr>
4588 <tr><td>Remove Markers</td>
4589 <td>&nbsp;</td>
4590 <td>Remove any markers on lines or words which
4591 were set by using 'Mark All' in the
4592 search dialog or by manually marking lines.</td>
4593 </tr>
4594 <tr><td>Remove Error Indicators</td>
4595 <td>&nbsp;</td>
4596 <td>Remove any error indicators in the
4597 current document.</td>
4598 </tr>
4599 <tr><td>Remove Markers and Error Indicators</td>
4600 <td>&nbsp;</td>
4601 <td>Combines <tt class="docutils literal">Remove Markers</tt> and
4602 <tt class="docutils literal">Remove Error Indicators</tt>.</td>
4603 </tr>
4604 </tbody>
4605 </table>
4606 </div>
4607 <div class="section" id="project-keybindings">
4608 <h4><a class="toc-backref" href="#id177">Project keybindings</a></h4>
4609 <table border="1" class="docutils">
4610 <colgroup>
4611 <col width="29%" />
4612 <col width="24%" />
4613 <col width="47%" />
4614 </colgroup>
4615 <thead valign="bottom">
4616 <tr><th class="head">Action</th>
4617 <th class="head">Default shortcut</th>
4618 <th class="head">Description</th>
4619 </tr>
4620 </thead>
4621 <tbody valign="top">
4622 <tr><td>New</td>
4623 <td>&nbsp;</td>
4624 <td>Create a new project.</td>
4625 </tr>
4626 <tr><td>Open</td>
4627 <td>&nbsp;</td>
4628 <td>Opens a project file.</td>
4629 </tr>
4630 <tr><td>Properties</td>
4631 <td>&nbsp;</td>
4632 <td>Shows project properties.</td>
4633 </tr>
4634 <tr><td>Close</td>
4635 <td>&nbsp;</td>
4636 <td>Close the current project.</td>
4637 </tr>
4638 </tbody>
4639 </table>
4640 </div>
4641 <div class="section" id="build-keybindings">
4642 <h4><a class="toc-backref" href="#id178">Build keybindings</a></h4>
4643 <table border="1" class="docutils">
4644 <colgroup>
4645 <col width="29%" />
4646 <col width="24%" />
4647 <col width="47%" />
4648 </colgroup>
4649 <thead valign="bottom">
4650 <tr><th class="head">Action</th>
4651 <th class="head">Default shortcut</th>
4652 <th class="head">Description</th>
4653 </tr>
4654 </thead>
4655 <tbody valign="top">
4656 <tr><td>Compile</td>
4657 <td>F8</td>
4658 <td>Compiles the current file.</td>
4659 </tr>
4660 <tr><td>Build</td>
4661 <td>F9</td>
4662 <td>Builds (compiles if necessary and links) the
4663 current file.</td>
4664 </tr>
4665 <tr><td>Make all</td>
4666 <td>Shift-F9</td>
4667 <td>Builds the current file with the Make tool.</td>
4668 </tr>
4669 <tr><td>Make custom target</td>
4670 <td>Ctrl-Shift-F9</td>
4671 <td>Builds the current file with the Make tool and a
4672 given target.</td>
4673 </tr>
4674 <tr><td>Make object</td>
4675 <td>Shift-F8</td>
4676 <td>Compiles the current file with the Make tool.</td>
4677 </tr>
4678 <tr><td>Next error</td>
4679 <td>&nbsp;</td>
4680 <td>Jumps to the line with the next error from the
4681 last build process.</td>
4682 </tr>
4683 <tr><td>Previous error</td>
4684 <td>&nbsp;</td>
4685 <td>Jumps to the line with the previous error from
4686 the last build process.</td>
4687 </tr>
4688 <tr><td>Run</td>
4689 <td>F5</td>
4690 <td>Executes the current file in a terminal emulation.</td>
4691 </tr>
4692 <tr><td>Set Build Commands</td>
4693 <td>&nbsp;</td>
4694 <td>Opens the build commands dialog.</td>
4695 </tr>
4696 </tbody>
4697 </table>
4698 </div>
4699 <div class="section" id="tools-keybindings">
4700 <h4><a class="toc-backref" href="#id179">Tools keybindings</a></h4>
4701 <table border="1" class="docutils">
4702 <colgroup>
4703 <col width="29%" />
4704 <col width="24%" />
4705 <col width="47%" />
4706 </colgroup>
4707 <thead valign="bottom">
4708 <tr><th class="head">Action</th>
4709 <th class="head">Default shortcut</th>
4710 <th class="head">Description</th>
4711 </tr>
4712 </thead>
4713 <tbody valign="top">
4714 <tr><td>Show Color Chooser</td>
4715 <td>&nbsp;</td>
4716 <td>Opens the Color Chooser dialog.</td>
4717 </tr>
4718 </tbody>
4719 </table>
4720 </div>
4721 <div class="section" id="help-keybindings">
4722 <h4><a class="toc-backref" href="#id180">Help keybindings</a></h4>
4723 <table border="1" class="docutils">
4724 <colgroup>
4725 <col width="29%" />
4726 <col width="24%" />
4727 <col width="47%" />
4728 </colgroup>
4729 <thead valign="bottom">
4730 <tr><th class="head">Action</th>
4731 <th class="head">Default shortcut</th>
4732 <th class="head">Description</th>
4733 </tr>
4734 </thead>
4735 <tbody valign="top">
4736 <tr><td>Help</td>
4737 <td>F1 (C)</td>
4738 <td>Opens the manual.</td>
4739 </tr>
4740 </tbody>
4741 </table>
4742 </div>
4743 </div>
4744 </div>
4745 </div>
4746 <div class="section" id="configuration-files">
4747 <h1><a class="toc-backref" href="#id181">Configuration files</a></h1>
4748 <div class="warning">
4749 <p class="first admonition-title">Warning</p>
4750 <p class="last">You must use UTF-8 encoding <em>without BOM</em> for configuration files.</p>
4751 </div>
4752 <div class="section" id="configuration-file-paths">
4753 <h2><a class="toc-backref" href="#id182">Configuration file paths</a></h2>
4754 <p>Geany has default configuration files installed for the system and
4755 also per-user configuration files.</p>
4756 <p>The system files should not normally be edited because they will be
4757 overwritten when upgrading Geany.</p>
4758 <p>The user configuration directory can be overridden with the <tt class="docutils literal"><span class="pre">-c</span></tt>
4759 switch, but this is not normally done. See <a class="reference internal" href="#command-line-options">Command line options</a>.</p>
4760 <div class="note">
4761 <p class="first admonition-title">Note</p>
4762 <p class="last">Any missing subdirectories in the user configuration directory
4763 will be created when Geany starts.</p>
4764 </div>
4765 <p>You can check the paths Geany is using with <em>Help-&gt;Debug Messages</em>.
4766 Near the top there should be 2 lines with something like:</p>
4767 <pre class="literal-block">
4768 Geany-INFO: System data dir: /usr/share/geany
4769 Geany-INFO: User config dir: /home/username/.config/geany
4770 </pre>
4771 <div class="section" id="paths-on-unix-like-systems">
4772 <h3><a class="toc-backref" href="#id183">Paths on Unix-like systems</a></h3>
4773 <p>The system path is <tt class="docutils literal">$prefix/share/geany</tt>, where <tt class="docutils literal">$prefix</tt> is the
4774 path where Geany is installed (see <a class="reference internal" href="#installation-prefix">Installation prefix</a>).</p>
4775 <p>The user configuration directory is normally:
4776 <tt class="docutils literal"><span class="pre">/home/username/.config/geany</span></tt></p>
4777 </div>
4778 <div class="section" id="paths-on-windows">
4779 <h3><a class="toc-backref" href="#id184">Paths on Windows</a></h3>
4780 <p>The system path is the <tt class="docutils literal">data</tt> subfolder of the installation path
4781 on Windows.</p>
4782 <p>The user configuration directory might vary, but on Windows XP it's:
4783 <tt class="docutils literal"><span class="pre">C:\Documents</span> and Settings\UserName\Application Data\geany</tt>
4784 On Windows 7 and above you most likely will find it at:
4785 <tt class="docutils literal"><span class="pre">C:\users\UserName\Roaming\geany</span></tt></p>
4786 </div>
4787 </div>
4788 <div class="section" id="tools-menu-items">
4789 <h2><a class="toc-backref" href="#id185">Tools menu items</a></h2>
4790 <p>There's a <em>Configuration files</em> submenu in the <em>Tools</em> menu that
4791 contains items for some of the available user configuration files.
4792 Clicking on one opens it in the editor for you to update. Geany will
4793 reload the file after you have saved it.</p>
4794 <div class="note">
4795 <p class="first admonition-title">Note</p>
4796 <p class="last">Other configuration files not shown here will need to be opened
4797 manually, and will not be automatically reloaded when saved.
4798 (see <em>Reload Configuration</em> below).</p>
4799 </div>
4800 <p>There's also a <em>Reload Configuration</em> item which can be used if you
4801 updated one of the other configuration files, or modified or added
4802 template files.</p>
4803 <p><em>Reload Configuration</em> is also necessary to update syntax highlighting colors.</p>
4804 <div class="note">
4805 <p class="first admonition-title">Note</p>
4806 <p class="last">Syntax highlighting colors aren't updated in open documents after
4807 saving filetypes.common as this may take a significant
4808 amount of time.</p>
4809 </div>
4810 </div>
4811 <div class="section" id="global-configuration-file">
4812 <h2><a class="toc-backref" href="#id186">Global configuration file</a></h2>
4813 <p>System administrators can add a global configuration file for Geany
4814 which will be used when starting Geany and a user configuration file
4815 does not exist.</p>
4816 <p>The global configuration file is read from <tt class="docutils literal">geany.conf</tt> in the
4817 system configuration path - see <a class="reference internal" href="#configuration-file-paths">Configuration file paths</a>. It can
4818 contain any settings which are found in the usual configuration file
4819 created by Geany, but does not have to contain all settings.</p>
4820 <div class="note">
4821 <p class="first admonition-title">Note</p>
4822 <p class="last">This feature is mainly intended for package maintainers or system
4823 admins who want to set up Geany in a multi user environment and
4824 set some sane default values for this environment. Usually users won't
4825 need to do that.</p>
4826 </div>
4827 </div>
4828 <div class="section" id="filetype-definition-files">
4829 <h2><a class="toc-backref" href="#id187">Filetype definition files</a></h2>
4830 <p>All color definitions and other filetype specific settings are
4831 stored in the filetype definition files. Those settings are colors
4832 for syntax highlighting, general settings like comment characters or
4833 word delimiter characters as well as compiler and linker settings.</p>
4834 <p>See also <a class="reference internal" href="#configuration-file-paths">Configuration file paths</a>.</p>
4835 <div class="section" id="filenames">
4836 <h3><a class="toc-backref" href="#id188">Filenames</a></h3>
4837 <p>Each filetype has a corresponding filetype definition file. The format
4838 for built-in filetype <cite>Foo</cite> is:</p>
4839 <pre class="literal-block">
4840 filetypes.foo
4841 </pre>
4842 <p>The extension is normally just the filetype name in lower case.</p>
4843 <p>However there are some exceptions:</p>
4844 <table border="1" class="docutils">
4845 <colgroup>
4846 <col width="63%" />
4847 <col width="38%" />
4848 </colgroup>
4849 <thead valign="bottom">
4850 <tr><th class="head">Filetype</th>
4851 <th class="head">Extension</th>
4852 </tr>
4853 </thead>
4854 <tbody valign="top">
4855 <tr><td>C++</td>
4856 <td>cpp</td>
4857 </tr>
4858 <tr><td>C#</td>
4859 <td>cs</td>
4860 </tr>
4861 <tr><td>Make</td>
4862 <td>makefile</td>
4863 </tr>
4864 <tr><td>Matlab/Octave</td>
4865 <td>matlab</td>
4866 </tr>
4867 </tbody>
4868 </table>
4869 <p>There is also the <a class="reference internal" href="#special-file-filetypes-common">special file filetypes.common</a>.</p>
4870 <p>For <a class="reference internal" href="#custom-filetypes">custom filetypes</a>, the filename for <cite>Foo</cite> is different:</p>
4871 <pre class="literal-block">
4872 filetypes.Foo.conf
4873 </pre>
4874 <p>See the link for details.</p>
4875 </div>
4876 <div class="section" id="system-files">
4877 <h3><a class="toc-backref" href="#id189">System files</a></h3>
4878 <p>The system-wide filetype configuration files can be found in the
4879 system configuration path and are called <tt class="docutils literal"><span class="pre">filetypes.$ext</span></tt>,
4880 where $ext is the name of the filetype. For every
4881 filetype there is a corresponding definition file. There is one
4882 exception: <tt class="docutils literal">filetypes.common</tt> -- this file is for general settings,
4883 which are not specific to a certain filetype.</p>
4884 <div class="warning">
4885 <p class="first admonition-title">Warning</p>
4886 <p class="last">It is not recommended that users edit the system-wide files,
4887 because they will be overridden when Geany is updated.</p>
4888 </div>
4889 </div>
4890 <div class="section" id="user-files">
4891 <h3><a class="toc-backref" href="#id190">User files</a></h3>
4892 <p>To change the settings, copy a file from the system configuration
4893 path to the subdirectory <tt class="docutils literal">filedefs</tt> in your user configuration
4894 directory. Then you can edit the file and the changes will still be
4895 available after an update of Geany.</p>
4896 <p>Alternatively, you can create the file yourself and add only the
4897 settings you want to change. All missing settings will be read from
4898 the corresponding system configuration file.</p>
4899 </div>
4900 <div class="section" id="custom-filetypes">
4901 <h3><a class="toc-backref" href="#id191">Custom filetypes</a></h3>
4902 <p>At startup Geany looks for <tt class="docutils literal"><span class="pre">filetypes.*.conf</span></tt> files in the system and
4903 user filetype paths, adding any filetypes found with the name matching
4904 the '<tt class="docutils literal">*</tt>' wildcard - e.g. <tt class="docutils literal">filetypes.Bar.conf</tt>.</p>
4905 <p>Custom filetypes are not as powerful as built-in filetypes, but
4906 support for the following has been implemented:</p>
4907 <ul>
4908 <li><p class="first">Recognizing and setting the filetype (after the user has manually updated
4909 the <a class="reference internal" href="#filetype-extensions">filetype extensions</a> file).</p>
4910 </li>
4911 <li><p class="first"><a class="reference internal" href="#filetype-group-membership">Filetype group membership</a>.</p>
4912 </li>
4913 <li><dl class="first docutils">
4914 <dt>Reading filetype settings in the <tt class="docutils literal">[settings]</tt> section, including:</dt>
4915 <dd><ul class="first last simple">
4916 <li>Using an existing syntax highlighting lexer (<a class="reference internal" href="#lexer-filetype">lexer_filetype</a> key).</li>
4917 <li>Using an existing tag parser (<a class="reference internal" href="#tag-parser">tag_parser</a> key).</li>
4918 </ul>
4919 </dd>
4920 </dl>
4921 </li>
4922 <li><p class="first">Build commands (<tt class="docutils literal"><span class="pre">[build-menu]</span></tt> section).</p>
4923 </li>
4924 <li><p class="first">Loading global tags files (sharing the <tt class="docutils literal">tag_parser</tt> filetype's namespace).</p>
4925 </li>
4926 </ul>
4927 <p>See <a class="reference internal" href="#filetype-configuration">Filetype configuration</a> for details on each setting.</p>
4928 <div class="section" id="creating-a-custom-filetype-from-an-existing-filetype">
4929 <h4><a class="toc-backref" href="#id192">Creating a custom filetype from an existing filetype</a></h4>
4930 <p>Because most filetype settings will relate to the syntax
4931 highlighting (e.g. styling, keywords, <tt class="docutils literal">lexer_properties</tt>
4932 sections), it is best to copy an existing filetype file that uses
4933 the lexer you wish to use as the basis of a custom filetype, using
4934 the correct filename extension format shown above, e.g.:</p>
4935 <pre class="literal-block">
4936 cp filetypes.foo filetypes.Bar.conf
4937 </pre>
4938 <p>Then add the <tt class="docutils literal">lexer_filetype=Foo</tt> setting (if not already present)
4939 and add/adjust other settings.</p>
4940 <div class="warning">
4941 <p class="first admonition-title">Warning</p>
4942 <p class="last">The <tt class="docutils literal">[styling]</tt> and <tt class="docutils literal">[keywords]</tt> sections have key names
4943 specific to each filetype/lexer. You must follow the same
4944 names - in particular, some lexers only support one keyword
4945 list, or none.</p>
4946 </div>
4947 </div>
4948 </div>
4949 <div class="section" id="filetype-configuration">
4950 <h3><a class="toc-backref" href="#id193">Filetype configuration</a></h3>
4951 <p>As well as the sections listed below, each filetype file can contain
4952 a [build-menu] section as described in <a class="reference internal" href="#build-menu-section">[build-menu] section</a>.</p>
4953 <div class="section" id="styling-section">
4954 <h4><a class="toc-backref" href="#id194">[styling] section</a></h4>
4955 <p>In this section the colors for syntax highlighting are defined. The
4956 manual format is:</p>
4957 <ul class="simple">
4958 <li><tt class="docutils literal">key=foreground_color;background_color;bold_flag;italic_flag</tt></li>
4959 </ul>
4960 <p>Colors have to be specified as RGB hex values prefixed by
4961 0x or # similar to HTML/CSS hex triplets. For example, all of the following
4962 are valid values for pure red; 0xff0000, 0xf00, #ff0000, or #f00. The
4963 values are case-insensitive but it is a good idea to use lower-case.
4964 Note that you can also use <em>named colors</em> as well by substituting the
4965 color value with the name of a color as defined in the <tt class="docutils literal">[named_colors]</tt>
4966 section, see the <a class="reference internal" href="#named-colors-section">[named_colors] Section</a> for more information.</p>
4967 <p>Bold and italic are flags and should only be &quot;true&quot; or &quot;false&quot;. If their
4968 value is something other than &quot;true&quot; or &quot;false&quot;, &quot;false&quot; is assumed.</p>
4969 <p>You can omit fields to use the values from the style named <tt class="docutils literal">&quot;default&quot;</tt>.</p>
4970 <p>E.g. <tt class="docutils literal"><span class="pre">key=0xff0000;;true</span></tt></p>
4971 <p>This makes the key style have red foreground text, default background
4972 color text and bold emphasis.</p>
4973 <div class="section" id="using-a-named-style">
4974 <h5><a class="toc-backref" href="#id195">Using a named style</a></h5>
4975 <p>The second format uses a <em>named style</em> name to reference a style
4976 defined in filetypes.common.</p>
4977 <ul class="simple">
4978 <li><tt class="docutils literal">key=named_style</tt></li>
4979 <li><tt class="docutils literal">key2=named_style2,bold,italic</tt></li>
4980 </ul>
4981 <p>The bold and italic parts are optional, and if present are used to
4982 toggle the bold or italic flags to the opposite of the named style's
4983 flags. In contrast to style definition booleans, they are a literal
4984 &quot;,bold,italic&quot; and commas are used instead of semi-colons.</p>
4985 <p>E.g. <tt class="docutils literal">key=comment,italic</tt></p>
4986 <p>This makes the key style match the <tt class="docutils literal">&quot;comment&quot;</tt> named style, but with
4987 italic emphasis.</p>
4988 <p>To define named styles, see the filetypes.common <a class="reference internal" href="#named-styles-section">[named_styles]
4989 Section</a>.</p>
4990 </div>
4991 <div class="section" id="reading-styles-from-another-filetype">
4992 <h5><a class="toc-backref" href="#id196">Reading styles from another filetype</a></h5>
4993 <p>You can automatically copy all of the styles from another filetype
4994 definition file by using the following syntax for the <tt class="docutils literal">[styling]</tt>
4995 group:</p>
4996 <pre class="literal-block">
4997 [styling=Foo]
4998 </pre>
4999 <p>Where Foo is a filetype name. The corresponding <tt class="docutils literal">[styling]</tt>
5000 section from <tt class="docutils literal">filetypes.foo</tt> will be read.</p>
5001 <p>This is useful when the same lexer is being used for multiple
5002 filetypes (e.g. C/C++/C#/Java/etc). For example, to make the C++
5003 styling the same as the C styling, you would put the following in
5004 <tt class="docutils literal">filetypes.cpp</tt>:</p>
5005 <pre class="literal-block">
5006 [styling=C]
5007 </pre>
5008 </div>
5009 </div>
5010 <div class="section" id="keywords-section">
5011 <h4><a class="toc-backref" href="#id197">[keywords] section</a></h4>
5012 <p>This section contains keys for different keyword lists specific to
5013 the filetype. Some filetypes do not support keywords, so adding a
5014 new key will not work. You can only add or remove keywords to/from
5015 an existing list.</p>
5016 <div class="important">
5017 <p class="first admonition-title">Important</p>
5018 <p class="last">The keywords list must be in one line without line ending characters.</p>
5019 </div>
5020 </div>
5021 <div class="section" id="lexer-properties-section">
5022 <h4><a class="toc-backref" href="#id198">[lexer_properties] section</a></h4>
5023 <p>Here any special properties for the Scintilla lexer can be set in the
5024 format <tt class="docutils literal">key.name.field=some.value</tt>.</p>
5025 <p>Properties Geany uses are listed in the system filetype files. To find
5026 other properties you need Geany's source code:</p>
5027 <pre class="literal-block">
5028 egrep -o 'GetProperty\w*\(&quot;([^&quot;]+)&quot;[^)]+\)' scintilla/Lex*.cxx
5029 </pre>
5030 </div>
5031 <div class="section" id="settings-section">
5032 <h4><a class="toc-backref" href="#id199">[settings] section</a></h4>
5033 <dl class="docutils">
5034 <dt>extension</dt>
5035 <dd><p class="first">This is the default file extension used when saving files, not
5036 including the period character (<tt class="docutils literal">.</tt>). The extension used should
5037 match one of the patterns associated with that filetype (see
5038 <a class="reference internal" href="#filetype-extensions">Filetype extensions</a>).</p>
5039 <p class="last"><em>Example:</em> <tt class="docutils literal">extension=cxx</tt></p>
5040 </dd>
5041 <dt>wordchars</dt>
5042 <dd><p class="first">These characters define word boundaries when making selections
5043 and searching using word matching options.</p>
5044 <p><em>Example:</em> (look at system filetypes.* files)</p>
5045 <div class="note last">
5046 <p class="first admonition-title">Note</p>
5047 <p class="last">This overrides the <em>whitespace_chars</em> filetypes.common setting.</p>
5048 </div>
5049 </dd>
5050 <dt>comment_single</dt>
5051 <dd><p class="first">A character or string which is used to comment code. If you want to use
5052 multiline comments only, don't set this but rather comment_open and
5053 comment_close.</p>
5054 <p>Single-line comments are used in priority over multiline comments to
5055 comment a line, e.g. with the <cite>Comment/Uncomment line</cite> command.</p>
5056 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">comment_single=//</span></tt></p>
5057 </dd>
5058 <dt>comment_open</dt>
5059 <dd><p class="first">A character or string which is used to comment code. You need to also
5060 set comment_close to really use multiline comments. If you want to use
5061 single-line comments, prefer setting comment_single.</p>
5062 <p>Multiline comments are used in priority over single-line comments to
5063 comment a block, e.g. template comments.</p>
5064 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">comment_open=/*</span></tt></p>
5065 </dd>
5066 <dt>comment_close</dt>
5067 <dd><p class="first">If multiline comments are used, this is the character or string to
5068 close the comment.</p>
5069 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">comment_close=*/</span></tt></p>
5070 </dd>
5071 <dt>comment_use_indent</dt>
5072 <dd><p class="first">Set this to false if a comment character or string should start at
5073 column 0 of a line. If set to true it uses any indentation of the
5074 line.</p>
5075 <p>Note: Comment indentation</p>
5076 <p><tt class="docutils literal">comment_use_indent=true</tt> would generate this if a line is
5077 commented (e.g. with Ctrl-D):</p>
5078 <pre class="literal-block">
5079 #command_example();
5080 </pre>
5081 <p><tt class="docutils literal">comment_use_indent=false</tt> would generate this if a line is
5082 commented (e.g. with Ctrl-D):</p>
5083 <pre class="literal-block">
5084 # command_example();
5085 </pre>
5086 <p>Note: This setting only works for single line comments (like '//',
5087 '#' or ';').</p>
5088 <p class="last"><em>Example:</em> <tt class="docutils literal">comment_use_indent=true</tt></p>
5089 </dd>
5090 <dt>context_action_cmd</dt>
5091 <dd><p class="first">A command which can be executed on the current word or the current
5092 selection.</p>
5093 <p>Example usage: Open the API documentation for the
5094 current function call at the cursor position.</p>
5095 <p>The command can
5096 be set for every filetype or if not set, a global command will
5097 be used. The command itself can be specified without the full
5098 path, then it is searched in $PATH. But for security reasons,
5099 it is recommended to specify the full path to the command. The
5100 wildcard %s will be replaced by the current word at the cursor
5101 position or by the current selection.</p>
5102 <p>Hint: for PHP files the following could be quite useful:
5103 context_action_cmd=firefox &quot;<a class="reference external" href="http://www.php.net/%s">http://www.php.net/%s</a>&quot;</p>
5104 <p class="last"><em>Example:</em> <tt class="docutils literal">context_action_cmd=devhelp <span class="pre">-s</span> &quot;%s&quot;</tt></p>
5105 </dd>
5106 </dl>
5107 <dl class="docutils" id="tag-parser">
5108 <dt>tag_parser</dt>
5109 <dd>The TagManager language name, e.g. &quot;C&quot;. Usually the same as the
5110 filetype name.</dd>
5111 </dl>
5112 <dl class="docutils" id="lexer-filetype">
5113 <dt>lexer_filetype</dt>
5114 <dd><p class="first">A filetype name to setup syntax highlighting from another filetype.
5115 This must not be recursive, i.e. it should be a filetype name that
5116 doesn't use the <em>lexer_filetype</em> key itself, e.g.:</p>
5117 <pre class="literal-block">
5118 lexer_filetype=C
5119 #lexer_filetype=C++
5120 </pre>
5121 <p class="last">The second line is wrong, because <tt class="docutils literal">filetypes.cpp</tt> itself uses
5122 <tt class="docutils literal">lexer_filetype=C</tt>, which would be recursive.</p>
5123 </dd>
5124 <dt>symbol_list_sort_mode</dt>
5125 <dd><p class="first">What the default symbol list sort order should be.</p>
5126 <table border="1" class="last docutils">
5127 <colgroup>
5128 <col width="12%" />
5129 <col width="88%" />
5130 </colgroup>
5131 <thead valign="bottom">
5132 <tr><th class="head">Value</th>
5133 <th class="head">Meaning</th>
5134 </tr>
5135 </thead>
5136 <tbody valign="top">
5137 <tr><td>0</td>
5138 <td>Sort tags by name</td>
5139 </tr>
5140 <tr><td>1</td>
5141 <td>Sort tags by appearance (line number)</td>
5142 </tr>
5143 </tbody>
5144 </table>
5145 </dd>
5146 </dl>
5147 <dl class="docutils" id="xml-indent-tags">
5148 <dt>xml_indent_tags</dt>
5149 <dd>If this setting is set to <em>true</em>, a new line after a line ending with an
5150 unclosed XML/HTML tag will be automatically indented. This only applies
5151 to filetypes for which the HTML or XML lexer is used. Such filetypes have
5152 this setting in their system configuration files.</dd>
5153 </dl>
5154 </div>
5155 <div class="section" id="indentation-section">
5156 <h4><a class="toc-backref" href="#id200">[indentation] section</a></h4>
5157 <p>This section allows definition of default indentation settings specific to
5158 the file type, overriding the ones configured in the preferences. This can
5159 be useful for file types requiring specific indentation settings (e.g. tabs
5160 only for Makefile). These settings don't override auto-detection if activated.</p>
5161 <dl class="docutils">
5162 <dt>width</dt>
5163 <dd>The forced indentation width.</dd>
5164 <dt>type</dt>
5165 <dd><p class="first">The forced indentation type.</p>
5166 <table border="1" class="last docutils">
5167 <colgroup>
5168 <col width="18%" />
5169 <col width="82%" />
5170 </colgroup>
5171 <thead valign="bottom">
5172 <tr><th class="head">Value</th>
5173 <th class="head">Indentation type</th>
5174 </tr>
5175 </thead>
5176 <tbody valign="top">
5177 <tr><td>0</td>
5178 <td>Spaces only</td>
5179 </tr>
5180 <tr><td>1</td>
5181 <td>Tabs only</td>
5182 </tr>
5183 <tr><td>2</td>
5184 <td>Mixed (tabs and spaces)</td>
5185 </tr>
5186 </tbody>
5187 </table>
5188 </dd>
5189 </dl>
5190 </div>
5191 <div class="section" id="build-settings-section">
5192 <h4><a class="toc-backref" href="#id201">[build_settings] section</a></h4>
5193 <p>As of Geany 0.19 this section is supplemented by the <a class="reference internal" href="#build-menu-section">[build-menu] section</a>.
5194 Values that are set in the [build-menu] section will override those in this section.</p>
5195 <dl class="docutils">
5196 <dt>error_regex</dt>
5197 <dd><p class="first">This is a regular expression to parse a filename
5198 and line number from build output. If undefined, Geany will fall
5199 back to its default error message parsing.</p>
5200 <p>Only the first two matches will be read by Geany. Geany will look for
5201 a match that is purely digits, and use this for the line number. The
5202 remaining match will be used as the filename.</p>
5203 <p><em>Example:</em> <tt class="docutils literal"><span class="pre">error_regex=(.+):([0-9]+):[0-9]+</span></tt></p>
5204 <p class="last">This will parse a message such as:
5205 <tt class="docutils literal">test.py:7:24: E202 whitespace before ']'</tt></p>
5206 </dd>
5207 </dl>
5208 <p><strong>Build commands</strong></p>
5209 <p>If any build menu item settings have been configured in the Build Menu Commands
5210 dialog or the Build tab of the project preferences dialog then these
5211 settings are stored in the [build-menu] section and override the settings in
5212 this section for that item.</p>
5213 <dl class="docutils">
5214 <dt>compiler</dt>
5215 <dd><p class="first">This item specifies the command to compile source code files. But
5216 it is also possible to use it with interpreted languages like Perl
5217 or Python. With these filetypes you can use this option as a kind of
5218 syntax parser, which sends output to the compiler message window.</p>
5219 <p>You should quote the filename to also support filenames with
5220 spaces. The following wildcards for filenames are available:</p>
5221 <ul class="simple">
5222 <li>%f -- complete filename without path</li>
5223 <li>%e -- filename without path and without extension</li>
5224 </ul>
5225 <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>
5226 </dd>
5227 <dt>linker</dt>
5228 <dd><p class="first">This item specifies the command to link the file. If the file is not
5229 already compiled, it will be compiled while linking. The -o option
5230 is automatically added by Geany. This item works well with GNU gcc,
5231 but may be problematic with other compilers (esp. with the linker).</p>
5232 <p class="last"><em>Example:</em> <tt class="docutils literal">linker=gcc <span class="pre">-Wall</span> &quot;%f&quot;</tt></p>
5233 </dd>
5234 <dt>run_cmd</dt>
5235 <dd><p class="first">Use this item to execute your file. It has to have been built
5236 already. Use the %e wildcard to have only the name of the executable
5237 (i.e. without extension) or use the %f wildcard if you need the
5238 complete filename, e.g. for shell scripts.</p>
5239 <p class="last"><em>Example:</em> <tt class="docutils literal"><span class="pre">run_cmd=&quot;./%e&quot;</span></tt></p>
5240 </dd>
5241 </dl>
5242 </div>
5243 </div>
5244 <div class="section" id="special-file-filetypes-common">
5245 <h3><a class="toc-backref" href="#id202">Special file filetypes.common</a></h3>
5246 <p>There is a special filetype definition file called
5247 filetypes.common. This file defines some general non-filetype-specific
5248 settings.</p>
5249 <p>You can open the user filetypes.common with the
5250 <em>Tools-&gt;Configuration Files-&gt;filetypes.common</em> menu item. This adds
5251 the default settings to the user file if the file doesn't exist.
5252 Alternatively the file can be created manually, adding only the
5253 settings you want to change. All missing settings will be read from
5254 the system file.</p>
5255 <div class="note">
5256 <p class="first admonition-title">Note</p>
5257 <p class="last">See the <a class="reference internal" href="#filetype-configuration">Filetype configuration</a> section for how to define styles.</p>
5258 </div>
5259 <div class="section" id="named-styles-section">
5260 <h4><a class="toc-backref" href="#id203">[named_styles] section</a></h4>
5261 <p>Named styles declared here can be used in the [styling] section of any
5262 filetypes.* file.</p>
5263 <p>For example:</p>
5264 <p><em>In filetypes.common</em>:</p>
5265 <pre class="literal-block">
5266 [named_styles]
5267 foo=0xc00000;0xffffff;false;true
5268 bar=foo
5269 </pre>
5270 <p><em>In filetypes.c</em>:</p>
5271 <pre class="literal-block">
5272 [styling]
5273 comment=foo
5274 </pre>
5275 <p>This saves copying and pasting the whole style definition into several
5276 different files.</p>
5277 <div class="note">
5278 <p class="first admonition-title">Note</p>
5279 <p class="last">You can define aliases for named styles, as shown with the <tt class="docutils literal">bar</tt>
5280 entry in the above example, but they must be declared after the
5281 original style.</p>
5282 </div>
5283 </div>
5284 <div class="section" id="named-colors-section">
5285 <h4><a class="toc-backref" href="#id204">[named_colors] section</a></h4>
5286 <p>Named colors declared here can be used in the <tt class="docutils literal">[styling]</tt> or
5287 <tt class="docutils literal">[named_styles]</tt> section of any filetypes.* file or color scheme.</p>
5288 <p>For example:</p>
5289 <pre class="literal-block">
5290 [named_colors]
5291 my_red_color=#FF0000
5292 my_blue_color=#0000FF
5294 [named_styles]
5295 foo=my_red_color;my_blue_color;false;true
5296 </pre>
5297 <p>This allows to define a color pallete by name so that to change a color
5298 scheme-wide only involves changing the hex value in a single location.</p>
5299 </div>
5300 <div class="section" id="id4">
5301 <h4><a class="toc-backref" href="#id205">[styling] section</a></h4>
5302 <dl class="docutils">
5303 <dt>default</dt>
5304 <dd><p class="first">This is the default style. It is used for styling files without a
5305 filetype set.</p>
5306 <p class="last"><em>Example:</em> <tt class="docutils literal">default=0x000000;0xffffff;false;false</tt></p>
5307 </dd>
5308 <dt>selection</dt>
5309 <dd><p class="first">The style for coloring selected text. The format is:</p>
5310 <ul class="simple">
5311 <li>Foreground color</li>
5312 <li>Background color</li>
5313 <li>Use foreground color</li>
5314 <li>Use background color</li>
5315 </ul>
5316 <p>The colors are only set if the 3rd or 4th argument is true. When
5317 the colors are not overridden, the default is a dark grey
5318 background with syntax highlighted foreground text.</p>
5319 <p class="last"><em>Example:</em> <tt class="docutils literal">selection=0xc0c0c0;0x00007F;true;true</tt></p>
5320 </dd>
5321 <dt>brace_good</dt>
5322 <dd><p class="first">The style for brace highlighting when a matching brace was found.</p>
5323 <p class="last"><em>Example:</em> <tt class="docutils literal">brace_good=0xff0000;0xFFFFFF;true;false</tt></p>
5324 </dd>
5325 <dt>brace_bad</dt>
5326 <dd><p class="first">The style for brace highlighting when no matching brace was found.</p>
5327 <p class="last"><em>Example:</em> <tt class="docutils literal">brace_bad=0x0000ff;0xFFFFFF;true;false</tt></p>
5328 </dd>
5329 <dt>caret</dt>
5330 <dd><p class="first">The style for coloring the caret(the blinking cursor). Only first
5331 and third argument is interpreted.
5332 Set the third argument to true to change the caret into a block caret.</p>
5333 <p class="last"><em>Example:</em> <tt class="docutils literal">caret=0x000000;0x0;false;false</tt></p>
5334 </dd>
5335 <dt>caret_width</dt>
5336 <dd><p class="first">The width for the caret(the blinking cursor). Only the first
5337 argument is interpreted. The width is specified in pixels with
5338 a maximum of three pixel. Use the width 0 to make the caret
5339 invisible.</p>
5340 <p class="last"><em>Example:</em> <tt class="docutils literal">caret=1;0;false;false</tt></p>
5341 </dd>
5342 <dt>current_line</dt>
5343 <dd><p class="first">The style for coloring the background of the current line. Only
5344 the second and third arguments are interpreted. The second argument
5345 is the background color. Use the third argument to enable or
5346 disable background highlighting for the current line (has to be
5347 true/false).</p>
5348 <p class="last"><em>Example:</em> <tt class="docutils literal">current_line=0x0;0xe5e5e5;true;false</tt></p>
5349 </dd>
5350 <dt>indent_guide</dt>
5351 <dd><p class="first">The style for coloring the indentation guides. Only the first and
5352 second arguments are interpreted.</p>
5353 <p class="last"><em>Example:</em> <tt class="docutils literal">indent_guide=0xc0c0c0;0xffffff;false;false</tt></p>
5354 </dd>
5355 <dt>white_space</dt>
5356 <dd><p class="first">The style for coloring the white space if it is shown. The first
5357 both arguments define the foreground and background colors, the
5358 third argument sets whether to use the defined foreground color
5359 or to use the color defined by each filetype for the white space.
5360 The fourth argument defines whether to use the background color.</p>
5361 <p class="last"><em>Example:</em> <tt class="docutils literal">white_space=0xc0c0c0;0xffffff;true;true</tt></p>
5362 </dd>
5363 <dt>margin_linenumber</dt>
5364 <dd>Line number margin foreground and background colors.</dd>
5365 </dl>
5366 <dl class="docutils" id="folding-settings">
5367 <dt>margin_folding</dt>
5368 <dd>Fold margin foreground and background colors.</dd>
5369 <dt>fold_symbol_highlight</dt>
5370 <dd>Highlight color of folding symbols.</dd>
5371 <dt>folding_style</dt>
5372 <dd><p class="first">The style of folding icons. Only first and second arguments are
5373 used.</p>
5374 <p>Valid values for the first argument are:</p>
5375 <ul class="simple">
5376 <li>1 -- for boxes</li>
5377 <li>2 -- for circles</li>
5378 <li>3 -- for arrows</li>
5379 <li>4 -- for +/-</li>
5380 </ul>
5381 <p>Valid values for the second argument are:</p>
5382 <ul class="simple">
5383 <li>0 -- for no lines</li>
5384 <li>1 -- for straight lines</li>
5385 <li>2 -- for curved lines</li>
5386 </ul>
5387 <p><em>Default:</em> <tt class="docutils literal">folding_style=1;1;</tt></p>
5388 <p class="last"><em>Arrows:</em> <tt class="docutils literal">folding_style=3;0;</tt></p>
5389 </dd>
5390 <dt>folding_horiz_line</dt>
5391 <dd><p class="first">Draw a thin horizontal line at the line where text is folded. Only
5392 first argument is used.</p>
5393 <p>Valid values for the first argument are:</p>
5394 <ul class="simple">
5395 <li>0 -- disable, do not draw a line</li>
5396 <li>1 -- draw the line above folded text</li>
5397 <li>2 -- draw the line below folded text</li>
5398 </ul>
5399 <p class="last"><em>Example:</em> <tt class="docutils literal">folding_horiz_line=0;0;false;false</tt></p>
5400 </dd>
5401 <dt>line_wrap_visuals</dt>
5402 <dd><p class="first">First argument: drawing of visual flags to indicate a line is wrapped.
5403 This is a bitmask of the values:</p>
5404 <ul class="simple">
5405 <li>0 -- No visual flags</li>
5406 <li>1 -- Visual flag at end of subline of a wrapped line</li>
5407 <li>2 -- Visual flag at begin of subline of a wrapped line. Subline is
5408 indented by at least 1 to make room for the flag.</li>
5409 </ul>
5410 <p>Second argument: wether the visual flags to indicate a line is wrapped
5411 are drawn near the border or near the text. This is a bitmask of the values:</p>
5412 <ul class="simple">
5413 <li>0 -- Visual flags drawn near border</li>
5414 <li>1 -- Visual flag at end of subline drawn near text</li>
5415 <li>2 -- Visual flag at begin of subline drawn near text</li>
5416 </ul>
5417 <p>Only first and second arguments are interpreted.</p>
5418 <p class="last"><em>Example:</em> <tt class="docutils literal">line_wrap_visuals=3;0;false;false</tt></p>
5419 </dd>
5420 <dt>line_wrap_indent</dt>
5421 <dd><p class="first">First argument: sets the size of indentation of sublines for wrapped lines
5422 in terms of the width of a space, only used when the second argument is <tt class="docutils literal">0</tt>.</p>
5423 <p>Second argument: wrapped sublines can be indented to the position of their
5424 first subline or one more indent level. Possible values:</p>
5425 <ul class="simple">
5426 <li>0 - Wrapped sublines aligned to left of window plus amount set by the first argument</li>
5427 <li>1 - Wrapped sublines are aligned to first subline indent (use the same indentation)</li>
5428 <li>2 - Wrapped sublines are aligned to first subline indent plus one more level of indentation</li>
5429 </ul>
5430 <p>Only first and second arguments are interpreted.</p>
5431 <p class="last"><em>Example:</em> <tt class="docutils literal">line_wrap_indent=0;1;false;false</tt></p>
5432 </dd>
5433 <dt>translucency</dt>
5434 <dd><p class="first">Translucency for the current line (first argument) and the selection
5435 (second argument). Values between 0 and 256 are accepted.</p>
5436 <p>Note for Windows 95, 98 and ME users:
5437 keep this value at 256 to disable translucency otherwise Geany might crash.</p>
5438 <p>Only the first and second arguments are interpreted.</p>
5439 <p class="last"><em>Example:</em> <tt class="docutils literal">translucency=256;256;false;false</tt></p>
5440 </dd>
5441 <dt>marker_line</dt>
5442 <dd><p class="first">The style for a highlighted line (e.g when using Goto line or goto tag).
5443 The foreground color (first argument) is only used when the Markers margin
5444 is enabled (see View menu).</p>
5445 <p>Only the first and second arguments are interpreted.</p>
5446 <p class="last"><em>Example:</em> <tt class="docutils literal">marker_line=0x000000;0xffff00;false;false</tt></p>
5447 </dd>
5448 <dt>marker_search</dt>
5449 <dd><p class="first">The style for a marked search results (when using &quot;Mark&quot; in Search dialogs).
5450 The second argument sets the background color for the drawn rectangle.</p>
5451 <p>Only the second argument is interpreted.</p>
5452 <p class="last"><em>Example:</em> <tt class="docutils literal">marker_search=0x000000;0xb8f4b8;false;false</tt></p>
5453 </dd>
5454 <dt>marker_mark</dt>
5455 <dd><p class="first">The style for a marked line (e.g when using the &quot;Toggle Marker&quot; keybinding
5456 (Ctrl-M)). The foreground color (first argument) is only used
5457 when the Markers margin is enabled (see View menu).</p>
5458 <p>Only the first and second arguments are interpreted.</p>
5459 <p class="last"><em>Example:</em> <tt class="docutils literal">marker_mark=0x000000;0xb8f4b8;false;false</tt></p>
5460 </dd>
5461 <dt>marker_translucency</dt>
5462 <dd><p class="first">Translucency for the line marker (first argument) and the search marker
5463 (second argument). Values between 0 and 256 are accepted.</p>
5464 <p>Note for Windows 95, 98 and ME users:
5465 keep this value at 256 to disable translucency otherwise Geany might crash.</p>
5466 <p>Only the first and second arguments are interpreted.</p>
5467 <p class="last"><em>Example:</em> <tt class="docutils literal">marker_translucency=256;256;false;false</tt></p>
5468 </dd>
5469 <dt>line_height</dt>
5470 <dd><p class="first">Amount of space to be drawn above and below the line's baseline.
5471 The first argument defines the amount of space to be drawn above the line, the second
5472 argument defines the amount of space to be drawn below.</p>
5473 <p>Only the first and second arguments are interpreted.</p>
5474 <p class="last"><em>Example:</em> <tt class="docutils literal">line_height=0;0;false;false</tt></p>
5475 </dd>
5476 <dt>calltips</dt>
5477 <dd><p class="first">The style for coloring the calltips. The first two arguments
5478 define the foreground and background colors, the third and fourth
5479 arguments set whether to use the defined colors.</p>
5480 <p class="last"><em>Example:</em> <tt class="docutils literal">calltips=0xc0c0c0;0xffffff;false;false</tt></p>
5481 </dd>
5482 </dl>
5483 </div>
5484 <div class="section" id="id5">
5485 <h4><a class="toc-backref" href="#id206">[settings] section</a></h4>
5486 <dl class="docutils">
5487 <dt>whitespace_chars</dt>
5488 <dd><p class="first">Characters to treat as whitespace. These characters are ignored
5489 when moving, selecting and deleting across word boundaries
5490 (see <a class="reference internal" href="#scintilla-keyboard-commands">Scintilla keyboard commands</a>).</p>
5491 <p>This should include space (\s) and tab (\t).</p>
5492 <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>
5493 </dd>
5494 </dl>
5495 </div>
5496 </div>
5497 </div>
5498 <div class="section" id="filetype-extensions">
5499 <h2><a class="toc-backref" href="#id207">Filetype extensions</a></h2>
5500 <div class="note">
5501 <p class="first admonition-title">Note</p>
5502 <p class="last">To change the default filetype extension used when saving a new file,
5503 see <a class="reference internal" href="#filetype-definition-files">Filetype definition files</a>.</p>
5504 </div>
5505 <p>You can override the list of file extensions that Geany uses to detect
5506 filetypes using the user <tt class="docutils literal">filetype_extensions.conf</tt> file. Use the
5507 <em>Tools-&gt;Configuration Files-&gt;filetype_extensions.conf</em> menu item. See
5508 also <a class="reference internal" href="#configuration-file-paths">Configuration file paths</a>.</p>
5509 <p>You should only list lines for filetype extensions that you want to
5510 override in the user configuration file and remove or comment out
5511 others. The patterns are listed after the <tt class="docutils literal">=</tt> sign, using a
5512 semi-colon separated list of patterns which should be matched for
5513 that filetype.</p>
5514 <p>For example, to override the filetype extensions for Make, the file
5515 should look like:</p>
5516 <pre class="literal-block">
5517 [Extensions]
5518 Make=Makefile*;*.mk;Buildfile;
5519 </pre>
5520 <div class="section" id="filetype-group-membership">
5521 <h3><a class="toc-backref" href="#id208">Filetype group membership</a></h3>
5522 <p>Group membership is also stored in <tt class="docutils literal">filetype_extensions.conf</tt>. This
5523 file is used to store information Geany needs at startup, whereas the
5524 separate filetype definition files hold information only needed when
5525 a document with their filetype is used.</p>
5526 <p>The format looks like:</p>
5527 <pre class="literal-block">
5528 [Groups]
5529 Programming=C;C++;
5530 Script=Perl;Python;
5531 Markup=HTML;XML;
5532 Misc=Diff;Conf;
5533 None=None;
5534 </pre>
5535 <p>The key names cannot be configured.</p>
5536 <div class="note">
5537 <p class="first admonition-title">Note</p>
5538 <p class="last">Group membership is only read at startup.</p>
5539 </div>
5540 </div>
5541 </div>
5542 <div class="section" id="preferences-file-format">
5543 <h2><a class="toc-backref" href="#id209">Preferences file format</a></h2>
5544 <p>The user preferences file <tt class="docutils literal">geany.conf</tt> holds settings for all the items configured
5545 in the preferences dialog. This file should not be edited while Geany is running
5546 as the file will be overwritten when the preferences in Geany are changed or Geany
5547 is quit.</p>
5548 <div class="section" id="build-menu-section">
5549 <h3><a class="toc-backref" href="#id210">[build-menu] section</a></h3>
5550 <p>The [build-menu] section contains the configuration of the build menu.
5551 This section can occur in filetype, preferences and project files and
5552 always has the format described here. Different menu items are loaded
5553 from different files, see the table in the <a class="reference internal" href="#build-menu-configuration">Build Menu Configuration</a>
5554 section for details. All the settings can be configured from the dialogs
5555 except the execute command in filetype files and filetype definitions in
5556 the project file, so these are the only ones which need hand editing.</p>
5557 <p>The build-menu section stores one entry for each setting for each menu item that
5558 is configured. The keys for these settings have the format:</p>
5559 <blockquote>
5560 <tt class="docutils literal">GG_NN_FF</tt></blockquote>
5561 <p>where:</p>
5562 <ul class="simple">
5563 <li>GG - is the menu item group,<ul>
5564 <li>FT for filetype</li>
5565 <li>NF for independent (non-filetype)</li>
5566 <li>EX for execute</li>
5567 </ul>
5568 </li>
5569 <li>NN - is a two decimal digit number of the item within the group,
5570 starting at 00</li>
5571 <li>FF - is the field,<ul>
5572 <li>LB for label</li>
5573 <li>CM for command</li>
5574 <li>WD for working directory</li>
5575 </ul>
5576 </li>
5577 </ul>
5578 </div>
5579 </div>
5580 <div class="section" id="project-file-format">
5581 <h2><a class="toc-backref" href="#id211">Project file format</a></h2>
5582 <p>The project file contains project related settings and possibly a
5583 record of the current session files.</p>
5584 <div class="section" id="build-menu-additions">
5585 <h3><a class="toc-backref" href="#id212">[build-menu] additions</a></h3>
5586 <p>The project file also can have extra fields in the [build-menu] section
5587 in addition to those listed in <a class="reference internal" href="#build-menu-section">[build-menu] section</a> above.</p>
5588 <p>When filetype menu items are configured for the project they are stored
5589 in the project file.</p>
5590 <p>The <tt class="docutils literal">filetypes</tt> entry is a list of the filetypes which exist in the
5591 project file.</p>
5592 <p>For each filetype the entries for that filetype have the format defined in
5593 <a class="reference internal" href="#build-menu-section">[build-menu] section</a> but the key is prefixed by the name of the filetype
5594 as it appears in the <tt class="docutils literal">filetypes</tt> entry, eg the entry for the label of
5595 filetype menu item 0 for the C filetype would be</p>
5596 <blockquote>
5597 <tt class="docutils literal">CFT_00_LB=Label</tt></blockquote>
5598 </div>
5599 </div>
5600 <div class="section" id="templates">
5601 <h2><a class="toc-backref" href="#id213">Templates</a></h2>
5602 <p>Geany supports the following templates:</p>
5603 <ul class="simple">
5604 <li>ChangeLog entry</li>
5605 <li>File header</li>
5606 <li>Function description</li>
5607 <li>Short GPL notice</li>
5608 <li>Short BSD notice</li>
5609 <li>File templates</li>
5610 </ul>
5611 <p>To use these templates, just open the Edit menu or open the popup menu
5612 by right-clicking in the editor widget, and choose &quot;Insert Comments&quot;
5613 and insert templates as you want.</p>
5614 <p>Some templates (like File header or ChangeLog entry) will always be
5615 inserted at the top of the file.</p>
5616 <p>To insert a function description, the cursor must be inside
5617 of the function, so that the function name can be determined
5618 automatically. The description will be positioned correctly one line
5619 above the function, just check it out. If the cursor is not inside
5620 of a function or the function name cannot be determined, the inserted
5621 function description won't contain the correct function name but &quot;unknown&quot;
5622 instead.</p>
5623 <div class="note">
5624 <p class="first admonition-title">Note</p>
5625 <p class="last">Geany automatically reloads template information when it notices you
5626 save a file in the user's template configuration directory. You can
5627 also force this by selecting <em>Tools-&gt;Reload Configuration</em>.</p>
5628 </div>
5629 <div class="section" id="template-meta-data">
5630 <h3><a class="toc-backref" href="#id214">Template meta data</a></h3>
5631 <p>Meta data can be used with all templates, but by default user set
5632 meta data is only used for the ChangeLog and File header templates.</p>
5633 <p>In the configuration dialog you can find a tab &quot;Templates&quot; (see
5634 <a class="reference internal" href="#template-preferences">Template preferences</a>). You can define the default values
5635 which will be inserted in the templates.</p>
5636 </div>
5637 <div class="section" id="file-templates">
5638 <h3><a class="toc-backref" href="#id215">File templates</a></h3>
5639 <p>File templates are templates used as the basis of a new file. To
5640 use them, choose the <em>New (with Template)</em> menu item from the <em>File</em>
5641 menu.</p>
5642 <p>By default, file templates are installed for some filetypes. Custom
5643 file templates can be added by creating the appropriate template file. You can
5644 also edit the default file templates.</p>
5645 <p>The file's contents are just the text to place in the document, with
5646 optional template wildcards like <tt class="docutils literal">{fileheader}</tt>. The fileheader
5647 wildcard can be placed anywhere, but it's usually put on the first
5648 line of the file, followed by a blank line.</p>
5649 <div class="section" id="adding-file-templates">
5650 <h4><a class="toc-backref" href="#id216">Adding file templates</a></h4>
5651 <p>File templates are read from <tt class="docutils literal">templates/files</tt> under the
5652 <a class="reference internal" href="#configuration-file-paths">Configuration file paths</a>.</p>
5653 <p>The filetype to use is detected from the template file's extension, if
5654 any. For example, creating a file <tt class="docutils literal">module.c</tt> would add a menu item
5655 which created a new document with the filetype set to 'C'.</p>
5656 <p>The template file is read from disk when the corresponding menu item is
5657 clicked.</p>
5658 </div>
5659 </div>
5660 <div class="section" id="customizing-templates">
5661 <h3><a class="toc-backref" href="#id217">Customizing templates</a></h3>
5662 <p>Each template can be customized to your needs. The templates are
5663 stored in the <tt class="docutils literal"><span class="pre">~/.config/geany/templates/</span></tt> directory (see the section called
5664 <a class="reference internal" href="#command-line-options">Command line options</a> for further information about the configuration
5665 directory). Just open the desired template with an editor (ideally,
5666 Geany ;-) ) and edit the template to your needs. There are some
5667 wildcards which will be automatically replaced by Geany at startup.</p>
5668 <div class="section" id="template-wildcards">
5669 <h4><a class="toc-backref" href="#id218">Template wildcards</a></h4>
5670 <p>All wildcards must be enclosed by &quot;{&quot; and &quot;}&quot;, e.g. {date}.</p>
5671 <p><strong>Wildcards for character escaping</strong></p>
5672 <table border="1" class="docutils">
5673 <colgroup>
5674 <col width="14%" />
5675 <col width="46%" />
5676 <col width="40%" />
5677 </colgroup>
5678 <thead valign="bottom">
5679 <tr><th class="head">Wildcard</th>
5680 <th class="head">Description</th>
5681 <th class="head">Available in</th>
5682 </tr>
5683 </thead>
5684 <tbody valign="top">
5685 <tr><td>ob</td>
5686 <td>{ Opening Brace (used to prevent other
5687 wildcards being expanded).</td>
5688 <td>file templates, file header, snippets.</td>
5689 </tr>
5690 <tr><td>cb</td>
5691 <td>} Closing Brace.</td>
5692 <td>file templates, file header, snippets.</td>
5693 </tr>
5694 <tr><td>pc</td>
5695 <td>% Percent (used to escape e.g. %block% in
5696 snippets).</td>
5697 <td>snippets.</td>
5698 </tr>
5699 </tbody>
5700 </table>
5701 <p><strong>Global wildcards</strong></p>
5702 <p>These are configurable, see <a class="reference internal" href="#template-preferences">Template preferences</a>.</p>
5703 <table border="1" class="docutils">
5704 <colgroup>
5705 <col width="14%" />
5706 <col width="46%" />
5707 <col width="40%" />
5708 </colgroup>
5709 <thead valign="bottom">
5710 <tr><th class="head">Wildcard</th>
5711 <th class="head">Description</th>
5712 <th class="head">Available in</th>
5713 </tr>
5714 </thead>
5715 <tbody valign="top">
5716 <tr><td>developer</td>
5717 <td>The name of the developer.</td>
5718 <td>file templates, file header,
5719 function description, ChangeLog entry,
5720 bsd, gpl, snippets.</td>
5721 </tr>
5722 <tr><td>initial</td>
5723 <td>The developer's initials, e.g. &quot;ET&quot; for
5724 Enrico Tröger or &quot;JFD&quot; for John Foobar Doe.</td>
5725 <td>file templates, file header,
5726 function description, ChangeLog entry,
5727 bsd, gpl, snippets.</td>
5728 </tr>
5729 <tr><td>mail</td>
5730 <td>The email address of the developer.</td>
5731 <td>file templates, file header,
5732 function description, ChangeLog entry,
5733 bsd, gpl, snippets.</td>
5734 </tr>
5735 <tr><td>company</td>
5736 <td>The company the developer is working for.</td>
5737 <td>file templates, file header,
5738 function description, ChangeLog entry,
5739 bsd, gpl, snippets.</td>
5740 </tr>
5741 <tr><td>version</td>
5742 <td>The initial version of a new file.</td>
5743 <td>file templates, file header,
5744 function description, ChangeLog entry,
5745 bsd, gpl, snippets.</td>
5746 </tr>
5747 </tbody>
5748 </table>
5749 <p><strong>Date &amp; time wildcards</strong></p>
5750 <p>The format for these wildcards can be changed in the preferences
5751 dialog, see <a class="reference internal" href="#template-preferences">Template preferences</a>. You can use any conversion
5752 specifiers which can be used with the ANSI C strftime function.
5753 For details please see <a class="reference external" href="http://man.cx/strftime">http://man.cx/strftime</a>.</p>
5754 <table border="1" class="docutils">
5755 <colgroup>
5756 <col width="14%" />
5757 <col width="46%" />
5758 <col width="40%" />
5759 </colgroup>
5760 <thead valign="bottom">
5761 <tr><th class="head">Wildcard</th>
5762 <th class="head">Description</th>
5763 <th class="head">Available in</th>
5764 </tr>
5765 </thead>
5766 <tbody valign="top">
5767 <tr><td>year</td>
5768 <td>The current year. Default format is: YYYY.</td>
5769 <td>file templates, file header,
5770 function description, ChangeLog entry,
5771 bsd, gpl, snippets.</td>
5772 </tr>
5773 <tr><td>date</td>
5774 <td>The current date. Default format:
5775 YYYY-MM-DD.</td>
5776 <td>file templates, file header,
5777 function description, ChangeLog entry,
5778 bsd, gpl, snippets.</td>
5779 </tr>
5780 <tr><td>datetime</td>
5781 <td>The current date and time. Default format:
5782 DD.MM.YYYY HH:mm:ss ZZZZ.</td>
5783 <td>file templates, file header,
5784 function description, ChangeLog entry,
5785 bsd, gpl, snippets.</td>
5786 </tr>
5787 </tbody>
5788 </table>
5789 <p><strong>Dynamic wildcards</strong></p>
5790 <table border="1" class="docutils">
5791 <colgroup>
5792 <col width="14%" />
5793 <col width="46%" />
5794 <col width="40%" />
5795 </colgroup>
5796 <thead valign="bottom">
5797 <tr><th class="head">Wildcard</th>
5798 <th class="head">Description</th>
5799 <th class="head">Available in</th>
5800 </tr>
5801 </thead>
5802 <tbody valign="top">
5803 <tr><td>untitled</td>
5804 <td>The string &quot;untitled&quot; (this will be
5805 translated to your locale), used in
5806 file templates.</td>
5807 <td>file templates, file header,
5808 function description, ChangeLog entry,
5809 bsd, gpl, snippets.</td>
5810 </tr>
5811 <tr><td>geanyversion</td>
5812 <td>The actual Geany version, e.g.
5813 &quot;Geany 1.24.1&quot;.</td>
5814 <td>file templates, file header,
5815 function description, ChangeLog entry,
5816 bsd, gpl, snippets.</td>
5817 </tr>
5818 <tr><td>filename</td>
5819 <td>The filename of the current file.
5820 For new files, it's only replaced when
5821 first saving if found on the first 4 lines
5822 of the file.</td>
5823 <td>file header, snippets, file
5824 templates.</td>
5825 </tr>
5826 <tr><td>project</td>
5827 <td>The current project's name, if any.</td>
5828 <td>file header, snippets, file templates.</td>
5829 </tr>
5830 <tr><td>description</td>
5831 <td>The current project's description, if any.</td>
5832 <td>file header, snippets, file templates.</td>
5833 </tr>
5834 <tr><td>functionname</td>
5835 <td>The function name of the function at the
5836 cursor position. This wildcard will only be
5837 replaced in the function description
5838 template.</td>
5839 <td>function description.</td>
5840 </tr>
5841 <tr><td>command:path</td>
5842 <td>Executes the specified command and replace
5843 the wildcard with the command's standard
5844 output. See <a class="reference internal" href="#special-command-wildcard">Special {command:} wildcard</a>
5845 for details.</td>
5846 <td>file templates, file header,
5847 function description, ChangeLog entry,
5848 bsd, gpl, snippets.</td>
5849 </tr>
5850 </tbody>
5851 </table>
5852 <p><strong>Template insertion wildcards</strong></p>
5853 <table border="1" class="docutils">
5854 <colgroup>
5855 <col width="14%" />
5856 <col width="46%" />
5857 <col width="40%" />
5858 </colgroup>
5859 <thead valign="bottom">
5860 <tr><th class="head">Wildcard</th>
5861 <th class="head">Description</th>
5862 <th class="head">Available in</th>
5863 </tr>
5864 </thead>
5865 <tbody valign="top">
5866 <tr><td>gpl</td>
5867 <td>This wildcard inserts a short GPL notice.</td>
5868 <td>file header.</td>
5869 </tr>
5870 <tr><td>bsd</td>
5871 <td>This wildcard inserts a BSD licence notice.</td>
5872 <td>file header.</td>
5873 </tr>
5874 <tr><td>fileheader</td>
5875 <td>The file header template. This wildcard
5876 will only be replaced in file templates.</td>
5877 <td>snippets, file templates.</td>
5878 </tr>
5879 </tbody>
5880 </table>
5881 <div class="section" id="special-command-wildcard">
5882 <h5><a class="toc-backref" href="#id219">Special {command:} wildcard</a></h5>
5883 <p>The {command:} wildcard is a special one because it can execute
5884 a specified command and put the command's output (stdout) into
5885 the template.</p>
5886 <p>Example:</p>
5887 <pre class="literal-block">
5888 {command:uname -a}
5889 </pre>
5890 <p>will result in:</p>
5891 <pre class="literal-block">
5892 Linux localhost 2.6.9-023stab046.2-smp #1 SMP Mon Dec 10 15:04:55 MSK 2007 x86_64 GNU/Linux
5893 </pre>
5894 <p>Using this wildcard you can insert nearly any arbitrary text into the
5895 template.</p>
5896 <p>In the environment of the executed command the variables
5897 <tt class="docutils literal">GEANY_FILENAME</tt>, <tt class="docutils literal">GEANY_FILETYPE</tt> and <tt class="docutils literal">GEANY_FUNCNAME</tt> are set.
5898 The value of these variables is filled in only if Geany knows about it.
5899 For example, <tt class="docutils literal">GEANY_FUNCNAME</tt> is only filled within the function
5900 description template. However, these variables are <tt class="docutils literal">always</tt> set,
5901 just maybe with an empty value.
5902 You can easily access them e.g. within an executed shell script using:</p>
5903 <pre class="literal-block">
5904 $GEANY_FILENAME
5905 </pre>
5906 <div class="note">
5907 <p class="first admonition-title">Note</p>
5908 <p class="last">If the specified command could not be found or not executed, the wildcard is substituted
5909 by an empty string. In such cases, you can find the occurred error message on Geany's
5910 standard error and in the Help-&gt;Debug Messages dialog.</p>
5911 </div>
5912 </div>
5913 </div>
5914 </div>
5915 </div>
5916 <div class="section" id="customizing-the-toolbar">
5917 <h2><a class="toc-backref" href="#id220">Customizing the toolbar</a></h2>
5918 <p>You can add, remove and reorder the elements in the toolbar by using
5919 the toolbar editor, or by manually editing the configuration file
5920 <tt class="docutils literal">ui_toolbar.xml</tt>.</p>
5921 <p>The toolbar editor can be opened from the preferences editor on the Toolbar tab or
5922 by right-clicking on the toolbar itself and choosing it from the menu.</p>
5923 <div class="section" id="manually-editing-the-toolbar-layout">
5924 <h3><a class="toc-backref" href="#id221">Manually editing the toolbar layout</a></h3>
5925 <p>To override the system-wide configuration file, copy it to your user
5926 configuration directory (see <a class="reference internal" href="#configuration-file-paths">Configuration file paths</a>).</p>
5927 <p>For example:</p>
5928 <pre class="literal-block">
5929 % cp /usr/local/share/geany/ui_toolbar.xml /home/username/.config/geany/
5930 </pre>
5931 <p>Then edit it and add any of the available elements listed in the file or remove
5932 any of the existing elements. Of course, you can also reorder the elements as
5933 you wish and add or remove additional separators.
5934 This file must be valid XML, otherwise the global toolbar UI definition
5935 will be used instead.</p>
5936 <p>Your changes are applied once you save the file.</p>
5937 <div class="note">
5938 <p class="first admonition-title">Note</p>
5939 <ol class="last arabic simple">
5940 <li>You cannot add new actions which are not listed below.</li>
5941 <li>Everything you add or change must be inside the /ui/toolbar/ path.</li>
5942 </ol>
5943 </div>
5944 </div>
5945 <div class="section" id="available-toolbar-elements">
5946 <h3><a class="toc-backref" href="#id222">Available toolbar elements</a></h3>
5947 <table border="1" class="docutils">
5948 <colgroup>
5949 <col width="19%" />
5950 <col width="81%" />
5951 </colgroup>
5952 <thead valign="bottom">
5953 <tr><th class="head">Element name</th>
5954 <th class="head">Description</th>
5955 </tr>
5956 </thead>
5957 <tbody valign="top">
5958 <tr><td>New</td>
5959 <td>Create a new file</td>
5960 </tr>
5961 <tr><td>Open</td>
5962 <td>Open an existing file</td>
5963 </tr>
5964 <tr><td>Save</td>
5965 <td>Save the current file</td>
5966 </tr>
5967 <tr><td>SaveAll</td>
5968 <td>Save all open files</td>
5969 </tr>
5970 <tr><td>Reload</td>
5971 <td>Reload the current file from disk</td>
5972 </tr>
5973 <tr><td>Close</td>
5974 <td>Close the current file</td>
5975 </tr>
5976 <tr><td>CloseAll</td>
5977 <td>Close all open files</td>
5978 </tr>
5979 <tr><td>Print</td>
5980 <td>Print the current file</td>
5981 </tr>
5982 <tr><td>Cut</td>
5983 <td>Cut the current selection</td>
5984 </tr>
5985 <tr><td>Copy</td>
5986 <td>Copy the current selection</td>
5987 </tr>
5988 <tr><td>Paste</td>
5989 <td>Paste the contents of the clipboard</td>
5990 </tr>
5991 <tr><td>Delete</td>
5992 <td>Delete the current selection</td>
5993 </tr>
5994 <tr><td>Undo</td>
5995 <td>Undo the last modification</td>
5996 </tr>
5997 <tr><td>Redo</td>
5998 <td>Redo the last modification</td>
5999 </tr>
6000 <tr><td>NavBack</td>
6001 <td>Navigate back a location</td>
6002 </tr>
6003 <tr><td>NavFor</td>
6004 <td>Navigate forward a location</td>
6005 </tr>
6006 <tr><td>Compile</td>
6007 <td>Compile the current file</td>
6008 </tr>
6009 <tr><td>Build</td>
6010 <td>Build the current file, includes a submenu for Make commands. Geany
6011 remembers the last chosen action from the submenu and uses this as default
6012 action when the button itself is clicked.</td>
6013 </tr>
6014 <tr><td>Run</td>
6015 <td>Run or view the current file</td>
6016 </tr>
6017 <tr><td>Color</td>
6018 <td>Open a color chooser dialog, to interactively pick colors from a palette</td>
6019 </tr>
6020 <tr><td>ZoomIn</td>
6021 <td>Zoom in the text</td>
6022 </tr>
6023 <tr><td>ZoomOut</td>
6024 <td>Zoom out the text</td>
6025 </tr>
6026 <tr><td>UnIndent</td>
6027 <td>Decrease indentation</td>
6028 </tr>
6029 <tr><td>Indent</td>
6030 <td>Increase indentation</td>
6031 </tr>
6032 <tr><td>Replace</td>
6033 <td>Replace text in the current document</td>
6034 </tr>
6035 <tr><td>SearchEntry</td>
6036 <td>The search field belonging to the 'Search' element (can be used alone)</td>
6037 </tr>
6038 <tr><td>Search</td>
6039 <td>Find the entered text in the current file (only useful if you also
6040 use 'SearchEntry')</td>
6041 </tr>
6042 <tr><td>GotoEntry</td>
6043 <td>The goto field belonging to the 'Goto' element (can be used alone)</td>
6044 </tr>
6045 <tr><td>Goto</td>
6046 <td>Jump to the entered line number (only useful if you also use 'GotoEntry')</td>
6047 </tr>
6048 <tr><td>Preferences</td>
6049 <td>Show the preferences dialog</td>
6050 </tr>
6051 <tr><td>Quit</td>
6052 <td>Quit Geany</td>
6053 </tr>
6054 </tbody>
6055 </table>
6056 </div>
6057 </div>
6058 </div>
6059 <div class="section" id="plugin-documentation">
6060 <h1><a class="toc-backref" href="#id223">Plugin documentation</a></h1>
6061 <div class="section" id="html-characters">
6062 <h2><a class="toc-backref" href="#id224">HTML Characters</a></h2>
6063 <p>The HTML Characters plugin helps when working with special
6064 characters in XML/HTML, e.g. German Umlauts ü and ä.</p>
6065 <div class="section" id="insert-entity-dialog">
6066 <h3><a class="toc-backref" href="#id225">Insert entity dialog</a></h3>
6067 <p>When the plugin is enabled, you can insert special character
6068 entities using <em>Tools-&gt;Insert Special HTML Characters</em>.</p>
6069 <p>This opens up a dialog where you can find a huge amount of special
6070 characters sorted by category that you might like to use inside your
6071 document. You can expand and collapse the categories by clicking on
6072 the little arrow on the left hand side. Once you have found the
6073 desired character click on it and choose &quot;Insert&quot;. This will insert
6074 the entity for the character at the current cursor position. You
6075 might also like to double click the chosen entity instead.</p>
6076 </div>
6077 <div class="section" id="replace-special-chars-by-its-entity">
6078 <h3><a class="toc-backref" href="#id226">Replace special chars by its entity</a></h3>
6079 <p>To help make a XML/HTML document valid the plugin supports
6080 replacement of special chars known by the plugin. Both bulk
6081 replacement and immediate replacement during typing are supported.</p>
6082 <dl class="docutils">
6083 <dt>A few characters will not be replaced. These are</dt>
6084 <dd><ul class="first last simple">
6085 <li>&quot;</li>
6086 <li>&amp;</li>
6087 <li>&lt;</li>
6088 <li>&gt;</li>
6089 <li>(<cite>&amp;nbsp;</cite>)</li>
6090 </ul>
6091 </dd>
6092 </dl>
6093 <div class="section" id="at-typing-time">
6094 <h4><a class="toc-backref" href="#id227">At typing time</a></h4>
6095 <p>You can activate/deactivate this feature using the <em>Tools-&gt;HTML
6096 Replacement-&gt;Auto-replace Special Characters</em> menu item. If it's
6097 activated, all special characters (beside the given exceptions from
6098 above) known by the plugin will be replaced by their entities.</p>
6099 <p>You could also set a keybinding for the plugin to toggle the status
6100 of this feature.</p>
6101 </div>
6102 <div class="section" id="bulk-replacement">
6103 <h4><a class="toc-backref" href="#id228">Bulk replacement</a></h4>
6104 <p>After inserting a huge amount of text, e.g. by using copy &amp; paste, the
6105 plugin allows bulk replacement of all known characters (beside the
6106 mentioned exceptions). You can find the function under the same
6107 menu at <em>Tools-&gt;HTML Replacement-&gt;Replace Characters in Selection</em>, or
6108 configure a keybinding for the plugin.</p>
6109 </div>
6110 </div>
6111 </div>
6112 <div class="section" id="save-actions">
6113 <h2><a class="toc-backref" href="#id229">Save Actions</a></h2>
6114 <div class="section" id="auto-save">
6115 <h3><a class="toc-backref" href="#id230">Auto Save</a></h3>
6116 <p>This plugin provides an option to automatically save documents.
6117 You can choose to save the current document, or all of your documents, at
6118 a given delay.</p>
6119 </div>
6120 <div class="section" id="save-on-focus-out">
6121 <h3><a class="toc-backref" href="#id231">Save on focus out</a></h3>
6122 <p>You can save the current document when the editor's focus goes out.
6123 Every pop-up, menu dialogs, or anything else that can make the editor lose the focus,
6124 will make the current document to be saved.</p>
6125 </div>
6126 <div class="section" id="instant-save">
6127 <h3><a class="toc-backref" href="#id232">Instant Save</a></h3>
6128 <p>This plugin sets on every new file (<em>File-&gt;New</em> or <em>File-&gt;New (with template)</em>)
6129 a randomly chosen filename and set its filetype appropriate to the used template
6130 or when no template was used, to a configurable default filetype.
6131 This enables you to quickly compile, build and/or run the new file without the
6132 need to give it an explicit filename using the Save As dialog. This might be
6133 useful when you often create new files just for testing some code or something
6134 similar.</p>
6135 </div>
6136 <div class="section" id="backup-copy">
6137 <h3><a class="toc-backref" href="#id233">Backup Copy</a></h3>
6138 <p>This plugin creates a backup copy of the current file in Geany when it is
6139 saved. You can specify the directory where the backup copy is saved and
6140 you can configure the automatically added extension in the configure dialog
6141 in Geany's plugin manager.</p>
6142 <p>After the plugin was loaded in Geany's plugin manager, every file is
6143 copied into the configured backup directory when the file is saved in Geany.</p>
6144 </div>
6145 </div>
6146 </div>
6147 <div class="section" id="contributing-to-this-document">
6148 <h1><a class="toc-backref" href="#id234">Contributing to this document</a></h1>
6149 <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>
6150 (or &quot;reST&quot;). The source file for it is located in Geany's <tt class="docutils literal">doc</tt>
6151 subdirectory. If you intend on making changes, you should grab the
6152 source right from Git to make sure you've got the newest version. After
6153 editing the file, to build the HTML document to see how your changes
6154 look, run &quot;<tt class="docutils literal">make doc</tt>&quot; in the subdirectory <tt class="docutils literal">doc</tt> of Geany's source
6155 directory. This regenerates the <tt class="docutils literal">geany.html</tt> file. To generate a PDF
6156 file, use the command &quot;<tt class="docutils literal">make pdf</tt>&quot; which should generate a file called
6157 geany-1.24.1.pdf.</p>
6158 <p>After you are happy with your changes, create a patch e.g. by using:</p>
6159 <pre class="literal-block">
6160 % git diff geany.txt &gt; foo.patch
6161 </pre>
6162 <p>or even better, by creating a Git-formatted patch which will keep authoring
6163 and description data, by first committing your changes (doing so in a fresh
6164 new branch is recommended for <cite>matser</cite> not to diverge from upstream) and then
6165 using git format-patch:</p>
6166 <pre class="literal-block">
6167 % git checkout -b my-documentation-changes # create a fresh branch
6168 % git commit geany.txt
6169 Write a good commit message...
6170 % git format-patch HEAD^
6171 % git checkout master # go back to master
6172 </pre>
6173 <p>and then submit that file to the mailing list for review.</p>
6174 <p>Also you can clone the Geany repository at GitHub and send a pull request.</p>
6175 <p>Note, you will need the Python docutils software package installed
6176 to build the docs. The package is named <tt class="docutils literal"><span class="pre">python-docutils</span></tt> on Debian
6177 and Fedora systems.</p>
6178 </div>
6179 <div class="section" id="scintilla-keyboard-commands">
6180 <h1><a class="toc-backref" href="#id235">Scintilla keyboard commands</a></h1>
6181 <p>Copyright © 1998, 2006 Neil Hodgson &lt;neilh(at)scintilla(dot)org&gt;</p>
6182 <p>This appendix is distributed under the terms of the License for
6183 Scintilla and SciTE. A copy of this license can be found in the file
6184 <tt class="docutils literal">scintilla/License.txt</tt> included with the source code of this
6185 program and in the appendix of this document. See <a class="reference internal" href="#license-for-scintilla-and-scite">License for
6186 Scintilla and SciTE</a>.</p>
6187 <p>20 June 2006</p>
6188 <div class="section" id="keyboard-commands">
6189 <h2><a class="toc-backref" href="#id236">Keyboard commands</a></h2>
6190 <p>Keyboard commands for Scintilla mostly follow common Windows and GTK+
6191 conventions. All move keys (arrows, page up/down, home and end)
6192 allows to extend or reduce the stream selection when holding the
6193 Shift key, and the rectangular selection when holding the
6194 appropriate keys (see <a class="reference internal" href="#column-mode-editing-rectangular-selections">Column mode editing (rectangular selections)</a>).</p>
6195 <p>Some keys may not be available with some national keyboards
6196 or because they are taken by the system such as by a window manager
6197 or GTK. Keyboard equivalents of menu commands are listed in the
6198 menus. Some less common commands with no menu equivalent are:</p>
6199 <table border="1" class="docutils">
6200 <colgroup>
6201 <col width="67%" />
6202 <col width="33%" />
6203 </colgroup>
6204 <thead valign="bottom">
6205 <tr><th class="head">Action</th>
6206 <th class="head">Shortcut key</th>
6207 </tr>
6208 </thead>
6209 <tbody valign="top">
6210 <tr><td>Magnify text size.</td>
6211 <td>Ctrl-Keypad+</td>
6212 </tr>
6213 <tr><td>Reduce text size.</td>
6214 <td>Ctrl-Keypad-</td>
6215 </tr>
6216 <tr><td>Restore text size to normal.</td>
6217 <td>Ctrl-Keypad/</td>
6218 </tr>
6219 <tr><td>Indent block.</td>
6220 <td>Tab</td>
6221 </tr>
6222 <tr><td>Dedent block.</td>
6223 <td>Shift-Tab</td>
6224 </tr>
6225 <tr><td>Delete to start of word.</td>
6226 <td>Ctrl-BackSpace</td>
6227 </tr>
6228 <tr><td>Delete to end of word.</td>
6229 <td>Ctrl-Delete</td>
6230 </tr>
6231 <tr><td>Delete to start of line.</td>
6232 <td>Ctrl-Shift-BackSpace</td>
6233 </tr>
6234 <tr><td>Go to start of document.</td>
6235 <td>Ctrl-Home</td>
6236 </tr>
6237 <tr><td>Extend selection to start of document.</td>
6238 <td>Ctrl-Shift-Home</td>
6239 </tr>
6240 <tr><td>Go to start of display line.</td>
6241 <td>Alt-Home</td>
6242 </tr>
6243 <tr><td>Extend selection to start of display line.</td>
6244 <td>Alt-Shift-Home</td>
6245 </tr>
6246 <tr><td>Go to end of document.</td>
6247 <td>Ctrl-End</td>
6248 </tr>
6249 <tr><td>Extend selection to end of document.</td>
6250 <td>Ctrl-Shift-End</td>
6251 </tr>
6252 <tr><td>Extend selection to end of display line.</td>
6253 <td>Alt-Shift-End</td>
6254 </tr>
6255 <tr><td>Previous paragraph. Shift extends selection.</td>
6256 <td>Ctrl-Up</td>
6257 </tr>
6258 <tr><td>Next paragraph. Shift extends selection.</td>
6259 <td>Ctrl-Down</td>
6260 </tr>
6261 <tr><td>Previous word. Shift extends selection.</td>
6262 <td>Ctrl-Left</td>
6263 </tr>
6264 <tr><td>Next word. Shift extends selection.</td>
6265 <td>Ctrl-Right</td>
6266 </tr>
6267 </tbody>
6268 </table>
6269 </div>
6270 </div>
6271 <div class="section" id="tips-and-tricks">
6272 <h1><a class="toc-backref" href="#id237">Tips and tricks</a></h1>
6273 <div class="section" id="document-notebook">
6274 <h2><a class="toc-backref" href="#id238">Document notebook</a></h2>
6275 <ul class="simple">
6276 <li>Double-click on empty space in the notebook tab bar to open a
6277 new document.</li>
6278 <li>Middle-click on a document's notebook tab to close the document.</li>
6279 <li>Hold <cite>Ctrl</cite> and click on any notebook tab to switch to the last used
6280 document.</li>
6281 <li>Double-click on a document's notebook tab to toggle all additional
6282 widgets (to show them again use the View menu or the keyboard
6283 shortcut). The interface pref must be enabled for this to work.</li>
6284 </ul>
6285 </div>
6286 <div class="section" id="editor">
6287 <h2><a class="toc-backref" href="#id239">Editor</a></h2>
6288 <ul class="simple">
6289 <li>Alt-scroll wheel moves up/down a page.</li>
6290 <li>Ctrl-scroll wheel zooms in/out.</li>
6291 <li>Shift-scroll wheel scrolls 8 characters right/left.</li>
6292 <li>Ctrl-click on a word in a document to perform <em>Go to Tag Definition</em>.</li>
6293 <li>Ctrl-click on a bracket/brace to perform <em>Go to Matching Brace</em>.</li>
6294 </ul>
6295 </div>
6296 <div class="section" id="interface">
6297 <h2><a class="toc-backref" href="#id240">Interface</a></h2>
6298 <ul class="simple">
6299 <li>Double-click on a symbol-list group to expand or compact it.</li>
6300 </ul>
6301 </div>
6302 <div class="section" id="gtk-related">
6303 <h2><a class="toc-backref" href="#id241">GTK-related</a></h2>
6304 <ul class="simple">
6305 <li>Scrolling the mouse wheel over a notebook tab bar will switch
6306 notebook pages.</li>
6307 </ul>
6308 <p>The following are derived from X-Windows features (but GTK still supports
6309 them on Windows):</p>
6310 <ul class="simple">
6311 <li>Middle-click pastes the last selected text.</li>
6312 <li>Middle-click on a scrollbar moves the scrollbar to that
6313 position without having to drag it.</li>
6314 </ul>
6315 </div>
6316 </div>
6317 <div class="section" id="compile-time-options">
6318 <h1><a class="toc-backref" href="#id242">Compile-time options</a></h1>
6319 <p>There are some options which can only be changed at compile time,
6320 and some options which are used as the default for configurable
6321 options. To change these options, edit the appropriate source file
6322 in the <tt class="docutils literal">src</tt> subdirectory. Look for a block of lines starting with
6323 <tt class="docutils literal">#define GEANY_*</tt>. Any definitions which are not listed here should
6324 not be changed.</p>
6325 <div class="note">
6326 <p class="first admonition-title">Note</p>
6327 <p class="last">Most users should not need to change these options.</p>
6328 </div>
6329 <div class="section" id="src-geany-h">
6330 <h2><a class="toc-backref" href="#id243">src/geany.h</a></h2>
6331 <table border="1" class="docutils">
6332 <colgroup>
6333 <col width="33%" />
6334 <col width="48%" />
6335 <col width="20%" />
6336 </colgroup>
6337 <thead valign="bottom">
6338 <tr><th class="head">Option</th>
6339 <th class="head">Description</th>
6340 <th class="head">Default</th>
6341 </tr>
6342 </thead>
6343 <tbody valign="top">
6344 <tr><td>GEANY_STRING_UNTITLED</td>
6345 <td>A string used as the default name for new
6346 files. Be aware that the string can be
6347 translated, so change it only if you know
6348 what you are doing.</td>
6349 <td>untitled</td>
6350 </tr>
6351 <tr><td>GEANY_WINDOW_MINIMAL_WIDTH</td>
6352 <td>The minimal width of the main window.</td>
6353 <td>620</td>
6354 </tr>
6355 <tr><td>GEANY_WINDOW_MINIMAL_HEIGHT</td>
6356 <td>The minimal height of the main window.</td>
6357 <td>440</td>
6358 </tr>
6359 <tr><td>GEANY_WINDOW_DEFAULT_WIDTH</td>
6360 <td>The default width of the main window at the
6361 first start.</td>
6362 <td>900</td>
6363 </tr>
6364 <tr><td>GEANY_WINDOW_DEFAULT_HEIGHT</td>
6365 <td>The default height of the main window at the
6366 first start.</td>
6367 <td>600</td>
6368 </tr>
6369 <tr><td><strong>Windows specific</strong></td>
6370 <td>&nbsp;</td>
6371 <td>&nbsp;</td>
6372 </tr>
6373 <tr><td>GEANY_USE_WIN32_DIALOG</td>
6374 <td>Set this to 1 if you want to use the default
6375 Windows file open and save dialogs instead
6376 GTK's file open and save dialogs. The
6377 default Windows file dialogs are missing
6378 some nice features like choosing a filetype
6379 or an encoding. <em>Do not touch this setting
6380 when building on a non-Win32 system.</em></td>
6381 <td>0</td>
6382 </tr>
6383 </tbody>
6384 </table>
6385 </div>
6386 <div class="section" id="project-h">
6387 <h2><a class="toc-backref" href="#id244">project.h</a></h2>
6388 <table border="1" class="docutils">
6389 <colgroup>
6390 <col width="33%" />
6391 <col width="48%" />
6392 <col width="20%" />
6393 </colgroup>
6394 <thead valign="bottom">
6395 <tr><th class="head">Option</th>
6396 <th class="head">Description</th>
6397 <th class="head">Default</th>
6398 </tr>
6399 </thead>
6400 <tbody valign="top">
6401 <tr><td>GEANY_PROJECT_EXT</td>
6402 <td>The default filename extension for Geany
6403 project files. It is used when creating new
6404 projects and as filter mask for the project
6405 open dialog.</td>
6406 <td>geany</td>
6407 </tr>
6408 </tbody>
6409 </table>
6410 </div>
6411 <div class="section" id="filetypes-c">
6412 <h2><a class="toc-backref" href="#id245">filetypes.c</a></h2>
6413 <table border="1" class="docutils">
6414 <colgroup>
6415 <col width="33%" />
6416 <col width="48%" />
6417 <col width="20%" />
6418 </colgroup>
6419 <thead valign="bottom">
6420 <tr><th class="head">Option</th>
6421 <th class="head">Description</th>
6422 <th class="head">Default</th>
6423 </tr>
6424 </thead>
6425 <tbody valign="top">
6426 <tr><td>GEANY_FILETYPE_SEARCH_LINES</td>
6427 <td>The number of lines to search for the
6428 filetype with the extract filetype regex.</td>
6429 <td>2</td>
6430 </tr>
6431 </tbody>
6432 </table>
6433 </div>
6434 <div class="section" id="editor-h">
6435 <h2><a class="toc-backref" href="#id246">editor.h</a></h2>
6436 <table border="1" class="docutils">
6437 <colgroup>
6438 <col width="33%" />
6439 <col width="48%" />
6440 <col width="20%" />
6441 </colgroup>
6442 <thead valign="bottom">
6443 <tr><th class="head">Option</th>
6444 <th class="head">Description</th>
6445 <th class="head">Default</th>
6446 </tr>
6447 </thead>
6448 <tbody valign="top">
6449 <tr><td>GEANY_WORDCHARS</td>
6450 <td>These characters define word boundaries when
6451 making selections and searching using word
6452 matching options.</td>
6453 <td>a string with:
6454 a-z, A-Z, 0-9 and
6455 underscore.</td>
6456 </tr>
6457 </tbody>
6458 </table>
6459 </div>
6460 <div class="section" id="keyfile-c">
6461 <h2><a class="toc-backref" href="#id247">keyfile.c</a></h2>
6462 <p>These are default settings that can be overridden in the <a class="reference internal" href="#preferences">Preferences</a> dialog.</p>
6463 <table border="1" class="docutils">
6464 <colgroup>
6465 <col width="33%" />
6466 <col width="48%" />
6467 <col width="20%" />
6468 </colgroup>
6469 <thead valign="bottom">
6470 <tr><th class="head">Option</th>
6471 <th class="head">Description</th>
6472 <th class="head">Default</th>
6473 </tr>
6474 </thead>
6475 <tbody valign="top">
6476 <tr><td>GEANY_MIN_SYMBOLLIST_CHARS</td>
6477 <td>How many characters you need to type to
6478 trigger the autocompletion list.</td>
6479 <td>4</td>
6480 </tr>
6481 <tr><td>GEANY_DISK_CHECK_TIMEOUT</td>
6482 <td>Time in seconds between checking a file for
6483 external changes.</td>
6484 <td>30</td>
6485 </tr>
6486 <tr><td>GEANY_DEFAULT_TOOLS_MAKE</td>
6487 <td>The make tool. This can also include a path.</td>
6488 <td>&quot;make&quot;</td>
6489 </tr>
6490 <tr><td>GEANY_DEFAULT_TOOLS_TERMINAL</td>
6491 <td>A terminal emulator command, see
6492 <a class="reference internal" href="#terminal-emulators">Terminal emulators</a>.</td>
6493 <td>See below.</td>
6494 </tr>
6495 <tr><td>GEANY_DEFAULT_TOOLS_BROWSER</td>
6496 <td>A web browser. This can also include a path.</td>
6497 <td>&quot;firefox&quot;</td>
6498 </tr>
6499 <tr><td>GEANY_DEFAULT_TOOLS_PRINTCMD</td>
6500 <td>A printing tool. It should be able to accept
6501 and process plain text files. This can also
6502 include a path.</td>
6503 <td>&quot;lpr&quot;</td>
6504 </tr>
6505 <tr><td>GEANY_DEFAULT_TOOLS_GREP</td>
6506 <td>A grep tool. It should be compatible with
6507 GNU grep. This can also include a path.</td>
6508 <td>&quot;grep&quot;</td>
6509 </tr>
6510 <tr><td>GEANY_DEFAULT_MRU_LENGTH</td>
6511 <td>The length of the &quot;Recent files&quot; list.</td>
6512 <td>10</td>
6513 </tr>
6514 <tr><td>GEANY_DEFAULT_FONT_SYMBOL_LIST</td>
6515 <td>The font used in sidebar to show symbols and
6516 open files.</td>
6517 <td>&quot;Sans 9&quot;</td>
6518 </tr>
6519 <tr><td>GEANY_DEFAULT_FONT_MSG_WINDOW</td>
6520 <td>The font used in the messages window.</td>
6521 <td>&quot;Sans 9&quot;</td>
6522 </tr>
6523 <tr><td>GEANY_DEFAULT_FONT_EDITOR</td>
6524 <td>The font used in the editor window.</td>
6525 <td>&quot;Monospace 10&quot;</td>
6526 </tr>
6527 <tr><td>GEANY_TOGGLE_MARK</td>
6528 <td>A string which is used to mark a toggled
6529 comment.</td>
6530 <td>&quot;~ &quot;</td>
6531 </tr>
6532 <tr><td>GEANY_MAX_AUTOCOMPLETE_WORDS</td>
6533 <td>How many autocompletion suggestions should
6534 Geany provide.</td>
6535 <td>30</td>
6536 </tr>
6537 <tr><td>GEANY_DEFAULT_FILETYPE_REGEX</td>
6538 <td>The default regex to extract filetypes from
6539 files.</td>
6540 <td>See below.</td>
6541 </tr>
6542 </tbody>
6543 </table>
6544 <p>The GEANY_DEFAULT_FILETYPE_REGEX default value is -\*-\s*([^\s]+)\s*-\*- which finds Emacs filetypes.</p>
6545 <p>The GEANY_DEFAULT_TOOLS_TERMINAL default value on Windows is:</p>
6546 <pre class="literal-block">
6547 cmd.exe /Q /C %c
6548 </pre>
6549 <p>and on any non-Windows system is:</p>
6550 <pre class="literal-block">
6551 xterm -e &quot;/bin/sh %c&quot;
6552 </pre>
6553 </div>
6554 <div class="section" id="build-c">
6555 <h2><a class="toc-backref" href="#id248">build.c</a></h2>
6556 <table border="1" class="docutils">
6557 <colgroup>
6558 <col width="33%" />
6559 <col width="48%" />
6560 <col width="20%" />
6561 </colgroup>
6562 <thead valign="bottom">
6563 <tr><th class="head">Option</th>
6564 <th class="head">Description</th>
6565 <th class="head">Default</th>
6566 </tr>
6567 </thead>
6568 <tbody valign="top">
6569 <tr><td>GEANY_BUILD_ERR_HIGHLIGHT_MAX</td>
6570 <td>Amount of build error indicators to
6571 be shown in the editor window.
6572 This affects the special coloring
6573 when Geany detects a compiler output line as
6574 an error message and then highlights the
6575 corresponding line in the source code.
6576 Usually only the first few messages are
6577 interesting because following errors are
6578 just after-effects.
6579 All errors in the Compiler window are parsed
6580 and unaffected by this value.</td>
6581 <td>50</td>
6582 </tr>
6583 <tr><td>PRINTBUILDCMDS</td>
6584 <td>Every time a build menu item priority
6585 calculation is run, print the state of the
6586 menu item table in the form of the table
6587 in <a class="reference internal" href="#build-menu-configuration">Build Menu Configuration</a>. May be
6588 useful to debug configuration file
6589 overloading. Warning produces a lot of
6590 output. Can also be enabled/disabled by the
6591 debugger by setting printbuildcmds to 1/0
6592 overriding the compile setting.</td>
6593 <td>FALSE</td>
6594 </tr>
6595 </tbody>
6596 </table>
6597 </div>
6598 </div>
6599 <div class="section" id="gnu-general-public-license">
6600 <h1><a class="toc-backref" href="#id249">GNU General Public License</a></h1>
6601 <pre class="literal-block">
6602 GNU GENERAL PUBLIC LICENSE
6603 Version 2, June 1991
6605 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
6606 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6607 Everyone is permitted to copy and distribute verbatim copies
6608 of this license document, but changing it is not allowed.
6610 Preamble
6612 The licenses for most software are designed to take away your
6613 freedom to share and change it. By contrast, the GNU General Public
6614 License is intended to guarantee your freedom to share and change free
6615 software--to make sure the software is free for all its users. This
6616 General Public License applies to most of the Free Software
6617 Foundation's software and to any other program whose authors commit to
6618 using it. (Some other Free Software Foundation software is covered by
6619 the GNU Library General Public License instead.) You can apply it to
6620 your programs, too.
6622 When we speak of free software, we are referring to freedom, not
6623 price. Our General Public Licenses are designed to make sure that you
6624 have the freedom to distribute copies of free software (and charge for
6625 this service if you wish), that you receive source code or can get it
6626 if you want it, that you can change the software or use pieces of it
6627 in new free programs; and that you know you can do these things.
6629 To protect your rights, we need to make restrictions that forbid
6630 anyone to deny you these rights or to ask you to surrender the rights.
6631 These restrictions translate to certain responsibilities for you if you
6632 distribute copies of the software, or if you modify it.
6634 For example, if you distribute copies of such a program, whether
6635 gratis or for a fee, you must give the recipients all the rights that
6636 you have. You must make sure that they, too, receive or can get the
6637 source code. And you must show them these terms so they know their
6638 rights.
6640 We protect your rights with two steps: (1) copyright the software, and
6641 (2) offer you this license which gives you legal permission to copy,
6642 distribute and/or modify the software.
6644 Also, for each author's protection and ours, we want to make certain
6645 that everyone understands that there is no warranty for this free
6646 software. If the software is modified by someone else and passed on, we
6647 want its recipients to know that what they have is not the original, so
6648 that any problems introduced by others will not reflect on the original
6649 authors' reputations.
6651 Finally, any free program is threatened constantly by software
6652 patents. We wish to avoid the danger that redistributors of a free
6653 program will individually obtain patent licenses, in effect making the
6654 program proprietary. To prevent this, we have made it clear that any
6655 patent must be licensed for everyone's free use or not licensed at all.
6657 The precise terms and conditions for copying, distribution and
6658 modification follow.
6660 GNU GENERAL PUBLIC LICENSE
6661 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
6663 0. This License applies to any program or other work which contains
6664 a notice placed by the copyright holder saying it may be distributed
6665 under the terms of this General Public License. The &quot;Program&quot;, below,
6666 refers to any such program or work, and a &quot;work based on the Program&quot;
6667 means either the Program or any derivative work under copyright law:
6668 that is to say, a work containing the Program or a portion of it,
6669 either verbatim or with modifications and/or translated into another
6670 language. (Hereinafter, translation is included without limitation in
6671 the term &quot;modification&quot;.) Each licensee is addressed as &quot;you&quot;.
6673 Activities other than copying, distribution and modification are not
6674 covered by this License; they are outside its scope. The act of
6675 running the Program is not restricted, and the output from the Program
6676 is covered only if its contents constitute a work based on the
6677 Program (independent of having been made by running the Program).
6678 Whether that is true depends on what the Program does.
6680 1. You may copy and distribute verbatim copies of the Program's
6681 source code as you receive it, in any medium, provided that you
6682 conspicuously and appropriately publish on each copy an appropriate
6683 copyright notice and disclaimer of warranty; keep intact all the
6684 notices that refer to this License and to the absence of any warranty;
6685 and give any other recipients of the Program a copy of this License
6686 along with the Program.
6688 You may charge a fee for the physical act of transferring a copy, and
6689 you may at your option offer warranty protection in exchange for a fee.
6691 2. You may modify your copy or copies of the Program or any portion
6692 of it, thus forming a work based on the Program, and copy and
6693 distribute such modifications or work under the terms of Section 1
6694 above, provided that you also meet all of these conditions:
6696 a) You must cause the modified files to carry prominent notices
6697 stating that you changed the files and the date of any change.
6699 b) You must cause any work that you distribute or publish, that in
6700 whole or in part contains or is derived from the Program or any
6701 part thereof, to be licensed as a whole at no charge to all third
6702 parties under the terms of this License.
6704 c) If the modified program normally reads commands interactively
6705 when run, you must cause it, when started running for such
6706 interactive use in the most ordinary way, to print or display an
6707 announcement including an appropriate copyright notice and a
6708 notice that there is no warranty (or else, saying that you provide
6709 a warranty) and that users may redistribute the program under
6710 these conditions, and telling the user how to view a copy of this
6711 License. (Exception: if the Program itself is interactive but
6712 does not normally print such an announcement, your work based on
6713 the Program is not required to print an announcement.)
6715 These requirements apply to the modified work as a whole. If
6716 identifiable sections of that work are not derived from the Program,
6717 and can be reasonably considered independent and separate works in
6718 themselves, then this License, and its terms, do not apply to those
6719 sections when you distribute them as separate works. But when you
6720 distribute the same sections as part of a whole which is a work based
6721 on the Program, the distribution of the whole must be on the terms of
6722 this License, whose permissions for other licensees extend to the
6723 entire whole, and thus to each and every part regardless of who wrote it.
6725 Thus, it is not the intent of this section to claim rights or contest
6726 your rights to work written entirely by you; rather, the intent is to
6727 exercise the right to control the distribution of derivative or
6728 collective works based on the Program.
6730 In addition, mere aggregation of another work not based on the Program
6731 with the Program (or with a work based on the Program) on a volume of
6732 a storage or distribution medium does not bring the other work under
6733 the scope of this License.
6735 3. You may copy and distribute the Program (or a work based on it,
6736 under Section 2) in object code or executable form under the terms of
6737 Sections 1 and 2 above provided that you also do one of the following:
6739 a) Accompany it with the complete corresponding machine-readable
6740 source code, which must be distributed under the terms of Sections
6741 1 and 2 above on a medium customarily used for software interchange; or,
6743 b) Accompany it with a written offer, valid for at least three
6744 years, to give any third party, for a charge no more than your
6745 cost of physically performing source distribution, a complete
6746 machine-readable copy of the corresponding source code, to be
6747 distributed under the terms of Sections 1 and 2 above on a medium
6748 customarily used for software interchange; or,
6750 c) Accompany it with the information you received as to the offer
6751 to distribute corresponding source code. (This alternative is
6752 allowed only for noncommercial distribution and only if you
6753 received the program in object code or executable form with such
6754 an offer, in accord with Subsection b above.)
6756 The source code for a work means the preferred form of the work for
6757 making modifications to it. For an executable work, complete source
6758 code means all the source code for all modules it contains, plus any
6759 associated interface definition files, plus the scripts used to
6760 control compilation and installation of the executable. However, as a
6761 special exception, the source code distributed need not include
6762 anything that is normally distributed (in either source or binary
6763 form) with the major components (compiler, kernel, and so on) of the
6764 operating system on which the executable runs, unless that component
6765 itself accompanies the executable.
6767 If distribution of executable or object code is made by offering
6768 access to copy from a designated place, then offering equivalent
6769 access to copy the source code from the same place counts as
6770 distribution of the source code, even though third parties are not
6771 compelled to copy the source along with the object code.
6773 4. You may not copy, modify, sublicense, or distribute the Program
6774 except as expressly provided under this License. Any attempt
6775 otherwise to copy, modify, sublicense or distribute the Program is
6776 void, and will automatically terminate your rights under this License.
6777 However, parties who have received copies, or rights, from you under
6778 this License will not have their licenses terminated so long as such
6779 parties remain in full compliance.
6781 5. You are not required to accept this License, since you have not
6782 signed it. However, nothing else grants you permission to modify or
6783 distribute the Program or its derivative works. These actions are
6784 prohibited by law if you do not accept this License. Therefore, by
6785 modifying or distributing the Program (or any work based on the
6786 Program), you indicate your acceptance of this License to do so, and
6787 all its terms and conditions for copying, distributing or modifying
6788 the Program or works based on it.
6790 6. Each time you redistribute the Program (or any work based on the
6791 Program), the recipient automatically receives a license from the
6792 original licensor to copy, distribute or modify the Program subject to
6793 these terms and conditions. You may not impose any further
6794 restrictions on the recipients' exercise of the rights granted herein.
6795 You are not responsible for enforcing compliance by third parties to
6796 this License.
6798 7. If, as a consequence of a court judgment or allegation of patent
6799 infringement or for any other reason (not limited to patent issues),
6800 conditions are imposed on you (whether by court order, agreement or
6801 otherwise) that contradict the conditions of this License, they do not
6802 excuse you from the conditions of this License. If you cannot
6803 distribute so as to satisfy simultaneously your obligations under this
6804 License and any other pertinent obligations, then as a consequence you
6805 may not distribute the Program at all. For example, if a patent
6806 license would not permit royalty-free redistribution of the Program by
6807 all those who receive copies directly or indirectly through you, then
6808 the only way you could satisfy both it and this License would be to
6809 refrain entirely from distribution of the Program.
6811 If any portion of this section is held invalid or unenforceable under
6812 any particular circumstance, the balance of the section is intended to
6813 apply and the section as a whole is intended to apply in other
6814 circumstances.
6816 It is not the purpose of this section to induce you to infringe any
6817 patents or other property right claims or to contest validity of any
6818 such claims; this section has the sole purpose of protecting the
6819 integrity of the free software distribution system, which is
6820 implemented by public license practices. Many people have made
6821 generous contributions to the wide range of software distributed
6822 through that system in reliance on consistent application of that
6823 system; it is up to the author/donor to decide if he or she is willing
6824 to distribute software through any other system and a licensee cannot
6825 impose that choice.
6827 This section is intended to make thoroughly clear what is believed to
6828 be a consequence of the rest of this License.
6830 8. If the distribution and/or use of the Program is restricted in
6831 certain countries either by patents or by copyrighted interfaces, the
6832 original copyright holder who places the Program under this License
6833 may add an explicit geographical distribution limitation excluding
6834 those countries, so that distribution is permitted only in or among
6835 countries not thus excluded. In such case, this License incorporates
6836 the limitation as if written in the body of this License.
6838 9. The Free Software Foundation may publish revised and/or new versions
6839 of the General Public License from time to time. Such new versions will
6840 be similar in spirit to the present version, but may differ in detail to
6841 address new problems or concerns.
6843 Each version is given a distinguishing version number. If the Program
6844 specifies a version number of this License which applies to it and &quot;any
6845 later version&quot;, you have the option of following the terms and conditions
6846 either of that version or of any later version published by the Free
6847 Software Foundation. If the Program does not specify a version number of
6848 this License, you may choose any version ever published by the Free Software
6849 Foundation.
6851 10. If you wish to incorporate parts of the Program into other free
6852 programs whose distribution conditions are different, write to the author
6853 to ask for permission. For software which is copyrighted by the Free
6854 Software Foundation, write to the Free Software Foundation; we sometimes
6855 make exceptions for this. Our decision will be guided by the two goals
6856 of preserving the free status of all derivatives of our free software and
6857 of promoting the sharing and reuse of software generally.
6859 NO WARRANTY
6861 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
6862 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
6863 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
6864 PROVIDE THE PROGRAM &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
6865 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
6866 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
6867 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
6868 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
6869 REPAIR OR CORRECTION.
6871 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
6872 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
6873 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
6874 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
6875 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
6876 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
6877 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
6878 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
6879 POSSIBILITY OF SUCH DAMAGES.
6881 END OF TERMS AND CONDITIONS
6883 How to Apply These Terms to Your New Programs
6885 If you develop a new program, and you want it to be of the greatest
6886 possible use to the public, the best way to achieve this is to make it
6887 free software which everyone can redistribute and change under these terms.
6889 To do so, attach the following notices to the program. It is safest
6890 to attach them to the start of each source file to most effectively
6891 convey the exclusion of warranty; and each file should have at least
6892 the &quot;copyright&quot; line and a pointer to where the full notice is found.
6894 &lt;one line to give the program's name and a brief idea of what it does.&gt;
6895 Copyright (C) &lt;year&gt; &lt;name of author&gt;
6897 This program is free software; you can redistribute it and/or modify
6898 it under the terms of the GNU General Public License as published by
6899 the Free Software Foundation; either version 2 of the License, or
6900 (at your option) any later version.
6902 This program is distributed in the hope that it will be useful,
6903 but WITHOUT ANY WARRANTY; without even the implied warranty of
6904 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6905 GNU General Public License for more details.
6907 You should have received a copy of the GNU General Public License along
6908 with this program; if not, write to the Free Software Foundation, Inc.,
6909 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
6912 Also add information on how to contact you by electronic and paper mail.
6914 If the program is interactive, make it output a short notice like this
6915 when it starts in an interactive mode:
6917 Gnomovision version 69, Copyright (C) year name of author
6918 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
6919 This is free software, and you are welcome to redistribute it
6920 under certain conditions; type `show c' for details.
6922 The hypothetical commands `show w' and `show c' should show the appropriate
6923 parts of the General Public License. Of course, the commands you use may
6924 be called something other than `show w' and `show c'; they could even be
6925 mouse-clicks or menu items--whatever suits your program.
6927 You should also get your employer (if you work as a programmer) or your
6928 school, if any, to sign a &quot;copyright disclaimer&quot; for the program, if
6929 necessary. Here is a sample; alter the names:
6931 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
6932 `Gnomovision' (which makes passes at compilers) written by James Hacker.
6934 &lt;signature of Ty Coon&gt;, 1 April 1989
6935 Ty Coon, President of Vice
6937 This General Public License does not permit incorporating your program into
6938 proprietary programs. If your program is a subroutine library, you may
6939 consider it more useful to permit linking proprietary applications with the
6940 library. If this is what you want to do, use the GNU Library General
6941 Public License instead of this License.
6942 </pre>
6943 </div>
6944 <div class="section" id="license-for-scintilla-and-scite">
6945 <h1><a class="toc-backref" href="#id250">License for Scintilla and SciTE</a></h1>
6946 <p>Copyright 1998-2003 by Neil Hodgson &lt;neilh(at)scintilla(dot)org&gt;</p>
6947 <p>All Rights Reserved</p>
6948 <p>Permission to use, copy, modify, and distribute this software and
6949 its documentation for any purpose and without fee is hereby granted,
6950 provided that the above copyright notice appear in all copies and
6951 that both that copyright notice and this permission notice appear in
6952 supporting documentation.</p>
6953 <p>NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
6954 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
6955 NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
6956 CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
6957 OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
6958 OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
6959 USE OR PERFORMANCE OF THIS SOFTWARE.</p>
6960 </div>
6961 </div>
6962 <div class="footer">
6963 <hr class="footer" />
6964 <a class="reference external" href="geany.txt">View document source</a>.
6965 Generated on: 2014-04-16 15:16 UTC.
6966 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.
6968 </div>
6969 </body>
6970 </html>