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