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