149
149
License as published by the Free Software Foundation; either version 2
150
150
of the License, or (at your option) any later version. A copy of this
151
151
license can be found in the file COPYING included with the source code
152
of this program, and also in the chapter <a class="reference internal" href="#gnu-general-public-license">GNU General Public License</a>.</p>
153
<div class="contents topic" id="contents">
154
<p class="topic-title first">Contents</p>
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
155
<ul class="simple">
156
<li><a class="reference internal" href="#introduction" id="id11">Introduction</a><ul>
157
<li><a class="reference internal" href="#about-geany" id="id12">About Geany</a></li>
158
<li><a class="reference internal" href="#where-to-get-it" id="id13">Where to get it</a></li>
159
<li><a class="reference internal" href="#license" id="id14">License</a></li>
160
<li><a class="reference internal" href="#about-this-document" id="id15">About this document</a></li>
163
<li><a class="reference internal" href="#installation" id="id16">Installation</a><ul>
164
<li><a class="reference internal" href="#requirements" id="id17">Requirements</a></li>
165
<li><a class="reference internal" href="#binary-packages" id="id18">Binary packages</a></li>
166
<li><a class="reference internal" href="#source-compilation" id="id19">Source compilation</a><ul>
167
<li><a class="reference internal" href="#autotools-based-build-system" id="id20">Autotools based build system</a></li>
168
<li><a class="reference internal" href="#waf-based-build-system" id="id21">Waf based build system</a><ul>
169
<li><a class="reference internal" href="#waf-cache" id="id22">Waf Cache</a><ul>
170
<li><a class="reference internal" href="#cleaning-the-cache" id="id23">Cleaning the Cache</a></li>
175
<li><a class="reference internal" href="#custom-installation" id="id24">Custom installation</a></li>
176
<li><a class="reference internal" href="#dynamic-linking-loader-support" id="id25">Dynamic linking loader support</a></li>
177
<li><a class="reference internal" href="#build-problems" id="id26">Build problems</a></li>
180
<li><a class="reference internal" href="#installation-prefix" id="id27">Installation prefix</a></li>
183
<li><a class="reference internal" href="#usage" id="id28">Usage</a><ul>
184
<li><a class="reference internal" href="#getting-started" id="id29">Getting started</a></li>
185
<li><a class="reference internal" href="#command-line-options" id="id30">Command line options</a></li>
186
<li><a class="reference internal" href="#general" id="id31">General</a><ul>
187
<li><a class="reference internal" href="#startup" id="id32">Startup</a></li>
188
<li><a class="reference internal" href="#opening-files-from-the-command-line-in-a-running-instance" id="id33">Opening files from the command-line in a running instance</a></li>
189
<li><a class="reference internal" href="#virtual-terminal-emulator-widget-vte" id="id34">Virtual terminal emulator widget (VTE)</a></li>
190
<li><a class="reference internal" href="#defining-own-widget-styles-using-gtkrc-2-0" id="id35">Defining own widget styles using .gtkrc-2.0</a></li>
193
<li><a class="reference internal" href="#documents" id="id36">Documents</a><ul>
194
<li><a class="reference internal" href="#switching-between-documents" id="id37">Switching between documents</a></li>
197
<li><a class="reference internal" href="#character-sets-and-unicode-byte-order-mark-bom" id="id38">Character sets and Unicode Byte-Order-Mark (BOM)</a><ul>
198
<li><a class="reference internal" href="#using-character-sets" id="id39">Using character sets</a></li>
199
<li><a class="reference internal" href="#in-file-encoding-specification" id="id40">In-file encoding specification</a></li>
200
<li><a class="reference internal" href="#special-encoding-none" id="id41">Special encoding "None"</a></li>
201
<li><a class="reference internal" href="#unicode-byte-order-mark-bom" id="id42">Unicode Byte-Order-Mark (BOM)</a></li>
204
<li><a class="reference internal" href="#editing" id="id43">Editing</a><ul>
205
<li><a class="reference internal" href="#folding" id="id44">Folding</a></li>
206
<li><a class="reference internal" href="#column-mode-editing-rectangular-selections" id="id45">Column mode editing (rectangular selections)</a></li>
207
<li><a class="reference internal" href="#drag-and-drop-of-text" id="id46">Drag and drop of text</a></li>
208
<li><a class="reference internal" href="#indentation" id="id47">Indentation</a></li>
209
<li><a class="reference internal" href="#auto-indentation" id="id48">Auto-indentation</a></li>
210
<li><a class="reference internal" href="#bookmarks" id="id49">Bookmarks</a></li>
211
<li><a class="reference internal" href="#code-navigation-history" id="id50">Code navigation history</a></li>
212
<li><a class="reference internal" href="#send-text-through-definable-commands" id="id51">Send text through definable commands</a></li>
213
<li><a class="reference internal" href="#context-actions" id="id52">Context actions</a></li>
214
<li><a class="reference internal" href="#autocompletion" id="id53">Autocompletion</a><ul>
215
<li><a class="reference internal" href="#scope-autocompletion" id="id54">Scope autocompletion</a></li>
218
<li><a class="reference internal" href="#user-definable-snippets" id="id55">User-definable snippets</a></li>
219
<li><a class="reference internal" href="#inserting-unicode-characters" id="id56">Inserting Unicode characters</a></li>
222
<li><a class="reference internal" href="#search-replace-and-go-to" id="id57">Search, replace and go to</a><ul>
223
<li><a class="reference internal" href="#find" id="id58">Find</a><ul>
224
<li><a class="reference internal" href="#matching-options" id="id59">Matching options</a></li>
225
<li><a class="reference internal" href="#find-all" id="id60">Find all</a></li>
226
<li><a class="reference internal" href="#change-font-in-search-dialog-text-fields" id="id61">Change font in search dialog text fields</a></li>
229
<li><a class="reference internal" href="#find-usage" id="id62">Find usage</a></li>
230
<li><a class="reference internal" href="#find-in-files" id="id63">Find in files</a><ul>
231
<li><a class="reference internal" href="#filtering-out-version-control-files" id="id64">Filtering out version control files</a></li>
234
<li><a class="reference internal" href="#replace" id="id65">Replace</a><ul>
235
<li><a class="reference internal" href="#replace-all" id="id66">Replace all</a></li>
238
<li><a class="reference internal" href="#go-to-tag-definition" id="id67">Go to tag definition</a></li>
239
<li><a class="reference internal" href="#go-to-tag-declaration" id="id68">Go to tag declaration</a></li>
240
<li><a class="reference internal" href="#go-to-line" id="id69">Go to line</a></li>
241
<li><a class="reference internal" href="#regular-expressions" id="id70">Regular expressions</a></li>
244
<li><a class="reference internal" href="#tags" id="id71">Tags</a><ul>
245
<li><a class="reference internal" href="#workspace-tags" id="id72">Workspace tags</a></li>
246
<li><a class="reference internal" href="#global-tags" id="id73">Global tags</a><ul>
247
<li><a class="reference internal" href="#default-global-tags-files" id="id74">Default global tags files</a></li>
248
<li><a class="reference internal" href="#global-tags-file-format" id="id75">Global tags file format</a></li>
249
<li><a class="reference internal" href="#generating-a-global-tags-file" id="id76">Generating a global tags file</a></li>
252
<li><a class="reference internal" href="#ignore-tags" id="id77">Ignore tags</a></li>
255
<li><a class="reference internal" href="#preferences" id="id78">Preferences</a><ul>
256
<li><a class="reference internal" href="#general-startup-preferences" id="id79">General Startup preferences</a><ul>
257
<li><a class="reference internal" href="#id1" id="id80">Startup</a></li>
258
<li><a class="reference internal" href="#shutdown" id="id81">Shutdown</a></li>
259
<li><a class="reference internal" href="#paths" id="id82">Paths</a></li>
262
<li><a class="reference internal" href="#general-miscellaneous-preferences" id="id83">General Miscellaneous preferences</a><ul>
263
<li><a class="reference internal" href="#miscellaneous" id="id84">Miscellaneous</a></li>
266
<li><a class="reference internal" href="#search" id="id85">Search</a><ul>
267
<li><a class="reference internal" href="#projects" id="id86">Projects</a></li>
270
<li><a class="reference internal" href="#interface-preferences" id="id87">Interface preferences</a><ul>
271
<li><a class="reference internal" href="#sidebar" id="id88">Sidebar</a></li>
272
<li><a class="reference internal" href="#fonts" id="id89">Fonts</a></li>
273
<li><a class="reference internal" href="#editor-tabs" id="id90">Editor tabs</a></li>
274
<li><a class="reference internal" href="#tab-positions" id="id91">Tab positions</a></li>
275
<li><a class="reference internal" href="#id2" id="id92">Miscellaneous</a></li>
278
<li><a class="reference internal" href="#toolbar-preferences" id="id93">Toolbar preferences</a><ul>
279
<li><a class="reference internal" href="#toolbar" id="id94">Toolbar</a></li>
280
<li><a class="reference internal" href="#appearance" id="id95">Appearance</a></li>
283
<li><a class="reference internal" href="#editor-features-preferences" id="id96">Editor Features preferences</a><ul>
284
<li><a class="reference internal" href="#features" id="id97">Features</a></li>
287
<li><a class="reference internal" href="#editor-indentation-preferences" id="id98">Editor Indentation preferences</a><ul>
288
<li><a class="reference internal" href="#indentation-group" id="id99">Indentation group</a></li>
291
<li><a class="reference internal" href="#editor-completions-preferences" id="id100">Editor Completions preferences</a><ul>
292
<li><a class="reference internal" href="#completions" id="id101">Completions</a></li>
293
<li><a class="reference internal" href="#auto-close-quotes-and-brackets" id="id102">Auto-close quotes and brackets</a></li>
296
<li><a class="reference internal" href="#editor-display-preferences" id="id103">Editor Display preferences</a><ul>
297
<li><a class="reference internal" href="#display" id="id104">Display</a></li>
298
<li><a class="reference internal" href="#long-line-marker" id="id105">Long line marker</a></li>
301
<li><a class="reference internal" href="#files-preferences" id="id106">Files preferences</a><ul>
302
<li><a class="reference internal" href="#new-files" id="id107">New files</a></li>
303
<li><a class="reference internal" href="#saving-files" id="id108">Saving files</a></li>
304
<li><a class="reference internal" href="#id3" id="id109">Miscellaneous</a></li>
307
<li><a class="reference internal" href="#tools-preferences" id="id110">Tools preferences</a><ul>
308
<li><a class="reference internal" href="#tool-paths" id="id111">Tool paths</a></li>
309
<li><a class="reference internal" href="#commands" id="id112">Commands</a></li>
312
<li><a class="reference internal" href="#template-preferences" id="id113">Template preferences</a><ul>
313
<li><a class="reference internal" href="#template-data" id="id114">Template data</a></li>
316
<li><a class="reference internal" href="#keybinding-preferences" id="id115">Keybinding preferences</a></li>
317
<li><a class="reference internal" href="#printing-preferences" id="id116">Printing preferences</a></li>
318
<li><a class="reference internal" href="#terminal-vte-preferences" id="id117">Terminal (VTE) preferences</a><ul>
319
<li><a class="reference internal" href="#terminal-widget" id="id118">Terminal widget</a></li>
324
<li><a class="reference internal" href="#project-management" id="id119">Project Management</a><ul>
325
<li><a class="reference internal" href="#new-project" id="id120">New Project</a></li>
326
<li><a class="reference internal" href="#project-properties" id="id121">Project Properties</a><ul>
327
<li><a class="reference internal" href="#make-in-base-path" id="id122">Make in base path</a></li>
328
<li><a class="reference internal" href="#run-command" id="id123">Run command</a></li>
331
<li><a class="reference internal" href="#open-project" id="id124">Open Project</a></li>
332
<li><a class="reference internal" href="#close-project" id="id125">Close Project</a></li>
335
<li><a class="reference internal" href="#build-system" id="id126">Build system</a><ul>
336
<li><a class="reference internal" href="#compile" id="id127">Compile</a></li>
337
<li><a class="reference internal" href="#build" id="id128">Build</a></li>
338
<li><a class="reference internal" href="#make-all" id="id129">Make all</a></li>
339
<li><a class="reference internal" href="#make-custom-target" id="id130">Make custom target</a></li>
340
<li><a class="reference internal" href="#make-object" id="id131">Make object</a></li>
341
<li><a class="reference internal" href="#execute" id="id132">Execute</a></li>
342
<li><a class="reference internal" href="#stopping-running-processes" id="id133">Stopping running processes</a><ul>
343
<li><a class="reference internal" href="#terminal-emulators" id="id134">Terminal emulators</a></li>
346
<li><a class="reference internal" href="#set-includes-and-arguments" id="id135">Set Includes and Arguments</a><ul>
347
<li><a class="reference internal" href="#one-step-compilation" id="id136">One step compilation</a></li>
350
<li><a class="reference internal" href="#indicators" id="id137">Indicators</a></li>
353
<li><a class="reference internal" href="#printing-support" id="id138">Printing support</a></li>
354
<li><a class="reference internal" href="#plugins" id="id139">Plugins</a></li>
355
<li><a class="reference internal" href="#keybindings" id="id140">Keybindings</a><ul>
356
<li><a class="reference internal" href="#switching-documents" id="id141">Switching documents</a></li>
357
<li><a class="reference internal" href="#configurable-keybindings" id="id142">Configurable keybindings</a></li>
362
<li><a class="reference internal" href="#configuration-files" id="id143">Configuration files</a><ul>
363
<li><a class="reference internal" href="#tools-menu-items" id="id144">Tools menu items</a></li>
364
<li><a class="reference internal" href="#global-configuration-file" id="id145">Global configuration file</a></li>
365
<li><a class="reference internal" href="#filetype-definition-files" id="id146">Filetype definition files</a><ul>
366
<li><a class="reference internal" href="#format" id="id147">Format</a><ul>
367
<li><a class="reference internal" href="#styling-section" id="id148">[styling] Section</a><ul>
368
<li><a class="reference internal" href="#using-a-named-style" id="id149">Using a named style</a></li>
371
<li><a class="reference internal" href="#keywords-section" id="id150">[keywords] Section</a></li>
372
<li><a class="reference internal" href="#settings-section" id="id151">[settings] Section</a></li>
373
<li><a class="reference internal" href="#build-settings-section" id="id152">[build_settings] Section</a></li>
376
<li><a class="reference internal" href="#special-file-filetypes-common" id="id153">Special file filetypes.common</a><ul>
377
<li><a class="reference internal" href="#named-styles-section" id="id154">[named_styles] Section</a></li>
378
<li><a class="reference internal" href="#id4" id="id155">[styling] Section</a></li>
379
<li><a class="reference internal" href="#id5" id="id156">[settings] Section</a></li>
384
<li><a class="reference internal" href="#filetype-extensions" id="id157">Filetype extensions</a></li>
385
<li><a class="reference internal" href="#templates" id="id158">Templates</a><ul>
386
<li><a class="reference internal" href="#template-meta-data" id="id159">Template meta data</a></li>
387
<li><a class="reference internal" href="#file-templates" id="id160">File templates</a><ul>
388
<li><a class="reference internal" href="#custom-file-templates" id="id161">Custom file templates</a></li>
389
<li><a class="reference internal" href="#filetype-templates" id="id162">Filetype templates</a></li>
392
<li><a class="reference internal" href="#customizing-templates" id="id163">Customizing templates</a><ul>
393
<li><a class="reference internal" href="#template-wildcards" id="id164">Template wildcards</a></li>
398
<li><a class="reference internal" href="#customizing-the-toolbar" id="id165">Customizing the toolbar</a><ul>
399
<li><a class="reference internal" href="#manually-editing-of-the-toolbar-layout" id="id166">Manually editing of the toolbar layout</a></li>
400
<li><a class="reference internal" href="#available-toolbar-elements" id="id167">Available toolbar elements</a></li>
405
<li><a class="reference internal" href="#plugin-documentation" id="id168">Plugin documentation</a><ul>
406
<li><a class="reference internal" href="#instant-save" id="id169">Instant Save</a></li>
407
<li><a class="reference internal" href="#backup-copy" id="id170">Backup Copy</a></li>
410
<li><a class="reference internal" href="#contributing-to-this-document" id="id171">Contributing to this document</a></li>
411
<li><a class="reference internal" href="#scintilla-keyboard-commands" id="id172">Scintilla keyboard commands</a><ul>
412
<li><a class="reference internal" href="#keyboard-commands" id="id173">Keyboard commands</a></li>
415
<li><a class="reference internal" href="#tips-and-tricks" id="id174">Tips and tricks</a><ul>
416
<li><a class="reference internal" href="#document-notebook" id="id175">Document notebook</a></li>
417
<li><a class="reference internal" href="#editor" id="id176">Editor</a></li>
418
<li><a class="reference internal" href="#interface" id="id177">Interface</a></li>
419
<li><a class="reference internal" href="#gtk-related" id="id178">GTK-related</a></li>
422
<li><a class="reference internal" href="#hidden-preferences" id="id179">Hidden preferences</a></li>
423
<li><a class="reference internal" href="#compile-time-options" id="id180">Compile-time options</a><ul>
424
<li><a class="reference internal" href="#src-geany-h" id="id181">src/geany.h</a></li>
425
<li><a class="reference internal" href="#project-h" id="id182">project.h</a></li>
426
<li><a class="reference internal" href="#editor-h" id="id183">editor.h</a></li>
427
<li><a class="reference internal" href="#keyfile-c" id="id184">keyfile.c</a></li>
428
<li><a class="reference internal" href="#build-h" id="id185">build.h</a></li>
431
<li><a class="reference internal" href="#gnu-general-public-license" id="id186">GNU General Public License</a></li>
432
<li><a class="reference internal" href="#license-for-scintilla-and-scite" id="id187">License for Scintilla and SciTE</a></li>
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>
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>
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>
180
<li><a class="reference" href="#installation-prefix" id="id24" name="id24">Installation prefix</a></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>
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>
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 "None"</a></li>
202
<li><a class="reference" href="#unicode-byte-order-mark-bom" id="id40" name="id40">Unicode Byte-Order-Mark (BOM)</a></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></li>
210
<li><a class="reference" href="#auto-indentation" id="id46" name="id46">Auto-indentation</a></li>
211
<li><a class="reference" href="#bookmarks" id="id47" name="id47">Bookmarks</a></li>
212
<li><a class="reference" href="#code-navigation-history" id="id48" name="id48">Code navigation history</a></li>
213
<li><a class="reference" href="#sending-text-through-custom-commands" id="id49" name="id49">Sending text through custom commands</a></li>
214
<li><a class="reference" href="#context-actions" id="id50" name="id50">Context actions</a></li>
215
<li><a class="reference" href="#autocompletion" id="id51" name="id51">Autocompletion</a><ul>
216
<li><a class="reference" href="#word-part-completion" id="id52" name="id52">Word part completion</a></li>
217
<li><a class="reference" href="#scope-autocompletion" id="id53" name="id53">Scope autocompletion</a></li>
220
<li><a class="reference" href="#user-definable-snippets" id="id54" name="id54">User-definable snippets</a></li>
221
<li><a class="reference" href="#inserting-unicode-characters" id="id55" name="id55">Inserting Unicode characters</a></li>
224
<li><a class="reference" href="#search-replace-and-go-to" id="id56" name="id56">Search, replace and go to</a><ul>
225
<li><a class="reference" href="#toolbar-entries" id="id57" name="id57">Toolbar entries</a><ul>
226
<li><a class="reference" href="#search-bar" id="id58" name="id58">Search bar</a></li>
229
<li><a class="reference" href="#find" id="id59" name="id59">Find</a><ul>
230
<li><a class="reference" href="#matching-options" id="id60" name="id60">Matching options</a></li>
231
<li><a class="reference" href="#find-all" id="id61" name="id61">Find all</a></li>
232
<li><a class="reference" href="#change-font-in-search-dialog-text-fields" id="id62" name="id62">Change font in search dialog text fields</a></li>
235
<li><a class="reference" href="#find-usage" id="id63" name="id63">Find usage</a></li>
236
<li><a class="reference" href="#find-in-files" id="id64" name="id64">Find in files</a><ul>
237
<li><a class="reference" href="#filtering-out-version-control-files" id="id65" name="id65">Filtering out version control files</a></li>
240
<li><a class="reference" href="#replace" id="id66" name="id66">Replace</a><ul>
241
<li><a class="reference" href="#replace-all" id="id67" name="id67">Replace all</a></li>
244
<li><a class="reference" href="#go-to-tag-definition" id="id68" name="id68">Go to tag definition</a></li>
245
<li><a class="reference" href="#go-to-tag-declaration" id="id69" name="id69">Go to tag declaration</a></li>
246
<li><a class="reference" href="#go-to-line" id="id70" name="id70">Go to line</a></li>
247
<li><a class="reference" href="#regular-expressions" id="id71" name="id71">Regular expressions</a></li>
250
<li><a class="reference" href="#tags" id="id72" name="id72">Tags</a><ul>
251
<li><a class="reference" href="#workspace-tags" id="id73" name="id73">Workspace tags</a></li>
252
<li><a class="reference" href="#global-tags" id="id74" name="id74">Global tags</a><ul>
253
<li><a class="reference" href="#default-global-tags-files" id="id75" name="id75">Default global tags files</a></li>
254
<li><a class="reference" href="#global-tags-file-format" id="id76" name="id76">Global tags file format</a></li>
255
<li><a class="reference" href="#generating-a-global-tags-file" id="id77" name="id77">Generating a global tags file</a></li>
258
<li><a class="reference" href="#ignore-tags" id="id78" name="id78">Ignore tags</a></li>
261
<li><a class="reference" href="#preferences" id="id79" name="id79">Preferences</a><ul>
262
<li><a class="reference" href="#general-startup-preferences" id="id80" name="id80">General Startup preferences</a><ul>
263
<li><a class="reference" href="#id1" id="id81" name="id81">Startup</a></li>
264
<li><a class="reference" href="#shutdown" id="id82" name="id82">Shutdown</a></li>
265
<li><a class="reference" href="#paths" id="id83" name="id83">Paths</a></li>
268
<li><a class="reference" href="#general-miscellaneous-preferences" id="id84" name="id84">General Miscellaneous preferences</a><ul>
269
<li><a class="reference" href="#miscellaneous" id="id85" name="id85">Miscellaneous</a></li>
270
<li><a class="reference" href="#search" id="id86" name="id86">Search</a></li>
271
<li><a class="reference" href="#projects" id="id87" name="id87">Projects</a></li>
274
<li><a class="reference" href="#interface-preferences" id="id88" name="id88">Interface preferences</a><ul>
275
<li><a class="reference" href="#sidebar" id="id89" name="id89">Sidebar</a></li>
276
<li><a class="reference" href="#fonts" id="id90" name="id90">Fonts</a></li>
277
<li><a class="reference" href="#editor-tabs" id="id91" name="id91">Editor tabs</a></li>
278
<li><a class="reference" href="#tab-positions" id="id92" name="id92">Tab positions</a></li>
279
<li><a class="reference" href="#id2" id="id93" name="id93">Miscellaneous</a></li>
282
<li><a class="reference" href="#toolbar-preferences" id="id94" name="id94">Toolbar preferences</a><ul>
283
<li><a class="reference" href="#toolbar" id="id95" name="id95">Toolbar</a></li>
284
<li><a class="reference" href="#appearance" id="id96" name="id96">Appearance</a></li>
287
<li><a class="reference" href="#editor-features-preferences" id="id97" name="id97">Editor Features preferences</a><ul>
288
<li><a class="reference" href="#features" id="id98" name="id98">Features</a></li>
291
<li><a class="reference" href="#editor-indentation-preferences" id="id99" name="id99">Editor Indentation preferences</a><ul>
292
<li><a class="reference" href="#indentation-group" id="id100" name="id100">Indentation group</a></li>
295
<li><a class="reference" href="#editor-completions-preferences" id="id101" name="id101">Editor Completions preferences</a><ul>
296
<li><a class="reference" href="#completions" id="id102" name="id102">Completions</a></li>
297
<li><a class="reference" href="#auto-close-quotes-and-brackets" id="id103" name="id103">Auto-close quotes and brackets</a></li>
300
<li><a class="reference" href="#editor-display-preferences" id="id104" name="id104">Editor Display preferences</a><ul>
301
<li><a class="reference" href="#display" id="id105" name="id105">Display</a></li>
302
<li><a class="reference" href="#long-line-marker" id="id106" name="id106">Long line marker</a></li>
303
<li><a class="reference" href="#virtual-spaces" id="id107" name="id107">Virtual spaces</a></li>
306
<li><a class="reference" href="#files-preferences" id="id108" name="id108">Files preferences</a><ul>
307
<li><a class="reference" href="#new-files" id="id109" name="id109">New files</a></li>
308
<li><a class="reference" href="#saving-files" id="id110" name="id110">Saving files</a></li>
309
<li><a class="reference" href="#id3" id="id111" name="id111">Miscellaneous</a></li>
312
<li><a class="reference" href="#tools-preferences" id="id112" name="id112">Tools preferences</a><ul>
313
<li><a class="reference" href="#tool-paths" id="id113" name="id113">Tool paths</a></li>
314
<li><a class="reference" href="#commands" id="id114" name="id114">Commands</a></li>
317
<li><a class="reference" href="#template-preferences" id="id115" name="id115">Template preferences</a><ul>
318
<li><a class="reference" href="#template-data" id="id116" name="id116">Template data</a></li>
321
<li><a class="reference" href="#keybinding-preferences" id="id117" name="id117">Keybinding preferences</a></li>
322
<li><a class="reference" href="#printing-preferences" id="id118" name="id118">Printing preferences</a></li>
323
<li><a class="reference" href="#terminal-vte-preferences" id="id119" name="id119">Terminal (VTE) preferences</a><ul>
324
<li><a class="reference" href="#terminal-widget" id="id120" name="id120">Terminal widget</a></li>
329
<li><a class="reference" href="#project-management" id="id121" name="id121">Project Management</a><ul>
330
<li><a class="reference" href="#new-project" id="id122" name="id122">New Project</a></li>
331
<li><a class="reference" href="#project-properties" id="id123" name="id123">Project Properties</a><ul>
332
<li><a class="reference" href="#set-base-path-button" id="id124" name="id124">Set Base Path Button</a></li>
335
<li><a class="reference" href="#open-project" id="id125" name="id125">Open Project</a></li>
336
<li><a class="reference" href="#close-project" id="id126" name="id126">Close Project</a></li>
339
<li><a class="reference" href="#build-menu" id="id127" name="id127">Build Menu</a><ul>
340
<li><a class="reference" href="#indicators" id="id128" name="id128">Indicators</a></li>
341
<li><a class="reference" href="#default-build-menu-items" id="id129" name="id129">Default Build Menu Items</a><ul>
342
<li><a class="reference" href="#compile" id="id130" name="id130">Compile</a></li>
343
<li><a class="reference" href="#build" id="id131" name="id131">Build</a></li>
344
<li><a class="reference" href="#make" id="id132" name="id132">Make</a></li>
345
<li><a class="reference" href="#make-custom-target" id="id133" name="id133">Make custom target</a></li>
346
<li><a class="reference" href="#make-object" id="id134" name="id134">Make object</a></li>
347
<li><a class="reference" href="#next-error" id="id135" name="id135">Next Error</a></li>
348
<li><a class="reference" href="#previous-error" id="id136" name="id136">Previous Error</a></li>
349
<li><a class="reference" href="#execute" id="id137" name="id137">Execute</a></li>
350
<li><a class="reference" href="#stopping-running-processes" id="id138" name="id138">Stopping running processes</a><ul>
351
<li><a class="reference" href="#terminal-emulators" id="id139" name="id139">Terminal emulators</a></li>
354
<li><a class="reference" href="#set-build-commands" id="id140" name="id140">Set Build Commands</a></li>
357
<li><a class="reference" href="#build-menu-configuration" id="id141" name="id141">Build Menu Configuration</a></li>
358
<li><a class="reference" href="#build-menu-commands-dialog" id="id142" name="id142">Build Menu Commands Dialog</a><ul>
359
<li><a class="reference" href="#substitutions-in-commands-and-working-directories" id="id143" name="id143">Substitutions in Commands and Working Directories</a></li>
360
<li><a class="reference" href="#build-menu-keyboard-shortcuts" id="id144" name="id144">Build Menu Keyboard Shortcuts</a></li>
361
<li><a class="reference" href="#configuration-files" id="id145" name="id145">Configuration Files</a></li>
366
<li><a class="reference" href="#printing-support" id="id146" name="id146">Printing support</a></li>
367
<li><a class="reference" href="#plugins" id="id147" name="id147">Plugins</a></li>
368
<li><a class="reference" href="#keybindings" id="id148" name="id148">Keybindings</a><ul>
369
<li><a class="reference" href="#switching-documents" id="id149" name="id149">Switching documents</a></li>
370
<li><a class="reference" href="#configurable-keybindings" id="id150" name="id150">Configurable keybindings</a><ul>
371
<li><a class="reference" href="#file-keybindings" id="id151" name="id151">File keybindings</a></li>
372
<li><a class="reference" href="#editor-keybindings" id="id152" name="id152">Editor keybindings</a></li>
373
<li><a class="reference" href="#clipboard-keybindings" id="id153" name="id153">Clipboard keybindings</a></li>
374
<li><a class="reference" href="#select-keybindings" id="id154" name="id154">Select keybindings</a></li>
375
<li><a class="reference" href="#insert-keybindings" id="id155" name="id155">Insert keybindings</a></li>
376
<li><a class="reference" href="#format-keybindings" id="id156" name="id156">Format keybindings</a></li>
377
<li><a class="reference" href="#settings-keybindings" id="id157" name="id157">Settings keybindings</a></li>
378
<li><a class="reference" href="#search-keybindings" id="id158" name="id158">Search keybindings</a></li>
379
<li><a class="reference" href="#go-to-keybindings" id="id159" name="id159">Go to keybindings</a></li>
380
<li><a class="reference" href="#view-keybindings" id="id160" name="id160">View keybindings</a></li>
381
<li><a class="reference" href="#focus-keybindings" id="id161" name="id161">Focus keybindings</a></li>
382
<li><a class="reference" href="#notebook-tab-keybindings" id="id162" name="id162">Notebook tab keybindings</a></li>
383
<li><a class="reference" href="#document-keybindings" id="id163" name="id163">Document keybindings</a></li>
384
<li><a class="reference" href="#build-keybindings" id="id164" name="id164">Build keybindings</a></li>
385
<li><a class="reference" href="#tools-keybindings" id="id165" name="id165">Tools keybindings</a></li>
386
<li><a class="reference" href="#help-keybindings" id="id166" name="id166">Help keybindings</a></li>
393
<li><a class="reference" href="#id4" id="id167" name="id167">Configuration files</a><ul>
394
<li><a class="reference" href="#tools-menu-items" id="id168" name="id168">Tools menu items</a></li>
395
<li><a class="reference" href="#global-configuration-file" id="id169" name="id169">Global configuration file</a></li>
396
<li><a class="reference" href="#filetype-definition-files" id="id170" name="id170">Filetype definition files</a><ul>
397
<li><a class="reference" href="#custom-filetypes" id="id171" name="id171">Custom filetypes</a></li>
398
<li><a class="reference" href="#system-files" id="id172" name="id172">System files</a></li>
399
<li><a class="reference" href="#user-files" id="id173" name="id173">User files</a></li>
400
<li><a class="reference" href="#format" id="id174" name="id174">Format</a><ul>
401
<li><a class="reference" href="#styling-section" id="id175" name="id175">[styling] Section</a><ul>
402
<li><a class="reference" href="#using-a-named-style" id="id176" name="id176">Using a named style</a></li>
405
<li><a class="reference" href="#keywords-section" id="id177" name="id177">[keywords] Section</a></li>
406
<li><a class="reference" href="#lexer-properties-section" id="id178" name="id178">[lexer_properties] Section</a></li>
407
<li><a class="reference" href="#settings-section" id="id179" name="id179">[settings] Section</a></li>
408
<li><a class="reference" href="#build-settings-section" id="id180" name="id180">[build_settings] Section</a></li>
411
<li><a class="reference" href="#special-file-filetypes-common" id="id181" name="id181">Special file filetypes.common</a><ul>
412
<li><a class="reference" href="#named-styles-section" id="id182" name="id182">[named_styles] Section</a></li>
413
<li><a class="reference" href="#id5" id="id183" name="id183">[styling] Section</a></li>
414
<li><a class="reference" href="#id6" id="id184" name="id184">[settings] Section</a></li>
419
<li><a class="reference" href="#filetype-extensions" id="id185" name="id185">Filetype extensions</a></li>
420
<li><a class="reference" href="#preferences-file-format" id="id186" name="id186">Preferences File Format</a><ul>
421
<li><a class="reference" href="#hidden-preferences" id="id187" name="id187">Hidden preferences</a></li>
422
<li><a class="reference" href="#build-menu-section" id="id188" name="id188">[build-menu] Section</a></li>
425
<li><a class="reference" href="#project-file-format" id="id189" name="id189">Project File Format</a><ul>
426
<li><a class="reference" href="#build-menu-additions" id="id190" name="id190">[build-menu] Additions</a></li>
429
<li><a class="reference" href="#templates" id="id191" name="id191">Templates</a><ul>
430
<li><a class="reference" href="#template-meta-data" id="id192" name="id192">Template meta data</a></li>
431
<li><a class="reference" href="#file-templates" id="id193" name="id193">File templates</a><ul>
432
<li><a class="reference" href="#custom-file-templates" id="id194" name="id194">Custom file templates</a></li>
433
<li><a class="reference" href="#filetype-templates" id="id195" name="id195">Filetype templates</a></li>
436
<li><a class="reference" href="#customizing-templates" id="id196" name="id196">Customizing templates</a><ul>
437
<li><a class="reference" href="#template-wildcards" id="id197" name="id197">Template wildcards</a><ul>
438
<li><a class="reference" href="#special-command-wildcard" id="id198" name="id198">Special {command:} wildcard</a></li>
445
<li><a class="reference" href="#customizing-the-toolbar" id="id199" name="id199">Customizing the toolbar</a><ul>
446
<li><a class="reference" href="#manually-editing-of-the-toolbar-layout" id="id200" name="id200">Manually editing of the toolbar layout</a></li>
447
<li><a class="reference" href="#available-toolbar-elements" id="id201" name="id201">Available toolbar elements</a></li>
452
<li><a class="reference" href="#plugin-documentation" id="id202" name="id202">Plugin documentation</a><ul>
453
<li><a class="reference" href="#save-actions" id="id203" name="id203">Save Actions</a><ul>
454
<li><a class="reference" href="#instant-save" id="id204" name="id204">Instant Save</a></li>
455
<li><a class="reference" href="#backup-copy" id="id205" name="id205">Backup Copy</a></li>
460
<li><a class="reference" href="#contributing-to-this-document" id="id206" name="id206">Contributing to this document</a></li>
461
<li><a class="reference" href="#scintilla-keyboard-commands" id="id207" name="id207">Scintilla keyboard commands</a><ul>
462
<li><a class="reference" href="#keyboard-commands" id="id208" name="id208">Keyboard commands</a></li>
465
<li><a class="reference" href="#tips-and-tricks" id="id209" name="id209">Tips and tricks</a><ul>
466
<li><a class="reference" href="#document-notebook" id="id210" name="id210">Document notebook</a></li>
467
<li><a class="reference" href="#editor" id="id211" name="id211">Editor</a></li>
468
<li><a class="reference" href="#interface" id="id212" name="id212">Interface</a></li>
469
<li><a class="reference" href="#gtk-related" id="id213" name="id213">GTK-related</a></li>
472
<li><a class="reference" href="#compile-time-options" id="id214" name="id214">Compile-time options</a><ul>
473
<li><a class="reference" href="#src-geany-h" id="id215" name="id215">src/geany.h</a></li>
474
<li><a class="reference" href="#project-h" id="id216" name="id216">project.h</a></li>
475
<li><a class="reference" href="#editor-h" id="id217" name="id217">editor.h</a></li>
476
<li><a class="reference" href="#keyfile-c" id="id218" name="id218">keyfile.c</a></li>
477
<li><a class="reference" href="#build-h" id="id219" name="id219">build.h</a></li>
478
<li><a class="reference" href="#build-c" id="id220" name="id220">build.c</a></li>
481
<li><a class="reference" href="#gnu-general-public-license" id="id221" name="id221">GNU General Public License</a></li>
482
<li><a class="reference" href="#license-for-scintilla-and-scite" id="id222" name="id222">License for Scintilla and SciTE</a></li>
435
<div class="section" id="introduction">
436
<h1><a class="toc-backref" href="#id11">Introduction</a></h1>
437
<div class="section" id="about-geany">
438
<h2><a class="toc-backref" href="#id12">About Geany</a></h2>
485
<div class="section">
486
<h1><a class="toc-backref" href="#id8" id="introduction" name="introduction">Introduction</a></h1>
487
<div class="section">
488
<h2><a class="toc-backref" href="#id9" id="about-geany" name="about-geany">About Geany</a></h2>
439
489
<p>Geany is a small and lightweight Integrated Development Environment. It
440
490
was developed to provide a small and fast IDE, which has only a few
441
dependencies from other packages. Another goal was to be as independent
442
as possible from a special Desktop Environment like KDE or GNOME -
491
dependencies on other packages. Another goal was to be as independent
492
as possible from a particular Desktop Environment like KDE or GNOME -
443
493
Geany only requires the GTK2 runtime libraries.</p>
444
494
<p>Some basic features of Geany:</p>
445
495
<ul class="simple">
2397
<div class="section" id="project-management">
2398
<h2><a class="toc-backref" href="#id119">Project Management</a></h2>
2594
<div class="section">
2595
<h2><a class="toc-backref" href="#id121" id="project-management" name="project-management">Project Management</a></h2>
2399
2596
<p>Project Management is optional in Geany. Currently it can be used for:</p>
2400
2597
<ul class="simple">
2401
2598
<li>Storing and opening session files on a project basis.</li>
2402
<li>Running <em>Make</em> from the project's base directory.</li>
2403
<li>Setting a custom <em>Run</em> command specific to the project.</li>
2599
<li>Configuring the Build menu on a project basis.</li>
2405
2601
<p>A list of session files can be stored and opened with the project
2406
2602
when the <em>Use project-based session files</em> preference is enabled,
2407
in the <em>Project</em> group of the <a class="reference internal" href="#preferences">Preferences</a> dialog.</p>
2408
<p>As long as a project is open, the Make and Run commands will use
2409
the project's settings, instead of the defaults. These will be used
2410
whichever document is currently displayed.</p>
2603
in the <em>Project</em> group of the <a class="reference" href="#preferences">Preferences</a> dialog.</p>
2604
<p>As long as a project is open, the Build menu will use
2605
the items defined in project's settings, instead of the defaults.
2606
See <a class="reference" href="#build-menu-configuration">Build Menu Configuration</a> for information on configuring the menu.</p>
2411
2607
<p>The current project's settings are saved when it is closed, or when
2412
2608
Geany is shutdown. When restarting Geany, the previously opened project
2413
2609
file that was in use at the end of the last session will be reopened.</p>
2414
<p>Below are the commands used to create, modify, open and close projects.</p>
2415
<div class="section" id="new-project">
2416
<h3><a class="toc-backref" href="#id120">New Project</a></h3>
2610
<p>The project menu items are detailed below.</p>
2611
<div class="section">
2612
<h3><a class="toc-backref" href="#id122" id="new-project" name="new-project">New Project</a></h3>
2417
2613
<p>To create a new project, fill in the <em>Name</em> field. By default this
2418
will setup a new project file <tt class="docutils literal">~/projects/name.geany</tt>. Usually it's
2614
will setup a new project file <tt class="docutils literal"><span class="pre">~/projects/name.geany</span></tt>. Usually it's
2419
2615
best to store all your project files in the same directory (they are
2420
2616
independent of any source directory trees).</p>
2421
<p>The Base path text field is setup to use <tt class="docutils literal">~/projects/name</tt>. This
2617
<p>The Base path text field is setup to use <tt class="docutils literal"><span class="pre">~/projects/name</span></tt>. This
2422
2618
can safely be set to any existing path -- it will not touch the file
2423
2619
structure contained in it.</p>
2425
<div class="section" id="project-properties">
2426
<h3><a class="toc-backref" href="#id121">Project Properties</a></h3>
2621
<div class="section">
2622
<h3><a class="toc-backref" href="#id123" id="project-properties" name="project-properties">Project Properties</a></h3>
2427
2623
<p>You can set an optional description for the project, but it is not
2428
2624
used elsewhere by Geany.</p>
2429
<p>The <em>Base path</em> field is used as the directory to run the Make and Make
2430
custom commands in. It is also used as working directory for the project
2431
specific <em>Run command</em>.
2432
The specified path can be an absolute path or relative to the project's
2434
<div class="section" id="make-in-base-path">
2435
<h4><a class="toc-backref" href="#id122">Make in base path</a></h4>
2436
<p>This setting makes the <em>Build->Make</em> command use the project's base
2437
path. Uncheck this if you want to use the current file's directory
2440
<div class="section" id="run-command">
2441
<h4><a class="toc-backref" href="#id123">Run command</a></h4>
2442
<p>The <em>Run command</em> overrides the default run command. You can set this
2443
to the executable or main script file for the project, and append
2444
any command-line arguments.</p>
2445
<p>The following variables can be used:</p>
2447
<li>%f -- complete filename without path</li>
2448
<li>%e -- filename without path and without extension</li>
2450
<p>See <a class="reference internal" href="#build-settings-section">[build_settings] Section</a> for details.</p>
2453
<div class="section" id="open-project">
2454
<h3><a class="toc-backref" href="#id124">Open Project</a></h3>
2625
<p>The <em>Base path</em> field is used as the directory to run the Build menu commands.
2626
The specified path can be an absolute path or it is considered to be
2627
relative to the project's file name.</p>
2628
<div class="section">
2629
<h4><a class="toc-backref" href="#id124" id="set-base-path-button" name="set-base-path-button">Set Base Path Button</a></h4>
2630
<p>This button is a convenience to set the working directory fields
2631
in the non-filetype Build menu items to %p to use the project base path.</p>
2633
<p class="first admonition-title">Note</p>
2634
<p class="last">Pressing the 'set' button will override any working directories
2635
you have configured for the project.</p>
2639
<div class="section">
2640
<h3><a class="toc-backref" href="#id125" id="open-project" name="open-project">Open Project</a></h3>
2455
2641
<p>The Open command displays a standard file chooser, starting in
2456
<tt class="docutils literal">~/projects</tt>. Choose a project file named with the <tt class="docutils literal">.geany</tt>
2642
<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>
2458
2644
<p>When project session support is enabled, Geany will close the currently
2459
2645
open files and open the session files associated with the project.</p>
2461
<div class="section" id="close-project">
2462
<h3><a class="toc-backref" href="#id125">Close Project</a></h3>
2647
<div class="section">
2648
<h3><a class="toc-backref" href="#id126" id="close-project" name="close-project">Close Project</a></h3>
2463
2649
<p>Project file settings are saved when the project is closed.</p>
2464
2650
<p>When project session support is enabled, Geany will close the project
2465
2651
session files and open any previously closed default session files.</p>
2468
<div class="section" id="build-system">
2469
<h2><a class="toc-backref" href="#id126">Build system</a></h2>
2470
<p>Geany has an integrated build system. Firstly this means that the
2471
current source file will be saved before it is processed. This is
2472
for convenience so that you don't need to keep saving small changes
2473
to the current file before building.</p>
2474
<p>Secondly the output for Compile, Build and Make actions will be captured
2475
in the Compiler notebook tab of the messages window. If there are
2476
any warnings or errors with line numbers shown in red in the Compiler
2477
output tab, you can click on them and Geany will switch to the relevant
2478
source file (or open it) and mark the line number so the problem can be
2479
corrected. Geany will also set indicators for warnings or errors with
2654
<div class="section">
2655
<h2><a class="toc-backref" href="#id127" id="build-menu" name="build-menu">Build Menu</a></h2>
2656
<p>After editing code with Geany, the next step is to compile, link, build,
2657
interpret, run etc. As Geany supports many languages each with a different
2658
approach to such operations, and as there are also many language independent
2659
software building systems, Geany does not have a built-in build system, nor
2660
does it limit which system you can use. Instead the build menu provides
2661
a configurable and flexible means of running any external commands to
2662
execute your preferred build system.</p>
2663
<p>This section provides a description of the default configuration of the
2664
build menu and then covers how to configure it, and where the defaults fit in.</p>
2665
<p>Running the commands from within Geany has two benefits:</p>
2667
<li>The current file is automatically saved before the command is run.</li>
2668
<li>The output is captured in the Compiler notebook tab and parsed for
2669
warnings or errors.</li>
2671
<p>Warnings and errors that can be parsed for line numbers will be shown in
2672
red in the Compiler tab and you can click on them to switch to the relevant
2673
source file (or open it) and mark the line number. Also lines with
2674
warnings or errors are marked in the source, see <a class="reference" href="#indicators">Indicators</a> below.</p>
2481
2675
<div class="tip">
2482
2676
<p class="first admonition-title">Tip</p>
2483
2677
<p class="last">If Geany's default error message parsing does not parse errors for
2484
the tool you're using, you can set a custom regex. See <a class="reference internal" href="#filetype-definition-files">Filetype
2485
definition files</a> and the <a class="reference internal" href="#build-settings-section">[build_settings] Section</a>.</p>
2487
<p>Depending on the current file's filetype, the Build menu will contain
2678
the tool you're using, you can set a custom regex in the Build Commands
2679
Dialog, see <a class="reference" href="#build-menu-configuration">Build Menu Configuration</a>.</p>
2681
<div class="section">
2682
<h3><a class="toc-backref" href="#id128" id="indicators" name="indicators">Indicators</a></h3>
2683
<p>Indicators are red squiggly underlines which are used to highlight
2684
errors which occurred while compiling the current file. So you can
2685
easily see where your code failed to compile. You can remove them by
2686
selecting <em>Remove Error Indicators</em> in the Document menu.</p>
2687
<p>If you do not like this feature, you can disable it - see <a class="reference" href="#editor-features-preferences">Editor Features
2688
preferences</a>.</p>
2690
<div class="section">
2691
<h3><a class="toc-backref" href="#id129" id="default-build-menu-items" name="default-build-menu-items">Default Build Menu Items</a></h3>
2692
<p>Depending on the current file's filetype, the default Build menu will contain
2488
2693
the following items:</p>
2489
2694
<ul class="simple">
2490
2695
<li>Compile</li>
2492
2697
<li>Make All</li>
2493
2698
<li>Make Custom Target</li>
2494
2699
<li>Make Object</li>
2701
<li>Previous Error</li>
2495
2702
<li>Execute</li>
2496
<li>Set Includes and Arguments</li>
2703
<li>Set Build Menu Commands</li>
2498
<div class="section" id="compile">
2499
<h3><a class="toc-backref" href="#id127">Compile</a></h3>
2705
<div class="section">
2706
<h4><a class="toc-backref" href="#id130" id="compile" name="compile">Compile</a></h4>
2500
2707
<p>The Compile command has different uses for different kinds of files.</p>
2501
2708
<p>For compilable languages such as C and C++, the Compile command is
2502
setup to compile the current source file into a binary object file.</p>
2503
<p>Java source files will be compiled to class file bytecode. Interpreted
2504
languages such as Perl, Python, Ruby will compile to bytecode if the
2505
language supports it, or will run a syntax check, or failing that
2506
will run the file in its language interpreter.</p>
2709
set up to compile the current source file into a binary object file.</p>
2710
<p>Java source files will be compiled to class file bytecode.</p>
2711
<p>Interpreted languages such as Perl, Python, Ruby will compile to
2712
bytecode if the language supports it, or will run a syntax check,
2713
or if that is not available will run the file in its language interpreter.</p>
2508
<div class="section" id="build">
2509
<h3><a class="toc-backref" href="#id128">Build</a></h3>
2715
<div class="section">
2716
<h4><a class="toc-backref" href="#id131" id="build" name="build">Build</a></h4>
2510
2717
<p>For compilable languages such as C and C++, the Build command will link
2511
2718
the current source file's equivalent object file into an executable. If
2512
2719
the object file does not exist, the source will be compiled and linked
2513
2720
in one step, producing just the executable binary.</p>
2514
2721
<p>Interpreted languages do not use the Build command.</p>
2516
<div class="section" id="make-all">
2517
<h3><a class="toc-backref" href="#id129">Make all</a></h3>
2518
<p>This effectively runs "make all" in the same directory as the
2723
<p class="first admonition-title">Note</p>
2724
<p class="last">If you need complex settings for your build system, or several
2725
different settings, then writing a Makefile and using the Make
2726
commands is recommended; this will also make it easier for users to
2727
build your software.</p>
2730
<div class="section">
2731
<h4><a class="toc-backref" href="#id132" id="make" name="make">Make</a></h4>
2732
<p>This runs "make" in the same directory as the
2519
2733
current file.</p>
2521
<p class="first admonition-title">Note</p>
2522
<p class="last">For each of the Make commands, The Make tool path must be correctly
2523
set in the Tools tab of the Preferences dialog.</p>
2526
<div class="section" id="make-custom-target">
2527
<h3><a class="toc-backref" href="#id130">Make custom target</a></h3>
2528
<p>This is similar to running 'Make all' but you will be prompted for
2735
<div class="section">
2736
<h4><a class="toc-backref" href="#id133" id="make-custom-target" name="make-custom-target">Make custom target</a></h4>
2737
<p>This is similar to running 'Make' but you will be prompted for
2529
2738
the make target name to be passed to the Make tool. For example,
2530
2739
typing 'clean' in the dialog prompt will run "make clean".</p>
2532
<div class="section" id="make-object">
2533
<h3><a class="toc-backref" href="#id131">Make object</a></h3>
2741
<div class="section">
2742
<h4><a class="toc-backref" href="#id134" id="make-object" name="make-object">Make object</a></h4>
2534
2743
<p>Make object will run "make current_file.o" in the same directory as
2535
the current file, using its prefix for 'current_file'. It is useful
2536
for compiling just the current file without building the whole project.</p>
2538
<div class="section" id="execute">
2539
<h3><a class="toc-backref" href="#id132">Execute</a></h3>
2744
the current file, using the filename for 'current_file'. It is useful
2745
for building just the current file without building the whole project.</p>
2747
<div class="section">
2748
<h4><a class="toc-backref" href="#id135" id="next-error" name="next-error">Next Error</a></h4>
2749
<p>The next error item will move to the next detected error in the file.</p>
2751
<div class="section">
2752
<h4><a class="toc-backref" href="#id136" id="previous-error" name="previous-error">Previous Error</a></h4>
2753
<p>The previous error item will move to the previous detected error in the file.</p>
2755
<div class="section">
2756
<h4><a class="toc-backref" href="#id137" id="execute" name="execute">Execute</a></h4>
2540
2757
<p>Execute will run the corresponding executable file, shell script or
2541
2758
interpreted script in a terminal window. Note that the Terminal tool
2542
2759
path must be correctly set in the Tools tab of the Preferences dialog -
2543
2760
you can use any terminal program that runs a Bourne compatible shell
2544
and accept the "-e" command line argument to start a command.</p>
2761
and accept the "-e" command line argument to start a command or can be
2762
selected to use the built-in VTE if it is available - see
2763
<a class="reference" href="#virtual-terminal-emulator-widget-vte">Virtual terminal emulator widget (VTE)</a>.</p>
2545
2764
<p>After your program or script has finished executing, you will be
2546
2765
prompted to press the return key. This allows you to review any text
2547
2766
output from the program before the terminal window is closed.</p>
2549
<div class="section" id="stopping-running-processes">
2550
<h3><a class="toc-backref" href="#id133">Stopping running processes</a></h3>
2551
<p>When there is a running program, the Run button in the toolbar
2552
becomes a stop button and you can stop the current action. This
2553
works by sending a signal to the process (and its child process(es))
2554
to stop the process. The used signal is SIGQUIT.</p>
2555
<p>Depending on the process you started it might occur that the process
2556
cannot be stopped. This can happen when the process creates more than
2557
one child process.</p>
2558
<div class="section" id="terminal-emulators">
2559
<h4><a class="toc-backref" href="#id134">Terminal emulators</a></h4>
2768
<p class="first admonition-title">Note</p>
2769
<p class="last">The execute command output is not parsed for errors.</p>
2772
<div class="section">
2773
<h4><a class="toc-backref" href="#id138" id="stopping-running-processes" name="stopping-running-processes">Stopping running processes</a></h4>
2774
<p>When there is a running program, the Execute menu item in the menu and
2775
the Run button in the toolbar
2776
each become a stop button so you can stop the current running program (and
2777
any child processes). This works by sending the SIGQUIT signal to the process.</p>
2778
<p>Depending on the process you started it is possible that the process
2779
cannot be stopped. For example this can happen when the process creates
2780
more than one child process.</p>
2781
<div class="section">
2782
<h5><a class="toc-backref" href="#id139" id="terminal-emulators" name="terminal-emulators">Terminal emulators</a></h5>
2560
2783
<p>Xterm is known to work properly. If you are using "Terminal"
2561
2784
(the terminal program of Xfce), you should add the command line
2562
2785
option <tt class="docutils literal"><span class="pre">--disable-server</span></tt> otherwise the started process cannot be
2564
2787
tab in the terminal field.</p>
2567
<div class="section" id="set-includes-and-arguments">
2568
<h3><a class="toc-backref" href="#id135">Set Includes and Arguments</a></h3>
2569
<p>By default the Compile and Build commands invoke the compiler and
2790
<div class="section">
2791
<h4><a class="toc-backref" href="#id140" id="set-build-commands" name="set-build-commands">Set Build Commands</a></h4>
2792
<p>By default the Compile and Build commands invoke the GCC compiler and
2570
2793
linker with only the basic arguments needed by all programs. Using
2571
Set Includes and Arguments you can add any include paths and compile
2794
<em>Set Build Commands</em> you can add any include paths and compile
2572
2795
flags for the compiler, any library names and paths for the linker,
2573
2796
and any arguments you want to use when running Execute.</p>
2575
<p class="first admonition-title">Note</p>
2576
<p class="last">If you need complex settings for your build system, or several
2577
different settings, then writing a Makefile and using the Make
2578
commands is recommended; this will also make it easier for users to
2579
build your software.</p>
2799
<div class="section">
2800
<h3><a class="toc-backref" href="#id141" id="build-menu-configuration" name="build-menu-configuration">Build Menu Configuration</a></h3>
2801
<p>The build menu has considerable flexibility and configurability, allowing
2802
both menu labels the commands they execute and the directory they execute
2803
in to be configured.</p>
2804
<p>For example, if you change one of the default make commands to run say 'waf'
2805
you can also change the label to match.</p>
2581
2806
<p>These settings are saved automatically when Geany is shut down.</p>
2582
<p>The following variables can be used:</p>
2584
<li>%f -- complete filename without path</li>
2585
<li>%e -- filename without path and without extension</li>
2587
<p>See <a class="reference internal" href="#build-settings-section">[build_settings] Section</a> for details.</p>
2588
<div class="section" id="one-step-compilation">
2589
<h4><a class="toc-backref" href="#id136">One step compilation</a></h4>
2590
<p>If you are using the Build command to compile and link in one step,
2591
you will need to set both the compiler arguments and the linker
2592
arguments in the linker command setting.</p>
2595
<div class="section" id="indicators">
2596
<h3><a class="toc-backref" href="#id137">Indicators</a></h3>
2597
<p>Indicators are red squiggly underlines which are used to highlight
2598
errors which occurred while compiling the current file. So you can
2599
easily see where your code failed to compile. To remove the indicators,
2600
just click on "Remove all indicators" in the document file menu.</p>
2601
<p>If you do not like this feature, you can disable it in the preferences
2605
<div class="section" id="printing-support">
2606
<h2><a class="toc-backref" href="#id138">Printing support</a></h2>
2607
<p>Since Geany 0.13 there is full printing support using GTK's printing API.
2807
<p>The build menu is divided into four groups of items each with different
2810
<li><p class="first">File items - are configurable and depend on the filetype of the current
2811
document; they capture output in the compiler tab and parse it for
2814
<li><p class="first">Non-file items - are configurable and mostly don't depend on the filetype
2815
of the current document; they also capture output in the compiler tab and
2816
parse it for errors.</p>
2818
<li><p class="first">Execute items - are configurable and intended for executing your
2819
program or other long running programs. The output is not parsed for errors
2820
and is directed to the terminal selected in preferences.</p>
2822
<li><dl class="first docutils">
2823
<dt>Fixed items - these perform built-in actions:</dt>
2824
<dd><ul class="first last simple">
2825
<li>Go to the next error.</li>
2826
<li>Go to the previous error.</li>
2827
<li>Show the build menu commands dialog.</li>
2833
<p>The maximum numbers of items in each of the configurable groups can be
2834
configured when Geany starts using hidden settings (see <a class="reference" href="#preferences-file-format">Preferences File Format</a>).
2835
Even though the maximum number of items may have been increased, only
2836
those menu items that have values configured are shown in the menu.</p>
2837
<p>The groups of menu items obtain their configuration from four potential
2838
sources. The highest priority source that has the menu item defined will
2839
be used. The sources in decreasing priority are:</p>
2841
<li>A project file if open</li>
2842
<li>The user preferences</li>
2843
<li>The system filetype definitions</li>
2844
<li>The defaults</li>
2846
<p>The detailed relationships between sources and the configurable menu item groups
2847
is shown in the following table.</p>
2848
<table border="1" class="docutils">
2856
<thead valign="bottom">
2857
<tr><th class="head">Group</th>
2858
<th class="head">Project File</th>
2859
<th class="head">Preferences</th>
2860
<th class="head">System Filetype</th>
2861
<th class="head">Defaults</th>
2864
<tbody valign="top">
2865
<tr><td>Filetype</td>
2866
<td><p class="first">Loads From: project
2868
<p class="last">Saves To: project
2871
<td><p class="first">Loads From:
2872
filetype.xxx file in
2873
~/.config/geany/filedefs</p>
2874
<p class="last">Saves to: as above,
2875
creating if needed.</p>
2877
<td><p class="first">Loads From:
2880
<p class="last">Saves to: as user
2881
preferences left.</p>
2885
<tr><td>Non-Filetype</td>
2886
<td><p class="first">Loads From: project
2888
<p class="last">Saves To: project
2891
<td><p class="first">Loads From:
2894
<p class="last">Saves to: as above,
2895
creating if needed.</p>
2897
<td><p class="first">Loads From:
2900
<p class="last">Saves to: as user
2901
preferences left.</p>
2903
<td><dl class="first last docutils">
2908
<dd>Label: Make Custom _Target
2911
<dd>Label: Make _Object
2912
Command: make %e.o</dd>
2916
<tr><td>Execute</td>
2917
<td><p class="first">Loads From: project
2921
<p class="last">Saves To:
2924
<td><p class="first">Loads From:
2926
~/.config/geany or else
2927
filetype.xxx file in
2928
~/.config/geany/filedefs</p>
2929
<p class="last">Saves To:
2930
filetype.xxx file in
2931
~/.config/geany/filedefs</p>
2933
<td><p class="first">Loads From:
2936
<p class="last">Saves To: as user
2937
preferences left</p>
2939
<td>Label: _Execute Command: ./%e</td>
2943
<p>The following notes on the table reference cells by coordinate as (group,source):</p>
2945
<li>General - for filetype.xxx substitute the filetype name of the
2946
current document for xxx.</li>
2947
<li>System Filetypes - Labels loaded from these sources are locale sensitive
2948
and can contain translations.</li>
2949
<li>(Filetype, Project File) and (Filetype, Preferences) - preferences use a full
2950
filetype file so that users can configure all other filetype preferences
2951
as well. Projects can only configure menu items per filetype. Saving
2952
in the project file means that there is only one file per project not
2953
a whole directory.</li>
2954
<li>(Non-Filetype, System Filetype) - although conceptually strange, defining
2955
non-filetype commands in a filetype file, this provides the ability to
2956
define filetype dependent default menu items.</li>
2957
<li>(Execute, Project File) and (Execute, Preferences) - the project filetype based execute
2958
configuration and preferences non-filetype based execute can only be set by hand editing the
2959
appropriate file, see <a class="reference" href="#preferences-file-format">Preferences File Format</a> and <a class="reference" href="#project-file-format">Project File Format</a>.</li>
2962
<div class="section">
2963
<h3><a class="toc-backref" href="#id142" id="build-menu-commands-dialog" name="build-menu-commands-dialog">Build Menu Commands Dialog</a></h3>
2964
<p>Most of the configuration of the build menu is done through the Build Menu
2965
Commands Dialog. You edit the configuration sourced from preferences in the
2966
dialog opened from the Build->Build Menu Commands item and you edit the
2967
configuration from the project in the build tab of the project preferences
2968
dialog. Both use the same form shown below.</p>
2969
<img alt="./images/build_menu_commands_dialog.png" src="./images/build_menu_commands_dialog.png" />
2970
<p>The dialog is divided into three sections:</p>
2972
<li>Filetype menu items which will be selected based on the filetype of the
2973
currently open document.</li>
2974
<li>Non-filetype menu items.</li>
2975
<li>Execute menu items.</li>
2977
<p>The filetype and non-filetype sections also each contain a field for the regular
2978
expression used for parsing command output for error and warning messages.</p>
2979
<p>The columns in the first three sections allow setting of the label, command,
2980
and working directory to run the command in.</p>
2981
<p>An item with an empty label will not be shown in the menu.</p>
2982
<p>An empty working directory will default to the directory of the current document.
2983
If there is no current document then the command will not run.</p>
2984
<p>The dialog will always show the command selected by priority, not just the
2985
commands configured in this configuration source. This ensures that you always
2986
see what the menu item is going to do if activated.</p>
2987
<p>If the current source of the menu item is higher priority than the
2988
configuration source you are editing then the command will be shown
2989
in the dialog but will be insensitive (greyed out). This can't happen
2990
with the project source but can with the preferences source dialog.</p>
2991
<p>The clear buttons remove the definition from the configuration source you are editing.
2992
When you do this the command from the next lower priority source will be shown.
2993
To hide lower priority menu items without having anything show in the menu
2994
configure with a nothing in the label but at least one character in the command.</p>
2995
<div class="section">
2996
<h4><a class="toc-backref" href="#id143" id="substitutions-in-commands-and-working-directories" name="substitutions-in-commands-and-working-directories">Substitutions in Commands and Working Directories</a></h4>
2997
<p>The first occurance of each of the following character sequences in each of the
2998
command and working directory fields is substituted by the items specified below
2999
before the command is run.</p>
3001
<li>%d - substituted by the absolute path to the directory of the current file.</li>
3002
<li>%e - substituted by the name of the current file without the extension or path.</li>
3003
<li>%f - substituted by the name of the current file without the path.</li>
3004
<li>%p - if a project is open, substituted by the base path from the project.</li>
3007
<p class="first admonition-title">Note</p>
3008
<p class="last">If the basepath set in the project preferences is not an absolute path , then it is
3009
taken as relative to the directory of the project file. This allows a project file
3010
stored in the source tree to specify all commands and working directories relative
3011
to the tree itself, so that the whole tree including the project file, can be moved
3012
and even checked into and out of version control without having to re-configure the
3016
<div class="section">
3017
<h4><a class="toc-backref" href="#id144" id="build-menu-keyboard-shortcuts" name="build-menu-keyboard-shortcuts">Build Menu Keyboard Shortcuts</a></h4>
3018
<p>Keyboard shortcuts can be defined for the first two filetype menu items, the first three
3019
non-filetype menu items, the first two execute menu items and the fixed menu items.
3020
In the keybindings configuration dialog (see <a class="reference" href="#keybinding-preferences">Keybinding preferences</a>)
3021
these items are identified by the default labels shown in the <a class="reference" href="#build-menu">Build Menu</a> section above.</p>
3022
<p>It is currently not possible to bind keyboard shortcuts to more than these menu items.</p>
3023
<p>You can also use underlines in the labels to set mnemonic characters.</p>
3025
<div class="section">
3026
<h4><a class="toc-backref" href="#id145" id="configuration-files" name="configuration-files">Configuration Files</a></h4>
3027
<p>The configurable Build Menu capability was introduced in Geany V0.19 and
3028
required a new section to be added to the configuration files (See
3029
<a class="reference" href="#preferences-file-format">Preferences File Format</a>). Geany will still load older format project,
3030
preferences and filetype file settings and will attempt to map them into the new
3031
configuration format. There is not a simple clean mapping between the formats.
3032
The mapping used produces the most sensible results for the majority of cases.
3033
However, if they do not map the way you want, you may have to manually
3034
configure some settings using the Build Commands
3035
Dialog or the Build tab of the project preferences dialog.</p>
3036
<p>Any setting configured in either of these dialogs will override settings mapped from
3037
older format configuration files.</p>
3041
<div class="section">
3042
<h2><a class="toc-backref" href="#id146" id="printing-support" name="printing-support">Printing support</a></h2>
3043
<p>Since Geany 0.13 there has been printing support using GTK's printing API.
2608
3044
The printed page(s) will look nearly the same as on your screen in Geany.
2609
Additionally, there are some options to modify the printed page(s). You
2610
can define whether to print line numbers, page numbers at the bottom of
3045
Additionally, there are some options to modify the printed page(s).</p>
3046
<p>You can define whether to print line numbers, page numbers at the bottom of
2611
3047
each page and whether to print a page header on each page. This header
2612
3048
contains the filename of the printed document, the current page number and
2613
3049
the date and time of printing. By default, the file name of the document
2614
is added with full path information to the header. If you prefer to add
3050
with full path information is added to the header. If you prefer to add
2615
3051
only the basename of the file(without any path information) you can set it
2616
3052
in the preferences dialog. You can also adjust the format of the date and
2617
3053
time added to the page header. The available conversion specifiers are the
2618
same as the ones which can be used with the ANSI C strftime function.
2619
All of these settings can also be changed in the print dialog just before
3054
same as the ones which can be used with the ANSI C strftime function.</p>
3055
<p>All of these settings can also be changed in the print dialog just before
2620
3056
actual printing is done.
2621
3057
On Unix-like systems the provided print dialog offers a print preview. The
2622
preview file is opened with a PDF viewer and by default GTK uses <tt class="docutils literal">evince</tt>
2623
for print preview. If you don't have installed evince or just want to use
3058
preview file is opened with a PDF viewer and by default GTK uses <tt class="docutils literal"><span class="pre">evince</span></tt>
3059
for print preview. If you have not installed evince or just want to use
2624
3060
another PDF viewer, you can change the program to use in the file
2625
3061
<tt class="docutils literal"><span class="pre">.gtkrc-2.0</span></tt> (usually found in your home directory). Simply add a line
3824
4613
Make=Makefile*;*.mk;Buildfile;
3827
<div class="section" id="templates">
3828
<h2><a class="toc-backref" href="#id158">Templates</a></h2>
4616
<div class="section">
4617
<h2><a class="toc-backref" href="#id186" id="preferences-file-format" name="preferences-file-format">Preferences File Format</a></h2>
4618
<p>The preferences file <tt class="docutils literal"><span class="pre">~/.config/geany/geany.conf</span></tt> holds settings for all the items configured
4619
in the preferences dialog. This file should not be edited while Geany is running
4620
as the file will be overwritten when the preferences in Geany are changed or Geany
4622
<div class="section">
4623
<h3><a class="toc-backref" href="#id187" id="hidden-preferences" name="hidden-preferences">Hidden preferences</a></h3>
4624
<p>There are some rarely used preferences that are not shown in the Preferences
4625
dialog. These can be set by editing the preferences file, then
4626
selecting <em>Tools->Reload Configuration</em> or restarting Geany. Search for the
4627
key name, then edit the value. Example:</p>
4629
<tt class="docutils literal"><span class="pre">brace_match_ltgt=true</span></tt></blockquote>
4630
<p>The table below show the key names of hidden preferences in the
4631
configuration file.</p>
4632
<table border="1" class="docutils">
4638
<thead valign="bottom">
4639
<tr><th class="head">Key</th>
4640
<th class="head">Description</th>
4641
<th class="head">Default</th>
4644
<tbody valign="top">
4645
<tr><td><strong>Editor related</strong></td>
4649
<tr><td>brace_match_ltgt</td>
4650
<td>Whether to highlight <, > angle brackets.</td>
4653
<tr><td>show_editor_scrollbars</td>
4654
<td>Whether to display scrollbars. If set to
4655
false, the horizontal and vertical
4656
scrollbars are hidden completely.</td>
4659
<tr><td>use_gtk_word_boundaries</td>
4660
<td>Whether to look for the end of a word when
4661
using word-boundary related Scintilla
4662
commands (see <a class="reference" href="#scintilla-keyboard-commands">Scintilla keyboard
4666
<tr><td>complete_snippets_whilst_editing</td>
4667
<td>Whether to allow completion of snippets
4668
when editing an existing line (i.e. there
4669
is some text after the current cursor
4670
position on the line). Only used when the
4671
keybinding <tt class="docutils literal"><span class="pre">Complete</span> <span class="pre">snippet</span></tt> is set to
4672
<tt class="docutils literal"><span class="pre">Space</span></tt>.</td>
4675
<tr><td><strong>Interface related</strong></td>
4679
<tr><td>show_symbol_list_expanders</td>
4680
<td>Whether to show or hide the small expander
4681
icons on the symbol list treeview (only
4682
available with GTK 2.12 or above).</td>
4685
<tr><td>allow_always_save</td>
4686
<td>Whether files can be saved always, even if
4687
they don't have any changes. By default,
4688
the Save buttons and menu items are
4689
disabled when a file is unchanged. When
4690
setting this option to true, the Save
4691
buttons and menu items are always active
4692
and files can be saved.</td>
4695
<tr><td>compiler_tab_autoscroll</td>
4696
<td>Whether to automatically scroll to the
4697
last line of the output in the Compiler
4701
<tr><td><strong>VTE related</strong></td>
4705
<tr><td>emulation</td>
4706
<td>Terminal emulation mode. Only change this
4707
if you have VTE termcap files other than
4708
<tt class="docutils literal"><span class="pre">vte/termcap/xterm</span></tt>.</td>
4711
<tr><td>send_selection_unsafe</td>
4712
<td>By default, Geany strips any trailing
4713
newline characters from the current
4714
selection before sending it to the terminal
4715
to not execute arbitrary code. This is
4716
mainly a security feature.
4717
If, for whatever reasons, you really want
4718
it to be executed directly, set this option
4722
<tr><td><strong>File related</strong></td>
4726
<tr><td>use_safe_file_saving</td>
4727
<td>Defines the mode how Geany saves files to
4728
disk. If disabled, Geany directly writes
4729
the content of the document to disk. This
4730
might cause in loss of data when there is
4731
no more free space on disk to save the
4732
file. When set to true, Geany first saves
4733
the contents into a temporary file and if
4734
this succeeded, the temporary file is
4735
moved to the real file to save.
4736
This gives better error checking in case of
4737
no more free disk space. But it also
4738
destroys hard links of the original file
4739
and its permissions (e.g. executable flags
4740
are reset). Use this with care as it can
4741
break things seriously.
4742
The better approach would be to ensure your
4743
disk won't run out of free space.</td>
4746
<tr><td><strong>Build Menu related</strong></td>
4750
<tr><td>number_ft_menu_items</td>
4751
<td>The maximum number of menu items in the
4752
filetype section of the Build menu.</td>
4755
<tr><td>number_non_ft_menu_items</td>
4756
<td>The maximum number of menu items in the
4757
non-filetype section of the Build menu.</td>
4760
<tr><td>number_exec_menu_items</td>
4761
<td>The maximum number of menu items in the
4762
execute section of the Build menu.</td>
4768
<div class="section">
4769
<h3><a class="toc-backref" href="#id188" id="build-menu-section" name="build-menu-section">[build-menu] Section</a></h3>
4770
<p>The [build-menu] section contains the configuration of the build menu.
4771
This section can occur in filetype, preferences and project files and
4772
always has the format described here. Different menu items are loaded
4773
from different files, see the table in the <a class="reference" href="#build-menu-configuration">Build Menu Configuration</a>
4774
section for details. All the settings can be configured from the dialogs
4775
except the execute command in filetype files and filetype definitions in
4776
the project file, so these are the only ones which need hand editing.</p>
4777
<p>The build-menu section stores one entry for each setting for each menu item that
4778
is configured. The keys for these settings have the format:</p>
4780
<tt class="docutils literal"><span class="pre">GG_NN_FF</span></tt></blockquote>
4783
<li>GG - is the menu item group,<ul>
4784
<li>FT for filetype</li>
4785
<li>NF for non-filetype</li>
4786
<li>EX for execute</li>
4789
<li>NN - is a two decimal digit number of the item within the group,
4791
<li>FF - is the field,<ul>
4792
<li>LB for label</li>
4793
<li>CM for command</li>
4794
<li>WD for working directory</li>
4800
<div class="section">
4801
<h2><a class="toc-backref" href="#id189" id="project-file-format" name="project-file-format">Project File Format</a></h2>
4802
<p>The project file contains project related settings and possibly a
4803
record of the current session files.</p>
4804
<div class="section">
4805
<h3><a class="toc-backref" href="#id190" id="build-menu-additions" name="build-menu-additions">[build-menu] Additions</a></h3>
4806
<p>The project file also can have extra fields in the [build-menu] section
4807
in addition to those listed in <a class="reference" href="#build-menu-section">[build-menu] Section</a> above.</p>
4808
<p>When filetype menu items are configured for the project they are stored
4809
in the project file.</p>
4810
<p>The <tt class="docutils literal"><span class="pre">filetypes</span></tt> entry is a list of the filetypes which exist in the
4812
<p>For each filetype the entries for that filetype have the format defined in
4813
<a class="reference" href="#build-menu-section">[build-menu] Section</a> but the key is prefixed by the name of the filetype
4814
as it appears in the <tt class="docutils literal"><span class="pre">filetypes</span></tt> entry, eg the entry for the label of
4815
filetype menu item 0 for the C filetype would be</p>
4817
<tt class="docutils literal"><span class="pre">CFT_00_LB=Label</span></tt></blockquote>
4820
<div class="section">
4821
<h2><a class="toc-backref" href="#id191" id="templates" name="templates">Templates</a></h2>
3829
4822
<p>Geany supports the following templates:</p>
3830
4823
<ul class="simple">
3831
4824
<li>ChangeLog entry</li>
3847
4840
of a function or the function name cannot be determined, the inserted
3848
4841
function description won't contain the correct function name but "unknown"
3850
<div class="section" id="template-meta-data">
3851
<h3><a class="toc-backref" href="#id159">Template meta data</a></h3>
4844
<p class="first admonition-title">Note</p>
4845
<p class="last">Geany automatically reloads template information when it notices you
4846
save a file in the user's template configuration directory. You can
4847
also force this by selecting <em>Tools->Reload Configuration</em>.</p>
4849
<div class="section">
4850
<h3><a class="toc-backref" href="#id192" id="template-meta-data" name="template-meta-data">Template meta data</a></h3>
3852
4851
<p>Meta data can be used with all templates, but by default user set
3853
4852
meta data is only used for the ChangeLog and File header templates.</p>
3854
4853
<p>In the configuration dialog you can find a tab "Templates" (see
3855
<a class="reference internal" href="#template-preferences">Template preferences</a>). You can define the
3856
default values which will be inserted in the templates. You should
3857
restart Geany after making changes, because they are only read
4854
<a class="reference" href="#template-preferences">Template preferences</a>). You can define the default values
4855
which will be inserted in the templates. You should select
4856
<em>Tools->Reload Configuration</em> or restart Geany after making changes.</p>
3860
<div class="section" id="file-templates">
3861
<h3><a class="toc-backref" href="#id160">File templates</a></h3>
4858
<div class="section">
4859
<h3><a class="toc-backref" href="#id193" id="file-templates" name="file-templates">File templates</a></h3>
3862
4860
<p>File templates are templates used as the basis of a new file. To
3863
4861
use them, choose the <em>New (with Template)</em> menu item from the <em>File</em>
3865
<p>By default, templates are created for some filetypes. Custom file
3866
templates can be added by creating the appropriate template file and
3867
restarting Geany. You can also edit the default filetype templates.</p>
3868
<p>The file's contents are just the text to place in the document,
3869
except for the optional <tt class="docutils literal">{fileheader}</tt> template wildcard. This can
3870
be placed anywhere, but is usually on the first line of the file,
3871
followed by a blank line.</p>
3872
<div class="section" id="custom-file-templates">
3873
<h4><a class="toc-backref" href="#id161">Custom file templates</a></h4>
3874
<p>These are read from the <tt class="docutils literal"><span class="pre">~/.config/geany/templates/files</span></tt> directory
3875
(created the first time Geany is started). The filetype to use is
3876
detected from the template file's extension, if any. For example, creating
3877
a file <tt class="docutils literal">main.c</tt> would add a menu item which created a new document with
3878
the filetype set to 'C'.</p>
4863
<p>By default, file templates are installed for some filetypes. Custom
4864
file templates can be added by creating the appropriate template file
4865
and then selecting <em>Tools->Reload Configuration</em> or restarting Geany. You can
4866
also edit the default file templates.</p>
4867
<p>The file's contents are just the text to place in the document, with
4868
optional template wildcards like <tt class="docutils literal"><span class="pre">{fileheader}</span></tt>. The fileheader
4869
wildcard can be placed anywhere, but it's usually put on the first
4870
line of the file, followed by a blank line.</p>
4871
<div class="section">
4872
<h4><a class="toc-backref" href="#id194" id="custom-file-templates" name="custom-file-templates">Custom file templates</a></h4>
4873
<p>These are read from the following directories:</p>
4875
<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>
4876
<li><tt class="docutils literal"><span class="pre">~/.config/geany/templates/files</span></tt> (created the first time
4877
Geany is started).</li>
4879
<p>The filetype to use is detected from the template file's extension, if
4880
any. For example, creating a file <tt class="docutils literal"><span class="pre">module.c</span></tt> would add a menu item
4881
which created a new document with the filetype set to 'C'.</p>
3879
4882
<p>The template file is read from disk when the corresponding menu item is
3880
clicked, so you don't need to restart Geany after editing a custom file
3883
<div class="section" id="filetype-templates">
3884
<h4><a class="toc-backref" href="#id162">Filetype templates</a></h4>
4885
<div class="section">
4886
<h4><a class="toc-backref" href="#id195" id="filetype-templates" name="filetype-templates">Filetype templates</a></h4>
4888
<p class="first admonition-title">Note</p>
4889
<p class="last">It's recommended to use custom file templates instead.</p>
3885
4891
<p>Filetype template files are read from the <tt class="docutils literal"><span class="pre">~/.config/geany/templates</span></tt>
3886
4892
directory, and are named "filetype." followed by the filetype
3887
4893
name, e.g. "filetype.python", "filetype.sh", etc. If you are
3888
4894
unsure about the filetype name extensions, they are the same as
3889
4895
the filetype configuration file extensions, commonly installed in
3890
<tt class="docutils literal">/usr/share/geany</tt>, with the prefix "filetypes.".</p>
3891
<p>There is also a template file <tt class="docutils literal">filetype.none</tt> which is used when
4896
<tt class="docutils literal"><span class="pre">/usr/share/geany</span></tt>, with the prefix "filetypes.".</p>
4897
<p>There is also a template file <tt class="docutils literal"><span class="pre">filetype.none</span></tt> which is used when
3892
4898
the New command is used without a filetype. This is empty by default.</p>
3895
<div class="section" id="customizing-templates">
3896
<h3><a class="toc-backref" href="#id163">Customizing templates</a></h3>
4901
<div class="section">
4902
<h3><a class="toc-backref" href="#id196" id="customizing-templates" name="customizing-templates">Customizing templates</a></h3>
3897
4903
<p>Each template can be customized to your needs. The templates are
3898
4904
stored in the <tt class="docutils literal"><span class="pre">~/.config/geany/templates/</span></tt> directory (see the section called
3899
<a class="reference internal" href="#command-line-options">Command line options</a> for further information about the configuration
4905
<a class="reference" href="#command-line-options">Command line options</a> for further information about the configuration
3900
4906
directory). Just open the desired template with an editor (ideally,
3901
4907
Geany ;-) ) and edit the template to your needs. There are some
3902
4908
wildcards which will be automatically replaced by Geany at startup.</p>
3903
<div class="section" id="template-wildcards">
3904
<h4><a class="toc-backref" href="#id164">Template wildcards</a></h4>
4909
<div class="section">
4910
<h4><a class="toc-backref" href="#id197" id="template-wildcards" name="template-wildcards">Template wildcards</a></h4>
3905
4911
<p>All wildcards must be enclosed by "{" and "}", e.g. {date}.</p>
4912
<p><strong>Wildcards for character escaping</strong></p>
4913
<table border="1" class="docutils">
4919
<thead valign="bottom">
4920
<tr><th class="head">Wildcard</th>
4921
<th class="head">Description</th>
4922
<th class="head">Available in</th>
4925
<tbody valign="top">
4927
<td>{ Opening Brace (used to prevent other
4928
wildcards being expanded).</td>
4929
<td>file templates, file header, snippets.</td>
4932
<td>} Closing Brace.</td>
4933
<td>file templates, file header, snippets.</td>
4936
<td>% Percent (used to escape e.g. %block% in
4942
<p><strong>Global wildcards</strong></p>
4943
<p>These are configurable, see <a class="reference" href="#template-preferences">Template preferences</a>.</p>
3906
4944
<table border="1" class="docutils">
3908
4946
<col width="14%" />
3918
4956
<tbody valign="top">
3919
4957
<tr><td>developer</td>
3920
4958
<td>The name of the developer.</td>
3921
<td>filetype templates, file header,
4959
<td>file templates, file header,
3922
4960
function description, ChangeLog entry,
3923
bsd, gpl, snippets</td>
4961
bsd, gpl, snippets.</td>
3925
4963
<tr><td>initial</td>
3926
4964
<td>The developer's initials, e.g. "ET" for
3927
4965
Enrico Trƶger or "JFD" for John Foobar Doe.</td>
3928
<td>filetype templates, file header,
4966
<td>file templates, file header,
3929
4967
function description, ChangeLog entry,
3930
bsd, gpl, snippets</td>
4968
bsd, gpl, snippets.</td>
3932
4970
<tr><td>mail</td>
3933
4971
<td>The email address of the developer.</td>
3934
<td>filetype templates, file header,
4972
<td>file templates, file header,
3935
4973
function description, ChangeLog entry,
3936
bsd, gpl, snippets</td>
4974
bsd, gpl, snippets.</td>
3938
4976
<tr><td>company</td>
3939
4977
<td>The company the developer is working for.</td>
3940
<td>filetype templates, file header,
3941
function description, ChangeLog entry,
3942
bsd, gpl, snippets</td>
3944
<tr><td>year <a class="footnote-reference" href="#id9" id="id6">[1]</a></td>
3945
<td>The current year. Default format is: YYYY</td>
3946
<td>filetype templates, file header,
3947
function description, ChangeLog entry,
3948
bsd, gpl, snippets</td>
4978
<td>file templates, file header,
4979
function description, ChangeLog entry,
4980
bsd, gpl, snippets.</td>
3950
4982
<tr><td>version</td>
3951
4983
<td>The initial version of a new file.</td>
3952
<td>filetype templates, file header,
3953
function description, ChangeLog entry,
3954
bsd, gpl, snippets</td>
3956
<tr><td>date <a class="footnote-reference" href="#id9" id="id7">[1]</a></td>
3957
<td>The current date. Default format: YYYY-MM-DD.</td>
3958
<td>filetype templates, file header,
3959
function description, ChangeLog entry,
3960
bsd, gpl, snippets</td>
4984
<td>file templates, file header,
4985
function description, ChangeLog entry,
4986
bsd, gpl, snippets.</td>
4990
<p><strong>Date & time wildcards</strong></p>
4991
<p>The format for these wildcards can be changed in the preferences
4992
dialog, see <a class="reference" href="#template-preferences">Template preferences</a>. You can use any conversion
4993
specifiers which can be used with the ANSI C strftime function.
4994
For details please see <a class="reference" href="http://man.cx/strftime">http://man.cx/strftime</a>.</p>
4995
<table border="1" class="docutils">
5001
<thead valign="bottom">
5002
<tr><th class="head">Wildcard</th>
5003
<th class="head">Description</th>
5004
<th class="head">Available in</th>
5007
<tbody valign="top">
5009
<td>The current year. Default format is: YYYY.</td>
5010
<td>file templates, file header,
5011
function description, ChangeLog entry,
5012
bsd, gpl, snippets.</td>
5015
<td>The current date. Default format:
5017
<td>file templates, file header,
5018
function description, ChangeLog entry,
5019
bsd, gpl, snippets.</td>
5021
<tr><td>datetime</td>
5022
<td>The current date and time. Default format:
5023
DD.MM.YYYY HH:mm:ss ZZZZ.</td>
5024
<td>file templates, file header,
5025
function description, ChangeLog entry,
5026
bsd, gpl, snippets.</td>
5030
<p><strong>Dynamic wildcards</strong></p>
5031
<table border="1" class="docutils">
5037
<thead valign="bottom">
5038
<tr><th class="head">Wildcard</th>
5039
<th class="head">Description</th>
5040
<th class="head">Available in</th>
5043
<tbody valign="top">
3962
5044
<tr><td>untitled</td>
3963
5045
<td>The string "untitled" (this will be
3964
5046
translated to your locale), used in
3965
filetype templates.</td>
3966
<td>filetype templates, file header,
5047
file templates.</td>
5048
<td>file templates, file header,
3967
5049
function description, ChangeLog entry,
3968
bsd, gpl, snippets</td>
5050
bsd, gpl, snippets.</td>
3970
5052
<tr><td>geanyversion</td>
3971
5053
<td>The actual Geany version, e.g.
3972
"Geany 0.18.1".</td>
3973
<td>filetype templates, file header,
3974
function description, ChangeLog entry,
3975
bsd, gpl, snippets</td>
3977
<tr><td>datetime <a class="footnote-reference" href="#id9" id="id8">[1]</a></td>
3978
<td>The current date and time. Default format:
3979
DD.MM.YYYY HH:mm:ss ZZZZ.</td>
3980
<td>filetype templates, file header,
3981
function description, ChangeLog entry,
3982
bsd, gpl, snippets</td>
5054
"Geany 0.19".</td>
5055
<td>file templates, file header,
5056
function description, ChangeLog entry,
5057
bsd, gpl, snippets.</td>
3984
5059
<tr><td>filename</td>
3985
<td>The filename of the current file.</td>
3986
<td>file header, snippets</td>
5060
<td>The filename of the current file.
5061
For new files, it's only replaced when
5062
first saving if found on the first 3 lines
5064
<td>file header, snippets, file
5067
<tr><td>project</td>
5068
<td>The current project's name, if any.</td>
5069
<td>file header, snippets, file templates.</td>
5071
<tr><td>description</td>
5072
<td>The current project's description, if any.</td>
5073
<td>file header, snippets, file templates.</td>
5075
<tr><td>functionname</td>
5076
<td>The function name of the function at the
5077
cursor position. This wildcard will only be
5078
replaced in the function description
5080
<td>function description.</td>
5082
<tr><td>command:path</td>
5083
<td>Executes the specified command and replace
5084
the wildcard with the command's standard
5085
output. See <a class="reference" href="#special-command-wildcard">Special {command:} wildcard</a>
5087
<td>file templates, file header,
5088
function description, ChangeLog entry,
5089
bsd, gpl, snippets.</td>
5093
<p><strong>Template insertion wildcards</strong></p>
5094
<table border="1" class="docutils">
5100
<thead valign="bottom">
5101
<tr><th class="head">Wildcard</th>
5102
<th class="head">Description</th>
5103
<th class="head">Available in</th>
5106
<tbody valign="top">
3988
5107
<tr><td>gpl</td>
3989
5108
<td>This wildcard inserts a short GPL notice.</td>
3990
<td>file header</td>
5109
<td>file header.</td>
3992
5111
<tr><td>bsd</td>
3993
5112
<td>This wildcard inserts a BSD licence notice.</td>
3994
<td>file header</td>
3996
<tr><td>functionname</td>
3997
<td>The function name of the function at the
3998
cursor position. This wildcard will only be
3999
replaced in the function description
4001
<td>function description</td>
5113
<td>file header.</td>
4003
5115
<tr><td>fileheader</td>
4004
5116
<td>The file header template. This wildcard
4005
5117
will only be replaced in filetype
4006
5118
templates.</td>
4007
<td>file header, snippets, custom filetype
5119
<td>snippets, file templates.</td>
4012
<table class="docutils footnote" frame="void" id="id9" rules="none">
4013
<colgroup><col class="label" /><col /></colgroup>
4014
<tbody valign="top">
4015
<tr><td class="label">[1]</td><td><em>(<a class="fn-backref" href="#id6">1</a>, <a class="fn-backref" href="#id7">2</a>, <a class="fn-backref" href="#id8">3</a>)</em> The format for the <tt class="docutils literal">year</tt>, <tt class="docutils literal">date</tt> and <tt class="docutils literal">datetime</tt> wildcards can be changed
4016
in the preferences dialog, see <a class="reference internal" href="#template-preferences">Template preferences</a>. You can
4017
use any conversion specifiers which can be used with the ANSI C strftime function.
4018
For details please see <a class="reference external" href="http://man.cx/strftime">http://man.cx/strftime</a>.</td></tr>
4024
<div class="section" id="customizing-the-toolbar">
4025
<h2><a class="toc-backref" href="#id165">Customizing the toolbar</a></h2>
5123
<div class="section">
5124
<h5><a class="toc-backref" href="#id198" id="special-command-wildcard" name="special-command-wildcard">Special {command:} wildcard</a></h5>
5125
<p>The {command:} wildcard is a special one because it can execute
5126
a specified command and put the command's output (stdout) into
5129
<pre class="literal-block">
5132
<p>will result in:</p>
5133
<pre class="literal-block">
5134
Linux localhost 2.6.9-023stab046.2-smp #1 SMP Mon Dec 10 15:04:55 MSK 2007 x86_64 GNU/Linux
5136
<p>Using this wildcard you can insert nearly any arbitrary text into the
5138
<p>In the environment of the executed command the variables
5139
<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.
5140
The value of these variables is filled in only if Geany knows about it.
5141
For example, <tt class="docutils literal"><span class="pre">GEANY_FUNCNAME</span></tt> is only filled within the function
5142
description template. However, these variables are <tt class="docutils literal"><span class="pre">always</span></tt> set,
5143
just maybe with an empty value.
5144
You can easily access them e.g. within an executed shell script using:</p>
5145
<pre class="literal-block">
5149
<p class="first admonition-title">Note</p>
5150
<p class="last">If the specified command could not be found or not executed, the wildcard is substituted
5151
by an empty string. In such cases, you can find the occurred error message on Geany's
5152
standard error and in the Help->Debug Messages dialog.</p>
5158
<div class="section">
5159
<h2><a class="toc-backref" href="#id199" id="customizing-the-toolbar" name="customizing-the-toolbar">Customizing the toolbar</a></h2>
4026
5160
<p>You can add, remove and reorder the elements in the toolbar by using the toolbar editor
4027
by manually editing the file <tt class="docutils literal">ui_toolbar.xml</tt>.</p>
5161
by manually editing the file <tt class="docutils literal"><span class="pre">ui_toolbar.xml</span></tt>.</p>
4028
5162
<p>The toolbar editor can be opened from the preferences editor on the Toolbar tab or
4029
5163
by right-clicking on the toolbar itself and choosing it from the menu.</p>
4030
<div class="section" id="manually-editing-of-the-toolbar-layout">
4031
<h3><a class="toc-backref" href="#id166">Manually editing of the toolbar layout</a></h3>
5164
<div class="section">
5165
<h3><a class="toc-backref" href="#id200" id="manually-editing-of-the-toolbar-layout" name="manually-editing-of-the-toolbar-layout">Manually editing of the toolbar layout</a></h3>
4032
5166
<p>To override the system-wide configuration file, copy it from
4033
<tt class="docutils literal">$prefix/share/geany</tt> to your configuration directory, usually
4034
<tt class="docutils literal"><span class="pre">~/.config/geany/</span></tt>. <tt class="docutils literal">$prefix</tt> is the path where Geany is installed
4035
(see <a class="reference internal" href="#installation-prefix">Installation prefix</a>).</p>
5167
<tt class="docutils literal"><span class="pre">$prefix/share/geany</span></tt> to your configuration directory, usually
5168
<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
5169
(see <a class="reference" href="#installation-prefix">Installation prefix</a>).</p>
4036
5170
<p>For example:</p>
4037
5171
<pre class="literal-block">
4038
5172
% cp /usr/local/share/geany/ui_toolbar.xml /home/username/.config/geany/