1 <?xml version=
"1.0" encoding=
"utf-8" ?>
2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en" lang=
"en">
5 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8" />
6 <meta name=
"generator" content=
"Docutils 0.11: http://docutils.sourceforge.net/" />
8 <meta name=
"authors" content=
"Enrico Tröger Nick Treleaven Frank Lanitz Colomban Wendling Matthew Brush" />
9 <meta name=
"date" content=
"2014-04-13" />
10 <style type=
"text/css">
13 :Author: Enrico Troeger
14 :Contact: enrico(dot)troeger(at)uvena(dot)de
15 :Copyright: This stylesheet has been placed in the public domain.
17 Stylesheet for Geany's documentation based on a version of John Gabriele.
23 background-color: #f2f2f2;
39 text-decoration: none;
43 border-top:
1px dotted;
48 font-family: sans-serif;
72 font-family: sans-serif;
73 background-color: #DBEDD5;
75 border-left:
4px solid;
76 border-color: #
9FD98C;
80 background-color: #ECDFCE;
82 border-left:
4px solid;
83 border-color: #D9BE9A;
91 border:
1px solid #D9BE9A;
95 background-color: #ECDFCE;
96 border:
1px dotted #D9BE9A;
100 border:
1px dotted #D9BE9A;
130 <div class=
"document" id=
"geany">
131 <h1 class=
"title">Geany
</h1>
132 <h2 class=
"subtitle" id=
"a-fast-light-gtk-ide">A fast, light, GTK+ IDE
</h2>
133 <table class=
"docinfo" frame=
"void" rules=
"none">
134 <col class=
"docinfo-name" />
135 <col class=
"docinfo-content" />
137 <tr><th class=
"docinfo-name">Authors:
</th>
141 <br />Colomban Wendling
142 <br />Matthew Brush
</td></tr>
143 <tr><th class=
"docinfo-name">Date:
</th>
144 <td>2014-
04-
13</td></tr>
145 <tr><th class=
"docinfo-name">Version:
</th>
149 <!-- -*- reStructuredText -*- -->
150 <p>Copyright ©
2005-
2014</p>
151 <p>This document is distributed under the terms of the GNU General Public
152 License as published by the Free Software Foundation; either version
2
153 of the License, or (at your option) any later version. A copy of this
154 license can be found in the file COPYING included with the source code
155 of this program, and also in the chapter
<a class=
"reference internal" href=
"#gnu-general-public-license">GNU General Public License
</a>.
</p>
156 <div class=
"contents topic" id=
"contents">
157 <p class=
"topic-title first">Contents
</p>
159 <li><a class=
"reference internal" href=
"#introduction" id=
"id7">Introduction
</a><ul>
160 <li><a class=
"reference internal" href=
"#about-geany" id=
"id8">About Geany
</a></li>
161 <li><a class=
"reference internal" href=
"#where-to-get-it" id=
"id9">Where to get it
</a></li>
162 <li><a class=
"reference internal" href=
"#license" id=
"id10">License
</a></li>
163 <li><a class=
"reference internal" href=
"#about-this-document" id=
"id11">About this document
</a></li>
166 <li><a class=
"reference internal" href=
"#installation" id=
"id12">Installation
</a><ul>
167 <li><a class=
"reference internal" href=
"#requirements" id=
"id13">Requirements
</a></li>
168 <li><a class=
"reference internal" href=
"#binary-packages" id=
"id14">Binary packages
</a></li>
169 <li><a class=
"reference internal" href=
"#source-compilation" id=
"id15">Source compilation
</a><ul>
170 <li><a class=
"reference internal" href=
"#autotools-based-build-system" id=
"id16">Autotools based build system
</a></li>
171 <li><a class=
"reference internal" href=
"#waf-based-build-system" id=
"id17">Waf based build system
</a><ul>
172 <li><a class=
"reference internal" href=
"#waf-cache" id=
"id18">Waf cache
</a><ul>
173 <li><a class=
"reference internal" href=
"#cleaning-the-cache" id=
"id19">Cleaning the cache
</a></li>
178 <li><a class=
"reference internal" href=
"#custom-installation" id=
"id20">Custom installation
</a></li>
179 <li><a class=
"reference internal" href=
"#dynamic-linking-loader-support-and-vte" id=
"id21">Dynamic linking loader support and VTE
</a></li>
180 <li><a class=
"reference internal" href=
"#build-problems" id=
"id22">Build problems
</a></li>
183 <li><a class=
"reference internal" href=
"#installation-prefix" id=
"id23">Installation prefix
</a></li>
186 <li><a class=
"reference internal" href=
"#usage" id=
"id24">Usage
</a><ul>
187 <li><a class=
"reference internal" href=
"#getting-started" id=
"id25">Getting started
</a></li>
188 <li><a class=
"reference internal" href=
"#the-geany-workspace" id=
"id26">The Geany workspace
</a></li>
189 <li><a class=
"reference internal" href=
"#command-line-options" id=
"id27">Command line options
</a></li>
190 <li><a class=
"reference internal" href=
"#general" id=
"id28">General
</a><ul>
191 <li><a class=
"reference internal" href=
"#startup" id=
"id29">Startup
</a></li>
192 <li><a class=
"reference internal" href=
"#opening-files-from-the-command-line-in-a-running-instance" id=
"id30">Opening files from the command-line in a running instance
</a></li>
193 <li><a class=
"reference internal" href=
"#virtual-terminal-emulator-widget-vte" id=
"id31">Virtual terminal emulator widget (VTE)
</a></li>
194 <li><a class=
"reference internal" href=
"#defining-own-widget-styles-using-gtkrc-2-0" id=
"id32">Defining own widget styles using .gtkrc-
2.0</a></li>
197 <li><a class=
"reference internal" href=
"#documents" id=
"id33">Documents
</a><ul>
198 <li><a class=
"reference internal" href=
"#switching-between-documents" id=
"id34">Switching between documents
</a></li>
199 <li><a class=
"reference internal" href=
"#cloning-documents" id=
"id35">Cloning documents
</a></li>
202 <li><a class=
"reference internal" href=
"#character-sets-and-unicode-byte-order-mark-bom" id=
"id36">Character sets and Unicode Byte-Order-Mark (BOM)
</a><ul>
203 <li><a class=
"reference internal" href=
"#using-character-sets" id=
"id37">Using character sets
</a></li>
204 <li><a class=
"reference internal" href=
"#in-file-encoding-specification" id=
"id38">In-file encoding specification
</a></li>
205 <li><a class=
"reference internal" href=
"#special-encoding-none" id=
"id39">Special encoding
"None
"</a></li>
206 <li><a class=
"reference internal" href=
"#unicode-byte-order-mark-bom" id=
"id40">Unicode Byte-Order-Mark (BOM)
</a></li>
209 <li><a class=
"reference internal" href=
"#editing" id=
"id41">Editing
</a><ul>
210 <li><a class=
"reference internal" href=
"#folding" id=
"id42">Folding
</a></li>
211 <li><a class=
"reference internal" href=
"#column-mode-editing-rectangular-selections" id=
"id43">Column mode editing (rectangular selections)
</a></li>
212 <li><a class=
"reference internal" href=
"#drag-and-drop-of-text" id=
"id44">Drag and drop of text
</a></li>
213 <li><a class=
"reference internal" href=
"#indentation" id=
"id45">Indentation
</a><ul>
214 <li><a class=
"reference internal" href=
"#applying-new-indentation-settings" id=
"id46">Applying new indentation settings
</a></li>
215 <li><a class=
"reference internal" href=
"#detecting-indent-type" id=
"id47">Detecting indent type
</a></li>
218 <li><a class=
"reference internal" href=
"#auto-indentation" id=
"id48">Auto-indentation
</a></li>
219 <li><a class=
"reference internal" href=
"#bookmarks" id=
"id49">Bookmarks
</a></li>
220 <li><a class=
"reference internal" href=
"#code-navigation-history" id=
"id50">Code navigation history
</a></li>
221 <li><a class=
"reference internal" href=
"#sending-text-through-custom-commands" id=
"id51">Sending text through custom commands
</a></li>
222 <li><a class=
"reference internal" href=
"#context-actions" id=
"id52">Context actions
</a></li>
223 <li><a class=
"reference internal" href=
"#autocompletion" id=
"id53">Autocompletion
</a><ul>
224 <li><a class=
"reference internal" href=
"#word-part-completion" id=
"id54">Word part completion
</a></li>
225 <li><a class=
"reference internal" href=
"#scope-autocompletion" id=
"id55">Scope autocompletion
</a></li>
228 <li><a class=
"reference internal" href=
"#user-definable-snippets" id=
"id56">User-definable snippets
</a><ul>
229 <li><a class=
"reference internal" href=
"#snippet-keybindings" id=
"id57">Snippet keybindings
</a></li>
232 <li><a class=
"reference internal" href=
"#inserting-unicode-characters" id=
"id58">Inserting Unicode characters
</a></li>
235 <li><a class=
"reference internal" href=
"#search-replace-and-go-to" id=
"id59">Search, replace and go to
</a><ul>
236 <li><a class=
"reference internal" href=
"#toolbar-entries" id=
"id60">Toolbar entries
</a><ul>
237 <li><a class=
"reference internal" href=
"#search-bar" id=
"id61">Search bar
</a></li>
240 <li><a class=
"reference internal" href=
"#find" id=
"id62">Find
</a><ul>
241 <li><a class=
"reference internal" href=
"#matching-options" id=
"id63">Matching options
</a></li>
242 <li><a class=
"reference internal" href=
"#find-all" id=
"id64">Find all
</a></li>
243 <li><a class=
"reference internal" href=
"#change-font-in-search-dialog-text-fields" id=
"id65">Change font in search dialog text fields
</a></li>
246 <li><a class=
"reference internal" href=
"#find-selection" id=
"id66">Find selection
</a></li>
247 <li><a class=
"reference internal" href=
"#find-usage" id=
"id67">Find usage
</a></li>
248 <li><a class=
"reference internal" href=
"#find-in-files" id=
"id68">Find in files
</a><ul>
249 <li><a class=
"reference internal" href=
"#filtering-out-version-control-files" id=
"id69">Filtering out version control files
</a></li>
252 <li><a class=
"reference internal" href=
"#replace" id=
"id70">Replace
</a><ul>
253 <li><a class=
"reference internal" href=
"#replace-all" id=
"id71">Replace all
</a></li>
256 <li><a class=
"reference internal" href=
"#go-to-tag-definition" id=
"id72">Go to tag definition
</a></li>
257 <li><a class=
"reference internal" href=
"#go-to-tag-declaration" id=
"id73">Go to tag declaration
</a></li>
258 <li><a class=
"reference internal" href=
"#go-to-line" id=
"id74">Go to line
</a></li>
259 <li><a class=
"reference internal" href=
"#regular-expressions" id=
"id75">Regular expressions
</a></li>
262 <li><a class=
"reference internal" href=
"#view-menu" id=
"id76">View menu
</a><ul>
263 <li><a class=
"reference internal" href=
"#color-schemes-menu" id=
"id77">Color schemes menu
</a></li>
266 <li><a class=
"reference internal" href=
"#tags" id=
"id78">Tags
</a><ul>
267 <li><a class=
"reference internal" href=
"#workspace-tags" id=
"id79">Workspace tags
</a></li>
268 <li><a class=
"reference internal" href=
"#global-tags" id=
"id80">Global tags
</a><ul>
269 <li><a class=
"reference internal" href=
"#default-global-tags-files" id=
"id81">Default global tags files
</a></li>
270 <li><a class=
"reference internal" href=
"#global-tags-file-format" id=
"id82">Global tags file format
</a><ul>
271 <li><a class=
"reference internal" href=
"#pipe-separated-format" id=
"id83">Pipe-separated format
</a></li>
272 <li><a class=
"reference internal" href=
"#ctags-format" id=
"id84">CTags format
</a></li>
275 <li><a class=
"reference internal" href=
"#generating-a-global-tags-file" id=
"id85">Generating a global tags file
</a><ul>
276 <li><a class=
"reference internal" href=
"#generating-c-c-tag-files" id=
"id86">Generating C/C++ tag files
</a></li>
277 <li><a class=
"reference internal" href=
"#generating-tag-files-on-windows" id=
"id87">Generating tag files on Windows
</a></li>
282 <li><a class=
"reference internal" href=
"#c-ignore-tags" id=
"id88">C ignore.tags
</a></li>
285 <li><a class=
"reference internal" href=
"#preferences" id=
"id89">Preferences
</a><ul>
286 <li><a class=
"reference internal" href=
"#general-startup-preferences" id=
"id90">General Startup preferences
</a><ul>
287 <li><a class=
"reference internal" href=
"#id1" id=
"id91">Startup
</a></li>
288 <li><a class=
"reference internal" href=
"#shutdown" id=
"id92">Shutdown
</a></li>
289 <li><a class=
"reference internal" href=
"#paths" id=
"id93">Paths
</a></li>
292 <li><a class=
"reference internal" href=
"#general-miscellaneous-preferences" id=
"id94">General Miscellaneous preferences
</a><ul>
293 <li><a class=
"reference internal" href=
"#miscellaneous" id=
"id95">Miscellaneous
</a></li>
294 <li><a class=
"reference internal" href=
"#search" id=
"id96">Search
</a></li>
295 <li><a class=
"reference internal" href=
"#projects" id=
"id97">Projects
</a></li>
298 <li><a class=
"reference internal" href=
"#interface-preferences" id=
"id98">Interface preferences
</a><ul>
299 <li><a class=
"reference internal" href=
"#sidebar" id=
"id99">Sidebar
</a></li>
300 <li><a class=
"reference internal" href=
"#fonts" id=
"id100">Fonts
</a></li>
301 <li><a class=
"reference internal" href=
"#id2" id=
"id101">Miscellaneous
</a></li>
304 <li><a class=
"reference internal" href=
"#interface-notebook-tab-preferences" id=
"id102">Interface Notebook tab preferences
</a><ul>
305 <li><a class=
"reference internal" href=
"#editor-tabs" id=
"id103">Editor tabs
</a></li>
306 <li><a class=
"reference internal" href=
"#tab-positions" id=
"id104">Tab positions
</a></li>
309 <li><a class=
"reference internal" href=
"#interface-toolbar-preferences" id=
"id105">Interface Toolbar preferences
</a><ul>
310 <li><a class=
"reference internal" href=
"#toolbar" id=
"id106">Toolbar
</a></li>
311 <li><a class=
"reference internal" href=
"#appearance" id=
"id107">Appearance
</a></li>
314 <li><a class=
"reference internal" href=
"#editor-features-preferences" id=
"id108">Editor Features preferences
</a><ul>
315 <li><a class=
"reference internal" href=
"#features" id=
"id109">Features
</a></li>
318 <li><a class=
"reference internal" href=
"#editor-indentation-preferences" id=
"id110">Editor Indentation preferences
</a><ul>
319 <li><a class=
"reference internal" href=
"#indentation-group" id=
"id111">Indentation group
</a></li>
322 <li><a class=
"reference internal" href=
"#editor-completions-preferences" id=
"id112">Editor Completions preferences
</a><ul>
323 <li><a class=
"reference internal" href=
"#completions" id=
"id113">Completions
</a></li>
324 <li><a class=
"reference internal" href=
"#auto-close-quotes-and-brackets" id=
"id114">Auto-close quotes and brackets
</a></li>
327 <li><a class=
"reference internal" href=
"#editor-display-preferences" id=
"id115">Editor Display preferences
</a><ul>
328 <li><a class=
"reference internal" href=
"#display" id=
"id116">Display
</a></li>
329 <li><a class=
"reference internal" href=
"#long-line-marker" id=
"id117">Long line marker
</a></li>
330 <li><a class=
"reference internal" href=
"#virtual-spaces" id=
"id118">Virtual spaces
</a></li>
333 <li><a class=
"reference internal" href=
"#files-preferences" id=
"id119">Files preferences
</a><ul>
334 <li><a class=
"reference internal" href=
"#new-files" id=
"id120">New files
</a></li>
335 <li><a class=
"reference internal" href=
"#saving-files" id=
"id121">Saving files
</a></li>
336 <li><a class=
"reference internal" href=
"#id3" id=
"id122">Miscellaneous
</a></li>
339 <li><a class=
"reference internal" href=
"#tools-preferences" id=
"id123">Tools preferences
</a><ul>
340 <li><a class=
"reference internal" href=
"#tool-paths" id=
"id124">Tool paths
</a></li>
341 <li><a class=
"reference internal" href=
"#commands" id=
"id125">Commands
</a></li>
344 <li><a class=
"reference internal" href=
"#template-preferences" id=
"id126">Template preferences
</a><ul>
345 <li><a class=
"reference internal" href=
"#template-data" id=
"id127">Template data
</a></li>
348 <li><a class=
"reference internal" href=
"#keybinding-preferences" id=
"id128">Keybinding preferences
</a></li>
349 <li><a class=
"reference internal" href=
"#printing-preferences" id=
"id129">Printing preferences
</a></li>
350 <li><a class=
"reference internal" href=
"#various-preferences" id=
"id130">Various preferences
</a><ul>
351 <li><a class=
"reference internal" href=
"#statusbar-templates" id=
"id131">Statusbar Templates
</a></li>
354 <li><a class=
"reference internal" href=
"#terminal-vte-preferences" id=
"id132">Terminal (VTE) preferences
</a><ul>
355 <li><a class=
"reference internal" href=
"#terminal-widget" id=
"id133">Terminal widget
</a></li>
360 <li><a class=
"reference internal" href=
"#project-management" id=
"id134">Project management
</a><ul>
361 <li><a class=
"reference internal" href=
"#new-project" id=
"id135">New project
</a></li>
362 <li><a class=
"reference internal" href=
"#project-properties" id=
"id136">Project properties
</a></li>
363 <li><a class=
"reference internal" href=
"#open-project" id=
"id137">Open project
</a></li>
364 <li><a class=
"reference internal" href=
"#close-project" id=
"id138">Close project
</a></li>
367 <li><a class=
"reference internal" href=
"#build-menu" id=
"id139">Build menu
</a><ul>
368 <li><a class=
"reference internal" href=
"#indicators" id=
"id140">Indicators
</a></li>
369 <li><a class=
"reference internal" href=
"#default-build-menu-items" id=
"id141">Default build menu items
</a><ul>
370 <li><a class=
"reference internal" href=
"#compile" id=
"id142">Compile
</a></li>
371 <li><a class=
"reference internal" href=
"#build" id=
"id143">Build
</a></li>
372 <li><a class=
"reference internal" href=
"#make" id=
"id144">Make
</a></li>
373 <li><a class=
"reference internal" href=
"#make-custom-target" id=
"id145">Make custom target
</a></li>
374 <li><a class=
"reference internal" href=
"#make-object" id=
"id146">Make object
</a></li>
375 <li><a class=
"reference internal" href=
"#next-error" id=
"id147">Next error
</a></li>
376 <li><a class=
"reference internal" href=
"#previous-error" id=
"id148">Previous error
</a></li>
377 <li><a class=
"reference internal" href=
"#execute" id=
"id149">Execute
</a></li>
378 <li><a class=
"reference internal" href=
"#stopping-running-processes" id=
"id150">Stopping running processes
</a><ul>
379 <li><a class=
"reference internal" href=
"#terminal-emulators" id=
"id151">Terminal emulators
</a></li>
382 <li><a class=
"reference internal" href=
"#set-build-commands" id=
"id152">Set build commands
</a></li>
385 <li><a class=
"reference internal" href=
"#build-menu-configuration" id=
"id153">Build menu configuration
</a></li>
386 <li><a class=
"reference internal" href=
"#build-menu-commands-dialog" id=
"id154">Build menu commands dialog
</a><ul>
387 <li><a class=
"reference internal" href=
"#substitutions-in-commands-and-working-directories" id=
"id155">Substitutions in commands and working directories
</a></li>
388 <li><a class=
"reference internal" href=
"#build-menu-keyboard-shortcuts" id=
"id156">Build menu keyboard shortcuts
</a></li>
389 <li><a class=
"reference internal" href=
"#old-settings" id=
"id157">Old settings
</a></li>
394 <li><a class=
"reference internal" href=
"#printing-support" id=
"id158">Printing support
</a></li>
395 <li><a class=
"reference internal" href=
"#plugins" id=
"id159">Plugins
</a><ul>
396 <li><a class=
"reference internal" href=
"#plugin-manager" id=
"id160">Plugin manager
</a></li>
399 <li><a class=
"reference internal" href=
"#keybindings" id=
"id161">Keybindings
</a><ul>
400 <li><a class=
"reference internal" href=
"#switching-documents" id=
"id162">Switching documents
</a></li>
401 <li><a class=
"reference internal" href=
"#configurable-keybindings" id=
"id163">Configurable keybindings
</a><ul>
402 <li><a class=
"reference internal" href=
"#file-keybindings" id=
"id164">File keybindings
</a></li>
403 <li><a class=
"reference internal" href=
"#editor-keybindings" id=
"id165">Editor keybindings
</a></li>
404 <li><a class=
"reference internal" href=
"#clipboard-keybindings" id=
"id166">Clipboard keybindings
</a></li>
405 <li><a class=
"reference internal" href=
"#select-keybindings" id=
"id167">Select keybindings
</a></li>
406 <li><a class=
"reference internal" href=
"#insert-keybindings" id=
"id168">Insert keybindings
</a></li>
407 <li><a class=
"reference internal" href=
"#format-keybindings" id=
"id169">Format keybindings
</a></li>
408 <li><a class=
"reference internal" href=
"#settings-keybindings" id=
"id170">Settings keybindings
</a></li>
409 <li><a class=
"reference internal" href=
"#search-keybindings" id=
"id171">Search keybindings
</a></li>
410 <li><a class=
"reference internal" href=
"#go-to-keybindings" id=
"id172">Go to keybindings
</a></li>
411 <li><a class=
"reference internal" href=
"#view-keybindings" id=
"id173">View keybindings
</a></li>
412 <li><a class=
"reference internal" href=
"#focus-keybindings" id=
"id174">Focus keybindings
</a></li>
413 <li><a class=
"reference internal" href=
"#notebook-tab-keybindings" id=
"id175">Notebook tab keybindings
</a></li>
414 <li><a class=
"reference internal" href=
"#document-keybindings" id=
"id176">Document keybindings
</a></li>
415 <li><a class=
"reference internal" href=
"#project-keybindings" id=
"id177">Project keybindings
</a></li>
416 <li><a class=
"reference internal" href=
"#build-keybindings" id=
"id178">Build keybindings
</a></li>
417 <li><a class=
"reference internal" href=
"#tools-keybindings" id=
"id179">Tools keybindings
</a></li>
418 <li><a class=
"reference internal" href=
"#help-keybindings" id=
"id180">Help keybindings
</a></li>
425 <li><a class=
"reference internal" href=
"#configuration-files" id=
"id181">Configuration files
</a><ul>
426 <li><a class=
"reference internal" href=
"#configuration-file-paths" id=
"id182">Configuration file paths
</a><ul>
427 <li><a class=
"reference internal" href=
"#paths-on-unix-like-systems" id=
"id183">Paths on Unix-like systems
</a></li>
428 <li><a class=
"reference internal" href=
"#paths-on-windows" id=
"id184">Paths on Windows
</a></li>
431 <li><a class=
"reference internal" href=
"#tools-menu-items" id=
"id185">Tools menu items
</a></li>
432 <li><a class=
"reference internal" href=
"#global-configuration-file" id=
"id186">Global configuration file
</a></li>
433 <li><a class=
"reference internal" href=
"#filetype-definition-files" id=
"id187">Filetype definition files
</a><ul>
434 <li><a class=
"reference internal" href=
"#filenames" id=
"id188">Filenames
</a></li>
435 <li><a class=
"reference internal" href=
"#system-files" id=
"id189">System files
</a></li>
436 <li><a class=
"reference internal" href=
"#user-files" id=
"id190">User files
</a></li>
437 <li><a class=
"reference internal" href=
"#custom-filetypes" id=
"id191">Custom filetypes
</a><ul>
438 <li><a class=
"reference internal" href=
"#creating-a-custom-filetype-from-an-existing-filetype" id=
"id192">Creating a custom filetype from an existing filetype
</a></li>
441 <li><a class=
"reference internal" href=
"#filetype-configuration" id=
"id193">Filetype configuration
</a><ul>
442 <li><a class=
"reference internal" href=
"#styling-section" id=
"id194">[styling] section
</a><ul>
443 <li><a class=
"reference internal" href=
"#using-a-named-style" id=
"id195">Using a named style
</a></li>
444 <li><a class=
"reference internal" href=
"#reading-styles-from-another-filetype" id=
"id196">Reading styles from another filetype
</a></li>
447 <li><a class=
"reference internal" href=
"#keywords-section" id=
"id197">[keywords] section
</a></li>
448 <li><a class=
"reference internal" href=
"#lexer-properties-section" id=
"id198">[lexer_properties] section
</a></li>
449 <li><a class=
"reference internal" href=
"#settings-section" id=
"id199">[settings] section
</a></li>
450 <li><a class=
"reference internal" href=
"#indentation-section" id=
"id200">[indentation] section
</a></li>
451 <li><a class=
"reference internal" href=
"#build-settings-section" id=
"id201">[build_settings] section
</a></li>
454 <li><a class=
"reference internal" href=
"#special-file-filetypes-common" id=
"id202">Special file filetypes.common
</a><ul>
455 <li><a class=
"reference internal" href=
"#named-styles-section" id=
"id203">[named_styles] section
</a></li>
456 <li><a class=
"reference internal" href=
"#named-colors-section" id=
"id204">[named_colors] section
</a></li>
457 <li><a class=
"reference internal" href=
"#id4" id=
"id205">[styling] section
</a></li>
458 <li><a class=
"reference internal" href=
"#id5" id=
"id206">[settings] section
</a></li>
463 <li><a class=
"reference internal" href=
"#filetype-extensions" id=
"id207">Filetype extensions
</a><ul>
464 <li><a class=
"reference internal" href=
"#filetype-group-membership" id=
"id208">Filetype group membership
</a></li>
467 <li><a class=
"reference internal" href=
"#preferences-file-format" id=
"id209">Preferences file format
</a><ul>
468 <li><a class=
"reference internal" href=
"#build-menu-section" id=
"id210">[build-menu] section
</a></li>
471 <li><a class=
"reference internal" href=
"#project-file-format" id=
"id211">Project file format
</a><ul>
472 <li><a class=
"reference internal" href=
"#build-menu-additions" id=
"id212">[build-menu] additions
</a></li>
475 <li><a class=
"reference internal" href=
"#templates" id=
"id213">Templates
</a><ul>
476 <li><a class=
"reference internal" href=
"#template-meta-data" id=
"id214">Template meta data
</a></li>
477 <li><a class=
"reference internal" href=
"#file-templates" id=
"id215">File templates
</a><ul>
478 <li><a class=
"reference internal" href=
"#adding-file-templates" id=
"id216">Adding file templates
</a></li>
481 <li><a class=
"reference internal" href=
"#customizing-templates" id=
"id217">Customizing templates
</a><ul>
482 <li><a class=
"reference internal" href=
"#template-wildcards" id=
"id218">Template wildcards
</a><ul>
483 <li><a class=
"reference internal" href=
"#special-command-wildcard" id=
"id219">Special {command:} wildcard
</a></li>
490 <li><a class=
"reference internal" href=
"#customizing-the-toolbar" id=
"id220">Customizing the toolbar
</a><ul>
491 <li><a class=
"reference internal" href=
"#manually-editing-the-toolbar-layout" id=
"id221">Manually editing the toolbar layout
</a></li>
492 <li><a class=
"reference internal" href=
"#available-toolbar-elements" id=
"id222">Available toolbar elements
</a></li>
497 <li><a class=
"reference internal" href=
"#plugin-documentation" id=
"id223">Plugin documentation
</a><ul>
498 <li><a class=
"reference internal" href=
"#html-characters" id=
"id224">HTML Characters
</a><ul>
499 <li><a class=
"reference internal" href=
"#insert-entity-dialog" id=
"id225">Insert entity dialog
</a></li>
500 <li><a class=
"reference internal" href=
"#replace-special-chars-by-its-entity" id=
"id226">Replace special chars by its entity
</a><ul>
501 <li><a class=
"reference internal" href=
"#at-typing-time" id=
"id227">At typing time
</a></li>
502 <li><a class=
"reference internal" href=
"#bulk-replacement" id=
"id228">Bulk replacement
</a></li>
507 <li><a class=
"reference internal" href=
"#save-actions" id=
"id229">Save Actions
</a><ul>
508 <li><a class=
"reference internal" href=
"#auto-save" id=
"id230">Auto Save
</a></li>
509 <li><a class=
"reference internal" href=
"#save-on-focus-out" id=
"id231">Save on focus out
</a></li>
510 <li><a class=
"reference internal" href=
"#instant-save" id=
"id232">Instant Save
</a></li>
511 <li><a class=
"reference internal" href=
"#backup-copy" id=
"id233">Backup Copy
</a></li>
516 <li><a class=
"reference internal" href=
"#contributing-to-this-document" id=
"id234">Contributing to this document
</a></li>
517 <li><a class=
"reference internal" href=
"#scintilla-keyboard-commands" id=
"id235">Scintilla keyboard commands
</a><ul>
518 <li><a class=
"reference internal" href=
"#keyboard-commands" id=
"id236">Keyboard commands
</a></li>
521 <li><a class=
"reference internal" href=
"#tips-and-tricks" id=
"id237">Tips and tricks
</a><ul>
522 <li><a class=
"reference internal" href=
"#document-notebook" id=
"id238">Document notebook
</a></li>
523 <li><a class=
"reference internal" href=
"#editor" id=
"id239">Editor
</a></li>
524 <li><a class=
"reference internal" href=
"#interface" id=
"id240">Interface
</a></li>
525 <li><a class=
"reference internal" href=
"#gtk-related" id=
"id241">GTK-related
</a></li>
528 <li><a class=
"reference internal" href=
"#compile-time-options" id=
"id242">Compile-time options
</a><ul>
529 <li><a class=
"reference internal" href=
"#src-geany-h" id=
"id243">src/geany.h
</a></li>
530 <li><a class=
"reference internal" href=
"#project-h" id=
"id244">project.h
</a></li>
531 <li><a class=
"reference internal" href=
"#filetypes-c" id=
"id245">filetypes.c
</a></li>
532 <li><a class=
"reference internal" href=
"#editor-h" id=
"id246">editor.h
</a></li>
533 <li><a class=
"reference internal" href=
"#keyfile-c" id=
"id247">keyfile.c
</a></li>
534 <li><a class=
"reference internal" href=
"#build-c" id=
"id248">build.c
</a></li>
537 <li><a class=
"reference internal" href=
"#gnu-general-public-license" id=
"id249">GNU General Public License
</a></li>
538 <li><a class=
"reference internal" href=
"#license-for-scintilla-and-scite" id=
"id250">License for Scintilla and SciTE
</a></li>
541 <div class=
"section" id=
"introduction">
542 <h1><a class=
"toc-backref" href=
"#id7">Introduction
</a></h1>
543 <div class=
"section" id=
"about-geany">
544 <h2><a class=
"toc-backref" href=
"#id8">About Geany
</a></h2>
545 <p>Geany is a small and lightweight Integrated Development Environment. It
546 was developed to provide a small and fast IDE, which has only a few
547 dependencies on other packages. Another goal was to be as independent
548 as possible from a particular Desktop Environment like KDE or GNOME -
549 Geany only requires the GTK2 runtime libraries.
</p>
550 <p>Some basic features of Geany:
</p>
552 <li>Syntax highlighting
</li>
553 <li>Code folding
</li>
554 <li>Autocompletion of symbols/words
</li>
555 <li>Construct completion/snippets
</li>
556 <li>Auto-closing of XML and HTML tags
</li>
558 <li>Many supported filetypes including C, Java, PHP, HTML, Python, Perl,
559 Pascal, and others
</li>
560 <li>Symbol lists
</li>
561 <li>Code navigation
</li>
562 <li>Build system to compile and execute your code
</li>
563 <li>Simple project management
</li>
564 <li>Plugin interface
</li>
567 <div class=
"section" id=
"where-to-get-it">
568 <h2><a class=
"toc-backref" href=
"#id9">Where to get it
</a></h2>
569 <p>You can obtain Geany from
<a class=
"reference external" href=
"http://www.geany.org/">http://www.geany.org/
</a> or perhaps also from
570 your distribution. For a list of available packages, please see
571 <a class=
"reference external" href=
"http://www.geany.org/Download/ThirdPartyPackages">http://www.geany.org/Download/ThirdPartyPackages
</a>.
</p>
573 <div class=
"section" id=
"license">
574 <h2><a class=
"toc-backref" href=
"#id10">License
</a></h2>
575 <p>Geany is distributed under the terms of the GNU General Public License
576 as published by the Free Software Foundation; either version
2 of
577 the License, or (at your option) any later version. A copy of this
578 license can be found in the file COPYING included with the source
579 code of this program and in the chapter,
<a class=
"reference internal" href=
"#gnu-general-public-license">GNU General Public License
</a>.
</p>
580 <p>The included Scintilla library (found in the subdirectory
581 <tt class=
"docutils literal">scintilla/
</tt>) has its own license, which can be found in the chapter,
582 <a class=
"reference internal" href=
"#license-for-scintilla-and-scite">License for Scintilla and SciTE
</a>.
</p>
584 <div class=
"section" id=
"about-this-document">
585 <h2><a class=
"toc-backref" href=
"#id11">About this document
</a></h2>
586 <p>This documentation is available in HTML and text formats.
587 The latest version can always be found at
<a class=
"reference external" href=
"http://www.geany.org/">http://www.geany.org/
</a>.
</p>
588 <p>If you want to contribute to it, see
<a class=
"reference internal" href=
"#contributing-to-this-document">Contributing to this document
</a>.
</p>
591 <div class=
"section" id=
"installation">
592 <h1><a class=
"toc-backref" href=
"#id12">Installation
</a></h1>
593 <div class=
"section" id=
"requirements">
594 <h2><a class=
"toc-backref" href=
"#id13">Requirements
</a></h2>
595 <p>You will need the GTK (
>=
2.16.0) libraries and their dependencies
596 (Pango, GLib and ATK). Your distro should provide packages for these,
597 usually installed by default. For Windows, you can download an installer
598 from the website which bundles these libraries.
</p>
600 <div class=
"section" id=
"binary-packages">
601 <h2><a class=
"toc-backref" href=
"#id14">Binary packages
</a></h2>
602 <p>There are many binary packages available. For an up-to-date but maybe
603 incomplete list see
<a class=
"reference external" href=
"http://www.geany.org/Download/ThirdPartyPackages">http://www.geany.org/Download/ThirdPartyPackages
</a>.
</p>
605 <div class=
"section" id=
"source-compilation">
606 <h2><a class=
"toc-backref" href=
"#id15">Source compilation
</a></h2>
607 <p>Compiling Geany is quite easy.
608 To do so, you need the GTK (
>=
2.16.0) libraries and header files.
609 You also need the Pango, GLib and ATK libraries and header files.
610 All these files are available at
<a class=
"reference external" href=
"http://www.gtk.org">http://www.gtk.org
</a>, but very often
611 your distro will provide development packages to save the trouble of
612 building these yourself.
</p>
613 <p>Furthermore you need, of course, a C and C++ compiler. The GNU versions
614 of these tools are recommended.
</p>
615 <div class=
"section" id=
"autotools-based-build-system">
616 <h3><a class=
"toc-backref" href=
"#id16">Autotools based build system
</a></h3>
617 <p>The Autotools based build system is very mature and has been well tested.
618 To use it, you just need the Make tool, preferably GNU Make.
</p>
619 <p>Then run the following commands:
</p>
620 <pre class=
"literal-block">
625 <pre class=
"literal-block">
629 <pre class=
"literal-block">
633 <div class=
"section" id=
"waf-based-build-system">
634 <h3><a class=
"toc-backref" href=
"#id17">Waf based build system
</a></h3>
635 <p>The Waf build system is still quite young and under heavy development but already in a
636 usable state. In contrast to the Autotools system, Waf needs Python. So before using Waf, you need
637 to install Python on your system.
638 The advantage of the Waf build system over the Autotools based build system is that the whole
639 build process might be a bit faster. Especially when you use the Waf
640 cache feature for repetitive builds (e.g. when changing only a few source files
641 to test something) will become much faster since Waf will cache and re-use the
642 unchanged built files and only compile the changed code again. See
<a class=
"reference internal" href=
"#waf-cache">Waf Cache
</a> for details.
643 To build Geany with Waf as run:
</p>
644 <pre class=
"literal-block">
649 <pre class=
"literal-block">
652 <div class=
"section" id=
"waf-cache">
653 <h4><a class=
"toc-backref" href=
"#id18">Waf cache
</a></h4>
654 <p>The Waf build system has a nice and interesting feature which can help to avoid
655 a lot of unnecessary rebuilding of unchanged code. This often happens when developing new features
656 or trying to debug something in Geany.
657 Waf is able to store and retrieve the object files from a cache. This cache is declared
658 using the environment variable
<tt class=
"docutils literal">WAFCACHE
</tt>.
659 A possible location of the cache directory could be
<tt class=
"docutils literal"><span class=
"pre">~/.cache/waf
</span></tt>. In order to make use of
660 this, you first need to create this directory:
</p>
661 <pre class=
"literal-block">
662 $ mkdir -p ~/.cache/waf
664 <p>then add the environment variable to your shell configuration (the following example is for
665 Bash and should be adjusted to your used shell):
</p>
666 <pre class=
"literal-block">
667 export WAFCACHE=/home/username/.cache/waf
669 <p>Remember to replace
<tt class=
"docutils literal">username
</tt> with your actual username.
</p>
670 <p>More information about the Waf cache feature are available at
671 <a class=
"reference external" href=
"http://code.google.com/p/waf/wiki/CacheObjectFiles">http://code.google.com/p/waf/wiki/CacheObjectFiles
</a>.
</p>
672 <div class=
"section" id=
"cleaning-the-cache">
673 <h5><a class=
"toc-backref" href=
"#id19">Cleaning the cache
</a></h5>
674 <p>You should be careful about the size of the cache directory as it may
675 grow rapidly over time.
676 Waf doesn't do any cleaning or other house-keeping of the cache yet, so you need to keep it
678 An easy way to keep it clean is to run the following command regularly to remove old
680 <pre class=
"literal-block">
681 $ find /home/username/.cache/waf -mtime +
14 -exec rm {} \;
683 <p>This will delete all files in the cache directory which are older than
14 days.
</p>
684 <p>For details about the
<tt class=
"docutils literal">find
</tt> command and its options, check its manual page.
</p>
688 <div class=
"section" id=
"custom-installation">
689 <h3><a class=
"toc-backref" href=
"#id20">Custom installation
</a></h3>
690 <p>The configure script supports several common options, for a detailed
692 <pre class=
"literal-block">
696 <pre class=
"literal-block">
699 <p>(depending on which build system you use).
</p>
700 <p>You may also want to read the INSTALL file for advanced installation
703 <li>See also
<a class=
"reference internal" href=
"#compile-time-options">Compile-time options
</a>.
</li>
706 <div class=
"section" id=
"dynamic-linking-loader-support-and-vte">
707 <h3><a class=
"toc-backref" href=
"#id21">Dynamic linking loader support and VTE
</a></h3>
708 <p>In the case that your system lacks dynamic linking loader support, you
709 probably want to pass the option
<tt class=
"docutils literal"><span class=
"pre">--disable-vte
</span></tt> to the
<tt class=
"docutils literal">configure
</tt>
710 script. This prevents compiling Geany with dynamic linking loader
711 support for automatically loading
<tt class=
"docutils literal">libvte.so
.4</tt> if available.
</p>
713 <div class=
"section" id=
"build-problems">
714 <h3><a class=
"toc-backref" href=
"#id22">Build problems
</a></h3>
715 <p>If there are any errors during compilation, check your build
716 environment and try to find the error, otherwise contact the mailing
717 list or one the authors. Sometimes you might need to ask for specific
718 help from your distribution.
</p>
721 <div class=
"section" id=
"installation-prefix">
722 <h2><a class=
"toc-backref" href=
"#id23">Installation prefix
</a></h2>
723 <p>If you want to find Geany's system files after installation you may
724 want to know the installation prefix.
</p>
725 <p>Pass the
<tt class=
"docutils literal"><span class=
"pre">--print-prefix
</span></tt> option to Geany to check this - see
726 <a class=
"reference internal" href=
"#command-line-options">Command line options
</a>. The first path is the prefix.
</p>
727 <p>On Unix-like systems this is commonly
<tt class=
"docutils literal">/usr
</tt> if you installed from
728 a binary package, or
<tt class=
"docutils literal">/usr/local
</tt> if you build from source.
</p>
730 <p class=
"first admonition-title">Note
</p>
731 <p class=
"last">Editing system files is not necessary as you should use the
732 per-user configuration files instead, which don't need root
733 permissions. See
<a class=
"reference internal" href=
"#configuration-files">Configuration files
</a>.
</p>
737 <div class=
"section" id=
"usage">
738 <h1><a class=
"toc-backref" href=
"#id24">Usage
</a></h1>
739 <div class=
"section" id=
"getting-started">
740 <h2><a class=
"toc-backref" href=
"#id25">Getting started
</a></h2>
741 <p>You can start Geany in the following ways:
</p>
743 <li><p class=
"first">From the Desktop Environment menu:
</p>
744 <p>Choose in your application menu of your used Desktop Environment:
745 Development --
> Geany.
</p>
746 <p>At Windows-systems you will find Geany after installation inside
747 the application menu within its special folder.
</p>
749 <li><p class=
"first">From the command line:
</p>
750 <p>To start Geany from a command line, type the following and press
752 <pre class=
"literal-block">
758 <div class=
"section" id=
"the-geany-workspace">
759 <h2><a class=
"toc-backref" href=
"#id26">The Geany workspace
</a></h2>
760 <p>The Geany window is shown in the following figure:
</p>
761 <img alt=
"./images/main_window.png" src=
"./images/main_window.png" />
762 <p>The workspace has the following parts:
</p>
765 <li>An optional toolbar.
</li>
766 <li>An optional sidebar that can show the following tabs:
<ul>
767 <li>Documents - A document list, and
</li>
768 <li>Symbols - A list of symbols in your code.
</li>
771 <li>The main editor window.
</li>
772 <li>An optional message window which can show the following tabs:
<ul>
773 <li>Status - A list of status messages.
</li>
774 <li>Compiler - The output of compiling or building programs.
</li>
775 <li>Messages - Results of 'Find Usage', 'Find in Files' and other actions
</li>
776 <li>Scribble - A text scratchpad for any use.
</li>
777 <li>Terminal - An optional terminal window.
</li>
780 <li>A status bar
</li>
782 <p>Most of these can be configured in the
<a class=
"reference internal" href=
"#interface-preferences">Interface preferences
</a>, the
783 <a class=
"reference internal" href=
"#view-menu">View menu
</a>, or the popup menu for the relevant area.
</p>
784 <p>Additional tabs may be added to the sidebar and message window by plugins.
</p>
785 <p>The position of the tabs can be selected in the interface preferences.
</p>
786 <p>The sizes of the sidebar and message window can be adjusted by
787 dragging the dividers.
</p>
789 <div class=
"section" id=
"command-line-options">
790 <h2><a class=
"toc-backref" href=
"#id27">Command line options
</a></h2>
791 <table border=
"1" class=
"docutils">
797 <thead valign=
"bottom">
798 <tr><th class=
"head">Short option
</th>
799 <th class=
"head">Long option
</th>
800 <th class=
"head">Function
</th>
804 <tr><td><em>none
</em></td>
806 <td>Set initial line number for the first opened file
807 (same as --line, do not put a space between the + sign
808 and the number). E.g.
"geany +
7 foo.bar
" will open the
809 file foo.bar and place the cursor in line
7.
</td>
811 <tr><td><em>none
</em></td>
813 <td>Set initial column number for the first opened file.
</td>
815 <tr><td>-c dir_name
</td>
816 <td>--config=directory_name
</td>
817 <td>Use an alternate configuration directory. The default
818 configuration directory is
<tt class=
"docutils literal"><span class=
"pre">~/.config/geany/
</span></tt> and that
819 is where
<tt class=
"docutils literal">geany.conf
</tt> and other configuration files
822 <tr><td><em>none
</em></td>
824 <td>Print a list of Geany's internal filetype names (useful
825 for snippets configuration).
</td>
828 <td>--generate-tags
</td>
829 <td>Generate a global tags file (see
830 <a class=
"reference internal" href=
"#generating-a-global-tags-file">Generating a global tags file
</a>).
</td>
833 <td>--no-preprocessing
</td>
834 <td>Don't preprocess C/C++ files when generating tags.
</td>
837 <td>--new-instance
</td>
838 <td>Do not open files in a running instance, force opening
839 a new instance. Only available if Geany was compiled
840 with support for Sockets.
</td>
844 <td>Set initial line number for the first opened file.
</td>
846 <tr><td><em>none
</em></td>
847 <td>--list-documents
</td>
848 <td>Return a list of open documents in a running Geany
850 This can be used to read the currently opened documents in
851 Geany from an external script or tool. The returned list
852 is separated by newlines (LF) and consists of the full,
853 UTF-
8 encoded filenames of the documents.
854 Only available if Geany was compiled with support for
859 <td>Do not show the message window. Use this option if you
860 do not need compiler messages or VTE support.
</td>
864 <td>Do not load symbol completion and call tip data. Use this
865 option if you do not want to use them.
</td>
868 <td>--no-plugins
</td>
869 <td>Do not load plugins or plugin support.
</td>
871 <tr><td><em>none
</em></td>
872 <td>--print-prefix
</td>
873 <td>Print installation prefix, the data directory, the lib
874 directory and the locale directory (in that order) to
875 stdout, one line each. This is mainly intended for plugin
876 authors to detect installation paths.
</td>
880 <td>Open all files given on the command line in read-only mode.
881 This only applies to files opened explicitly from the command
882 line, so files from previous sessions or project files are
886 <td>--no-session
</td>
887 <td>Do not load the previous session's files.
</td>
890 <td>--no-terminal
</td>
891 <td>Do not load terminal support. Use this option if you do
892 not want to load the virtual terminal emulator widget
893 at startup. If you do not have
<tt class=
"docutils literal">libvte.so
.4</tt> installed,
894 then terminal-support is automatically disabled. Only
895 available if Geany was compiled with support for VTE.
</td>
897 <tr><td><em>none
</em></td>
898 <td>--socket-file
</td>
899 <td><p class=
"first">Use this socket filename for communication with a
900 running Geany instance. This can be used with the following
901 command to execute Geany on the current workspace:
</p>
902 <pre class=
"last literal-block">
903 geany --socket-file=/tmp/geany-sock-$(xprop -root _NET_CURRENT_DESKTOP | awk '{print $
3}')
907 <tr><td><em>none
</em></td>
909 <td>Specify explicitly the path including filename or only
910 the filename to the VTE library, e.g.
911 <tt class=
"docutils literal">/usr/lib/libvte.so
</tt> or
<tt class=
"docutils literal">libvte.so
</tt>. This option is
912 only needed when the auto-detection does not work. Only
913 available if Geany was compiled with support for VTE.
</td>
917 <td>Be verbose (print useful status messages).
</td>
921 <td>Show version information and exit.
</td>
925 <td>Show help information and exit.
</td>
927 <tr><td><em>none
</em></td>
929 <td><p class=
"first">Open all given files at startup. This option causes
930 Geany to ignore loading stored files from the last
931 session (if enabled).
932 Geany also recognizes line and column information when
933 appended to the filename with colons, e.g.
934 "geany foo.bar:
10:
5" will open the file foo.bar and
935 place the cursor in line
10 at column
5.
</p>
936 <p class=
"last">Projects can also be opened but a project file (*.geany)
937 must be the first non-option argument. All additionally
938 given files are ignored.
</p>
943 <p>You can also pass line number and column number information, e.g.:
</p>
944 <pre class=
"literal-block">
945 geany some_file.foo:
55:
4
947 <p>Geany supports all generic GTK options, a list is available on the
950 <div class=
"section" id=
"general">
951 <h2><a class=
"toc-backref" href=
"#id28">General
</a></h2>
952 <div class=
"section" id=
"startup">
953 <h3><a class=
"toc-backref" href=
"#id29">Startup
</a></h3>
954 <p>At startup, Geany loads all files from the last time Geany was
955 launched. You can disable this feature in the preferences dialog
956 (see
<a class=
"reference internal" href=
"#general-startup-preferences">General Startup preferences
</a>).
</p>
957 <p>You can start several instances of Geany, but only the first will
958 load files from the last session. In the subsequent instances, you
959 can find these files in the file menu under the
"Recent files
" item.
960 By default this contains the last
10 recently opened files. You can
961 change the number of recently opened files in the preferences dialog.
</p>
962 <p>To run a second instance of Geany, do not specify any filenames on
963 the command-line, or disable opening files in a running instance
964 using the appropriate command line option.
</p>
966 <div class=
"section" id=
"opening-files-from-the-command-line-in-a-running-instance">
967 <h3><a class=
"toc-backref" href=
"#id30">Opening files from the command-line in a running instance
</a></h3>
968 <p>Geany detects if there is an an instance of itself already running and opens files
969 from the command-line in that instance. So, Geany can
970 be used to view and edit files by opening them from other programs
971 such as a file manager.
</p>
972 <p>You can also pass line number and column number information, e.g.:
</p>
973 <pre class=
"literal-block">
974 geany some_file.foo:
55:
4
976 <p>This would open the file
<tt class=
"docutils literal">some_file.foo
</tt> with the cursor on line
55,
978 <p>If you do not like this for some reason, you can disable using the first
979 instance by using the appropriate command line option -- see the section
980 called
<a class=
"reference internal" href=
"#command-line-options">Command line options
</a>.
</p>
982 <div class=
"section" id=
"virtual-terminal-emulator-widget-vte">
983 <h3><a class=
"toc-backref" href=
"#id31">Virtual terminal emulator widget (VTE)
</a></h3>
984 <p>If you have installed
<tt class=
"docutils literal">libvte.so
</tt> on your system, it is loaded
985 automatically by Geany, and you will have a terminal widget in the
986 notebook at the bottom.
</p>
987 <p>If Geany cannot find any
<tt class=
"docutils literal">libvte.so
</tt> at startup, the terminal widget
988 will not be loaded. So there is no need to install the package containing
989 this file in order to run Geany. Additionally, you can disable the use
990 of the terminal widget by command line option, for more information
991 see the section called
<a class=
"reference internal" href=
"#command-line-options">Command line options
</a>.
</p>
992 <p>You can use this terminal (from now on called VTE) much as you would
993 a terminal program like xterm. There is basic clipboard support. You
994 can paste the contents of the clipboard by pressing the right mouse
995 button to open the popup menu, and choosing Paste. To copy text from
996 the VTE, just select the desired text and then press the right mouse
997 button and choose Copy from the popup menu. On systems running the
998 X Window System you can paste the last selected text by pressing the
999 middle mouse button in the VTE (on
2-button mice, the middle button
1000 can often be simulated by pressing both mouse buttons together).
</p>
1001 <p>In the preferences dialog you can specify a shell which should be
1002 started in the VTE. To make the specified shell a login shell just
1003 use the appropriate command line options for the shell. These options
1004 should be found in the manual page of the shell. For zsh and bash
1005 you can use the argument
<tt class=
"docutils literal"><span class=
"pre">--login
</span></tt>.
</p>
1007 <p class=
"first admonition-title">Note
</p>
1008 <p class=
"last">Geany tries to load
<tt class=
"docutils literal">libvte.so
</tt>. If this fails, it tries to load
1009 some other filenames. If this fails too, you should check whether you
1010 installed libvte correctly. Again note, Geany will run without this
1013 <p>It could be, that the library is called something else than
1014 <tt class=
"docutils literal">libvte.so
</tt> (e.g. on FreeBSD
6.0 it is called
<tt class=
"docutils literal">libvte.so
.8</tt>). If so
1015 please set a link to the correct file (as root):
</p>
1016 <pre class=
"literal-block">
1017 # ln -s /usr/lib/libvte.so.X /usr/lib/libvte.so
1019 <p>Obviously, you have to adjust the paths and set X to the number of your
1020 <tt class=
"docutils literal">libvte.so
</tt>.
</p>
1021 <p>You can also specify the filename of the VTE library to use on the command
1022 line (see the section called
<a class=
"reference internal" href=
"#command-line-options">Command line options
</a>) or at compile time
1023 by specifying the command line option
<tt class=
"docutils literal"><span class=
"pre">--with-vte-module-path
</span></tt> to
1026 <div class=
"section" id=
"defining-own-widget-styles-using-gtkrc-2-0">
1027 <h3><a class=
"toc-backref" href=
"#id32">Defining own widget styles using .gtkrc-
2.0</a></h3>
1028 <p>You can define your widget style for many of Geany's GUI parts. To
1029 do this, just edit your
<tt class=
"docutils literal"><span class=
"pre">.gtkrc-
2.0</span></tt> (usually found in your home
1030 directory on UNIX-like systems and in the etc subdirectory of your
1031 Geany installation on Windows).
</p>
1032 <p>To have a defined style used by Geany you must assign it to
1033 at least one of Geany's widgets. For example use the following line:
</p>
1034 <pre class=
"literal-block">
1035 widget
"Geany*
" style
"geanyStyle
"
1037 <p>This would assign your style
"geany_style
" to all Geany
1038 widgets. You can also assign styles only to specific widgets. At the
1039 moment you can use the following widgets:
</p>
1041 <li>GeanyMainWindow
</li>
1042 <li>GeanyEditMenu
</li>
1043 <li>GeanyToolbarMenu
</li>
1044 <li>GeanyDialog
</li>
1045 <li>GeanyDialogPrefs
</li>
1046 <li>GeanyDialogProject
</li>
1047 <li>GeanyDialogSearch
</li>
1048 <li>GeanyMenubar
</li>
1049 <li>GeanyToolbar
</li>
1051 <p>An example of a simple
<tt class=
"docutils literal"><span class=
"pre">.gtkrc-
2.0</span></tt>:
</p>
1052 <pre class=
"literal-block">
1053 style
"geanyStyle
"
1055 font_name=
"Sans
12"
1057 widget
"GeanyMainWindow
" style
"geanyStyle
"
1059 style
"geanyStyle
"
1061 font_name=
"Sans
10"
1063 widget
"GeanyPrefsDialog
" style
"geanyStyle
"
1067 <div class=
"section" id=
"documents">
1068 <h2><a class=
"toc-backref" href=
"#id33">Documents
</a></h2>
1069 <div class=
"section" id=
"switching-between-documents">
1070 <h3><a class=
"toc-backref" href=
"#id34">Switching between documents
</a></h3>
1071 <p>The documents list and the editor tabs are two different ways
1072 to switch between documents using the mouse. When you hit the key
1073 combination to move between tabs, the order is determined by the tab
1074 order. It is not alphabetical as shown in the documents list
1075 (regardless of whether or not editor tabs are visible).
</p>
1076 <p>See the
<a class=
"reference internal" href=
"#notebook-tab-keybindings">Notebook tab keybindings
</a> section for useful
1077 shortcuts including for Most-Recently-Used document switching.
</p>
1079 <div class=
"section" id=
"cloning-documents">
1080 <h3><a class=
"toc-backref" href=
"#id35">Cloning documents
</a></h3>
1081 <p>The
<cite>Document-
>Clone
</cite> menu item copies the current document's text,
1082 cursor position and properties into a new untitled document. If
1083 there is a selection, only the selected text is copied. This can be
1084 useful when making temporary copies of text or for creating
1085 documents with similar or identical contents.
</p>
1088 <div class=
"section" id=
"character-sets-and-unicode-byte-order-mark-bom">
1089 <h2><a class=
"toc-backref" href=
"#id36">Character sets and Unicode Byte-Order-Mark (BOM)
</a></h2>
1090 <div class=
"section" id=
"using-character-sets">
1091 <h3><a class=
"toc-backref" href=
"#id37">Using character sets
</a></h3>
1092 <p>Geany provides support for detecting and converting character sets. So
1093 you can open and save files in different character sets, and even
1094 convert a file from one character set to another. To do this,
1095 Geany uses the character conversion capabilities of the GLib library.
</p>
1096 <p>Only text files are supported, i.e. opening files which contain
1097 NULL-bytes may fail. Geany will try to open the file anyway but it is
1098 likely that the file will be truncated because it can only be read up
1099 to the first occurrence of a NULL-byte. All characters after this
1100 position are lost and are not written when you save the file.
</p>
1101 <p>Geany tries to detect the encoding of a file while opening it, but
1102 auto-detecting the encoding of a file is not easy and sometimes an
1103 encoding might not be detected correctly. In this case you have to
1104 set the encoding of the file manually in order to display it
1105 correctly. You can this in the file open dialog by selecting an
1106 encoding in the drop down box or by reloading the file with the
1107 file menu item
"Reload as
". The auto-detection works well for most
1108 encodings but there are also some encodings where it is known that
1109 auto-detection has problems.
</p>
1110 <p>There are different ways to set different encodings in Geany:
</p>
1112 <li><p class=
"first">Using the file open dialog
</p>
1113 <p>This opens the file with the encoding specified in the encoding drop
1114 down box. If the encoding is set to
"Detect from file
" auto-detection
1115 will be used. If the encoding is set to
"Without encoding (None)
" the
1116 file will be opened without any character conversion and Geany will
1117 not try to auto-detect the encoding (see below for more information).
</p>
1119 <li><p class=
"first">Using the
"Reload as
" menu item
</p>
1120 <p>This item reloads the current file with the specified encoding. It can
1121 help if you opened a file and found out that the wrong encoding was used.
</p>
1123 <li><p class=
"first">Using the
"Set encoding
" menu item
</p>
1124 <p>Contrary to the above two options, this will not change or reload
1125 the current file unless you save it. It is useful when you want to
1126 change the encoding of the file.
</p>
1128 <li><p class=
"first">Specifying the encoding in the file itself
</p>
1129 <p>As mentioned above, auto-detecting the encoding of a file may fail on
1130 some encodings. If you know that Geany doesn't open a certain file,
1131 you can add the specification line, described in the next section,
1132 to the beginning of the file to force Geany to use a specific
1133 encoding when opening the file.
</p>
1137 <div class=
"section" id=
"in-file-encoding-specification">
1138 <h3><a class=
"toc-backref" href=
"#id38">In-file encoding specification
</a></h3>
1139 <p>Geany detects meta tags of HTML files which contain charset information
1141 <pre class=
"literal-block">
1142 <meta http-equiv=
"content-type
" content=
"text/html; charset=ISO-
8859-
15" /
>
1144 <p>and the specified charset is used when opening the file. This is useful if the
1145 encoding of the file cannot be detected properly.
1146 For non-HTML files you can also define a line like:
</p>
1147 <pre class=
"literal-block">
1148 /* geany_encoding=ISO-
8859-
15 */
1151 <pre class=
"literal-block">
1152 # geany_encoding=ISO-
8859-
15 #
1154 <p>to force an encoding to be used. The #, /* and */ are examples
1155 of filetype-specific comment characters. It doesn't matter which
1156 characters are around the string
" geany_encoding=ISO-
8859-
15 " as long
1157 as there is at least one whitespace character before and after this
1158 string. Whitespace characters are in this case a space or tab character.
1159 An example to use this could be you have a file with ISO-
8859-
15
1160 encoding but Geany constantly detects the file encoding as ISO-
8859-
1.
1161 Then you simply add such a line to the file and Geany will open it
1162 correctly the next time.
</p>
1163 <p>Since Geany
0.15 you can also use lines which match the
1164 regular expression used to find the encoding string:
1165 <tt class=
"docutils literal"><span class=
"pre">coding[\t
</span> <span class=
"pre">]*[:=][\t
</span> <span class=
"pre">]*([a-z0-
9-]+)[\t
</span> ]*
</tt></p>
1167 <p class=
"first admonition-title">Note
</p>
1168 <p class=
"last">These specifications must be in the first
512 bytes of the file.
1169 Anything after the first
512 bytes will not be recognized.
</p>
1171 <p>Some examples are:
</p>
1172 <pre class=
"literal-block">
1173 # encoding = ISO-
8859-
15
1176 <pre class=
"literal-block">
1177 # coding: ISO-
8859-
15
1180 <div class=
"section" id=
"special-encoding-none">
1181 <h3><a class=
"toc-backref" href=
"#id39">Special encoding
"None
"</a></h3>
1182 <p>There is a special encoding
"None
" which uses no
1183 encoding. It is useful when you know that Geany cannot auto-detect
1184 the encoding of a file and it is not displayed correctly. Especially
1185 when the file contains NULL-bytes this can be useful to skip auto
1186 detection and open the file properly at least until the occurrence
1187 of the first NULL-byte. Using this encoding opens the file as it is
1188 without any character conversion.
</p>
1190 <div class=
"section" id=
"unicode-byte-order-mark-bom">
1191 <h3><a class=
"toc-backref" href=
"#id40">Unicode Byte-Order-Mark (BOM)
</a></h3>
1192 <p>Furthermore, Geany detects a Unicode Byte Order Mark (see
1193 <a class=
"reference external" href=
"http://en.wikipedia.org/wiki/Byte_Order_Mark">http://en.wikipedia.org/wiki/Byte_Order_Mark
</a> for details). Of course,
1194 this feature is only available if the opened file is in a Unicode
1195 encoding. The Byte Order Mark helps to detect the encoding of a file,
1196 e.g. whether it is UTF-
16LE or UTF-
16BE and so on. On Unix-like systems
1197 using a Byte Order Mark could cause some problems for programs not
1198 expecting it, e.g. the compiler gcc stops
1199 with stray errors, PHP does not parse a script containing a BOM and
1200 script files starting with a she-bang maybe cannot be started. In the
1201 status bar you can easily see whether the file starts with a BOM or
1203 <p>If you want to set a BOM for a file or if you want to remove it
1204 from a file, just use the document menu and toggle the checkbox.
</p>
1206 <p class=
"first admonition-title">Note
</p>
1207 <p class=
"last">If you are unsure what a BOM is or if you do not understand where
1208 to use it, then it is probably not important for you and you can
1209 safely ignore it.
</p>
1213 <div class=
"section" id=
"editing">
1214 <h2><a class=
"toc-backref" href=
"#id41">Editing
</a></h2>
1215 <div class=
"section" id=
"folding">
1216 <h3><a class=
"toc-backref" href=
"#id42">Folding
</a></h3>
1217 <p>Geany provides basic code folding support. Folding means the ability to
1218 show and hide parts of the text in the current file. You can hide
1219 unimportant code sections and concentrate on the parts you are working on
1220 and later you can show hidden sections again. In the editor window there is
1221 a small grey margin on the left side with [+] and [-] symbols which
1222 show hidden parts and hide parts of the file respectively. By
1223 clicking on these icons you can simply show and hide sections which are
1224 marked by vertical lines within this margin. For many filetypes nested
1225 folding is supported, so there may be several fold points within other
1228 <p class=
"first admonition-title">Note
</p>
1229 <p class=
"last">You can customize the folding icon and line styles - see the
1230 filetypes.common
<a class=
"reference internal" href=
"#folding-settings">Folding Settings
</a>.
</p>
1232 <p>If you don't like it or don't need it at all, you can simply disable
1233 folding support completely in the preferences dialog.
</p>
1234 <p>The folding behaviour can be changed with the
"Fold/Unfold all children of
1235 a fold point
" option in the preference dialog. If activated, Geany will
1236 unfold all nested fold points below the current one if they are already
1237 folded (when clicking on a [+] symbol).
1238 When clicking on a [-] symbol, Geany will fold all nested fold points
1239 below the current one if they are unfolded.
</p>
1240 <p>This option can be inverted by pressing the Shift
1241 key while clicking on a fold symbol. That means, if the
"Fold/Unfold all
1242 children of a fold point
" option is enabled, pressing Shift will disable
1243 it for this click and vice versa.
</p>
1245 <div class=
"section" id=
"column-mode-editing-rectangular-selections">
1246 <h3><a class=
"toc-backref" href=
"#id43">Column mode editing (rectangular selections)
</a></h3>
1247 <p>There is basic support for column mode editing. To use it, create a
1248 rectangular selection by holding down the Control and Shift keys
1249 (or Alt and Shift on Windows) while selecting some text.
1250 Once a rectangular selection exists you can start editing the text within
1251 this selection and the modifications will be done for every line in the
1253 <p>It is also possible to create a zero-column selection - this is
1254 useful to insert text on multiple lines.
</p>
1256 <div class=
"section" id=
"drag-and-drop-of-text">
1257 <h3><a class=
"toc-backref" href=
"#id44">Drag and drop of text
</a></h3>
1258 <p>If you drag selected text in the editor widget of Geany the text is
1259 moved to the position where the mouse pointer is when releasing the
1260 mouse button. Holding Control when releasing the mouse button will
1261 copy the text instead. This behaviour was changed in Geany
0.11 -
1262 before the selected text was copied to the new position.
</p>
1264 <div class=
"section" id=
"indentation">
1265 <h3><a class=
"toc-backref" href=
"#id45">Indentation
</a></h3>
1266 <p>Geany allows each document to indent either with a tab character,
1267 multiple spaces or a combination of both.
</p>
1268 <p>The
<em>Tabs
</em> setting indents with one tab character per indent level, and
1269 displays tabs as the indent width.
</p>
1270 <p>The
<em>Spaces
</em> setting indents with the number of spaces set in the indent
1271 width for each level.
</p>
1272 <p>The
<em>Tabs and Spaces
</em> setting indents with spaces as above, then converts
1273 as many spaces as it can to tab characters at the rate of one tab for
1274 each multiple of the
<cite>Various preference
</cite> setting
1275 <em>indent_hard_tab_width
</em> (default
8) and displays tabs as the
1276 <em>indent_hard_tab_width
</em> value.
</p>
1277 <p>The default indent settings are set in
<a class=
"reference internal" href=
"#editor-indentation-preferences">Editor Indentation
1278 preferences
</a> (see the link for more information).
</p>
1279 <p>The default settings can be overridden per-document using the
1280 Document menu. They can also be overridden by projects - see
1281 <a class=
"reference internal" href=
"#project-management">Project management
</a>.
</p>
1282 <p>The indent mode for the current document is shown on the status bar
1284 <dl class=
"docutils">
1286 <dd>Indent with Tab characters.
</dd>
1288 <dd>Indent with spaces.
</dd>
1290 <dd>Indent with tabs and spaces, depending on how much indentation is
1293 <div class=
"section" id=
"applying-new-indentation-settings">
1294 <h4><a class=
"toc-backref" href=
"#id46">Applying new indentation settings
</a></h4>
1295 <p>After changing the default settings you may wish to apply the new
1296 settings to every document in the current session. To do this use the
1297 <em>Project-
>Apply Default Indentation
</em> menu item.
</p>
1299 <div class=
"section" id=
"detecting-indent-type">
1300 <h4><a class=
"toc-backref" href=
"#id47">Detecting indent type
</a></h4>
1301 <p>The
<em>Detect from file
</em> indentation preference can be used to
1302 scan each file as it's opened and set the indent type based on
1303 how many lines start with a tab vs.
2 or more spaces.
</p>
1306 <div class=
"section" id=
"auto-indentation">
1307 <h3><a class=
"toc-backref" href=
"#id48">Auto-indentation
</a></h3>
1308 <p>When enabled, auto-indentation happens when pressing
<em>Enter
</em> in the
1309 Editor. It adds a certain amount of indentation to the new line so the
1310 user doesn't always have to indent each line manually.
</p>
1311 <p>Geany has four types of auto-indentation:
</p>
1312 <dl class=
"docutils">
1314 <dd>Disables auto-indentation completely.
</dd>
1316 <dd>Adds the same amount of whitespace on a new line as on the previous line.
1317 For the
<em>Tabs
</em> and the
<em>Spaces
</em> indent types the indentation will use the
1318 same combination of characters as the previous line. The
1319 <em>Tabs and Spaces
</em> indentation type converts as explained above.
</dd>
1320 <dt>Current chars
</dt>
1321 <dd>Does the same as
<em>Basic
</em> but also indents a new line after an opening
1322 brace '{', and de-indents when typing a closing brace '}'. For Python,
1323 a new line will be indented after typing ':' at the end of the
1325 <dt>Match braces
</dt>
1326 <dd>Similar to
<em>Current chars
</em> but the closing brace will be aligned to
1327 match the indentation of the line with the opening brace. This
1328 requires the filetype to be one where Geany knows that the Scintilla
1329 lexer understands matching braces (C, C++, D, HTML, Pascal, Bash,
1332 <p>There is also XML-tag auto-indentation. This is enabled when the
1333 mode is more than just Basic, and is also controlled by a filetype
1334 setting - see
<a class=
"reference internal" href=
"#xml-indent-tags">xml_indent_tags
</a>.
</p>
1336 <div class=
"section" id=
"bookmarks">
1337 <h3><a class=
"toc-backref" href=
"#id49">Bookmarks
</a></h3>
1338 <p>Geany provides a handy bookmarking feature that lets you mark one
1339 or more lines in a document, and return the cursor to them using a
1340 key combination.
</p>
1341 <p>To place a mark on a line, either left-mouse-click in the left margin
1342 of the editor window, or else use Ctrl-m. This will
1343 produce a small green plus symbol in the margin. You can have as many
1344 marks in a document as you like. Click again (or use Ctrl-m again)
1345 to remove the bookmark. To remove all the marks in a given document,
1346 use
"Remove Markers
" in the Document menu.
</p>
1347 <p>To navigate down your document, jumping from one mark to the next,
1348 use Ctrl-. (control period). To go in the opposite direction on
1349 the page, use Ctrl-, (control comma). Using the bookmarking feature
1350 together with the commands to switch from one editor tab to another
1351 (Ctrl-PgUp/PgDn and Ctrl-Tab) provides a particularly fast way to
1352 navigate around multiple files.
</p>
1354 <div class=
"section" id=
"code-navigation-history">
1355 <h3><a class=
"toc-backref" href=
"#id50">Code navigation history
</a></h3>
1356 <p>To ease navigation in source files and especially between
1357 different files, Geany lets you jump between different navigation
1358 points. Currently, this works for the following:
</p>
1360 <li><a class=
"reference internal" href=
"#go-to-tag-declaration">Go to tag declaration
</a></li>
1361 <li><a class=
"reference internal" href=
"#go-to-tag-definition">Go to tag definition
</a></li>
1362 <li>Symbol list items
</li>
1363 <li>Build errors
</li>
1364 <li>Message items
</li>
1366 <p>When using one of these actions, Geany remembers your current position
1367 and jumps to the new one. If you decide to go back to your previous
1368 position in the file, just use
"Navigate back a location
". To
1369 get back to the new position again, just use
"Navigate forward a
1370 location
". This makes it easier to navigate in e.g. foreign code
1371 and between different files.
</p>
1373 <div class=
"section" id=
"sending-text-through-custom-commands">
1374 <h3><a class=
"toc-backref" href=
"#id51">Sending text through custom commands
</a></h3>
1375 <p>You can define several custom commands in Geany and send the current
1376 selection to one of these commands using the
<em>Edit-
>Format-
>Send
1377 Selection to
</em> menu or keybindings. The output of the command will be
1378 used to replace the current selection. This makes it possible to use
1379 text formatting tools with Geany in a general way.
</p>
1380 <p>The selected text will be sent to the standard input of the executed
1381 command, so the command should be able to read from it and it should
1382 print all results to its standard output which will be read by
1383 Geany. To help finding errors in executing the command, the output
1384 of the program's standard error will be printed on Geany's standard
1386 <p>If there is no selection, the whole current line is used instead.
</p>
1387 <p>To add a custom command, use the
<em>Send Selection to-
>Set Custom
1388 Commands
</em> menu item. Click on
<em>Add
</em> to get a new item and type the
1389 command. You can also specify some command line options. Empty
1390 commands are not saved.
</p>
1391 <p>Normal shell quoting is supported, so you can do things like:
</p>
1393 <li><tt class=
"docutils literal">sed
<span class=
"pre">'s/\./(dot)/g'
</span></tt></li>
1395 <p>The above example would normally be done with the
<a class=
"reference internal" href=
"#replace-all">Replace all
</a>
1396 function, but it can be handy to have common commands already set up.
</p>
1397 <p>Note that the command is not run in a shell, so if you want to use
1398 shell features like pipes and command chains, you need to explicitly
1399 launch the shell and pass it your command:
</p>
1401 <li><tt class=
"docutils literal">sh
<span class=
"pre">-c
</span> 'sort | uniq'
</tt></li>
1404 <div class=
"section" id=
"context-actions">
1405 <h3><a class=
"toc-backref" href=
"#id52">Context actions
</a></h3>
1406 <p>You can execute the context action command on the current word at the
1407 cursor position or the available selection. This word or selection
1408 can be used as an argument to the command.
1409 The context action is invoked by a menu entry in the popup menu of the
1410 editor and also a keyboard shortcut (see the section called
1411 <a class=
"reference internal" href=
"#keybindings">Keybindings
</a>).
</p>
1412 <p>The command can be specified in the preferences dialog and also for
1413 each filetype (see
"context_action_cmd
" in the section called
1414 <a class=
"reference internal" href=
"#filetype-configuration">Filetype configuration
</a>). When the context action is invoked, the filetype
1415 specific command is used if available, otherwise the command
1416 specified in the preferences dialog is executed.
</p>
1417 <p>The current word or selection can be referred with the wildcard
"%s
"
1418 in the command, it will be replaced by the current word or
1419 selection before the command is executed.
</p>
1420 <p>For example a context action can be used to open API documentation
1421 in a browser window, the command to open the PHP API documentation
1423 <pre class=
"literal-block">
1424 firefox
"http://www.php.net/%s
"
1426 <p>when executing the command, the %s is substituted by the word near
1427 the cursor position or by the current selection. If the cursor is at
1428 the word
"echo
", a browser window will open(assumed your browser is
1429 called firefox) and it will open the address:
<a class=
"reference external" href=
"http://www.php.net/echo">http://www.php.net/echo
</a>.
</p>
1431 <div class=
"section" id=
"autocompletion">
1432 <h3><a class=
"toc-backref" href=
"#id53">Autocompletion
</a></h3>
1433 <p>Geany can offer a list of possible completions for symbols defined in the
1434 tags and for all words in a document.
</p>
1435 <p>The autocompletion list for symbols is presented when the first few
1436 characters of the symbol are typed (configurable, see
<a class=
"reference internal" href=
"#editor-completions-preferences">Editor Completions
1437 preferences
</a>, default
4) or when the
<em>Complete word
</em>
1438 keybinding is pressed (configurable, see
<a class=
"reference internal" href=
"#editor-keybindings">Editor keybindings
</a>,
1439 default Ctrl-Space).
</p>
1440 <p>When the defined keybinding is typed and the
<em>Autocomplete all words in
1441 document
</em> preference (in
<a class=
"reference internal" href=
"#editor-completions-preferences">Editor Completions preferences
</a>)
1442 is selected then the autocompletion list will show all matching words
1443 in the document, if there are no matching symbols.
</p>
1444 <p>If you don't want to use autocompletion it can be dismissed until
1445 the next symbol by pressing Escape. The autocompletion list is updated
1446 as more characters are typed so that it only shows completions that start
1447 with the characters typed so far. If no symbols begin with the sequence,
1448 the autocompletion window is closed.
</p>
1449 <p>The up and down arrows will move the selected item. The highlighted
1450 item on the autocompletion list can be chosen from the list by pressing
1451 Enter/Return. You can also double-click to select an item. The sequence
1452 will be completed to match the chosen item, and if the
<em>Drop rest of
1453 word on completion
</em> preference is set (in
<a class=
"reference internal" href=
"#editor-completions-preferences">Editor Completions
1454 preferences
</a>) then any characters after the cursor that match
1455 a symbol or word are deleted.
</p>
1456 <div class=
"section" id=
"word-part-completion">
1457 <h4><a class=
"toc-backref" href=
"#id54">Word part completion
</a></h4>
1458 <p>By default, pressing Tab will complete the selected item by word part;
1459 useful e.g. for adding the prefix
<tt class=
"docutils literal">gtk_combo_box_entry_
</tt> without typing it
1462 <li>gtk_com
<TAB
></li>
1463 <li>gtk_combo_
<TAB
></li>
1464 <li>gtk_combo_box_
<e
><TAB
></li>
1465 <li>gtk_combo_box_entry_
<s
><ENTER
></li>
1466 <li>gtk_combo_box_entry_set_text_column
</li>
1468 <p>The key combination can be changed from Tab - See
<a class=
"reference internal" href=
"#editor-keybindings">Editor keybindings
</a>.
1469 If you clear/change the key combination for word part completion, Tab
1470 will complete the whole word instead, like Enter.
</p>
1472 <div class=
"section" id=
"scope-autocompletion">
1473 <h4><a class=
"toc-backref" href=
"#id55">Scope autocompletion
</a></h4>
1475 <pre class=
"literal-block">
1482 <p>When you type
<tt class=
"docutils literal">foo.
</tt> it will show an autocompletion list with 'i' and
1484 <p>It only works for languages that set parent scope names for e.g. struct
1485 members. Currently this means C-like languages. The C tag parser only
1486 parses global scopes, so this won't work for structs or objects declared
1490 <div class=
"section" id=
"user-definable-snippets">
1491 <h3><a class=
"toc-backref" href=
"#id56">User-definable snippets
</a></h3>
1492 <p>Snippets are small strings or code constructs which can be replaced or
1493 completed to a more complex string. So you can save a lot of time when
1494 typing common strings and letting Geany do the work for you.
1495 To know what to complete or replace Geany reads a configuration file
1496 called
<tt class=
"docutils literal">snippets.conf
</tt> at startup.
</p>
1497 <p>Maybe you need to often type your name, so define a snippet like this:
</p>
1498 <pre class=
"literal-block">
1500 myname=Enrico Tröger
1502 <p>Every time you write
<tt class=
"docutils literal">myname
</tt> <TAB
> in Geany, it will replace
"myname
"
1503 with
"Enrico Tröger
". The key to start autocompletion can be changed
1504 in the preferences dialog, by default it is TAB. The corresponding keybinding
1505 is called
<cite>Complete snippet
</cite>.
</p>
1506 <p><strong>Paths
</strong></p>
1507 <p>You can override the default snippets using the user
1508 <tt class=
"docutils literal">snippets.conf
</tt> file. Use the
<em>Tools-
>Configuration
1509 Files-
>snippets.conf
</em> menu item. See also
<a class=
"reference internal" href=
"#configuration-file-paths">Configuration file paths
</a>.
</p>
1510 <p>This adds the default settings to the user file if the file doesn't
1511 exist. Alternatively the file can be created manually, adding only
1512 the settings you want to change. All missing settings will be read
1513 from the system snippets file.
</p>
1514 <p><strong>Snippet groups
</strong></p>
1515 <p>The file
<tt class=
"docutils literal">snippets.conf
</tt> contains sections defining snippets that
1516 are available for particular filetypes and in general.
</p>
1517 <p>The two sections
"Default
" and
"Special
" apply to all filetypes.
1518 "Default
" contains all snippets which are available for every
1519 filetype and
"Special
" contains snippets which can only be used in
1520 other snippets. So you can define often used parts of snippets and
1521 just use the special snippet as a placeholder (see the
1522 <tt class=
"docutils literal">snippets.conf
</tt> for details).
</p>
1523 <p>You can define sections with the name of a filetype eg
"C++
". The
1524 snippets in that section are only available for use in files with that
1525 filetype. Snippets in filetype sections will hide snippets with the
1526 same name in the
"Default
" section when used in a file of that
1528 <p><strong>Substitution sequences for snippets
</strong></p>
1529 <p>To define snippets you can use several special character sequences which
1530 will be replaced when using the snippet:
</p>
1531 <table border=
"1" class=
"docutils">
1536 <tbody valign=
"top">
1537 <tr><td>\n or %newline%
</td>
1538 <td>Insert a new line (it will be replaced by the used EOL
1539 char(s): LF, CR/LF, or CR).
</td>
1541 <tr><td>\t or %ws%
</td>
1542 <td>Insert an indentation step, it will be replaced according
1543 to the current document's indent mode.
</td>
1546 <td>\s to force whitespace at beginning or end of a value
1547 ('key= value' won't work, use 'key=\svalue')
</td>
1549 <tr><td>%cursor%
</td>
1550 <td>Place the cursor at this position after completion has
1551 been done. You can define multiple %cursor% wildcards
1552 and use the keybinding
<cite>Move cursor in snippet
</cite> to jump
1553 to the next defined cursor position in the completed
1557 <td>"...
" means the name of a key in the
"Special
" section.
1558 If you have defined a key
"brace_open
" in the
"Special
"
1559 section you can use %brace_open% in any other snippet.
</td>
1563 <p>Snippet names must not contain spaces otherwise they won't
1564 work correctly. But beside that you can define almost any
1565 string as a snippet and use it later in Geany. It is not limited
1566 to existing contructs of certain programming languages(like
<tt class=
"docutils literal">if
</tt>,
1567 <tt class=
"docutils literal">for
</tt>,
<tt class=
"docutils literal">switch
</tt>). Define whatever you need.
</p>
1568 <p><strong>Template wildcards
</strong></p>
1569 <p>Since Geany
0.15 you can also use most of the available templates wildcards
1570 listed in
<a class=
"reference internal" href=
"#template-wildcards">Template wildcards
</a>. All wildcards which are listed as
1571 <cite>available in snippets
</cite> can be used. For instance to improve the above example:
</p>
1572 <pre class=
"literal-block">
1574 myname=My name is {developer}
1575 mysystem=My system: {command:uname -a}
1577 <p>this will replace
<tt class=
"docutils literal">myname
</tt> with
"My name is
" and the value of the template
1578 preference
<tt class=
"docutils literal">developer
</tt>.
</p>
1579 <p><strong>Word characters
</strong></p>
1580 <p>You can change the way Geany recognizes the word to complete,
1581 that is how the start and end of a word is recognised when the
1582 snippet completion is requested. The section
"Special
" may
1583 contain a key
"wordchars
" which lists all characters a string may contain
1584 to be recognized as a word for completion. Leave it commented to use
1585 default characters or define it to add or remove characters to fit your
1587 <div class=
"section" id=
"snippet-keybindings">
1588 <h4><a class=
"toc-backref" href=
"#id57">Snippet keybindings
</a></h4>
1589 <p>Normally you would type the snippet name and press Tab. However, you
1590 can define keybindings for snippets under the
<em>Keybindings
</em> group in
1591 <tt class=
"docutils literal">snippets.conf
</tt>:
</p>
1592 <pre class=
"literal-block">
1595 block_cursor=
<Ctrl
>8
1598 <p class=
"first admonition-title">Note
</p>
1599 <p class=
"last">Snippet keybindings may be overridden by Geany's configurable
1604 <div class=
"section" id=
"inserting-unicode-characters">
1605 <h3><a class=
"toc-backref" href=
"#id58">Inserting Unicode characters
</a></h3>
1606 <p>You can insert Unicode code points by hitting Ctrl-Shift-u, then still holding
1607 Ctrl-Shift, type some hex digits representing the code point for the character
1608 you want and hit Enter or Return (still holding Ctrl-Shift). If you release
1609 Ctrl-Shift before hitting Enter or Return (or any other character), the code
1610 insertion is completed, but the typed character is also entered. In the case
1611 of Enter/Return, it is a newline, as you might expect.
</p>
1612 <p>In some earlier versions of Geany, you might need to first unbind Ctrl-Shift-u
1613 in the
<a class=
"reference internal" href=
"#keybinding-preferences">keybinding preferences
</a>, then select
<em>Tools-
>Reload Configuration
</em>
1614 or restart Geany. Note that it works slightly differently from other GTK
1615 applications, in that you'll need to continue to hold down the Ctrl and Shift
1616 keys while typing the code point hex digits (and the Enter or Return to finish the code point).
</p>
1619 <div class=
"section" id=
"search-replace-and-go-to">
1620 <h2><a class=
"toc-backref" href=
"#id59">Search, replace and go to
</a></h2>
1621 <p>This section describes search-related commands from the Search menu
1622 and the editor window's popup menu:
</p>
1625 <li>Find selection
</li>
1627 <li>Find in files
</li>
1629 <li>Go to tag definition
</li>
1630 <li>Go to tag declaration
</li>
1633 <p>See also
<a class=
"reference internal" href=
"#search">Search
</a> preferences.
</p>
1634 <div class=
"section" id=
"toolbar-entries">
1635 <h3><a class=
"toc-backref" href=
"#id60">Toolbar entries
</a></h3>
1636 <p>There are also two toolbar entries:
</p>
1639 <li>Go to line entry
</li>
1641 <p>There are keybindings to focus each of these - see
<a class=
"reference internal" href=
"#focus-keybindings">Focus
1642 keybindings
</a>. Pressing Escape will then focus the editor.
</p>
1643 <div class=
"section" id=
"search-bar">
1644 <h4><a class=
"toc-backref" href=
"#id61">Search bar
</a></h4>
1645 <p>The quickest way to find some text is to use the search bar entry in
1646 the toolbar. This performs a case-insensitive search in the current
1647 document whilst you type. Pressing Enter will search again, and pressing
1648 Shift-Enter will search backwards.
</p>
1651 <div class=
"section" id=
"find">
1652 <h3><a class=
"toc-backref" href=
"#id62">Find
</a></h3>
1653 <p>The Find dialog is used for finding text in one or more open documents.
</p>
1654 <img alt=
"./images/find_dialog.png" src=
"./images/find_dialog.png" />
1655 <div class=
"section" id=
"matching-options">
1656 <h4><a class=
"toc-backref" href=
"#id63">Matching options
</a></h4>
1657 <p>The syntax for the
<em>Use regular expressions
</em> option is shown in
1658 <a class=
"reference internal" href=
"#regular-expressions">Regular expressions
</a>.
</p>
1660 <p class=
"first admonition-title">Note
</p>
1661 <p class=
"last"><em>Use escape sequences
</em> is implied for regular expressions.
</p>
1663 <p>The
<em>Use escape sequences
</em> option will transform any escaped characters
1664 into their UTF-
8 equivalent. For example, \t will be transformed into
1665 a tab character. Other recognized symbols are: \\, \n, \r, \uXXXX
1666 (Unicode characters).
</p>
1668 <div class=
"section" id=
"find-all">
1669 <h4><a class=
"toc-backref" href=
"#id64">Find all
</a></h4>
1670 <p>To find all matches, click on the Find All expander. This will reveal
1671 several options:
</p>
1673 <li>In Document
</li>
1677 <p>Find All In Document will show a list of matching lines in the
1678 current document in the Messages tab of the Message Window.
<em>Find All
1679 In Session
</em> does the same for all open documents.
</p>
1680 <p>Mark will highlight all matches in the current document with a
1681 colored box. These markers can be removed by selecting the
1682 Remove Markers command from the Document menu.
</p>
1684 <div class=
"section" id=
"change-font-in-search-dialog-text-fields">
1685 <h4><a class=
"toc-backref" href=
"#id65">Change font in search dialog text fields
</a></h4>
1686 <p>All search related dialogs use a Monospace for the text input fields to
1687 increase the readability of input text. This is useful when you are
1688 typing input such as regular expressions with spaces, periods and commas which
1689 might it hard to read with a proportional font.
</p>
1690 <p>If you want to change the font, you can do this easily
1691 by inserting the following style into your
<tt class=
"docutils literal"><span class=
"pre">.gtkrc-
2.0</span></tt>
1692 (usually found in your home directory on UNIX-like systems and in the
1693 etc subdirectory of your Geany installation on Windows):
</p>
1694 <pre class=
"literal-block">
1695 style
"search_style
"
1697 font_name=
"Monospace
8"
1699 widget
"GeanyDialogSearch.*.GtkEntry
" style:highest
"search_style
"
1701 <p>Please note the addition of
":highest
" in the last line which sets the priority
1702 of this style to the highest available. Otherwise, the style is ignored
1703 for the search dialogs.
</p>
1706 <div class=
"section" id=
"find-selection">
1707 <h3><a class=
"toc-backref" href=
"#id66">Find selection
</a></h3>
1708 <p>The
<em>Find Next/Previous Selection
</em> commands perform a search for the
1709 current selected text. If nothing is selected, by default the current
1710 word is used instead. This can be customized by the
1711 <em>find_selection_type
</em> preference - see
<a class=
"reference internal" href=
"#various-preferences">Various preferences
</a>.
</p>
1712 <table border=
"1" class=
"docutils">
1717 <thead valign=
"bottom">
1718 <tr><th class=
"head">Value
</th>
1719 <th class=
"head"><em>find_selection_type
</em> behaviour
</th>
1722 <tbody valign=
"top">
1724 <td>Use the current word (default).
</td>
1727 <td>Try the X selection first, then current word.
</td>
1730 <td>Repeat last search.
</td>
1735 <div class=
"section" id=
"find-usage">
1736 <h3><a class=
"toc-backref" href=
"#id67">Find usage
</a></h3>
1737 <p><em>Find Usage
</em> searches all open files. It is similar to the
<em>Find All In
1738 Session
</em> option in the Find dialog.
</p>
1739 <p>If there is a selection, then it is used as the search text; otherwise
1740 the current word is used. The current word is either taken from the
1741 word nearest the edit cursor, or the word underneath the popup menu
1742 click position when the popup menu is used. The search results are
1743 shown in the Messages tab of the Message Window.
</p>
1745 <p class=
"first admonition-title">Note
</p>
1746 <p class=
"last">You can also use Find Usage for symbol list items from the popup
1750 <div class=
"section" id=
"find-in-files">
1751 <h3><a class=
"toc-backref" href=
"#id68">Find in files
</a></h3>
1752 <p><em>Find in Files
</em> is a more powerful version of
<em>Find Usage
</em> that searches
1753 all files in a certain directory using the Grep tool. The Grep tool
1754 must be correctly set in Preferences to the path of the system's Grep
1755 utility. GNU Grep is recommended (see note below).
</p>
1756 <img alt=
"./images/find_in_files_dialog.png" src=
"./images/find_in_files_dialog.png" />
1757 <p>The
<em>Search
</em> field is initially set to the current word in the editor
1758 (depending on
<a class=
"reference internal" href=
"#search">Search
</a> preferences).
</p>
1759 <p>The
<em>Files
</em> setting allows to choose which files are included in the
1760 search, depending on the mode:
</p>
1761 <dl class=
"docutils">
1763 <dd>Search in all files;
</dd>
1765 <dd>Use the current project's patterns, see
<a class=
"reference internal" href=
"#project-properties">Project properties
</a>;
</dd>
1767 <dd>Use custom patterns.
</dd>
1769 <p>Both project and custom patterns use a glob-style syntax, each
1770 pattern separated by a space. To search all
<tt class=
"docutils literal">.c
</tt> and
<tt class=
"docutils literal">.h
</tt> files,
1771 use:
<tt class=
"docutils literal">*.c *.h
</tt>.
1772 Note that an empty pattern list searches in all files rather
1774 <p>The
<em>Directory
</em> field is initially set to the current document's directory,
1775 unless this field has already been edited and the current document has
1776 not changed. Otherwise, the current document's directory is prepended to
1777 the drop-down history. This can be disabled - see
<a class=
"reference internal" href=
"#search">Search
</a> preferences.
</p>
1778 <p>The
<em>Encoding
</em> field can be used to define the encoding of the files
1779 to be searched. The entered search text is converted to the chosen encoding
1780 and the search results are converted back to UTF-
8.
</p>
1781 <p>The
<em>Extra options
</em> field is used to pass any additional arguments to
1784 <p class=
"first admonition-title">Note
</p>
1785 <p class=
"last">The
<em>Files
</em> setting uses
<tt class=
"docutils literal"><span class=
"pre">--include=
</span></tt> when searching recursively,
1786 <em>Recurse in subfolders
</em> uses
<tt class=
"docutils literal"><span class=
"pre">-r
</span></tt>; both are GNU Grep options and may
1787 not work with other Grep implementations.
</p>
1789 <div class=
"section" id=
"filtering-out-version-control-files">
1790 <h4><a class=
"toc-backref" href=
"#id69">Filtering out version control files
</a></h4>
1791 <p>When using the
<em>Recurse in subfolders
</em> option with a directory that's
1792 under version control, you can set the
<em>Extra options
</em> field to filter
1793 out version control files.
</p>
1794 <p>If you have GNU Grep
>=
2.5.2 you can use the
<tt class=
"docutils literal"><span class=
"pre">--exclude-dir
</span></tt>
1795 argument to filter out CVS and hidden directories like
<tt class=
"docutils literal">.svn
</tt>.
</p>
1796 <p>Example:
<tt class=
"docutils literal"><span class=
"pre">--exclude-dir=.svn
</span> <span class=
"pre">--exclude-dir=CVS
</span></tt></p>
1797 <p>If you have an older Grep, you can try using the
<tt class=
"docutils literal"><span class=
"pre">--exclude
</span></tt> flag
1798 to filter out filenames.
</p>
1799 <p>SVN Example:
<tt class=
"docutils literal"><span class=
"pre">--exclude=*.svn-base
</span></tt></p>
1800 <p>The --exclude argument only matches the file name part, not the path.
</p>
1803 <div class=
"section" id=
"replace">
1804 <h3><a class=
"toc-backref" href=
"#id70">Replace
</a></h3>
1805 <p>The Replace dialog is used for replacing text in one or more open
1807 <img alt=
"./images/replace_dialog.png" src=
"./images/replace_dialog.png" />
1808 <p>The Replace dialog has the same options for matching text as the Find
1809 dialog. See the section
<a class=
"reference internal" href=
"#matching-options">Matching options
</a>.
</p>
1810 <p>The
<em>Use regular expressions
</em> option allows regular expressions to
1811 be used in the search string and back references in the replacement
1812 text -- see the entry for '\n' in
<a class=
"reference internal" href=
"#regular-expressions">Regular expressions
</a>.
</p>
1813 <div class=
"section" id=
"replace-all">
1814 <h4><a class=
"toc-backref" href=
"#id71">Replace all
</a></h4>
1815 <p>To replace several matches, click on the
<em>Replace All
</em> expander. This
1816 will reveal several options:
</p>
1818 <li>In Document
</li>
1820 <li>In Selection
</li>
1822 <p><em>Replace All In Document
</em> will replace all matching text in the
1823 current document.
<em>Replace All In Session
</em> does the same for all open
1824 documents.
<em>Replace All In Selection
</em> will replace all matching text
1825 in the current selection of the current document.
</p>
1828 <div class=
"section" id=
"go-to-tag-definition">
1829 <h3><a class=
"toc-backref" href=
"#id72">Go to tag definition
</a></h3>
1830 <p>If the current word or selection is the name of a tag definition
1831 (e.g. a function name) and the file containing the tag definition is
1832 open, this command will switch to that file and go to the
1833 corresponding line number. The current word is either the word
1834 nearest the edit cursor, or the word underneath the popup menu click
1835 position when the popup menu is used.
</p>
1837 <p class=
"first admonition-title">Note
</p>
1838 <p class=
"last">If the corresponding tag is on the current line, Geany will first
1839 look for a tag declaration instead, as this is more useful.
1840 Likewise
<em>Go to tag declaration
</em> will search for a tag definition
1841 first in this case also.
</p>
1844 <div class=
"section" id=
"go-to-tag-declaration">
1845 <h3><a class=
"toc-backref" href=
"#id73">Go to tag declaration
</a></h3>
1846 <p>Like
<em>Go to tag definition
</em>, but for a forward declaration such as a
1847 C function prototype or
<tt class=
"docutils literal">extern
</tt> declaration instead of a function
1850 <div class=
"section" id=
"go-to-line">
1851 <h3><a class=
"toc-backref" href=
"#id74">Go to line
</a></h3>
1852 <p>Go to a particular line number in the current file.
</p>
1854 <div class=
"section" id=
"regular-expressions">
1855 <h3><a class=
"toc-backref" href=
"#id75">Regular expressions
</a></h3>
1856 <p>You can use regular expressions in the Find and Replace dialogs
1857 by selecting the
<em>Use regular expressions
</em> check box (see
<a class=
"reference internal" href=
"#matching-options">Matching
1858 options
</a>). The syntax is Perl compatible. Basic syntax is described
1859 in the table below. For full details, see
1860 <a class=
"reference external" href=
"http://www.geany.org/manual/gtk/glib/glib-regex-syntax.html">http://www.geany.org/manual/gtk/glib/glib-regex-syntax.html
</a>.
</p>
1862 <p class=
"first admonition-title">Note
</p>
1863 <ol class=
"last arabic simple">
1864 <li>The
<em>Use escape sequences
</em> dialog option always applies for regular
1866 <li>Searching backwards with regular expressions is not supported.
</li>
1869 <p><strong>In a regular expression, the following characters are interpreted:
</strong></p>
1870 <table border=
"1" class=
"docutils">
1875 <tbody valign=
"top">
1877 <td>Matches any character.
</td>
1880 <td>This marks the start of a region for tagging a match.
</td>
1883 <td>This marks the end of a tagged region.
</td>
1886 <td><p class=
"first">Where n is
1 through
9 refers to the first through ninth tagged
1887 region when searching or replacing.
</p>
1888 <p>Searching for (Wiki)\
1 matches WikiWiki.
</p>
1889 <p class=
"last">If the search string was Fred([
1-
9])XXX and the
1890 replace string was Sam\
1YYY, when applied to Fred2XXX this
1891 would generate Sam2YYY.
</p>
1895 <td>When replacing, the whole matching text.
</td>
1898 <td>This matches a word boundary.
</td>
1901 <td><p class=
"first">A backslash followed by d, D, s, S, w or W, becomes a
1902 character class (both inside and outside sets []).
</p>
1903 <ul class=
"last simple">
1904 <li>d: decimal digits
</li>
1905 <li>D: any char except decimal digits
</li>
1906 <li>s: whitespace (space, \t \n \r \f \v)
</li>
1907 <li>S: any char except whitespace (see above)
</li>
1908 <li>w: alphanumeric
& underscore
</li>
1909 <li>W: any char except alphanumeric
& underscore
</li>
1914 <td>This allows you to use a character x that would otherwise have
1915 a special meaning. For example, \[ would be interpreted as [
1916 and not as the start of a character set. Use \\ for a literal
1920 <td><p class=
"first">Matches one of the characters in the set. If the first
1921 character in the set is ^, it matches the characters NOT in
1922 the set, i.e. complements the set. A shorthand S-E (start
1923 dash end) is used to specify a set of characters S up to E,
1925 <p>The special characters ] and - have no special
1926 meaning if they appear first in the set. - can also be last
1927 in the set. To include both, put ] first: []A-Z-].
</p>
1929 <pre class=
"last literal-block">
1930 []|-] matches these
3 chars
1931 []-|] matches from ] to | chars
1932 [a-z] any lowercase alpha
1933 [^]-] any char except - and ]
1934 [^A-Z] any char except uppercase alpha
1940 <td>This matches the start of a line (unless used inside a set, see
1944 <td>This matches the end of a line.
</td>
1947 <td>This matches
0 or more times. For example, Sa*m matches Sm, Sam,
1948 Saam, Saaam and so on.
</td>
1951 <td>This matches
1 or more times. For example, Sa+m matches Sam,
1952 Saam, Saaam and so on.
</td>
1955 <td>This matches
0 or
1 time(s). For example, Joh?n matches John, Jon.
</td>
1960 <p class=
"first admonition-title">Note
</p>
1961 <p class=
"last">This table is adapted from Scintilla and SciTE documentation,
1962 distributed under the
<a class=
"reference internal" href=
"#license-for-scintilla-and-scite">License for Scintilla and SciTE
</a>.
</p>
1966 <div class=
"section" id=
"view-menu">
1967 <h2><a class=
"toc-backref" href=
"#id76">View menu
</a></h2>
1968 <p>The View menu allows various elements of the main window to be shown
1969 or hidden, and also provides various display-related editor options.
</p>
1970 <div class=
"section" id=
"color-schemes-menu">
1971 <h3><a class=
"toc-backref" href=
"#id77">Color schemes menu
</a></h3>
1972 <p>The Color schemes menu is available under the
<em>View-
>Editor
</em> submenu.
1973 It lists various color schemes for editor highlighting styles,
1974 including the default scheme first. Other items are available based
1975 on what color scheme files Geany found at startup.
</p>
1976 <p>Color scheme files are read from the
<a class=
"reference internal" href=
"#configuration-file-paths">Configuration file paths
</a> under
1977 the
<tt class=
"docutils literal">colorschemes
</tt> subdirectory. They should have the extension
1978 <tt class=
"docutils literal">.conf
</tt>. The default color scheme
1979 is read from
<tt class=
"docutils literal">filetypes.common
</tt>.
</p>
1980 <p>The
<a class=
"reference internal" href=
"#named-styles-section">[named_styles] section
</a> and
<a class=
"reference internal" href=
"#named-colors-section">[named_colors] section
</a> are the
1981 same as for
<tt class=
"docutils literal">filetypes.common
</tt>.
</p>
1982 <p>The
<tt class=
"docutils literal">[theme_info]
</tt> section can contain information about the
1983 theme. The
<tt class=
"docutils literal">name
</tt> and
<tt class=
"docutils literal">description
</tt> keys are read to set the
1984 menu item text and tooltip, respectively. These keys can have
1985 translations, e.g.:
</p>
1986 <pre class=
"literal-block">
1993 <div class=
"section" id=
"tags">
1994 <h2><a class=
"toc-backref" href=
"#id78">Tags
</a></h2>
1995 <p>Tags are information that relates symbols in a program with the
1996 source file location of the declaration and definition.
</p>
1997 <p>Geany has built-in functionality for generating tag information (aka
1998 "workspace tags
") for supported filetypes when you open a file. You
1999 can also have Geany automatically load external tag files (aka
"global
2000 tags files
") upon startup, or manually using
<em>Tools --
> Load Tags
</em>.
</p>
2001 <p>Geany uses its own tag file format, similar to what
<tt class=
"docutils literal">ctags
</tt> uses
2002 (but is incompatible with ctags). You use Geany to generate global
2003 tags files, as described below.
</p>
2004 <div class=
"section" id=
"workspace-tags">
2005 <h3><a class=
"toc-backref" href=
"#id79">Workspace tags
</a></h3>
2006 <p>Tags for each document are parsed whenever a file is loaded, saved or
2007 modified (see
<em>Symbol list update frequency
</em> preference in the
<a class=
"reference internal" href=
"#editor-completions-preferences">Editor
2008 Completions preferences
</a>). These are shown in the Symbol list in the
2009 Sidebar. These tags are also used for autocompletion of symbols and calltips
2010 for all documents open in the current session that have the same filetype.
</p>
2011 <p>The
<em>Go to Tag
</em> commands can be used with all workspace tags. See
2012 <a class=
"reference internal" href=
"#go-to-tag-definition">Go to tag definition
</a>.
</p>
2014 <div class=
"section" id=
"global-tags">
2015 <h3><a class=
"toc-backref" href=
"#id80">Global tags
</a></h3>
2016 <p>Global tags are used to provide autocompletion of symbols and calltips
2017 without having to open the corresponding source files. This is intended
2018 for library APIs, as the tags file only has to be updated when you upgrade
2020 <p>You can load a custom global tags file in two ways:
</p>
2022 <li>Using the
<em>Load Tags
</em> command in the Tools menu.
</li>
2023 <li>By moving or symlinking tags files to the
<tt class=
"docutils literal">tags
</tt> subdirectory of
2024 one of the
<a class=
"reference internal" href=
"#configuration-file-paths">configuration file paths
</a> before starting Geany.
</li>
2026 <p>You can either download these files or generate your own. They have
2028 <pre class=
"literal-block">
2031 <p><em>lang_ext
</em> is one of the extensions set for the filetype associated
2032 with the tags. See the section called
<a class=
"reference internal" href=
"#filetype-extensions">Filetype extensions
</a> for
2033 more information.
</p>
2034 <div class=
"section" id=
"default-global-tags-files">
2035 <h4><a class=
"toc-backref" href=
"#id81">Default global tags files
</a></h4>
2036 <p>For some languages, a list of global tags is loaded when the
2037 corresponding filetype is first used. Currently these are for:
</p>
2042 <li>HTML --
&symbol; completion, e.g. for ampersand, copyright, etc.
</li>
2047 <div class=
"section" id=
"global-tags-file-format">
2048 <h4><a class=
"toc-backref" href=
"#id82">Global tags file format
</a></h4>
2049 <p>Global tags files can have three different formats:
</p>
2051 <li>Tagmanager format
</li>
2052 <li>Pipe-separated format
</li>
2053 <li>CTags format
</li>
2055 <p>The first line of global tags files should be a comment, introduced
2056 by
<tt class=
"docutils literal">#
</tt> followed by a space and a string like
<tt class=
"docutils literal">format=pipe
</tt>,
2057 <tt class=
"docutils literal">format=ctags
</tt> or
<tt class=
"docutils literal">format=tagmanager
</tt> respectively, these are
2058 case-sensitive. This helps Geany to read the file properly. If this
2059 line is missing, Geany tries to auto-detect the used format but this
2061 <p>The Tagmanager format is a bit more complex and is used for files
2062 created by the
<tt class=
"docutils literal">geany
<span class=
"pre">-g
</span></tt> command. There is one tag per line.
2063 Different tag attributes like the return value or the argument list
2064 are separated with different characters indicating the type of the
2065 following argument. This is the more complete and recommended tag
2067 <div class=
"section" id=
"pipe-separated-format">
2068 <h5><a class=
"toc-backref" href=
"#id83">Pipe-separated format
</a></h5>
2069 <p>The Pipe-separated format is easier to read and write.
2070 There is one tag per line and different tag attributes are separated
2071 by the pipe character (
<tt class=
"docutils literal">|
</tt>). A line looks like:
</p>
2072 <pre class=
"literal-block">
2073 basename|string|(string path [, string suffix])|
2075 <div class=
"line-block">
2076 <div class=
"line">The first field is the tag name (usually a function name).
</div>
2077 <div class=
"line">The second field is the type of the return value.
</div>
2078 <div class=
"line">The third field is the argument list for this tag.
</div>
2079 <div class=
"line">The fourth field is the description for this tag but
2080 currently unused and should be left empty.
</div>
2082 <p>Except for the first field (tag name), all other field can be left
2083 empty but the pipe separator must appear for them.
</p>
2084 <p>You can easily write your own global tag files using this format.
2085 Just save them in your tags directory, as described earlier in the
2086 section
<a class=
"reference internal" href=
"#global-tags">Global tags
</a>.
</p>
2088 <div class=
"section" id=
"ctags-format">
2089 <h5><a class=
"toc-backref" href=
"#id84">CTags format
</a></h5>
2090 <p>This is the format that ctags generates, and that is used by Vim.
2091 This format is compatible with the format historically used by Vi.
</p>
2092 <p>The format is described at
<a class=
"reference external" href=
"http://ctags.sourceforge.net/FORMAT">http://ctags.sourceforge.net/FORMAT
</a>, but
2093 for the full list of existing extensions please refer to ctags.
2094 However, note that Geany may actually only honor a subset of the
2095 existing extensions.
</p>
2098 <div class=
"section" id=
"generating-a-global-tags-file">
2099 <h4><a class=
"toc-backref" href=
"#id85">Generating a global tags file
</a></h4>
2100 <p>You can generate your own global tags files by parsing a list of
2101 source files. The command is:
</p>
2102 <pre class=
"literal-block">
2103 geany -g [-P]
<Tag File
> <File list
>
2106 <li>Tag File filename should be in the format described earlier --
2107 see the section called
<a class=
"reference internal" href=
"#global-tags">Global tags
</a>.
</li>
2108 <li>File list is a list of filenames, each with a full path (unless
2109 you are generating C/C++ tags and have set the CFLAGS environment
2110 variable appropriately).
</li>
2111 <li><tt class=
"docutils literal"><span class=
"pre">-P
</span></tt> or
<tt class=
"docutils literal"><span class=
"pre">--no-preprocessing
</span></tt> disables using the C pre-processor
2112 to process
<tt class=
"docutils literal">#include
</tt> directives for C/C++ source files. Use this
2113 option if you want to specify each source file on the command-line
2114 instead of using a 'master' header file. Also can be useful if you
2115 don't want to specify the CFLAGS environment variable.
</li>
2117 <p>Example for the wxD library for the D programming language:
</p>
2118 <pre class=
"literal-block">
2119 geany -g wxd.d.tags /home/username/wxd/wx/*.d
2121 <div class=
"section" id=
"generating-c-c-tag-files">
2122 <h5><a class=
"toc-backref" href=
"#id86">Generating C/C++ tag files
</a></h5>
2123 <p>You may need to first setup the
<a class=
"reference internal" href=
"#c-ignore-tags">C ignore.tags
</a> file.
</p>
2124 <p>For C/C++ tag files gcc is required by default, so that header files
2125 can be preprocessed to include any other headers they depend upon. If
2126 you do not want this, use the
<tt class=
"docutils literal"><span class=
"pre">-P
</span></tt> option described above.
</p>
2127 <p>For preprocessing, the environment variable CFLAGS should be set with
2128 appropriate
<tt class=
"docutils literal"><span class=
"pre">-I/path
</span></tt> include paths. The following example works with
2129 the bash shell, generating tags for the GnomeUI library:
</p>
2130 <pre class=
"literal-block">
2131 CFLAGS=`pkg-config --cflags libgnomeui-
2.0` geany -g gnomeui.c.tags \
2132 /usr/include/libgnomeui-
2.0/gnome.h
2134 <p>You can adapt this command to use CFLAGS and header files appropriate
2135 for whichever libraries you want.
</p>
2137 <div class=
"section" id=
"generating-tag-files-on-windows">
2138 <h5><a class=
"toc-backref" href=
"#id87">Generating tag files on Windows
</a></h5>
2139 <p>This works basically the same as on other platforms:
</p>
2140 <pre class=
"literal-block">
2141 "c:\program files\geany\bin\geany
" -g c:\mytags.php.tags c:\code\somefile.php
2146 <div class=
"section" id=
"c-ignore-tags">
2147 <h3><a class=
"toc-backref" href=
"#id88">C ignore.tags
</a></h3>
2148 <p>You can ignore certain tags for C-based languages if they would lead
2149 to wrong parsing of the code. Use the
<em>Tools-
>Configuration
2150 Files-
>ignore.tags
</em> menu item to open the user
<tt class=
"docutils literal">ignore.tags
</tt> file.
2151 See also
<a class=
"reference internal" href=
"#configuration-file-paths">Configuration file paths
</a>.
</p>
2152 <p>List all tag names you want to ignore in this file, separated by spaces
2153 and/or newlines.
</p>
2155 <pre class=
"literal-block">
2156 G_GNUC_NULL_TERMINATED
2158 G_GNUC_WARN_UNUSED_RESULT
2160 <p>This will parse code like:
</p>
2161 <p><tt class=
"docutils literal">gchar **utils_strv_new(const gchar *first,
<span class=
"pre">...)
</span>
2162 G_GNUC_NULL_TERMINATED;
</tt></p>
2163 <p>More detailed information about ignore tags usage from the Exuberant Ctags
2166 Specifies a list of identifiers which are to be specially handled
2167 while parsing C and C++ source files. This option is specifically
2168 provided to handle special cases arising through the use of
2169 pre-processor macros. When the identifiers listed are simple identifiers,
2170 these identifiers will be ignored during parsing of the source files.
2171 If an identifier is suffixed with a '+' character, ctags will also
2172 ignore any parenthesis-enclosed argument list which may immediately
2173 follow the identifier in the source files.
2174 If two identifiers are separated with the '=' character, the first
2175 identifiers is replaced by the second identifiers for parsing purposes.
</blockquote>
2176 <p>For even more detailed information please read the manual page of
2177 Exuberant Ctags.
</p>
2178 <p>Geany extends Ctags with a '*' character suffix - this means use
2179 prefix matching, e.g. G_GNUC_* will match G_GNUC_NULL_TERMINATED, etc.
2180 Note that prefix match items should be put after other items to ensure
2181 that items like G_GNUC_PRINTF+ get parsed correctly.
</p>
2184 <div class=
"section" id=
"preferences">
2185 <h2><a class=
"toc-backref" href=
"#id89">Preferences
</a></h2>
2186 <p>You may adjust Geany's settings using the Edit --
> Preferences
2187 dialog. Any changes you make there can be applied by hitting either
2188 the Apply or the OK button. These settings will persist between Geany
2189 sessions. Note that most settings here have descriptive popup bubble
2190 help -- just hover the mouse over the item in question to get help
2192 <p>You may also adjust some View settings (under the View menu) that
2193 persist between Geany sessions. The settings under the Document menu,
2194 however, are only for the current document and revert to defaults
2195 when restarting Geany.
</p>
2197 <p class=
"first admonition-title">Note
</p>
2198 <p class=
"last">In the paragraphs that follow, the text describing a dialog tab
2199 comes after the screenshot of that tab.
</p>
2201 <div class=
"section" id=
"general-startup-preferences">
2202 <h3><a class=
"toc-backref" href=
"#id90">General Startup preferences
</a></h3>
2203 <img alt=
"./images/pref_dialog_gen_startup.png" src=
"./images/pref_dialog_gen_startup.png" />
2204 <div class=
"section" id=
"id1">
2205 <h4><a class=
"toc-backref" href=
"#id91">Startup
</a></h4>
2206 <dl class=
"docutils">
2207 <dt>Load files from the last session
</dt>
2208 <dd>On startup, load the same files you had open the last time you
2210 <dt>Load virtual terminal support
</dt>
2211 <dd>Load the library for running a terminal in the message window area.
</dd>
2212 <dt>Enable plugin support
</dt>
2213 <dd>Allow plugins to be used in Geany.
</dd>
2216 <div class=
"section" id=
"shutdown">
2217 <h4><a class=
"toc-backref" href=
"#id92">Shutdown
</a></h4>
2218 <dl class=
"docutils">
2219 <dt>Save window position and geometry
</dt>
2220 <dd>Save the current position and size of the main window so next time
2221 you open Geany it's in the same location.
</dd>
2222 <dt>Confirm Exit
</dt>
2223 <dd>Have a dialog pop up to confirm that you really want to quit Geany.
</dd>
2226 <div class=
"section" id=
"paths">
2227 <h4><a class=
"toc-backref" href=
"#id93">Paths
</a></h4>
2228 <dl class=
"docutils">
2229 <dt>Startup path
</dt>
2230 <dd>Path to start in when opening or saving files.
2231 It must be an absolute path.
</dd>
2232 <dt>Project files
</dt>
2233 <dd>Path to start in when opening project files.
</dd>
2234 <dt>Extra plugin path
</dt>
2235 <dd>By default Geany looks in the system installation and the user
2236 configuration - see
<a class=
"reference internal" href=
"#plugins">Plugins
</a>. In addition the path entered here will be
2238 Usually you do not need to set an additional path to search for
2239 plugins. It might be useful when Geany is installed on a multi-user machine
2240 and additional plugins are available in a common location for all users.
2241 Leave blank to not set an additional lookup path.
</dd>
2245 <div class=
"section" id=
"general-miscellaneous-preferences">
2246 <h3><a class=
"toc-backref" href=
"#id94">General Miscellaneous preferences
</a></h3>
2247 <img alt=
"./images/pref_dialog_gen_misc.png" src=
"./images/pref_dialog_gen_misc.png" />
2248 <div class=
"section" id=
"miscellaneous">
2249 <h4><a class=
"toc-backref" href=
"#id95">Miscellaneous
</a></h4>
2250 <dl class=
"docutils">
2251 <dt>Beep on errors when compilation has finished
</dt>
2252 <dd>Have the computer make a beeping sound when compilation of your program
2253 has completed or any errors occurred.
</dd>
2254 <dt>Switch status message list at new message
</dt>
2255 <dd>Switch to the status message tab (in the notebook window at the bottom)
2256 once a new status message arrives.
</dd>
2257 <dt>Suppress status messages in the status bar
</dt>
2258 <dd><p class=
"first">Remove all messages from the status bar. The messages are still displayed
2259 in the status messages window.
</p>
2260 <div class=
"tip last">
2261 <p class=
"first admonition-title">Tip
</p>
2262 <p class=
"last">Another option is to use the
<em>Switch to Editor
</em> keybinding - it
2263 reshows the document statistics on the status bar. See
<a class=
"reference internal" href=
"#focus-keybindings">Focus
2264 keybindings
</a>.
</p>
2267 <dt>Use Windows File Open/Save dialogs
</dt>
2268 <dd>Defines whether to use the native Windows File Open/Save dialogs or
2269 whether to use the GTK default dialogs.
</dd>
2270 <dt>Auto-focus widgets (focus follows mouse)
</dt>
2271 <dd>Give the focus automatically to widgets below the mouse cursor.
2272 This works for the main editor widget, the scribble, the toolbar search field
2273 goto line fields and the VTE.
</dd>
2276 <div class=
"section" id=
"search">
2277 <h4><a class=
"toc-backref" href=
"#id96">Search
</a></h4>
2278 <dl class=
"docutils">
2279 <dt>Always wrap search
</dt>
2280 <dd>Always wrap search around the document when finding a match.
</dd>
2281 <dt>Hide the Find dialog
</dt>
2282 <dd>Hide the
<a class=
"reference internal" href=
"#find">Find
</a> dialog after clicking Find Next/Previous.
</dd>
2283 <dt>Use the current word under the cursor for Find dialogs
</dt>
2284 <dd>Use current word under the cursor when opening the Find, Find in Files or Replace dialog and
2285 there is no selection. When this option is disabled, the search term last used in the
2286 appropriate Find dialog is used.
</dd>
2287 <dt>Use the current file's directory for Find in Files
</dt>
2288 <dd>When opening the Find in Files dialog, set the directory to search to the directory of the current
2289 active file. When this option is disabled, the directory of the last use of the Find in Files
2290 dialog is used. See
<a class=
"reference internal" href=
"#find-in-files">Find in Files
</a> for details.
</dd>
2293 <div class=
"section" id=
"projects">
2294 <h4><a class=
"toc-backref" href=
"#id97">Projects
</a></h4>
2295 <dl class=
"docutils">
2296 <dt>Use project-based session files
</dt>
2297 <dd>Save your current session when closing projects. You will be able to
2298 resume different project sessions, automatically opening the files
2299 you had open previously.
</dd>
2300 <dt>Store project file inside the project base directory
</dt>
2301 <dd>When creating new projects, the default path for the project file contains
2302 the project base path. Without this option enabled, the default project file
2303 path is one level above the project base path.
2304 In either case, you can easily set the final project file path in the
2305 <em>New Project
</em> dialog. This option provides the more common
2306 defaults automatically for convenience.
</dd>
2310 <div class=
"section" id=
"interface-preferences">
2311 <h3><a class=
"toc-backref" href=
"#id98">Interface preferences
</a></h3>
2312 <img alt=
"./images/pref_dialog_interface_interface.png" src=
"./images/pref_dialog_interface_interface.png" />
2313 <div class=
"section" id=
"sidebar">
2314 <h4><a class=
"toc-backref" href=
"#id99">Sidebar
</a></h4>
2315 <dl class=
"docutils">
2316 <dt>Show sidebar
</dt>
2317 <dd>Whether to show the sidebar at all.
</dd>
2318 <dt>Show symbol list
</dt>
2319 <dd>Show the list of functions, variables, and other information in the
2320 current document you are editing.
</dd>
2321 <dt>Show documents list
</dt>
2322 <dd>Show all the documents you have open currently. This can be used to
2323 change between documents (see
<a class=
"reference internal" href=
"#switching-between-documents">Switching between documents
</a>) and
2324 to perform some common operations such as saving, closing and reloading.
</dd>
2326 <dd>Whether to place the sidebar on the left or right of the editor window.
</dd>
2329 <div class=
"section" id=
"fonts">
2330 <h4><a class=
"toc-backref" href=
"#id100">Fonts
</a></h4>
2331 <dl class=
"docutils">
2333 <dd>Change the font used to display documents.
</dd>
2334 <dt>Symbol list
</dt>
2335 <dd>Change the font used for the Symbols sidebar tab.
</dd>
2336 <dt>Message window
</dt>
2337 <dd>Change the font used for the message window area.
</dd>
2340 <div class=
"section" id=
"id2">
2341 <h4><a class=
"toc-backref" href=
"#id101">Miscellaneous
</a></h4>
2342 <dl class=
"docutils">
2343 <dt>Show status bar
</dt>
2344 <dd>Show the status bar at the bottom of the main window. It gives information about
2345 the file you are editing like the line and column you are on, whether any
2346 modifications were done, the file encoding, the filetype and other information.
</dd>
2350 <div class=
"section" id=
"interface-notebook-tab-preferences">
2351 <h3><a class=
"toc-backref" href=
"#id102">Interface Notebook tab preferences
</a></h3>
2352 <img alt=
"./images/pref_dialog_interface_notebook.png" src=
"./images/pref_dialog_interface_notebook.png" />
2353 <div class=
"section" id=
"editor-tabs">
2354 <h4><a class=
"toc-backref" href=
"#id103">Editor tabs
</a></h4>
2355 <dl class=
"docutils">
2356 <dt>Show editor tabs
</dt>
2357 <dd>Show a notebook tab for all documents so you can switch between them
2358 using the mouse (instead of using the Documents window).
</dd>
2359 <dt>Show close buttons
</dt>
2360 <dd>Make each tab show a close button so you can easily close open
2362 <dt>Placement of new file tabs
</dt>
2363 <dd>Whether to create a document with its notebook tab to the left or
2364 right of all existing tabs.
</dd>
2365 <dt>Next to current
</dt>
2366 <dd>Whether to place file tabs next to the current tab
2367 rather than at the edges of the notebook.
</dd>
2368 <dt>Double-clicking hides all additional widgets
</dt>
2369 <dd>Whether to call the View-
>Toggle All Additional Widgets command
2370 when double-clicking on a notebook tab.
</dd>
2373 <div class=
"section" id=
"tab-positions">
2374 <h4><a class=
"toc-backref" href=
"#id104">Tab positions
</a></h4>
2375 <dl class=
"docutils">
2377 <dd>Set the positioning of the editor's notebook tabs to the right,
2378 left, top, or bottom of the editing window.
</dd>
2380 <dd>Set the positioning of the sidebar's notebook tabs to the right,
2381 left, top, or bottom of the sidebar window.
</dd>
2382 <dt>Message window
</dt>
2383 <dd>Set the positioning of the message window's notebook tabs to the
2384 right, left, top, or bottom of the message window.
</dd>
2388 <div class=
"section" id=
"interface-toolbar-preferences">
2389 <h3><a class=
"toc-backref" href=
"#id105">Interface Toolbar preferences
</a></h3>
2390 <p>Affects the main toolbar underneath the menu bar.
</p>
2391 <img alt=
"./images/pref_dialog_interface_toolbar.png" src=
"./images/pref_dialog_interface_toolbar.png" />
2392 <div class=
"section" id=
"toolbar">
2393 <h4><a class=
"toc-backref" href=
"#id106">Toolbar
</a></h4>
2394 <dl class=
"docutils">
2395 <dt>Show Toolbar
</dt>
2396 <dd>Whether to show the toolbar.
</dd>
2397 <dt>Append Toolbar to the Menu
</dt>
2398 <dd>Allows to append the toolbar to the main menu bar instead of placing it below.
2399 This is useful to save vertical space.
</dd>
2400 <dt>Customize Toolbar
</dt>
2401 <dd>See
<a class=
"reference internal" href=
"#customizing-the-toolbar">Customizing the toolbar
</a>.
</dd>
2404 <div class=
"section" id=
"appearance">
2405 <h4><a class=
"toc-backref" href=
"#id107">Appearance
</a></h4>
2406 <dl class=
"docutils">
2408 <dd>Select the toolbar icon style to use - either icons and text, just
2410 The choice System default uses whatever icon style is set by GTK.
</dd>
2412 <dd>Select the size of the icons you see (large, small or very small).
2413 The choice System default uses whatever icon size is set by GTK.
</dd>
2417 <div class=
"section" id=
"editor-features-preferences">
2418 <h3><a class=
"toc-backref" href=
"#id108">Editor Features preferences
</a></h3>
2419 <img alt=
"./images/pref_dialog_edit_features.png" src=
"./images/pref_dialog_edit_features.png" />
2420 <div class=
"section" id=
"features">
2421 <h4><a class=
"toc-backref" href=
"#id109">Features
</a></h4>
2422 <dl class=
"docutils">
2423 <dt>Line wrapping
</dt>
2424 <dd>Show long lines wrapped around to new display lines.
</dd>
2426 <dl class=
"docutils" id=
"smart-home-key">
2427 <dt>"Smart
" home key
</dt>
2428 <dd>Whether to move the cursor to the first non-whitespace character
2429 on the line when you hit the home key on your keyboard. Pressing it
2430 again will go to the very start of the line.
</dd>
2431 <dt>Disable Drag and Drop
</dt>
2432 <dd>Do not allow the dragging and dropping of selected text in documents.
</dd>
2433 <dt>Code folding
</dt>
2434 <dd>Allow groups of lines in a document to be collapsed for easier
2435 navigation/editing.
</dd>
2436 <dt>Fold/Unfold all children of a fold point
</dt>
2437 <dd>Whether to fold/unfold all child fold points when a parent line
2439 <dt>Use indicators to show compile errors
</dt>
2440 <dd>Underline lines with compile errors using red squiggles to indicate
2441 them in the editor area.
</dd>
2442 <dt>Newline strips trailing spaces
</dt>
2443 <dd>Remove any whitespace at the end of the line when you hit the
2444 Enter/Return key. See also
<a class=
"reference internal" href=
"#strip-trailing-spaces">Strip trailing spaces
</a>. Note
2445 auto indentation is calculated before stripping, so although this
2446 setting will clear a blank line, it will not set the next line
2447 indentation back to zero.
</dd>
2448 <dt>Line breaking column
</dt>
2449 <dd>The editor column number to insert a newline at when Line Breaking
2450 is enabled for the current document.
</dd>
2451 <dt>Comment toggle marker
</dt>
2452 <dd>A string which is added when toggling a line comment in a source file.
2453 It is used to mark the comment as toggled.
</dd>
2457 <div class=
"section" id=
"editor-indentation-preferences">
2458 <h3><a class=
"toc-backref" href=
"#id110">Editor Indentation preferences
</a></h3>
2459 <img alt=
"./images/pref_dialog_edit_indentation.png" src=
"./images/pref_dialog_edit_indentation.png" />
2460 <div class=
"section" id=
"indentation-group">
2461 <h4><a class=
"toc-backref" href=
"#id111">Indentation group
</a></h4>
2462 <p>See
<a class=
"reference internal" href=
"#indentation">Indentation
</a> for more information.
</p>
2463 <dl class=
"docutils">
2465 <dd>The width of a single indent size in spaces. By default the indent
2466 size is equivalent to
4 spaces.
</dd>
2467 <dt>Detect width from file
</dt>
2468 <dd>Try to detect and set the indent width based on file content, when
2469 a file is opened.
</dd>
2471 <dd><p class=
"first">When Geany inserts indentation, whether to use:
</p>
2474 <li>Just Spaces
</li>
2475 <li>Tabs and Spaces, depending on how much indentation is on a line
</li>
2477 <p class=
"last">The
<em>Tabs and Spaces
</em> indent type is also known as
<em>Soft tab
2478 support
</em> in some other editors.
</p>
2480 <dt>Detect type from file
</dt>
2481 <dd>Try to detect and set the indent type based on file content, when
2482 a file is opened.
</dd>
2483 <dt>Auto-indent mode
</dt>
2484 <dd><p class=
"first">The type of auto-indentation you wish to use after pressing Enter,
2486 <dl class=
"last docutils">
2488 <dd>Just add the indentation of the previous line.
</dd>
2489 <dt>Current chars
</dt>
2490 <dd>Add indentation based on the current filetype and any characters at
2491 the end of the line such as
<tt class=
"docutils literal">{
</tt>,
<tt class=
"docutils literal">}
</tt> for C,
<tt class=
"docutils literal">:
</tt> for Python.
</dd>
2492 <dt>Match braces
</dt>
2493 <dd>Like
<em>Current chars
</em> but for C-like languages, make a closing
2494 <tt class=
"docutils literal">}
</tt> brace line up with the matching opening brace.
</dd>
2497 <dt>Tab key indents
</dt>
2498 <dd><p class=
"first">If set, pressing tab will indent the current line or selection, and
2499 unindent when pressing Shift-tab. Otherwise, the tab key will
2500 insert a tab character into the document (which can be different
2501 from indentation, depending on the indent type).
</p>
2502 <div class=
"note last">
2503 <p class=
"first admonition-title">Note
</p>
2504 <p class=
"last">There are also separate configurable keybindings for indent
&
2505 unindent, but this preference allows the tab key to have different
2506 meanings in different contexts - e.g. for snippet completion.
</p>
2512 <div class=
"section" id=
"editor-completions-preferences">
2513 <h3><a class=
"toc-backref" href=
"#id112">Editor Completions preferences
</a></h3>
2514 <img alt=
"./images/pref_dialog_edit_completions.png" src=
"./images/pref_dialog_edit_completions.png" />
2515 <div class=
"section" id=
"completions">
2516 <h4><a class=
"toc-backref" href=
"#id113">Completions
</a></h4>
2517 <dl class=
"docutils">
2518 <dt>Snippet Completion
</dt>
2519 <dd>Whether to replace special keywords after typing Tab into a
2520 pre-defined text snippet.
2521 See
<a class=
"reference internal" href=
"#user-definable-snippets">User-definable snippets
</a>.
</dd>
2522 <dt>XML/HTML tag auto-closing
</dt>
2523 <dd>When you open an XML/HTML tag automatically generate its
2524 completion tag.
</dd>
2525 <dt>Automatic continuation multi-line comments
</dt>
2526 <dd><p class=
"first">Continue automatically multi-line comments in languages like C, C++
2527 and Java when a new line is entered inside such a comment.
2528 With this option enabled, Geany will insert a
<tt class=
"docutils literal">*
</tt> on every new line
2529 inside a multi-line comment, for example when you press return in the
2530 following C code:
</p>
2531 <pre class=
"literal-block">
2533 * This is a C multi-line comment, press
<Return
>
2535 <p>then Geany would insert:
</p>
2536 <pre class=
"literal-block">
2539 <p class=
"last">on the next line with the correct indentation based on the previous line,
2540 as long as the multi-line is not closed by
<tt class=
"docutils literal">*/
</tt>.
</p>
2542 <dt>Autocomplete symbols
</dt>
2543 <dd>When you start to type a symbol name, look for the full string to
2544 allow it to be completed for you.
</dd>
2545 <dt>Autocomplete all words in document
</dt>
2546 <dd>When you start to type a word, Geany will search the whole document for
2547 words starting with the typed part to complete it, assuming there
2548 are no tag names to show.
</dd>
2549 <dt>Drop rest of word on completion
</dt>
2550 <dd>Remove any word part to the right of the cursor when choosing a
2551 completion list item.
</dd>
2552 <dt>Characters to type for autocompletion
</dt>
2553 <dd>Number of characters of a word to type before autocompletion is
2555 <dt>Completion list height
</dt>
2556 <dd>The number of rows to display for the autocompletion window.
</dd>
2557 <dt>Max. symbol name suggestions
</dt>
2558 <dd>The maximum number of items in the autocompletion list.
</dd>
2559 <dt>Symbol list update frequency
</dt>
2560 <dd><p class=
"first">The minimum delay (in milliseconds) between two symbol list updates.
</p>
2561 <p>This option determines how frequently the tag list is updated for the
2562 current document. The smaller the delay, the more up-to-date the symbol
2563 list (and then the completions); but rebuilding the symbol list has a
2564 cost in performance, especially with large files.
</p>
2565 <p>The default value is
250ms, which means the symbol list will be updated
2566 at most four times per second, even if the document changes continuously.
</p>
2567 <p class=
"last">A value of
0 disables automatic updates, so the symbol list will only be
2568 updated upon document saving.
</p>
2572 <div class=
"section" id=
"auto-close-quotes-and-brackets">
2573 <h4><a class=
"toc-backref" href=
"#id114">Auto-close quotes and brackets
</a></h4>
2574 <p>Geany can automatically insert a closing bracket and quote characters when
2575 you open them. For instance, you type a
<tt class=
"docutils literal">(
</tt> and Geany will automatically
2576 insert
<tt class=
"docutils literal">)
</tt>. With the following options, you can define for which
2577 characters this should work.
</p>
2578 <dl class=
"docutils">
2579 <dt>Parenthesis ( )
</dt>
2580 <dd>Auto-close parenthesis when typing an opening one
</dd>
2581 <dt>Curly brackets { }
</dt>
2582 <dd>Auto-close curly brackets (braces) when typing an opening one
</dd>
2583 <dt>Square brackets [ ]
</dt>
2584 <dd>Auto-close square brackets when typing an opening one
</dd>
2585 <dt>Single quotes ' '
</dt>
2586 <dd>Auto-close single quotes when typing an opening one
</dd>
2587 <dt>Double quotes
" "</dt>
2588 <dd>Auto-close double quotes when typing an opening one
</dd>
2592 <div class=
"section" id=
"editor-display-preferences">
2593 <h3><a class=
"toc-backref" href=
"#id115">Editor Display preferences
</a></h3>
2594 <p>This is for visual elements displayed in the editor window.
</p>
2595 <img alt=
"./images/pref_dialog_edit_display.png" src=
"./images/pref_dialog_edit_display.png" />
2596 <div class=
"section" id=
"display">
2597 <h4><a class=
"toc-backref" href=
"#id116">Display
</a></h4>
2598 <dl class=
"docutils">
2599 <dt>Invert syntax highlighting colors
</dt>
2600 <dd>Invert all colors, by default this makes white text on a black
2602 <dt>Show indendation guides
</dt>
2603 <dd>Show vertical lines to help show how much leading indentation there
2604 is on each line.
</dd>
2605 <dt>Show whitespaces
</dt>
2606 <dd>Mark all tabs with an arrow
"--
>" symbol and spaces with dots to
2607 show which kinds of whitespace are used.
</dd>
2608 <dt>Show line endings
</dt>
2609 <dd>Display a symbol everywhere that a carriage return or line feed
2611 <dt>Show line numbers
</dt>
2612 <dd>Show or hide the Line Number margin.
</dd>
2613 <dt>Show markers margin
</dt>
2614 <dd>Show or hide the small margin right of the line numbers, which is used
2616 <dt>Stop scrolling at last line
</dt>
2617 <dd>When enabled Geany stops scrolling when at the last line of the document.
2618 Otherwise you can scroll one more page even if there are no real lines.
</dd>
2621 <div class=
"section" id=
"long-line-marker">
2622 <h4><a class=
"toc-backref" href=
"#id117">Long line marker
</a></h4>
2623 <p>The long line marker helps to indicate overly-long lines, or as a hint
2624 to the user for when to break the line.
</p>
2625 <dl class=
"docutils">
2627 <dd><dl class=
"first last docutils">
2629 <dd>Show a thin vertical line in the editor window at the given column
2632 <dd>Change the background color of characters after the given column
2633 position to the color set below. (This is recommended over the
2634 <em>Line
</em> setting if you use proportional fonts).
</dd>
2636 <dd>Don't mark long lines at all.
</dd>
2639 <dt>Long line marker
</dt>
2640 <dd>Set this value to a value greater than zero to specify the column
2641 where it should appear.
</dd>
2642 <dt>Long line marker color
</dt>
2643 <dd>Set the color of the long line marker.
</dd>
2646 <div class=
"section" id=
"virtual-spaces">
2647 <h4><a class=
"toc-backref" href=
"#id118">Virtual spaces
</a></h4>
2648 <p>Virtual space is space beyond the end of each line.
2649 The cursor may be moved into virtual space but no real space will be
2650 added to the document until there is some text typed or some other
2651 text insertion command is used.
</p>
2652 <dl class=
"docutils">
2654 <dd>Do not show virtual spaces
</dd>
2655 <dt>Only for rectangular selections
</dt>
2656 <dd>Only show virtual spaces beyond the end of lines when drawing a rectangular selection
</dd>
2658 <dd>Always show virtual spaces beyond the end of lines
</dd>
2662 <div class=
"section" id=
"files-preferences">
2663 <h3><a class=
"toc-backref" href=
"#id119">Files preferences
</a></h3>
2664 <img alt=
"./images/pref_dialog_files.png" src=
"./images/pref_dialog_files.png" />
2665 <div class=
"section" id=
"new-files">
2666 <h4><a class=
"toc-backref" href=
"#id120">New files
</a></h4>
2667 <dl class=
"docutils">
2668 <dt>Open new documents from the command-line
</dt>
2669 <dd>Whether to create new documents when passing filenames that don't
2670 exist from the command-line.
</dd>
2671 <dt>Default encoding (new files)
</dt>
2672 <dd>The type of file encoding you wish to use when creating files.
</dd>
2673 <dt>Used fixed encoding when opening files
</dt>
2674 <dd>Assume all files you are opening are using the type of encoding specified below.
</dd>
2675 <dt>Default encoding (existing files)
</dt>
2676 <dd>Opens all files with the specified encoding instead of auto-detecting it.
2677 Use this option when it's not possible for Geany to detect the exact encoding.
</dd>
2678 <dt>Default end of line characters
</dt>
2679 <dd>The end of line characters to which should be used for new files.
2680 On Windows systems, you generally want to use CR/LF which are the common
2681 characters to mark line breaks.
2682 On Unix-like systems, LF is default and CR is used on MAC systems.
</dd>
2685 <div class=
"section" id=
"saving-files">
2686 <h4><a class=
"toc-backref" href=
"#id121">Saving files
</a></h4>
2687 <p>Perform formatting operations when a document is saved. These
2688 can each be undone with the Undo command.
</p>
2689 <dl class=
"docutils">
2690 <dt>Ensure newline at file end
</dt>
2691 <dd>Add a newline at the end of the document if one is missing.
</dd>
2692 <dt>Ensure consistent line endings
</dt>
2693 <dd>Ensures that newline characters always get converted before
2694 saving, avoiding mixed line endings in the same file.
</dd>
2696 <dl class=
"docutils" id=
"strip-trailing-spaces">
2697 <dt>Strip trailing spaces
</dt>
2698 <dd><p class=
"first">Remove any whitespace at the end of each document line.
</p>
2699 <div class=
"note last">
2700 <p class=
"first admonition-title">Note
</p>
2701 <p class=
"last">This does not apply to Diff documents, e.g. patch files.
</p>
2704 <dt>Replace tabs by space
</dt>
2705 <dd><p class=
"first">Replace all tabs in the document with the equivalent number of spaces.
</p>
2706 <div class=
"note last">
2707 <p class=
"first admonition-title">Note
</p>
2708 <p class=
"last">It is better to use spaces to indent than use this preference - see
2709 <a class=
"reference internal" href=
"#indentation">Indentation
</a>.
</p>
2714 <div class=
"section" id=
"id3">
2715 <h4><a class=
"toc-backref" href=
"#id122">Miscellaneous
</a></h4>
2716 <dl class=
"docutils">
2717 <dt>Recent files list length
</dt>
2718 <dd>The number of files to remember in the recently used files list.
</dd>
2719 <dt>Disk check timeout
</dt>
2720 <dd><p class=
"first">The number of seconds to periodically check the current document's
2721 file on disk in case it has changed. Setting it to
0 will disable
2723 <div class=
"note last">
2724 <p class=
"first admonition-title">Note
</p>
2725 <p class=
"last">These checks are only performed on local files. Remote files are
2726 not checked for changes due to performance issues
2727 (remote files are files in
<tt class=
"docutils literal"><span class=
"pre">~/.gvfs/
</span></tt>).
</p>
2733 <div class=
"section" id=
"tools-preferences">
2734 <h3><a class=
"toc-backref" href=
"#id123">Tools preferences
</a></h3>
2735 <img alt=
"./images/pref_dialog_tools.png" src=
"./images/pref_dialog_tools.png" />
2736 <div class=
"section" id=
"tool-paths">
2737 <h4><a class=
"toc-backref" href=
"#id124">Tool paths
</a></h4>
2738 <dl class=
"docutils">
2740 <dd>The command to execute a script in a terminal. Occurrences of %c
2741 in the command are substituted with the run script name, see
2742 <a class=
"reference internal" href=
"#terminal-emulators">Terminal emulators
</a>.
</dd>
2744 <dd>The location of your web browser executable.
</dd>
2746 <dd>The location of the grep executable.
</dd>
2749 <p class=
"first admonition-title">Note
</p>
2750 <p class=
"last">For Windows users: at the time of writing it is recommended to use
2751 the grep.exe from the UnxUtils project
2752 (
<a class=
"reference external" href=
"http://sourceforge.net/projects/unxutils">http://sourceforge.net/projects/unxutils
</a>). The grep.exe from the
2753 Mingw project for instance might not work with Geany at the moment.
</p>
2756 <div class=
"section" id=
"commands">
2757 <h4><a class=
"toc-backref" href=
"#id125">Commands
</a></h4>
2758 <dl class=
"docutils">
2759 <dt>Context action
</dt>
2760 <dd>Set this to a command to execute on the current word.
2761 You can use the
"%s
" wildcard to pass the current word below the cursor
2762 to the specified command.
</dd>
2766 <div class=
"section" id=
"template-preferences">
2767 <h3><a class=
"toc-backref" href=
"#id126">Template preferences
</a></h3>
2768 <p>This data is used as meta data for various template text to insert into
2769 a document, such as the file header. You only need to set fields that
2770 you want to use in your template files.
</p>
2771 <img alt=
"./images/pref_dialog_templ.png" src=
"./images/pref_dialog_templ.png" />
2772 <div class=
"section" id=
"template-data">
2773 <h4><a class=
"toc-backref" href=
"#id127">Template data
</a></h4>
2774 <dl class=
"docutils">
2776 <dd>The name of the developer who will be creating files.
</dd>
2778 <dd>The initials of the developer.
</dd>
2779 <dt>Mail address
</dt>
2780 <dd><p class=
"first">The email address of the developer.
</p>
2781 <div class=
"note last">
2782 <p class=
"first admonition-title">Note
</p>
2783 <p class=
"last">You may wish to add anti-spam markup, e.g.
<tt class=
"docutils literal">name
<at
>site
<dot
>ext
</tt>.
</p>
2787 <dd>The company the developer is working for.
</dd>
2788 <dt>Initial version
</dt>
2789 <dd>The initial version of files you will be creating.
</dd>
2791 <dd>Specify a format for the the {year} wildcard. You can use any conversion specifiers
2792 which can be used with the ANSI C strftime function. For details please see
2793 <a class=
"reference external" href=
"http://man.cx/strftime">http://man.cx/strftime
</a>.
</dd>
2795 <dd>Specify a format for the the {date} wildcard. You can use any conversion specifiers
2796 which can be used with the ANSI C strftime function. For details please see
2797 <a class=
"reference external" href=
"http://man.cx/strftime">http://man.cx/strftime
</a>.
</dd>
2798 <dt>Date
& Time
</dt>
2799 <dd>Specify a format for the the {datetime} wildcard. You can use any conversion specifiers
2800 which can be used with the ANSI C strftime function. For details please see
2801 <a class=
"reference external" href=
"http://man.cx/strftime">http://man.cx/strftime
</a>.
</dd>
2805 <div class=
"section" id=
"keybinding-preferences">
2806 <h3><a class=
"toc-backref" href=
"#id128">Keybinding preferences
</a></h3>
2807 <img alt=
"./images/pref_dialog_keys.png" src=
"./images/pref_dialog_keys.png" />
2808 <p>There are some commands listed in the keybinding dialog that are not, by default,
2809 bound to a key combination, and may not be available as a menu item.
</p>
2811 <p class=
"first admonition-title">Note
</p>
2812 <p class=
"last">For more information see the section
<a class=
"reference internal" href=
"#keybindings">Keybindings
</a>.
</p>
2815 <div class=
"section" id=
"printing-preferences">
2816 <h3><a class=
"toc-backref" href=
"#id129">Printing preferences
</a></h3>
2817 <img alt=
"./images/pref_dialog_printing.png" src=
"./images/pref_dialog_printing.png" />
2818 <dl class=
"docutils">
2819 <dt>Use external command for printing
</dt>
2820 <dd>Use a system command to print your file out.
</dd>
2821 <dt>Use native GTK printing
</dt>
2822 <dd>Let the GTK GUI toolkit handle your print request.
</dd>
2823 <dt>Print line numbers
</dt>
2824 <dd>Print the line numbers on the left of your paper.
</dd>
2825 <dt>Print page number
</dt>
2826 <dd>Print the page number on the bottom right of your paper.
</dd>
2827 <dt>Print page header
</dt>
2828 <dd>Print a header on every page that is sent to the printer.
</dd>
2829 <dt>Use base name of the printed file
</dt>
2830 <dd>Don't use the entire path for the header, only the filename.
</dd>
2831 <dt>Date format
</dt>
2832 <dd>How the date should be printed. You can use the same format
2833 specifiers as in the ANSI C function strftime(). For details please
2834 see
<a class=
"reference external" href=
"http://man.cx/strftime">http://man.cx/strftime
</a>.
</dd>
2837 <div class=
"section" id=
"various-preferences">
2838 <h3><a class=
"toc-backref" href=
"#id130">Various preferences
</a></h3>
2839 <img alt=
"./images/pref_dialog_various.png" src=
"./images/pref_dialog_various.png" />
2840 <p>Rarely used preferences, explained in the table below. A few of them require
2841 restart to take effect, and a few other will only affect newly opened or created
2842 documents before restart.
</p>
2843 <table border=
"1" class=
"docutils">
2850 <thead valign=
"bottom">
2851 <tr><th class=
"head">Key
</th>
2852 <th class=
"head">Description
</th>
2853 <th class=
"head">Default
</th>
2854 <th class=
"head">Applies
</th>
2857 <tbody valign=
"top">
2858 <tr><td><strong>Editor related
</strong></td>
2863 <tr><td>use_gtk_word_boundaries
</td>
2864 <td>Whether to look for the end of a word
2865 when using word-boundary related
2866 Scintilla commands (see
<a class=
"reference internal" href=
"#scintilla-keyboard-commands">Scintilla
2867 keyboard commands
</a>).
</td>
2872 <tr><td>brace_match_ltgt
</td>
2873 <td>Whether to highlight
<,
> angle brackets.
</td>
2875 <td>immediately
</td>
2877 <tr><td>complete_snippets_whilst_editing
</td>
2878 <td>Whether to allow completion of snippets
2879 when editing an existing line (i.e. there
2880 is some text after the current cursor
2881 position on the line). Only used when the
2882 keybinding
<cite>Complete snippet
</cite> is set to
2883 <tt class=
"docutils literal">Space
</tt>.
</td>
2885 <td>immediately
</td>
2887 <tr><td>show_editor_scrollbars
</td>
2888 <td>Whether to display scrollbars. If set to
2889 false, the horizontal and vertical
2890 scrollbars are hidden completely.
</td>
2892 <td>immediately
</td>
2894 <tr><td>indent_hard_tab_width
</td>
2895 <td>The size of a tab character. Don't change
2896 it unless you really need to; use the
2897 indentation settings instead.
</td>
2899 <td>immediately
</td>
2901 <tr><td><strong>Interface related
</strong></td>
2906 <tr><td>show_symbol_list_expanders
</td>
2907 <td>Whether to show or hide the small
2908 expander icons on the symbol list
2914 <tr><td>allow_always_save
</td>
2915 <td>Whether files can be saved always, even
2916 if they don't have any changes.
2917 By default, the Save button and menu
2918 item are disabled when a file is
2919 unchanged. When setting this option to
2920 true, the Save button and menu item are
2921 always active and files can be saved.
</td>
2923 <td>immediately
</td>
2925 <tr><td>compiler_tab_autoscroll
</td>
2926 <td>Whether to automatically scroll to the
2927 last line of the output in the Compiler
2930 <td>immediately
</td>
2932 <tr><td>statusbar_template
</td>
2933 <td>The status bar statistics line format.
2934 (See
<a class=
"reference internal" href=
"#statusbar-templates">Statusbar Templates
</a> for details).
</td>
2936 <td>immediately
</td>
2938 <tr><td>new_document_after_close
</td>
2939 <td>Whether to open a new document after all
2940 documents have been closed.
</td>
2942 <td>immediately
</td>
2944 <tr><td>msgwin_status_visible
</td>
2945 <td>Whether to show the Status tab in the
2946 Messages Window
</td>
2948 <td>immediately
</td>
2950 <tr><td>msgwin_compiler_visible
</td>
2951 <td>Whether to show the Compiler tab in the
2952 Messages Window
</td>
2954 <td>immediately
</td>
2956 <tr><td>msgwin_messages_visible
</td>
2957 <td>Whether to show the Messages tab in the
2958 Messages Window
</td>
2960 <td>immediately
</td>
2962 <tr><td>msgwin_scribble_visible
</td>
2963 <td>Whether to show the Scribble tab in the
2964 Messages Window
</td>
2966 <td>immediately
</td>
2968 <tr><td><strong>VTE related
</strong></td>
2973 <tr><td>emulation
</td>
2974 <td>Terminal emulation mode. Only change this
2975 if you have VTE termcap files other than
2976 <tt class=
"docutils literal">vte/termcap/xterm
</tt>.
</td>
2978 <td>immediately
</td>
2980 <tr><td>send_selection_unsafe
</td>
2981 <td>By default, Geany strips any trailing
2982 newline characters from the current
2983 selection before sending it to the terminal
2984 to not execute arbitrary code. This is
2985 mainly a security feature.
2986 If, for whatever reasons, you really want
2987 it to be executed directly, set this option
2990 <td>immediately
</td>
2992 <tr><td>send_cmd_prefix
</td>
2993 <td>String with which prefix the commands sent
2994 to the shell. This may be used to tell
2995 some shells (BASH with
<tt class=
"docutils literal">HISTCONTROL
</tt> set
2996 to
<tt class=
"docutils literal">ignorespace
</tt>, ZSH with
2997 <tt class=
"docutils literal">HIST_IGNORE_SPACE
</tt> enabled, etc.) from
2998 putting these commands in their history by
2999 setting this to a space. Note that leading
3000 spaces must be escaped using
<cite>s
</cite> in the
3001 configuration file.
</td>
3003 <td>immediately
</td>
3005 <tr><td><strong>File related
</strong></td>
3010 <tr><td>use_atomic_file_saving
</td>
3011 <td>Defines the mode how Geany saves files to
3012 disk. If disabled, Geany directly writes
3013 the content of the document to disk. This
3014 might cause loss of data when there is
3015 no more free space on disk to save the
3016 file. When set to true, Geany first saves
3017 the contents into a temporary file and if
3018 this succeeded, the temporary file is
3019 moved to the real file to save.
3020 This gives better error checking in case of
3021 no more free disk space. But it also
3022 destroys hard links of the original file
3023 and its permissions (e.g. executable flags
3024 are reset). Use this with care as it can
3025 break things seriously.
3026 The better approach would be to ensure your
3027 disk won't run out of free space.
</td>
3029 <td>immediately
</td>
3031 <tr><td>use_gio_unsafe_file_saving
</td>
3032 <td>Whether to use GIO as the unsafe file
3033 saving backend. It is better on most
3034 situations but is known not to work
3035 correctly on some complex setups.
</td>
3037 <td>immediately
</td>
3039 <tr><td>gio_unsafe_save_backup
</td>
3040 <td>Make a backup when using GIO unsafe file
3041 saving. Backup is named
<cite>filename~
</cite>.
</td>
3043 <td>immediately
</td>
3045 <tr><td><strong>Filetype related
</strong></td>
3050 <tr><td>extract_filetype_regex
</td>
3051 <td>Regex to extract filetype name from file
3052 via capture group one.
</td>
3054 <td>immediately
</td>
3056 <tr><td><strong>Search related
</strong></td>
3061 <tr><td>find_selection_type
</td>
3062 <td>See
<a class=
"reference internal" href=
"#find-selection">Find selection
</a>.
</td>
3064 <td>immediately
</td>
3066 <tr><td><strong>Build Menu related
</strong></td>
3071 <tr><td>number_ft_menu_items
</td>
3072 <td>The maximum number of menu items in the
3073 filetype section of the Build menu.
</td>
3077 <tr><td>number_non_ft_menu_items
</td>
3078 <td>The maximum number of menu items in the
3079 independent section of the Build menu.
</td>
3083 <tr><td>number_exec_menu_items
</td>
3084 <td>The maximum number of menu items in the
3085 execute section of the Build menu.
</td>
3091 <p>The extract_filetype_regex has the default value GEANY_DEFAULT_FILETYPE_REGEX.
</p>
3092 <div class=
"section" id=
"statusbar-templates">
3093 <h4><a class=
"toc-backref" href=
"#id131">Statusbar Templates
</a></h4>
3094 <p>The default statusbar template is (note
<tt class=
"docutils literal">\t
</tt> = tab):
</p>
3095 <p><tt class=
"docutils literal">line: %l / %L\t col: %c\t sel: %s\t %w
%t
%mmode: %M
encoding: %e
filetype: %f
scope: %S
</tt></p>
3096 <p>Settings the preference to an empty string will also cause Geany to use this
3097 internal default.
</p>
3098 <p>The following format characters are available for the statusbar template:
</p>
3099 <table border=
"1" class=
"docutils">
3104 <thead valign=
"bottom">
3105 <tr><th class=
"head">Placeholder
</th>
3106 <th class=
"head">Description
</th>
3109 <tbody valign=
"top">
3110 <tr><td><tt class=
"docutils literal">%l
</tt></td>
3111 <td>The current line number starting at
1</td>
3113 <tr><td><tt class=
"docutils literal">%L
</tt></td>
3114 <td>The total number of lines
</td>
3116 <tr><td><tt class=
"docutils literal">%c
</tt></td>
3117 <td>The current column number starting at
0</td>
3119 <tr><td><tt class=
"docutils literal">%C
</tt></td>
3120 <td>The current column number starting at
1</td>
3122 <tr><td><tt class=
"docutils literal">%s
</tt></td>
3123 <td>The number of selected characters or if only whole lines
3124 selected, the number of selected lines.
</td>
3126 <tr><td><tt class=
"docutils literal">%w
</tt></td>
3127 <td>Shows
<tt class=
"docutils literal">RO
</tt> when the document is in read-only mode,
3128 otherwise shows whether the editor is in overtype (OVR)
3129 or insert (INS) mode.
</td>
3131 <tr><td><tt class=
"docutils literal">%t
</tt></td>
3132 <td>Shows the indentation mode, either tabs (TAB),
3133 spaces (SP) or both (T/S).
</td>
3135 <tr><td><tt class=
"docutils literal">%m
</tt></td>
3136 <td>Shows whether the document is modified (MOD) or nothing.
</td>
3138 <tr><td><tt class=
"docutils literal">%M
</tt></td>
3139 <td>The name of the document's line-endings (ex.
<tt class=
"docutils literal">Unix (LF)
</tt>)
</td>
3141 <tr><td><tt class=
"docutils literal">%e
</tt></td>
3142 <td>The name of the document's encoding (ex. UTF-
8).
</td>
3144 <tr><td><tt class=
"docutils literal">%f
</tt></td>
3145 <td>The filetype of the document (ex. None, Python, C, etc).
</td>
3147 <tr><td><tt class=
"docutils literal">%S
</tt></td>
3148 <td>The name of the scope where the caret is located.
</td>
3150 <tr><td><tt class=
"docutils literal">%p
</tt></td>
3151 <td>The caret position in the entire document starting at
0.
</td>
3153 <tr><td><tt class=
"docutils literal">%r
</tt></td>
3154 <td>Shows whether the document is read-only (RO) or nothing.
</td>
3156 <tr><td><tt class=
"docutils literal">%Y
</tt></td>
3157 <td>The Scintilla style number at the caret position. This is
3158 useful if you're debugging color schemes or related code.
</td>
3164 <div class=
"section" id=
"terminal-vte-preferences">
3165 <h3><a class=
"toc-backref" href=
"#id132">Terminal (VTE) preferences
</a></h3>
3166 <p>See also:
<a class=
"reference internal" href=
"#virtual-terminal-emulator-widget-vte">Virtual terminal emulator widget (VTE)
</a>.
</p>
3167 <img alt=
"./images/pref_dialog_vte.png" src=
"./images/pref_dialog_vte.png" />
3168 <div class=
"section" id=
"terminal-widget">
3169 <h4><a class=
"toc-backref" href=
"#id133">Terminal widget
</a></h4>
3170 <dl class=
"docutils">
3171 <dt>Terminal font
</dt>
3172 <dd>Select the font that will be used in the terminal emulation control.
</dd>
3173 <dt>Foreground color
</dt>
3174 <dd>Select the font color.
</dd>
3175 <dt>Background color
</dt>
3176 <dd>Select the background color of the terminal.
</dd>
3177 <dt>Background image
</dt>
3178 <dd>Select the background image to show behind the terminal's text.
</dd>
3179 <dt>Scrollback lines
</dt>
3180 <dd>The number of lines buffered so that you can scroll though the history.
</dd>
3182 <dd>The location of the shell on your system.
</dd>
3183 <dt>Scroll on keystroke
</dt>
3184 <dd>Scroll the terminal to the prompt line when pressing a key.
</dd>
3185 <dt>Scroll on output
</dt>
3186 <dd>Scroll the output down.
</dd>
3187 <dt>Cursor blinks
</dt>
3188 <dd>Let the terminal cursor blink.
</dd>
3189 <dt>Override Geany keybindings
</dt>
3190 <dd>Allow the VTE to receive keyboard shortcuts (apart from focus commands).
</dd>
3191 <dt>Disable menu shortcut key (F10 by default)
</dt>
3192 <dd>Disable the menu shortcut when you are in the virtual terminal.
</dd>
3193 <dt>Follow path of the current file
</dt>
3194 <dd>Make the path of the terminal change according to the path of the
3196 <dt>Execute programs in VTE
</dt>
3197 <dd>Execute programs in the virtual terminal instead of using the external
3198 terminal tool. Note that if you run multiple execute commands at once
3199 the output may become mixed together in the VTE.
</dd>
3200 <dt>Don't use run script
</dt>
3201 <dd>Don't use the simple run script which is usually used to display
3202 the exit status of the executed program.
3203 This can be useful if you already have a program running in the VTE
3204 like a Python console (e.g. ipython). Use this with care.
</dd>
3209 <div class=
"section" id=
"project-management">
3210 <h2><a class=
"toc-backref" href=
"#id134">Project management
</a></h2>
3211 <p>Project management is optional in Geany. Currently it can be used for:
</p>
3213 <li>Storing and opening session files on a project basis.
</li>
3214 <li>Overriding default settings with project equivalents.
</li>
3215 <li>Configuring the Build menu on a project basis.
</li>
3217 <p>A list of session files can be stored and opened with the project
3218 when the
<em>Use project-based session files
</em> preference is enabled,
3219 in the
<em>Project
</em> group of the
<a class=
"reference internal" href=
"#preferences">Preferences
</a> dialog.
</p>
3220 <p>As long as a project is open, the Build menu will use
3221 the items defined in project's settings, instead of the defaults.
3222 See
<a class=
"reference internal" href=
"#build-menu-configuration">Build Menu Configuration
</a> for information on configuring the menu.
</p>
3223 <p>The current project's settings are saved when it is closed, or when
3224 Geany is shutdown. When restarting Geany, the previously opened project
3225 file that was in use at the end of the last session will be reopened.
</p>
3226 <p>The project menu items are detailed below.
</p>
3227 <div class=
"section" id=
"new-project">
3228 <h3><a class=
"toc-backref" href=
"#id135">New project
</a></h3>
3229 <p>To create a new project, fill in the
<em>Name
</em> field. By default this
3230 will setup a new project file
<tt class=
"docutils literal">~/projects/name.geany
</tt>. Usually it's
3231 best to store all your project files in the same directory (they are
3232 independent of any source directory trees).
</p>
3233 <p>The Base path text field is setup to use
<tt class=
"docutils literal">~/projects/name
</tt>. This
3234 can safely be set to any existing path -- it will not touch the file
3235 structure contained in it.
</p>
3237 <div class=
"section" id=
"project-properties">
3238 <h3><a class=
"toc-backref" href=
"#id136">Project properties
</a></h3>
3239 <p>You can set an optional description for the project. Currently it's
3240 only used for a template wildcard - see
<a class=
"reference internal" href=
"#template-wildcards">Template wildcards
</a>.
</p>
3241 <p>The
<em>Base path
</em> field is used as the directory to run the Build menu commands.
3242 The specified path can be an absolute path or it is considered to be
3243 relative to the project's file name.
</p>
3244 <p>The
<em>File patterns
</em> field allows to specify a list of file patterns for the
3245 project, which can be used in the
<a class=
"reference internal" href=
"#find-in-files">Find in files
</a> dialog.
</p>
3246 <p>The
<em>Indentation
</em> tab allows you to override the default
3247 <a class=
"reference internal" href=
"#indentation">Indentation
</a> settings.
</p>
3249 <div class=
"section" id=
"open-project">
3250 <h3><a class=
"toc-backref" href=
"#id137">Open project
</a></h3>
3251 <p>The Open command displays a standard file chooser, starting in
3252 <tt class=
"docutils literal">~/projects
</tt>. Choose a project file named with the
<tt class=
"docutils literal">.geany
</tt>
3254 <p>When project session support is enabled, Geany will close the currently
3255 open files and open the session files associated with the project.
</p>
3257 <div class=
"section" id=
"close-project">
3258 <h3><a class=
"toc-backref" href=
"#id138">Close project
</a></h3>
3259 <p>Project file settings are saved when the project is closed.
</p>
3260 <p>When project session support is enabled, Geany will close the project
3261 session files and open any previously closed default session files.
</p>
3264 <div class=
"section" id=
"build-menu">
3265 <h2><a class=
"toc-backref" href=
"#id139">Build menu
</a></h2>
3266 <p>After editing code with Geany, the next step is to compile, link, build,
3267 interpret, run etc. As Geany supports many languages each with a different
3268 approach to such operations, and as there are also many language independent
3269 software building systems, Geany does not have a built-in build system, nor
3270 does it limit which system you can use. Instead the build menu provides
3271 a configurable and flexible means of running any external commands to
3272 execute your preferred build system.
</p>
3273 <p>This section provides a description of the default configuration of the
3274 build menu and then covers how to configure it, and where the defaults fit in.
</p>
3275 <p>Running the commands from within Geany has two benefits:
</p>
3277 <li>The current file is automatically saved before the command is run.
</li>
3278 <li>The output is captured in the Compiler notebook tab and parsed for
3279 warnings or errors.
</li>
3281 <p>Warnings and errors that can be parsed for line numbers will be shown in
3282 red in the Compiler tab and you can click on them to switch to the relevant
3283 source file (or open it) and mark the line number. Also lines with
3284 warnings or errors are marked in the source, see
<a class=
"reference internal" href=
"#indicators">Indicators
</a> below.
</p>
3286 <p class=
"first admonition-title">Tip
</p>
3287 <p class=
"last">If Geany's default error message parsing does not parse errors for
3288 the tool you're using, you can set a custom regex in the Build Commands
3289 Dialog, see
<a class=
"reference internal" href=
"#build-menu-configuration">Build Menu Configuration
</a>.
</p>
3291 <div class=
"section" id=
"indicators">
3292 <h3><a class=
"toc-backref" href=
"#id140">Indicators
</a></h3>
3293 <p>Indicators are red squiggly underlines which are used to highlight
3294 errors which occurred while compiling the current file. So you can
3295 easily see where your code failed to compile. You can remove them by
3296 selecting
<em>Remove Error Indicators
</em> in the Document menu.
</p>
3297 <p>If you do not like this feature, you can disable it - see
<a class=
"reference internal" href=
"#editor-features-preferences">Editor Features
3298 preferences
</a>.
</p>
3300 <div class=
"section" id=
"default-build-menu-items">
3301 <h3><a class=
"toc-backref" href=
"#id141">Default build menu items
</a></h3>
3302 <p>Depending on the current file's filetype, the default Build menu will contain
3303 the following items:
</p>
3308 <li>Make Custom Target
</li>
3309 <li>Make Object
</li>
3311 <li>Previous Error
</li>
3313 <li>Set Build Menu Commands
</li>
3315 <div class=
"section" id=
"compile">
3316 <h4><a class=
"toc-backref" href=
"#id142">Compile
</a></h4>
3317 <p>The Compile command has different uses for different kinds of files.
</p>
3318 <p>For compilable languages such as C and C++, the Compile command is
3319 set up to compile the current source file into a binary object file.
</p>
3320 <p>Java source files will be compiled to class file bytecode.
</p>
3321 <p>Interpreted languages such as Perl, Python, Ruby will compile to
3322 bytecode if the language supports it, or will run a syntax check,
3323 or if that is not available will run the file in its language interpreter.
</p>
3325 <div class=
"section" id=
"build">
3326 <h4><a class=
"toc-backref" href=
"#id143">Build
</a></h4>
3327 <p>For compilable languages such as C and C++, the Build command will link
3328 the current source file's equivalent object file into an executable. If
3329 the object file does not exist, the source will be compiled and linked
3330 in one step, producing just the executable binary.
</p>
3331 <p>Interpreted languages do not use the Build command.
</p>
3333 <p class=
"first admonition-title">Note
</p>
3334 <p class=
"last">If you need complex settings for your build system, or several
3335 different settings, then writing a Makefile and using the Make
3336 commands is recommended; this will also make it easier for users to
3337 build your software.
</p>
3340 <div class=
"section" id=
"make">
3341 <h4><a class=
"toc-backref" href=
"#id144">Make
</a></h4>
3342 <p>This runs
"make
" in the same directory as the
3345 <div class=
"section" id=
"make-custom-target">
3346 <h4><a class=
"toc-backref" href=
"#id145">Make custom target
</a></h4>
3347 <p>This is similar to running 'Make' but you will be prompted for
3348 the make target name to be passed to the Make tool. For example,
3349 typing 'clean' in the dialog prompt will run
"make clean
".
</p>
3351 <div class=
"section" id=
"make-object">
3352 <h4><a class=
"toc-backref" href=
"#id146">Make object
</a></h4>
3353 <p>Make object will run
"make current_file.o
" in the same directory as
3354 the current file, using the filename for 'current_file'. It is useful
3355 for building just the current file without building the whole project.
</p>
3357 <div class=
"section" id=
"next-error">
3358 <h4><a class=
"toc-backref" href=
"#id147">Next error
</a></h4>
3359 <p>The next error item will move to the next detected error in the file.
</p>
3361 <div class=
"section" id=
"previous-error">
3362 <h4><a class=
"toc-backref" href=
"#id148">Previous error
</a></h4>
3363 <p>The previous error item will move to the previous detected error in the file.
</p>
3365 <div class=
"section" id=
"execute">
3366 <h4><a class=
"toc-backref" href=
"#id149">Execute
</a></h4>
3367 <p>Execute will run the corresponding executable file, shell script or
3368 interpreted script in a terminal window. The command set in the
3369 "Set Build Commands
" dialog is run in a script to ensure the terminal
3370 stays open after execution completes. Note: see
<a class=
"reference internal" href=
"#terminal-emulators">Terminal emulators
</a>
3371 below for the command format. Alternatively the built-in VTE can be used
3372 if it is available - see
<a class=
"reference internal" href=
"#virtual-terminal-emulator-widget-vte">Virtual terminal emulator widget (VTE)
</a>.
</p>
3373 <p>After your program or script has finished executing, the run script will
3374 prompt you to press the return key. This allows you to review any text
3375 output from the program before the terminal window is closed.
</p>
3377 <p class=
"first admonition-title">Note
</p>
3378 <p class=
"last">The execute command output is not parsed for errors.
</p>
3381 <div class=
"section" id=
"stopping-running-processes">
3382 <h4><a class=
"toc-backref" href=
"#id150">Stopping running processes
</a></h4>
3383 <p>When there is a running program, the Execute menu item in the menu and
3384 the Run button in the toolbar
3385 each become a stop button so you can stop the current running program (and
3386 any child processes). This works by sending the SIGQUIT signal to the process.
</p>
3387 <p>Depending on the process you started it is possible that the process
3388 cannot be stopped. For example this can happen when the process creates
3389 more than one child process.
</p>
3390 <div class=
"section" id=
"terminal-emulators">
3391 <h5><a class=
"toc-backref" href=
"#id151">Terminal emulators
</a></h5>
3392 <p>The Terminal field of the tools preferences tab requires a command to
3393 execute the terminal program and to pass it the name of the Geany run
3394 script that it should execute in a Bourne compatible shell (eg /bin/sh).
3395 The marker
"%c
" is substituted with the name of the Geany run script,
3396 which is created in the working directory set in the Build commands
3397 dialog, see
<a class=
"reference internal" href=
"#build-menu-commands-dialog">Build menu commands dialog
</a> for details.
</p>
3398 <p>As an example the default (Linux) command is:
</p>
3399 <pre class=
"literal-block">
3400 xterm -e
"/bin/sh %c
"
3404 <div class=
"section" id=
"set-build-commands">
3405 <h4><a class=
"toc-backref" href=
"#id152">Set build commands
</a></h4>
3406 <p>By default Compile, Build and Execute are fairly basic commands. You
3407 may wish to customise them using
<em>Set Build Commands
</em>.
</p>
3408 <p>E.g. for C you can add any include paths and compile flags for the
3409 compiler, any library names and paths for the linker, and any
3410 arguments you want to use when running Execute.
</p>
3413 <div class=
"section" id=
"build-menu-configuration">
3414 <h3><a class=
"toc-backref" href=
"#id153">Build menu configuration
</a></h3>
3415 <p>The build menu has considerable flexibility and configurability, allowing
3416 both menu labels the commands they execute and the directory they execute
3417 in to be configured.
</p>
3418 <p>For example, if you change one of the default make commands to run say 'waf'
3419 you can also change the label to match.
</p>
3420 <p>These settings are saved automatically when Geany is shut down.
</p>
3421 <p>The build menu is divided into four groups of items each with different
3424 <li>Filetype build commands - are configurable and depend on the filetype of the
3425 current document; they capture output in the compiler tab and parse it for
3427 <li>Independent build commands - are configurable and mostly don't depend on the
3428 filetype of the current document; they also capture output in the
3429 compiler tab and parse it for errors.
</li>
3430 <li>Execute commands - are configurable and intended for executing your
3431 program or other long running programs. The output is not parsed for errors
3432 and is directed to the terminal command selected in preferences.
</li>
3433 <li>Fixed commands - these perform built-in actions:
<ul>
3434 <li>Go to the next error.
</li>
3435 <li>Go to the previous error.
</li>
3436 <li>Show the build menu commands dialog.
</li>
3440 <p>The maximum numbers of items in each of the configurable groups can be
3441 configured in the
<a class=
"reference internal" href=
"#various-preferences">Various preferences
</a>. Even though the maximum number of
3442 items may have been increased, only those menu items that have values
3443 configured are shown in the menu.
</p>
3444 <p>The groups of menu items obtain their configuration from four potential
3445 sources. The highest priority source that has the menu item defined will
3446 be used. The sources in decreasing priority are:
</p>
3448 <li>A project file if open
</li>
3449 <li>The user preferences
</li>
3450 <li>The system filetype definitions
</li>
3451 <li>The defaults
</li>
3453 <p>The detailed relationships between sources and the configurable menu item groups
3454 is shown in the following table.
</p>
3455 <table border=
"1" class=
"docutils">
3463 <thead valign=
"bottom">
3464 <tr><th class=
"head">Group
</th>
3465 <th class=
"head">Project File
</th>
3466 <th class=
"head">Preferences
</th>
3467 <th class=
"head">System Filetype
</th>
3468 <th class=
"head">Defaults
</th>
3471 <tbody valign=
"top">
3472 <tr><td>Filetype
</td>
3473 <td><p class=
"first">Loads From: project
3475 <p class=
"last">Saves To: project
3478 <td><p class=
"first">Loads From:
3479 filetypes.xxx file in
3480 ~/.config/geany/filedefs
</p>
3481 <p class=
"last">Saves to: as above,
3482 creating if needed.
</p>
3484 <td><p class=
"first">Loads From:
3487 <p class=
"last">Saves to: as user
3488 preferences left.
</p>
3494 <td><p class=
"first">Loads From: project
3496 <p class=
"last">Saves To: project
3499 <td><p class=
"first">Loads From:
3502 <p class=
"last">Saves to: as above,
3503 creating if needed.
</p>
3505 <td><p class=
"first">Loads From:
3508 <p class=
"last">Saves to: as user
3509 preferences left.
</p>
3511 <td><dl class=
"first last docutils">
3516 <dd>Label: Make Custom _Target
3519 <dd>Label: Make _Object
3520 Command: make %e.o
</dd>
3524 <tr><td>Execute
</td>
3525 <td><p class=
"first">Loads From: project
3529 <p class=
"last">Saves To:
3532 <td><p class=
"first">Loads From:
3534 ~/.config/geany or else
3535 filetypes.xxx file in
3536 ~/.config/geany/filedefs
</p>
3537 <p class=
"last">Saves To:
3538 filetypes.xxx file in
3539 ~/.config/geany/filedefs
</p>
3541 <td><p class=
"first">Loads From:
3544 <p class=
"last">Saves To: as user
3545 preferences left.
</p>
3552 <p>The following notes on the table reference cells by coordinate as (group,source):
</p>
3554 <li>General - for filetypes.xxx substitute the appropriate extension for
3555 the filetype of the current document for xxx - see
<a class=
"reference internal" href=
"#filenames">filenames
</a>.
</li>
3556 <li>System Filetypes - Labels loaded from these sources are locale sensitive
3557 and can contain translations.
</li>
3558 <li>(Filetype, Project File) and (Filetype, Preferences) - preferences use a full
3559 filetype file so that users can configure all other filetype preferences
3560 as well. Projects can only configure menu items per filetype. Saving
3561 in the project file means that there is only one file per project not
3562 a whole directory.
</li>
3563 <li>(Filetype-Independent, System Filetype) - although conceptually strange, defining
3564 filetype-independent commands in a filetype file, this provides the ability to
3565 define filetype dependent default menu items.
</li>
3566 <li>(Execute, Project File) and (Execute, Preferences) - the project independent
3567 execute and preferences independent execute commands can only be set by hand
3568 editing the appropriate file, see
<a class=
"reference internal" href=
"#preferences-file-format">Preferences file format
</a> and
<a class=
"reference internal" href=
"#project-file-format">Project file
3572 <div class=
"section" id=
"build-menu-commands-dialog">
3573 <h3><a class=
"toc-backref" href=
"#id154">Build menu commands dialog
</a></h3>
3574 <p>Most of the configuration of the build menu is done through the Build Menu
3575 Commands Dialog. You edit the configuration sourced from preferences in the
3576 dialog opened from the Build-
>Build Menu Commands item and you edit the
3577 configuration from the project in the build tab of the project preferences
3578 dialog. Both use the same form shown below.
</p>
3579 <img alt=
"./images/build_menu_commands_dialog.png" src=
"./images/build_menu_commands_dialog.png" />
3580 <p>The dialog is divided into three sections:
</p>
3582 <li>Filetype build commands (selected based on the current document's filetype).
</li>
3583 <li>Independent build commands (available regardless of filetype).
</li>
3584 <li>Filetype execute commands.
</li>
3586 <p>The filetype and independent sections also each contain a field for the regular
3587 expression used for parsing command output for error and warning messages.
</p>
3588 <p>The columns in the first three sections allow setting of the label, command,
3589 and working directory to run the command in.
</p>
3590 <p>An item with an empty label will not be shown in the menu.
</p>
3591 <p>An empty working directory will default to the directory of the current document.
3592 If there is no current document then the command will not run.
</p>
3593 <p>The dialog will always show the command selected by priority, not just the
3594 commands configured in this configuration source. This ensures that you always
3595 see what the menu item is going to do if activated.
</p>
3596 <p>If the current source of the menu item is higher priority than the
3597 configuration source you are editing then the command will be shown
3598 in the dialog but will be insensitive (greyed out). This can't happen
3599 with the project source but can with the preferences source dialog.
</p>
3600 <p>The clear buttons remove the definition from the configuration source you are editing.
3601 When you do this the command from the next lower priority source will be shown.
3602 To hide lower priority menu items without having anything show in the menu
3603 configure with a nothing in the label but at least one character in the command.
</p>
3604 <div class=
"section" id=
"substitutions-in-commands-and-working-directories">
3605 <h4><a class=
"toc-backref" href=
"#id155">Substitutions in commands and working directories
</a></h4>
3606 <p>The first occurence of each of the following character sequences in each of the
3607 command and working directory fields is substituted by the items specified below
3608 before the command is run.
</p>
3610 <li>%d - substituted by the absolute path to the directory of the current file.
</li>
3611 <li>%e - substituted by the name of the current file without the extension or path.
</li>
3612 <li>%f - substituted by the name of the current file without the path.
</li>
3613 <li>%p - if a project is open, substituted by the base path from the project.
</li>
3616 <p class=
"first admonition-title">Note
</p>
3617 <p class=
"last">If the basepath set in the project preferences is not an absolute path , then it is
3618 taken as relative to the directory of the project file. This allows a project file
3619 stored in the source tree to specify all commands and working directories relative
3620 to the tree itself, so that the whole tree including the project file, can be moved
3621 and even checked into and out of version control without having to re-configure the
3625 <div class=
"section" id=
"build-menu-keyboard-shortcuts">
3626 <h4><a class=
"toc-backref" href=
"#id156">Build menu keyboard shortcuts
</a></h4>
3627 <p>Keyboard shortcuts can be defined for the first two filetype menu items, the first three
3628 independent menu items, the first two execute menu items and the fixed menu items.
3629 In the keybindings configuration dialog (see
<a class=
"reference internal" href=
"#keybinding-preferences">Keybinding preferences
</a>)
3630 these items are identified by the default labels shown in the
<a class=
"reference internal" href=
"#build-menu">Build Menu
</a> section above.
</p>
3631 <p>It is currently not possible to bind keyboard shortcuts to more than these menu items.
</p>
3632 <p>You can also use underlines in the labels to set mnemonic characters.
</p>
3634 <div class=
"section" id=
"old-settings">
3635 <h4><a class=
"toc-backref" href=
"#id157">Old settings
</a></h4>
3636 <p>The configurable Build Menu capability was introduced in Geany
0.19 and
3637 required a new section to be added to the configuration files (See
3638 <a class=
"reference internal" href=
"#preferences-file-format">Preferences file format
</a>). Geany will still load older format project,
3639 preferences and filetype file settings and will attempt to map them into the new
3640 configuration format. There is not a simple clean mapping between the formats.
3641 The mapping used produces the most sensible results for the majority of cases.
3642 However, if they do not map the way you want, you may have to manually
3643 configure some settings using the Build Commands
3644 Dialog or the Build tab of the project preferences dialog.
</p>
3645 <p>Any setting configured in either of these dialogs will override settings mapped from
3646 older format configuration files.
</p>
3650 <div class=
"section" id=
"printing-support">
3651 <h2><a class=
"toc-backref" href=
"#id158">Printing support
</a></h2>
3652 <p>Since Geany
0.13 there has been printing support using GTK's printing API.
3653 The printed page(s) will look nearly the same as on your screen in Geany.
3654 Additionally, there are some options to modify the printed page(s).
</p>
3656 <p class=
"first admonition-title">Note
</p>
3657 <p class=
"last">The background text color is set to white, except for text with
3658 a white foreground. This allows dark color schemes to save ink
3661 <p>You can define whether to print line numbers, page numbers at the bottom of
3662 each page and whether to print a page header on each page. This header
3663 contains the filename of the printed document, the current page number and
3664 the date and time of printing. By default, the file name of the document
3665 with full path information is added to the header. If you prefer to add
3666 only the basename of the file(without any path information) you can set it
3667 in the preferences dialog. You can also adjust the format of the date and
3668 time added to the page header. The available conversion specifiers are the
3669 same as the ones which can be used with the ANSI C strftime function.
</p>
3670 <p>All of these settings can also be changed in the print dialog just before
3671 actual printing is done.
3672 On Unix-like systems the provided print dialog offers a print preview. The
3673 preview file is opened with a PDF viewer and by default GTK uses
<tt class=
"docutils literal">evince
</tt>
3674 for print preview. If you have not installed evince or just want to use
3675 another PDF viewer, you can change the program to use in the file
3676 <tt class=
"docutils literal"><span class=
"pre">.gtkrc-
2.0</span></tt> (usually found in your home directory). Simply add a line
3678 <pre class=
"literal-block">
3679 gtk-print-preview-command =
"epdfview %f
"
3681 <p>at the end of the file. Of course, you can also use xpdf, kpdf or whatever
3682 as the print preview command.
</p>
3683 <p>Geany also provides an alternative basic printing support using a custom
3684 print command. However, the printed document contains no syntax highlighting.
3685 You can adjust the command to which the filename is passed in the preferences
3686 dialog. The default command is:
</p>
3687 <pre class=
"literal-block">
3690 <p><tt class=
"docutils literal">%f
</tt> will be substituted by the filename of the current file. Geany
3691 will not show errors from the command itself, so you should make
3692 sure that it works before(e.g. by trying to execute it from the
3694 <p>A nicer example, which many prefer is:
</p>
3695 <pre class=
"literal-block">
3696 % a2ps -
1 --medium=A4 -o - %f | xfprint4
3698 <p>But this depends on a2ps and xfprint4. As a replacement for xfprint4,
3699 gtklp or similar programs can be used.
</p>
3701 <div class=
"section" id=
"plugins">
3702 <h2><a class=
"toc-backref" href=
"#id159">Plugins
</a></h2>
3703 <p>Plugins are loaded at startup, if the
<em>Enable plugin support
</em>
3704 general preference is set. There is also a command-line option,
3705 <tt class=
"docutils literal"><span class=
"pre">-p
</span></tt>, which prevents plugins being loaded. Plugins are scanned in
3706 the following directories:
</p>
3708 <li><tt class=
"docutils literal">$prefix/lib/geany
</tt> on Unix-like systems (see
<a class=
"reference internal" href=
"#installation-prefix">Installation prefix
</a>)
</li>
3709 <li>The
<tt class=
"docutils literal">lib
</tt> subfolder of the installation path on Windows.
</li>
3710 <li>The
<tt class=
"docutils literal">plugins
</tt> subfolder of the user configuration directory - see
3711 <a class=
"reference internal" href=
"#configuration-file-paths">Configuration file paths
</a>.
</li>
3712 <li>The
<cite>Extra plugin path
</cite> preference (usually blank) - see
<a class=
"reference internal" href=
"#paths">Paths
</a>.
</li>
3714 <p>Most plugins add menu items to the
<em>Tools
</em> menu when they are loaded.
</p>
3715 <p>See also
<a class=
"reference internal" href=
"#plugin-documentation">Plugin documentation
</a> for information about single plugins
3716 which are included in Geany.
</p>
3717 <div class=
"section" id=
"plugin-manager">
3718 <h3><a class=
"toc-backref" href=
"#id160">Plugin manager
</a></h3>
3719 <p>The Plugin Manager dialog lets you choose which plugins
3720 should be loaded at startup. You can also load and unload plugins on the
3721 fly using this dialog. Once you click the checkbox for a specific plugin
3722 in the dialog, it is loaded or unloaded according to its previous state.
3723 By default, no plugins are loaded at startup until you select some.
3724 You can also configure some plugin specific options if the plugin
3728 <div class=
"section" id=
"keybindings">
3729 <h2><a class=
"toc-backref" href=
"#id161">Keybindings
</a></h2>
3730 <p>Geany supports the default keyboard shortcuts for the Scintilla
3731 editing widget. For a list of these commands, see
<a class=
"reference internal" href=
"#scintilla-keyboard-commands">Scintilla
3732 keyboard commands
</a>. The Scintilla keyboard shortcuts will be overridden
3733 by any custom keybindings with the same keyboard shortcut.
</p>
3734 <div class=
"section" id=
"switching-documents">
3735 <h3><a class=
"toc-backref" href=
"#id162">Switching documents
</a></h3>
3736 <p>There are some non-configurable bindings to switch between documents,
3737 listed below. These can also be overridden by custom keybindings.
</p>
3738 <table border=
"1" class=
"docutils">
3743 <thead valign=
"bottom">
3744 <tr><th class=
"head">Key
</th>
3745 <th class=
"head">Action
</th>
3748 <tbody valign=
"top">
3749 <tr><td>Alt-[
1-
9]
</td>
3750 <td>Select left-most tab, from
1 to
9.
</td>
3753 <td>Select right-most tab.
</td>
3757 <p>See also
<a class=
"reference internal" href=
"#notebook-tab-keybindings">Notebook tab keybindings
</a>.
</p>
3759 <div class=
"section" id=
"configurable-keybindings">
3760 <h3><a class=
"toc-backref" href=
"#id163">Configurable keybindings
</a></h3>
3761 <p>For all actions listed below you can define your own keybindings. Open
3762 the Preferences dialog, select the desired action and click on
3763 change. In the resulting dialog you can press the key combination you
3764 want to assign to the action and it will be saved when you press OK.
3765 You can define only one key combination for each action and each key
3766 combination can only be defined for one action.
</p>
3767 <p>The following tables list all customizable keyboard shortcuts, those
3768 which are common to many applications are marked with (C) after the
3770 <div class=
"section" id=
"file-keybindings">
3771 <h4><a class=
"toc-backref" href=
"#id164">File keybindings
</a></h4>
3772 <table border=
"1" class=
"docutils">
3778 <thead valign=
"bottom">
3779 <tr><th class=
"head">Action
</th>
3780 <th class=
"head">Default shortcut
</th>
3781 <th class=
"head">Description
</th>
3784 <tbody valign=
"top">
3787 <td>Creates a new file.
</td>
3791 <td>Opens a file.
</td>
3793 <tr><td>Open selected file
</td>
3794 <td>Ctrl-Shift-O
</td>
3795 <td>Opens the selected filename.
</td>
3797 <tr><td>Re-open last closed tab
</td>
3799 <td>Re-opens the last closed document tab.
</td>
3803 <td>Saves the current file.
</td>
3805 <tr><td>Save As
</td>
3807 <td>Saves the current file under a new name.
</td>
3809 <tr><td>Save all
</td>
3810 <td>Ctrl-Shift-S
</td>
3811 <td>Saves all open files.
</td>
3813 <tr><td>Close all
</td>
3814 <td>Ctrl-Shift-W
</td>
3815 <td>Closes all open files.
</td>
3819 <td>Closes the current file.
</td>
3821 <tr><td>Reload file
</td>
3823 <td>Reloads the current file. All unsaved changes
3828 <td>Prints the current file.
</td>
3832 <td>Quits Geany.
</td>
3837 <div class=
"section" id=
"editor-keybindings">
3838 <h4><a class=
"toc-backref" href=
"#id165">Editor keybindings
</a></h4>
3839 <table border=
"1" class=
"docutils">
3845 <thead valign=
"bottom">
3846 <tr><th class=
"head">Action
</th>
3847 <th class=
"head">Default shortcut
</th>
3848 <th class=
"head">Description
</th>
3851 <tbody valign=
"top">
3854 <td>Un-does the last action.
</td>
3858 <td>Re-does the last action.
</td>
3860 <tr><td>Delete current line(s)
</td>
3862 <td>Deletes the current line (and any lines with a
3865 <tr><td>Delete to line end
</td>
3866 <td>Ctrl-Shift-Delete
</td>
3867 <td>Deletes from the current caret position to the
3868 end of the current line.
</td>
3870 <tr><td>Duplicate line or selection
</td>
3872 <td>Duplicates the current line or selection.
</td>
3874 <tr><td>Transpose current line
</td>
3876 <td>Transposes the current line with the previous one.
</td>
3878 <tr><td>Scroll to current line
</td>
3879 <td>Ctrl-Shift-L
</td>
3880 <td>Scrolls the current line into the centre of the
3881 view. The cursor position and or an existing
3882 selection will not be changed.
</td>
3884 <tr><td>Scroll up by one line
</td>
3886 <td>Scrolls the view.
</td>
3888 <tr><td>Scroll down by one line
</td>
3890 <td>Scrolls the view.
</td>
3892 <tr><td>Complete word
</td>
3894 <td>Shows the autocompletion list. If already showing
3895 tag completion, it shows document word completion
3896 instead, even if it is not enabled for automatic
3897 completion. Likewise if no tag suggestions are
3898 available, it shows document word completion.
</td>
3900 <tr><td>Show calltip
</td>
3901 <td>Ctrl-Shift-Space
</td>
3902 <td>Shows a calltip for the current function or
3905 <tr><td>Show macro list
</td>
3906 <td>Ctrl-Return
</td>
3907 <td>Shows a list of available macros and variables in
3910 <tr><td>Complete snippet
</td>
3912 <td>If you type a construct like if or for and press
3913 this key, it will be completed with a matching
3916 <tr><td>Suppress snippet completion
</td>
3918 <td>If you type a construct like if or for and press
3919 this key, it will not be completed, and a space or
3920 tab will be inserted, depending on what the
3921 construct completion keybinding is set to. For
3922 example, if you have set the construct completion
3923 keybinding to space, then setting this to
3924 Shift+space will prevent construct completion and
3925 insert a space.
</td>
3927 <tr><td>Context Action
</td>
3929 <td>Executes a command and passes the current word
3930 (near the cursor position) or selection as an
3931 argument. See the section called
<a class=
"reference internal" href=
"#context-actions">Context
3934 <tr><td>Move cursor in snippet
</td>
3936 <td>Jumps to the next defined cursor positions in a
3937 completed snippets if multiple cursor positions
3940 <tr><td>Word part completion
</td>
3942 <td>When the autocompletion list is visible, complete
3943 the currently selected item up to the next word
3946 <tr><td>Move line(s) up
</td>
3948 <td>Move the current line or selected lines up by
3951 <tr><td>Move line(s) down
</td>
3952 <td>Alt-PageDown
</td>
3953 <td>Move the current line or selected lines down by
3959 <div class=
"section" id=
"clipboard-keybindings">
3960 <h4><a class=
"toc-backref" href=
"#id166">Clipboard keybindings
</a></h4>
3961 <table border=
"1" class=
"docutils">
3967 <thead valign=
"bottom">
3968 <tr><th class=
"head">Action
</th>
3969 <th class=
"head">Default shortcut
</th>
3970 <th class=
"head">Description
</th>
3973 <tbody valign=
"top">
3976 <td>Cut the current selection to the clipboard.
</td>
3980 <td>Copy the current selection to the clipboard.
</td>
3984 <td>Paste the clipboard text into the current document.
</td>
3986 <tr><td>Cut current line(s)
</td>
3987 <td>Ctrl-Shift-X
</td>
3988 <td>Cuts the current line (and any lines with a
3989 selection) to the clipboard.
</td>
3991 <tr><td>Copy current line(s)
</td>
3992 <td>Ctrl-Shift-C
</td>
3993 <td>Copies the current line (and any lines with a
3994 selection) to the clipboard.
</td>
3999 <div class=
"section" id=
"select-keybindings">
4000 <h4><a class=
"toc-backref" href=
"#id167">Select keybindings
</a></h4>
4001 <table border=
"1" class=
"docutils">
4007 <thead valign=
"bottom">
4008 <tr><th class=
"head">Action
</th>
4009 <th class=
"head">Default shortcut
</th>
4010 <th class=
"head">Description
</th>
4013 <tbody valign=
"top">
4014 <tr><td>Select all
</td>
4016 <td>Makes a selection of all text in the current
4019 <tr><td>Select current word
</td>
4020 <td>Alt-Shift-W
</td>
4021 <td>Selects the current word under the cursor.
</td>
4023 <tr><td>Select current paragraph
</td>
4024 <td>Alt-Shift-P
</td>
4025 <td>Selects the current paragraph under the cursor
4026 which is defined by two empty lines around it.
</td>
4028 <tr><td>Select current line(s)
</td>
4029 <td>Alt-Shift-L
</td>
4030 <td>Selects the current line under the cursor (and any
4031 partially selected lines).
</td>
4033 <tr><td>Select to previous word part
</td>
4035 <td>(Extend) selection to previous word part boundary.
</td>
4037 <tr><td>Select to next word part
</td>
4039 <td>(Extend) selection to next word part boundary.
</td>
4044 <div class=
"section" id=
"insert-keybindings">
4045 <h4><a class=
"toc-backref" href=
"#id168">Insert keybindings
</a></h4>
4046 <table border=
"1" class=
"docutils">
4052 <thead valign=
"bottom">
4053 <tr><th class=
"head">Action
</th>
4054 <th class=
"head">Default shortcut
</th>
4055 <th class=
"head">Description
</th>
4058 <tbody valign=
"top">
4059 <tr><td>Insert date
</td>
4060 <td>Shift-Alt-D
</td>
4061 <td>Inserts a customisable date.
</td>
4063 <tr><td>Insert alternative whitespace
</td>
4065 <td>Inserts a tab character when spaces should
4066 be used for indentation and inserts space
4067 characters of the amount of a tab width when
4068 tabs should be used for indentation.
</td>
4070 <tr><td>Insert New Line Before Current
</td>
4072 <td>Inserts a new line with indentation.
</td>
4074 <tr><td>Insert New Line After Current
</td>
4076 <td>Inserts a new line with indentation.
</td>
4081 <div class=
"section" id=
"format-keybindings">
4082 <h4><a class=
"toc-backref" href=
"#id169">Format keybindings
</a></h4>
4083 <table border=
"1" class=
"docutils">
4089 <thead valign=
"bottom">
4090 <tr><th class=
"head">Action
</th>
4091 <th class=
"head">Default shortcut
</th>
4092 <th class=
"head">Description
</th>
4095 <tbody valign=
"top">
4096 <tr><td>Toggle case of selection
</td>
4098 <td>Changes the case of the selection. A lowercase
4099 selection will be changed into uppercase and vice
4100 versa. If the selection contains lower- and
4101 uppercase characters, all will be converted to
4104 <tr><td>Comment line
</td>
4106 <td>Comments current line or selection.
</td>
4108 <tr><td>Uncomment line
</td>
4110 <td>Uncomments current line or selection.
</td>
4112 <tr><td>Toggle line commentation
</td>
4114 <td>Comments a line if it is not commented or removes
4115 a comment if the line is commented.
</td>
4117 <tr><td>Increase indent
</td>
4119 <td>Indents the current line or selection by one tab
4120 or by spaces in the amount of the tab width
4123 <tr><td>Decrease indent
</td>
4125 <td>Removes one tab or the amount of spaces of
4126 the tab width setting from the indentation of the
4127 current line or selection.
</td>
4129 <tr><td>Increase indent by one space
</td>
4131 <td>Indents the current line or selection by one
4134 <tr><td>Decrease indent by one space
</td>
4136 <td>Deindents the current line or selection by one
4139 <tr><td>Smart line indent
</td>
4141 <td>Indents the current line or all selected lines
4142 with the same indentation as the previous line.
</td>
4144 <tr><td>Send to Custom Command
1 (
2,
3)
</td>
4145 <td>Ctrl-
1 (
2,
3)
</td>
4146 <td>Passes the current selection to a configured
4147 external command (available for the first
4148 three configured commands, see
4149 <a class=
"reference internal" href=
"#sending-text-through-custom-commands">Sending text through custom commands
</a> for
4152 <tr><td>Send Selection to Terminal
</td>
4154 <td>Sends the current selection or the current
4155 line (if there is no selection) to the
4156 embedded Terminal (VTE).
</td>
4158 <tr><td>Reflow lines/block
</td>
4160 <td>Reformat selected lines or current
4161 (indented) text block,
4162 breaking lines at the long line marker or the
4163 line breaking column if line breaking is
4164 enabled for the current document.
</td>
4169 <div class=
"section" id=
"settings-keybindings">
4170 <h4><a class=
"toc-backref" href=
"#id170">Settings keybindings
</a></h4>
4171 <table border=
"1" class=
"docutils">
4177 <thead valign=
"bottom">
4178 <tr><th class=
"head">Action
</th>
4179 <th class=
"head">Default shortcut
</th>
4180 <th class=
"head">Description
</th>
4183 <tbody valign=
"top">
4184 <tr><td>Preferences
</td>
4186 <td>Opens preferences dialog.
</td>
4188 <tr><td>Plugin Preferences
</td>
4190 <td>Opens plugin preferences dialog.
</td>
4195 <div class=
"section" id=
"search-keybindings">
4196 <h4><a class=
"toc-backref" href=
"#id171">Search keybindings
</a></h4>
4197 <table border=
"1" class=
"docutils">
4203 <thead valign=
"bottom">
4204 <tr><th class=
"head">Action
</th>
4205 <th class=
"head">Default shortcut
</th>
4206 <th class=
"head">Description
</th>
4209 <tbody valign=
"top">
4212 <td>Opens the Find dialog.
</td>
4214 <tr><td>Find Next
</td>
4216 <td>Finds next result.
</td>
4218 <tr><td>Find Previous
</td>
4219 <td>Ctrl-Shift-G
</td>
4220 <td>Finds previous result.
</td>
4222 <tr><td>Find Next Selection
</td>
4224 <td>Finds next occurence of selected text.
</td>
4226 <tr><td>Find Previous Selection
</td>
4228 <td>Finds previous occurence of selected text.
</td>
4230 <tr><td>Replace
</td>
4232 <td>Opens the Replace dialog.
</td>
4234 <tr><td>Find in files
</td>
4235 <td>Ctrl-Shift-F
</td>
4236 <td>Opens the Find in files dialog.
</td>
4238 <tr><td>Next message
</td>
4240 <td>Jumps to the line with the next message in
4241 the Messages window.
</td>
4243 <tr><td>Previous message
</td>
4245 <td>Jumps to the line with the previous message
4246 in the Messages window.
</td>
4248 <tr><td>Find Usage
</td>
4249 <td>Ctrl-Shift-E
</td>
4250 <td>Finds all occurrences of the current word (near
4251 the keyboard cursor) or selection in all open
4252 documents and displays them in the messages
4255 <tr><td>Find Document Usage
</td>
4256 <td>Ctrl-Shift-D
</td>
4257 <td>Finds all occurrences of the current word (near
4258 the keyboard cursor) or selection in the current
4259 document and displays them in the messages
4262 <tr><td>Mark All
</td>
4263 <td>Ctrl-Shift-M
</td>
4264 <td>Highlight all matches of the current
4265 word/selection in the current document
4266 with a colored box. If there's nothing to
4267 find, or the cursor is next to an existing match,
4268 the highlighted matches will be cleared.
</td>
4273 <div class=
"section" id=
"go-to-keybindings">
4274 <h4><a class=
"toc-backref" href=
"#id172">Go to keybindings
</a></h4>
4275 <table border=
"1" class=
"docutils">
4281 <thead valign=
"bottom">
4282 <tr><th class=
"head">Action
</th>
4283 <th class=
"head">Default shortcut
</th>
4284 <th class=
"head">Description
</th>
4287 <tbody valign=
"top">
4288 <tr><td>Navigate forward a location
</td>
4289 <td>Alt-Right (C)
</td>
4290 <td>Switches to the next location in the navigation
4291 history. See the section called
<a class=
"reference internal" href=
"#code-navigation-history">Code Navigation
4294 <tr><td>Navigate back a location
</td>
4295 <td>Alt-Left (C)
</td>
4296 <td>Switches to the previous location in the
4297 navigation history. See the section called
4298 <a class=
"reference internal" href=
"#code-navigation-history">Code navigation history
</a>.
</td>
4300 <tr><td>Go to line
</td>
4302 <td>Focuses the Go to Line entry (if visible) or
4303 shows the Go to line dialog.
</td>
4305 <tr><td>Goto matching brace
</td>
4307 <td>If the cursor is ahead or behind a brace, then it
4308 is moved to the brace which belongs to the current
4309 one. If this keyboard shortcut is pressed again,
4310 the cursor is moved back to the first brace.
</td>
4312 <tr><td>Toggle marker
</td>
4314 <td>Set a marker on the current line, or clear the
4315 marker if there already is one.
</td>
4317 <tr><td>Goto next marker
</td>
4319 <td>Goto the next marker in the current document.
</td>
4321 <tr><td>Goto previous marker
</td>
4323 <td>Goto the previous marker in the current document.
</td>
4325 <tr><td>Go to tag definition
</td>
4327 <td>Jump to the definition of the current word or
4328 selection. See
<a class=
"reference internal" href=
"#go-to-tag-definition">Go to tag definition
</a>.
</td>
4330 <tr><td>Go to tag declaration
</td>
4331 <td>Ctrl-Shift-T
</td>
4332 <td>Jump to the declaration of the current word or
4333 selection. See
<a class=
"reference internal" href=
"#go-to-tag-declaration">Go to tag declaration
</a>.
</td>
4335 <tr><td>Go to Start of Line
</td>
4337 <td>Move the caret to the start of the line.
4338 Behaves differently if
<a class=
"reference internal" href=
"#smart-home-key">smart_home_key
</a> is set.
</td>
4340 <tr><td>Go to End of Line
</td>
4342 <td>Move the caret to the end of the line.
</td>
4344 <tr><td>Go to Start of Display Line
</td>
4346 <td>Move the caret to the start of the display line.
4347 This is useful when you use line wrapping and
4348 want to jump to the start of the wrapped, virtual
4349 line, not the real start of the whole line.
4350 If the line is not wrapped, it behaves like
4351 <cite>Go to Start of Line
</cite>.
</td>
4353 <tr><td>Go to End of Display Line
</td>
4355 <td>Move the caret to the end of the display line.
4356 If the line is not wrapped, it behaves like
4357 <cite>Go to End of Line
</cite>.
</td>
4359 <tr><td>Go to Previous Word Part
</td>
4361 <td>Goto the previous part of the current word.
</td>
4363 <tr><td>Go to Next Word Part
</td>
4365 <td>Goto the next part of the current word.
</td>
4370 <div class=
"section" id=
"view-keybindings">
4371 <h4><a class=
"toc-backref" href=
"#id173">View keybindings
</a></h4>
4372 <table border=
"1" class=
"docutils">
4378 <thead valign=
"bottom">
4379 <tr><th class=
"head">Action
</th>
4380 <th class=
"head">Default shortcut
</th>
4381 <th class=
"head">Description
</th>
4384 <tbody valign=
"top">
4385 <tr><td>Fullscreen
</td>
4387 <td>Switches to fullscreen mode.
</td>
4389 <tr><td>Toggle Messages Window
</td>
4391 <td>Toggles the message window (status and compiler
4392 messages) on and off.
</td>
4394 <tr><td>Toggle Sidebar
</td>
4396 <td>Shows or hides the sidebar.
</td>
4398 <tr><td>Toggle all additional widgets
</td>
4400 <td>Hide and show all additional widgets like the
4401 notebook tabs, the toolbar, the messages window
4402 and the status bar.
</td>
4404 <tr><td>Zoom In
</td>
4406 <td>Zooms in the text.
</td>
4408 <tr><td>Zoom Out
</td>
4410 <td>Zooms out the text.
</td>
4412 <tr><td>Zoom Reset
</td>
4414 <td>Reset any previous zoom on the text.
</td>
4419 <div class=
"section" id=
"focus-keybindings">
4420 <h4><a class=
"toc-backref" href=
"#id174">Focus keybindings
</a></h4>
4421 <table border=
"1" class=
"docutils">
4427 <thead valign=
"bottom">
4428 <tr><th class=
"head">Action
</th>
4429 <th class=
"head">Default shortcut
</th>
4430 <th class=
"head">Description
</th>
4433 <tbody valign=
"top">
4434 <tr><td>Switch to Editor
</td>
4436 <td>Switches to editor widget.
4437 Also reshows the document statistics line
4438 (after a short timeout).
</td>
4440 <tr><td>Switch to Search Bar
</td>
4442 <td>Switches to the search bar in the toolbar (if
4445 <tr><td>Switch to Message Window
</td>
4447 <td>Focus the Message Window's current tab.
</td>
4449 <tr><td>Switch to Compiler
</td>
4451 <td>Focus the Compiler message window tab.
</td>
4453 <tr><td>Switch to Messages
</td>
4455 <td>Focus the Messages message window tab.
</td>
4457 <tr><td>Switch to Scribble
</td>
4459 <td>Switches to scribble widget.
</td>
4461 <tr><td>Switch to VTE
</td>
4463 <td>Switches to VTE widget.
</td>
4465 <tr><td>Switch to Sidebar
</td>
4467 <td>Focus the Sidebar.
</td>
4469 <tr><td>Switch to Sidebar Symbol List
</td>
4471 <td>Focus the Symbol list tab in the Sidebar
4474 <tr><td>Switch to Sidebar Document List
</td>
4476 <td>Focus the Document list tab in the Sidebar
4482 <div class=
"section" id=
"notebook-tab-keybindings">
4483 <h4><a class=
"toc-backref" href=
"#id175">Notebook tab keybindings
</a></h4>
4484 <table border=
"1" class=
"docutils">
4490 <thead valign=
"bottom">
4491 <tr><th class=
"head">Action
</th>
4492 <th class=
"head">Default shortcut
</th>
4493 <th class=
"head">Description
</th>
4496 <tbody valign=
"top">
4497 <tr><td>Switch to left document
</td>
4498 <td>Ctrl-PageUp (C)
</td>
4499 <td>Switches to the previous open document.
</td>
4501 <tr><td>Switch to right document
</td>
4502 <td>Ctrl-PageDown (C)
</td>
4503 <td>Switches to the next open document.
</td>
4505 <tr><td>Switch to last used document
</td>
4507 <td>Switches to the previously shown document (if it's
4509 Holding Ctrl (or another modifier if the keybinding
4510 has been changed) will show a dialog, then repeated
4511 presses of the keybinding will switch to the
2nd-last
4512 used document,
3rd-last, etc. Also known as
4513 Most-Recently-Used documents switching.
</td>
4515 <tr><td>Move document left
</td>
4516 <td>Ctrl-Shift-PageUp
</td>
4517 <td>Changes the current document with the left hand
4520 <tr><td>Move document right
</td>
4521 <td>Ctrl-Shift-PageDown
</td>
4522 <td>Changes the current document with the right hand
4525 <tr><td>Move document first
</td>
4527 <td>Moves the current document to the first position.
</td>
4529 <tr><td>Move document last
</td>
4531 <td>Moves the current document to the last position.
</td>
4536 <div class=
"section" id=
"document-keybindings">
4537 <h4><a class=
"toc-backref" href=
"#id176">Document keybindings
</a></h4>
4538 <table border=
"1" class=
"docutils">
4544 <thead valign=
"bottom">
4545 <tr><th class=
"head">Action
</th>
4546 <th class=
"head">Default shortcut
</th>
4547 <th class=
"head">Description
</th>
4550 <tbody valign=
"top">
4553 <td>See
<a class=
"reference internal" href=
"#cloning-documents">Cloning documents
</a>.
</td>
4555 <tr><td>Replace tabs by space
</td>
4557 <td>Replaces all tabs with the right amount of spaces.
</td>
4559 <tr><td>Replace spaces by tabs
</td>
4561 <td>Replaces leading spaces with tab characters.
</td>
4563 <tr><td>Toggle current fold
</td>
4565 <td>Toggles the folding state of the current code block.
</td>
4567 <tr><td>Fold all
</td>
4569 <td>Folds all contractible code blocks.
</td>
4571 <tr><td>Unfold all
</td>
4573 <td>Unfolds all contracted code blocks.
</td>
4575 <tr><td>Reload symbol list
</td>
4576 <td>Ctrl-Shift-R
</td>
4577 <td>Reloads the tag/symbol list.
</td>
4579 <tr><td>Toggle Line wrapping
</td>
4581 <td>Enables or disables wrapping of long lines.
</td>
4583 <tr><td>Toggle Line breaking
</td>
4585 <td>Enables or disables automatic breaking of long
4586 lines at a configurable column.
</td>
4588 <tr><td>Remove Markers
</td>
4590 <td>Remove any markers on lines or words which
4591 were set by using 'Mark All' in the
4592 search dialog or by manually marking lines.
</td>
4594 <tr><td>Remove Error Indicators
</td>
4596 <td>Remove any error indicators in the
4597 current document.
</td>
4599 <tr><td>Remove Markers and Error Indicators
</td>
4601 <td>Combines
<tt class=
"docutils literal">Remove Markers
</tt> and
4602 <tt class=
"docutils literal">Remove Error Indicators
</tt>.
</td>
4607 <div class=
"section" id=
"project-keybindings">
4608 <h4><a class=
"toc-backref" href=
"#id177">Project keybindings
</a></h4>
4609 <table border=
"1" class=
"docutils">
4615 <thead valign=
"bottom">
4616 <tr><th class=
"head">Action
</th>
4617 <th class=
"head">Default shortcut
</th>
4618 <th class=
"head">Description
</th>
4621 <tbody valign=
"top">
4624 <td>Create a new project.
</td>
4628 <td>Opens a project file.
</td>
4630 <tr><td>Properties
</td>
4632 <td>Shows project properties.
</td>
4636 <td>Close the current project.
</td>
4641 <div class=
"section" id=
"build-keybindings">
4642 <h4><a class=
"toc-backref" href=
"#id178">Build keybindings
</a></h4>
4643 <table border=
"1" class=
"docutils">
4649 <thead valign=
"bottom">
4650 <tr><th class=
"head">Action
</th>
4651 <th class=
"head">Default shortcut
</th>
4652 <th class=
"head">Description
</th>
4655 <tbody valign=
"top">
4656 <tr><td>Compile
</td>
4658 <td>Compiles the current file.
</td>
4662 <td>Builds (compiles if necessary and links) the
4665 <tr><td>Make all
</td>
4667 <td>Builds the current file with the Make tool.
</td>
4669 <tr><td>Make custom target
</td>
4670 <td>Ctrl-Shift-F9
</td>
4671 <td>Builds the current file with the Make tool and a
4674 <tr><td>Make object
</td>
4676 <td>Compiles the current file with the Make tool.
</td>
4678 <tr><td>Next error
</td>
4680 <td>Jumps to the line with the next error from the
4681 last build process.
</td>
4683 <tr><td>Previous error
</td>
4685 <td>Jumps to the line with the previous error from
4686 the last build process.
</td>
4690 <td>Executes the current file in a terminal emulation.
</td>
4692 <tr><td>Set Build Commands
</td>
4694 <td>Opens the build commands dialog.
</td>
4699 <div class=
"section" id=
"tools-keybindings">
4700 <h4><a class=
"toc-backref" href=
"#id179">Tools keybindings
</a></h4>
4701 <table border=
"1" class=
"docutils">
4707 <thead valign=
"bottom">
4708 <tr><th class=
"head">Action
</th>
4709 <th class=
"head">Default shortcut
</th>
4710 <th class=
"head">Description
</th>
4713 <tbody valign=
"top">
4714 <tr><td>Show Color Chooser
</td>
4716 <td>Opens the Color Chooser dialog.
</td>
4721 <div class=
"section" id=
"help-keybindings">
4722 <h4><a class=
"toc-backref" href=
"#id180">Help keybindings
</a></h4>
4723 <table border=
"1" class=
"docutils">
4729 <thead valign=
"bottom">
4730 <tr><th class=
"head">Action
</th>
4731 <th class=
"head">Default shortcut
</th>
4732 <th class=
"head">Description
</th>
4735 <tbody valign=
"top">
4738 <td>Opens the manual.
</td>
4746 <div class=
"section" id=
"configuration-files">
4747 <h1><a class=
"toc-backref" href=
"#id181">Configuration files
</a></h1>
4748 <div class=
"warning">
4749 <p class=
"first admonition-title">Warning
</p>
4750 <p class=
"last">You must use UTF-
8 encoding
<em>without BOM
</em> for configuration files.
</p>
4752 <div class=
"section" id=
"configuration-file-paths">
4753 <h2><a class=
"toc-backref" href=
"#id182">Configuration file paths
</a></h2>
4754 <p>Geany has default configuration files installed for the system and
4755 also per-user configuration files.
</p>
4756 <p>The system files should not normally be edited because they will be
4757 overwritten when upgrading Geany.
</p>
4758 <p>The user configuration directory can be overridden with the
<tt class=
"docutils literal"><span class=
"pre">-c
</span></tt>
4759 switch, but this is not normally done. See
<a class=
"reference internal" href=
"#command-line-options">Command line options
</a>.
</p>
4761 <p class=
"first admonition-title">Note
</p>
4762 <p class=
"last">Any missing subdirectories in the user configuration directory
4763 will be created when Geany starts.
</p>
4765 <p>You can check the paths Geany is using with
<em>Help-
>Debug Messages
</em>.
4766 Near the top there should be
2 lines with something like:
</p>
4767 <pre class=
"literal-block">
4768 Geany-INFO: System data dir: /usr/share/geany
4769 Geany-INFO: User config dir: /home/username/.config/geany
4771 <div class=
"section" id=
"paths-on-unix-like-systems">
4772 <h3><a class=
"toc-backref" href=
"#id183">Paths on Unix-like systems
</a></h3>
4773 <p>The system path is
<tt class=
"docutils literal">$prefix/share/geany
</tt>, where
<tt class=
"docutils literal">$prefix
</tt> is the
4774 path where Geany is installed (see
<a class=
"reference internal" href=
"#installation-prefix">Installation prefix
</a>).
</p>
4775 <p>The user configuration directory is normally:
4776 <tt class=
"docutils literal"><span class=
"pre">/home/username/.config/geany
</span></tt></p>
4778 <div class=
"section" id=
"paths-on-windows">
4779 <h3><a class=
"toc-backref" href=
"#id184">Paths on Windows
</a></h3>
4780 <p>The system path is the
<tt class=
"docutils literal">data
</tt> subfolder of the installation path
4782 <p>The user configuration directory might vary, but on Windows XP it's:
4783 <tt class=
"docutils literal"><span class=
"pre">C:\Documents
</span> and Settings\UserName\Application Data\geany
</tt>
4784 On Windows
7 and above you most likely will find it at:
4785 <tt class=
"docutils literal"><span class=
"pre">C:\users\UserName\Roaming\geany
</span></tt></p>
4788 <div class=
"section" id=
"tools-menu-items">
4789 <h2><a class=
"toc-backref" href=
"#id185">Tools menu items
</a></h2>
4790 <p>There's a
<em>Configuration files
</em> submenu in the
<em>Tools
</em> menu that
4791 contains items for some of the available user configuration files.
4792 Clicking on one opens it in the editor for you to update. Geany will
4793 reload the file after you have saved it.
</p>
4795 <p class=
"first admonition-title">Note
</p>
4796 <p class=
"last">Other configuration files not shown here will need to be opened
4797 manually, and will not be automatically reloaded when saved.
4798 (see
<em>Reload Configuration
</em> below).
</p>
4800 <p>There's also a
<em>Reload Configuration
</em> item which can be used if you
4801 updated one of the other configuration files, or modified or added
4803 <p><em>Reload Configuration
</em> is also necessary to update syntax highlighting colors.
</p>
4805 <p class=
"first admonition-title">Note
</p>
4806 <p class=
"last">Syntax highlighting colors aren't updated in open documents after
4807 saving filetypes.common as this may take a significant
4811 <div class=
"section" id=
"global-configuration-file">
4812 <h2><a class=
"toc-backref" href=
"#id186">Global configuration file
</a></h2>
4813 <p>System administrators can add a global configuration file for Geany
4814 which will be used when starting Geany and a user configuration file
4816 <p>The global configuration file is read from
<tt class=
"docutils literal">geany.conf
</tt> in the
4817 system configuration path - see
<a class=
"reference internal" href=
"#configuration-file-paths">Configuration file paths
</a>. It can
4818 contain any settings which are found in the usual configuration file
4819 created by Geany, but does not have to contain all settings.
</p>
4821 <p class=
"first admonition-title">Note
</p>
4822 <p class=
"last">This feature is mainly intended for package maintainers or system
4823 admins who want to set up Geany in a multi user environment and
4824 set some sane default values for this environment. Usually users won't
4825 need to do that.
</p>
4828 <div class=
"section" id=
"filetype-definition-files">
4829 <h2><a class=
"toc-backref" href=
"#id187">Filetype definition files
</a></h2>
4830 <p>All color definitions and other filetype specific settings are
4831 stored in the filetype definition files. Those settings are colors
4832 for syntax highlighting, general settings like comment characters or
4833 word delimiter characters as well as compiler and linker settings.
</p>
4834 <p>See also
<a class=
"reference internal" href=
"#configuration-file-paths">Configuration file paths
</a>.
</p>
4835 <div class=
"section" id=
"filenames">
4836 <h3><a class=
"toc-backref" href=
"#id188">Filenames
</a></h3>
4837 <p>Each filetype has a corresponding filetype definition file. The format
4838 for built-in filetype
<cite>Foo
</cite> is:
</p>
4839 <pre class=
"literal-block">
4842 <p>The extension is normally just the filetype name in lower case.
</p>
4843 <p>However there are some exceptions:
</p>
4844 <table border=
"1" class=
"docutils">
4849 <thead valign=
"bottom">
4850 <tr><th class=
"head">Filetype
</th>
4851 <th class=
"head">Extension
</th>
4854 <tbody valign=
"top">
4864 <tr><td>Matlab/Octave
</td>
4869 <p>There is also the
<a class=
"reference internal" href=
"#special-file-filetypes-common">special file filetypes.common
</a>.
</p>
4870 <p>For
<a class=
"reference internal" href=
"#custom-filetypes">custom filetypes
</a>, the filename for
<cite>Foo
</cite> is different:
</p>
4871 <pre class=
"literal-block">
4874 <p>See the link for details.
</p>
4876 <div class=
"section" id=
"system-files">
4877 <h3><a class=
"toc-backref" href=
"#id189">System files
</a></h3>
4878 <p>The system-wide filetype configuration files can be found in the
4879 system configuration path and are called
<tt class=
"docutils literal"><span class=
"pre">filetypes.$ext
</span></tt>,
4880 where $ext is the name of the filetype. For every
4881 filetype there is a corresponding definition file. There is one
4882 exception:
<tt class=
"docutils literal">filetypes.common
</tt> -- this file is for general settings,
4883 which are not specific to a certain filetype.
</p>
4884 <div class=
"warning">
4885 <p class=
"first admonition-title">Warning
</p>
4886 <p class=
"last">It is not recommended that users edit the system-wide files,
4887 because they will be overridden when Geany is updated.
</p>
4890 <div class=
"section" id=
"user-files">
4891 <h3><a class=
"toc-backref" href=
"#id190">User files
</a></h3>
4892 <p>To change the settings, copy a file from the system configuration
4893 path to the subdirectory
<tt class=
"docutils literal">filedefs
</tt> in your user configuration
4894 directory. Then you can edit the file and the changes will still be
4895 available after an update of Geany.
</p>
4896 <p>Alternatively, you can create the file yourself and add only the
4897 settings you want to change. All missing settings will be read from
4898 the corresponding system configuration file.
</p>
4900 <div class=
"section" id=
"custom-filetypes">
4901 <h3><a class=
"toc-backref" href=
"#id191">Custom filetypes
</a></h3>
4902 <p>At startup Geany looks for
<tt class=
"docutils literal"><span class=
"pre">filetypes.*.conf
</span></tt> files in the system and
4903 user filetype paths, adding any filetypes found with the name matching
4904 the '
<tt class=
"docutils literal">*
</tt>' wildcard - e.g.
<tt class=
"docutils literal">filetypes.Bar.conf
</tt>.
</p>
4905 <p>Custom filetypes are not as powerful as built-in filetypes, but
4906 support for the following has been implemented:
</p>
4908 <li><p class=
"first">Recognizing and setting the filetype (after the user has manually updated
4909 the
<a class=
"reference internal" href=
"#filetype-extensions">filetype extensions
</a> file).
</p>
4911 <li><p class=
"first"><a class=
"reference internal" href=
"#filetype-group-membership">Filetype group membership
</a>.
</p>
4913 <li><dl class=
"first docutils">
4914 <dt>Reading filetype settings in the
<tt class=
"docutils literal">[settings]
</tt> section, including:
</dt>
4915 <dd><ul class=
"first last simple">
4916 <li>Using an existing syntax highlighting lexer (
<a class=
"reference internal" href=
"#lexer-filetype">lexer_filetype
</a> key).
</li>
4917 <li>Using an existing tag parser (
<a class=
"reference internal" href=
"#tag-parser">tag_parser
</a> key).
</li>
4922 <li><p class=
"first">Build commands (
<tt class=
"docutils literal"><span class=
"pre">[build-menu]
</span></tt> section).
</p>
4924 <li><p class=
"first">Loading global tags files (sharing the
<tt class=
"docutils literal">tag_parser
</tt> filetype's namespace).
</p>
4927 <p>See
<a class=
"reference internal" href=
"#filetype-configuration">Filetype configuration
</a> for details on each setting.
</p>
4928 <div class=
"section" id=
"creating-a-custom-filetype-from-an-existing-filetype">
4929 <h4><a class=
"toc-backref" href=
"#id192">Creating a custom filetype from an existing filetype
</a></h4>
4930 <p>Because most filetype settings will relate to the syntax
4931 highlighting (e.g. styling, keywords,
<tt class=
"docutils literal">lexer_properties
</tt>
4932 sections), it is best to copy an existing filetype file that uses
4933 the lexer you wish to use as the basis of a custom filetype, using
4934 the correct filename extension format shown above, e.g.:
</p>
4935 <pre class=
"literal-block">
4936 cp filetypes.foo filetypes.Bar.conf
4938 <p>Then add the
<tt class=
"docutils literal">lexer_filetype=Foo
</tt> setting (if not already present)
4939 and add/adjust other settings.
</p>
4940 <div class=
"warning">
4941 <p class=
"first admonition-title">Warning
</p>
4942 <p class=
"last">The
<tt class=
"docutils literal">[styling]
</tt> and
<tt class=
"docutils literal">[keywords]
</tt> sections have key names
4943 specific to each filetype/lexer. You must follow the same
4944 names - in particular, some lexers only support one keyword
4949 <div class=
"section" id=
"filetype-configuration">
4950 <h3><a class=
"toc-backref" href=
"#id193">Filetype configuration
</a></h3>
4951 <p>As well as the sections listed below, each filetype file can contain
4952 a [build-menu] section as described in
<a class=
"reference internal" href=
"#build-menu-section">[build-menu] section
</a>.
</p>
4953 <div class=
"section" id=
"styling-section">
4954 <h4><a class=
"toc-backref" href=
"#id194">[styling] section
</a></h4>
4955 <p>In this section the colors for syntax highlighting are defined. The
4956 manual format is:
</p>
4958 <li><tt class=
"docutils literal">key=foreground_color;background_color;bold_flag;italic_flag
</tt></li>
4960 <p>Colors have to be specified as RGB hex values prefixed by
4961 0x or # similar to HTML/CSS hex triplets. For example, all of the following
4962 are valid values for pure red;
0xff0000,
0xf00, #ff0000, or #f00. The
4963 values are case-insensitive but it is a good idea to use lower-case.
4964 Note that you can also use
<em>named colors
</em> as well by substituting the
4965 color value with the name of a color as defined in the
<tt class=
"docutils literal">[named_colors]
</tt>
4966 section, see the
<a class=
"reference internal" href=
"#named-colors-section">[named_colors] Section
</a> for more information.
</p>
4967 <p>Bold and italic are flags and should only be
"true
" or
"false
". If their
4968 value is something other than
"true
" or
"false
",
"false
" is assumed.
</p>
4969 <p>You can omit fields to use the values from the style named
<tt class=
"docutils literal">"default
"</tt>.
</p>
4970 <p>E.g.
<tt class=
"docutils literal"><span class=
"pre">key=
0xff0000;;true
</span></tt></p>
4971 <p>This makes the key style have red foreground text, default background
4972 color text and bold emphasis.
</p>
4973 <div class=
"section" id=
"using-a-named-style">
4974 <h5><a class=
"toc-backref" href=
"#id195">Using a named style
</a></h5>
4975 <p>The second format uses a
<em>named style
</em> name to reference a style
4976 defined in filetypes.common.
</p>
4978 <li><tt class=
"docutils literal">key=named_style
</tt></li>
4979 <li><tt class=
"docutils literal">key2=named_style2,bold,italic
</tt></li>
4981 <p>The bold and italic parts are optional, and if present are used to
4982 toggle the bold or italic flags to the opposite of the named style's
4983 flags. In contrast to style definition booleans, they are a literal
4984 ",bold,italic
" and commas are used instead of semi-colons.
</p>
4985 <p>E.g.
<tt class=
"docutils literal">key=comment,italic
</tt></p>
4986 <p>This makes the key style match the
<tt class=
"docutils literal">"comment
"</tt> named style, but with
4987 italic emphasis.
</p>
4988 <p>To define named styles, see the filetypes.common
<a class=
"reference internal" href=
"#named-styles-section">[named_styles]
4991 <div class=
"section" id=
"reading-styles-from-another-filetype">
4992 <h5><a class=
"toc-backref" href=
"#id196">Reading styles from another filetype
</a></h5>
4993 <p>You can automatically copy all of the styles from another filetype
4994 definition file by using the following syntax for the
<tt class=
"docutils literal">[styling]
</tt>
4996 <pre class=
"literal-block">
4999 <p>Where Foo is a filetype name. The corresponding
<tt class=
"docutils literal">[styling]
</tt>
5000 section from
<tt class=
"docutils literal">filetypes.foo
</tt> will be read.
</p>
5001 <p>This is useful when the same lexer is being used for multiple
5002 filetypes (e.g. C/C++/C#/Java/etc). For example, to make the C++
5003 styling the same as the C styling, you would put the following in
5004 <tt class=
"docutils literal">filetypes.cpp
</tt>:
</p>
5005 <pre class=
"literal-block">
5010 <div class=
"section" id=
"keywords-section">
5011 <h4><a class=
"toc-backref" href=
"#id197">[keywords] section
</a></h4>
5012 <p>This section contains keys for different keyword lists specific to
5013 the filetype. Some filetypes do not support keywords, so adding a
5014 new key will not work. You can only add or remove keywords to/from
5015 an existing list.
</p>
5016 <div class=
"important">
5017 <p class=
"first admonition-title">Important
</p>
5018 <p class=
"last">The keywords list must be in one line without line ending characters.
</p>
5021 <div class=
"section" id=
"lexer-properties-section">
5022 <h4><a class=
"toc-backref" href=
"#id198">[lexer_properties] section
</a></h4>
5023 <p>Here any special properties for the Scintilla lexer can be set in the
5024 format
<tt class=
"docutils literal">key.name.field=some.value
</tt>.
</p>
5025 <p>Properties Geany uses are listed in the system filetype files. To find
5026 other properties you need Geany's source code:
</p>
5027 <pre class=
"literal-block">
5028 egrep -o 'GetProperty\w*\(
"([^
"]+)
"[^)]+\)' scintilla/Lex*.cxx
5031 <div class=
"section" id=
"settings-section">
5032 <h4><a class=
"toc-backref" href=
"#id199">[settings] section
</a></h4>
5033 <dl class=
"docutils">
5035 <dd><p class=
"first">This is the default file extension used when saving files, not
5036 including the period character (
<tt class=
"docutils literal">.
</tt>). The extension used should
5037 match one of the patterns associated with that filetype (see
5038 <a class=
"reference internal" href=
"#filetype-extensions">Filetype extensions
</a>).
</p>
5039 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal">extension=cxx
</tt></p>
5042 <dd><p class=
"first">These characters define word boundaries when making selections
5043 and searching using word matching options.
</p>
5044 <p><em>Example:
</em> (look at system filetypes.* files)
</p>
5045 <div class=
"note last">
5046 <p class=
"first admonition-title">Note
</p>
5047 <p class=
"last">This overrides the
<em>whitespace_chars
</em> filetypes.common setting.
</p>
5050 <dt>comment_single
</dt>
5051 <dd><p class=
"first">A character or string which is used to comment code. If you want to use
5052 multiline comments only, don't set this but rather comment_open and
5054 <p>Single-line comments are used in priority over multiline comments to
5055 comment a line, e.g. with the
<cite>Comment/Uncomment line
</cite> command.
</p>
5056 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal"><span class=
"pre">comment_single=//
</span></tt></p>
5058 <dt>comment_open
</dt>
5059 <dd><p class=
"first">A character or string which is used to comment code. You need to also
5060 set comment_close to really use multiline comments. If you want to use
5061 single-line comments, prefer setting comment_single.
</p>
5062 <p>Multiline comments are used in priority over single-line comments to
5063 comment a block, e.g. template comments.
</p>
5064 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal"><span class=
"pre">comment_open=/*
</span></tt></p>
5066 <dt>comment_close
</dt>
5067 <dd><p class=
"first">If multiline comments are used, this is the character or string to
5068 close the comment.
</p>
5069 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal"><span class=
"pre">comment_close=*/
</span></tt></p>
5071 <dt>comment_use_indent
</dt>
5072 <dd><p class=
"first">Set this to false if a comment character or string should start at
5073 column
0 of a line. If set to true it uses any indentation of the
5075 <p>Note: Comment indentation
</p>
5076 <p><tt class=
"docutils literal">comment_use_indent=true
</tt> would generate this if a line is
5077 commented (e.g. with Ctrl-D):
</p>
5078 <pre class=
"literal-block">
5081 <p><tt class=
"docutils literal">comment_use_indent=false
</tt> would generate this if a line is
5082 commented (e.g. with Ctrl-D):
</p>
5083 <pre class=
"literal-block">
5084 # command_example();
5086 <p>Note: This setting only works for single line comments (like '//',
5088 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal">comment_use_indent=true
</tt></p>
5090 <dt>context_action_cmd
</dt>
5091 <dd><p class=
"first">A command which can be executed on the current word or the current
5093 <p>Example usage: Open the API documentation for the
5094 current function call at the cursor position.
</p>
5096 be set for every filetype or if not set, a global command will
5097 be used. The command itself can be specified without the full
5098 path, then it is searched in $PATH. But for security reasons,
5099 it is recommended to specify the full path to the command. The
5100 wildcard %s will be replaced by the current word at the cursor
5101 position or by the current selection.
</p>
5102 <p>Hint: for PHP files the following could be quite useful:
5103 context_action_cmd=firefox
"<a class=
"reference external" href=
"http://www.php.net/%s">http://www.php.net/%s
</a>"</p>
5104 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal">context_action_cmd=devhelp
<span class=
"pre">-s
</span> "%s
"</tt></p>
5107 <dl class=
"docutils" id=
"tag-parser">
5109 <dd>The TagManager language name, e.g.
"C
". Usually the same as the
5112 <dl class=
"docutils" id=
"lexer-filetype">
5113 <dt>lexer_filetype
</dt>
5114 <dd><p class=
"first">A filetype name to setup syntax highlighting from another filetype.
5115 This must not be recursive, i.e. it should be a filetype name that
5116 doesn't use the
<em>lexer_filetype
</em> key itself, e.g.:
</p>
5117 <pre class=
"literal-block">
5121 <p class=
"last">The second line is wrong, because
<tt class=
"docutils literal">filetypes.cpp
</tt> itself uses
5122 <tt class=
"docutils literal">lexer_filetype=C
</tt>, which would be recursive.
</p>
5124 <dt>symbol_list_sort_mode
</dt>
5125 <dd><p class=
"first">What the default symbol list sort order should be.
</p>
5126 <table border=
"1" class=
"last docutils">
5131 <thead valign=
"bottom">
5132 <tr><th class=
"head">Value
</th>
5133 <th class=
"head">Meaning
</th>
5136 <tbody valign=
"top">
5138 <td>Sort tags by name
</td>
5141 <td>Sort tags by appearance (line number)
</td>
5147 <dl class=
"docutils" id=
"xml-indent-tags">
5148 <dt>xml_indent_tags
</dt>
5149 <dd>If this setting is set to
<em>true
</em>, a new line after a line ending with an
5150 unclosed XML/HTML tag will be automatically indented. This only applies
5151 to filetypes for which the HTML or XML lexer is used. Such filetypes have
5152 this setting in their system configuration files.
</dd>
5155 <div class=
"section" id=
"indentation-section">
5156 <h4><a class=
"toc-backref" href=
"#id200">[indentation] section
</a></h4>
5157 <p>This section allows definition of default indentation settings specific to
5158 the file type, overriding the ones configured in the preferences. This can
5159 be useful for file types requiring specific indentation settings (e.g. tabs
5160 only for Makefile). These settings don't override auto-detection if activated.
</p>
5161 <dl class=
"docutils">
5163 <dd>The forced indentation width.
</dd>
5165 <dd><p class=
"first">The forced indentation type.
</p>
5166 <table border=
"1" class=
"last docutils">
5171 <thead valign=
"bottom">
5172 <tr><th class=
"head">Value
</th>
5173 <th class=
"head">Indentation type
</th>
5176 <tbody valign=
"top">
5178 <td>Spaces only
</td>
5184 <td>Mixed (tabs and spaces)
</td>
5191 <div class=
"section" id=
"build-settings-section">
5192 <h4><a class=
"toc-backref" href=
"#id201">[build_settings] section
</a></h4>
5193 <p>As of Geany
0.19 this section is supplemented by the
<a class=
"reference internal" href=
"#build-menu-section">[build-menu] section
</a>.
5194 Values that are set in the [build-menu] section will override those in this section.
</p>
5195 <dl class=
"docutils">
5196 <dt>error_regex
</dt>
5197 <dd><p class=
"first">This is a regular expression to parse a filename
5198 and line number from build output. If undefined, Geany will fall
5199 back to its default error message parsing.
</p>
5200 <p>Only the first two matches will be read by Geany. Geany will look for
5201 a match that is purely digits, and use this for the line number. The
5202 remaining match will be used as the filename.
</p>
5203 <p><em>Example:
</em> <tt class=
"docutils literal"><span class=
"pre">error_regex=(.+):([
0-
9]+):[
0-
9]+
</span></tt></p>
5204 <p class=
"last">This will parse a message such as:
5205 <tt class=
"docutils literal">test.py:
7:
24: E202 whitespace before ']'
</tt></p>
5208 <p><strong>Build commands
</strong></p>
5209 <p>If any build menu item settings have been configured in the Build Menu Commands
5210 dialog or the Build tab of the project preferences dialog then these
5211 settings are stored in the [build-menu] section and override the settings in
5212 this section for that item.
</p>
5213 <dl class=
"docutils">
5215 <dd><p class=
"first">This item specifies the command to compile source code files. But
5216 it is also possible to use it with interpreted languages like Perl
5217 or Python. With these filetypes you can use this option as a kind of
5218 syntax parser, which sends output to the compiler message window.
</p>
5219 <p>You should quote the filename to also support filenames with
5220 spaces. The following wildcards for filenames are available:
</p>
5222 <li>%f -- complete filename without path
</li>
5223 <li>%e -- filename without path and without extension
</li>
5225 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal">compiler=gcc
<span class=
"pre">-Wall
</span> <span class=
"pre">-c
</span> "%f
"</tt></p>
5228 <dd><p class=
"first">This item specifies the command to link the file. If the file is not
5229 already compiled, it will be compiled while linking. The -o option
5230 is automatically added by Geany. This item works well with GNU gcc,
5231 but may be problematic with other compilers (esp. with the linker).
</p>
5232 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal">linker=gcc
<span class=
"pre">-Wall
</span> "%f
"</tt></p>
5235 <dd><p class=
"first">Use this item to execute your file. It has to have been built
5236 already. Use the %e wildcard to have only the name of the executable
5237 (i.e. without extension) or use the %f wildcard if you need the
5238 complete filename, e.g. for shell scripts.
</p>
5239 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal"><span class=
"pre">run_cmd=
"./%e
"</span></tt></p>
5244 <div class=
"section" id=
"special-file-filetypes-common">
5245 <h3><a class=
"toc-backref" href=
"#id202">Special file filetypes.common
</a></h3>
5246 <p>There is a special filetype definition file called
5247 filetypes.common. This file defines some general non-filetype-specific
5249 <p>You can open the user filetypes.common with the
5250 <em>Tools-
>Configuration Files-
>filetypes.common
</em> menu item. This adds
5251 the default settings to the user file if the file doesn't exist.
5252 Alternatively the file can be created manually, adding only the
5253 settings you want to change. All missing settings will be read from
5254 the system file.
</p>
5256 <p class=
"first admonition-title">Note
</p>
5257 <p class=
"last">See the
<a class=
"reference internal" href=
"#filetype-configuration">Filetype configuration
</a> section for how to define styles.
</p>
5259 <div class=
"section" id=
"named-styles-section">
5260 <h4><a class=
"toc-backref" href=
"#id203">[named_styles] section
</a></h4>
5261 <p>Named styles declared here can be used in the [styling] section of any
5262 filetypes.* file.
</p>
5264 <p><em>In filetypes.common
</em>:
</p>
5265 <pre class=
"literal-block">
5267 foo=
0xc00000;
0xffffff;false;true
5270 <p><em>In filetypes.c
</em>:
</p>
5271 <pre class=
"literal-block">
5275 <p>This saves copying and pasting the whole style definition into several
5276 different files.
</p>
5278 <p class=
"first admonition-title">Note
</p>
5279 <p class=
"last">You can define aliases for named styles, as shown with the
<tt class=
"docutils literal">bar
</tt>
5280 entry in the above example, but they must be declared after the
5284 <div class=
"section" id=
"named-colors-section">
5285 <h4><a class=
"toc-backref" href=
"#id204">[named_colors] section
</a></h4>
5286 <p>Named colors declared here can be used in the
<tt class=
"docutils literal">[styling]
</tt> or
5287 <tt class=
"docutils literal">[named_styles]
</tt> section of any filetypes.* file or color scheme.
</p>
5289 <pre class=
"literal-block">
5291 my_red_color=#FF0000
5292 my_blue_color=#
0000FF
5295 foo=my_red_color;my_blue_color;false;true
5297 <p>This allows to define a color pallete by name so that to change a color
5298 scheme-wide only involves changing the hex value in a single location.
</p>
5300 <div class=
"section" id=
"id4">
5301 <h4><a class=
"toc-backref" href=
"#id205">[styling] section
</a></h4>
5302 <dl class=
"docutils">
5304 <dd><p class=
"first">This is the default style. It is used for styling files without a
5306 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal">default=
0x000000;
0xffffff;false;false
</tt></p>
5309 <dd><p class=
"first">The style for coloring selected text. The format is:
</p>
5311 <li>Foreground color
</li>
5312 <li>Background color
</li>
5313 <li>Use foreground color
</li>
5314 <li>Use background color
</li>
5316 <p>The colors are only set if the
3rd or
4th argument is true. When
5317 the colors are not overridden, the default is a dark grey
5318 background with syntax highlighted foreground text.
</p>
5319 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal">selection=
0xc0c0c0;
0x00007F;true;true
</tt></p>
5322 <dd><p class=
"first">The style for brace highlighting when a matching brace was found.
</p>
5323 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal">brace_good=
0xff0000;
0xFFFFFF;true;false
</tt></p>
5326 <dd><p class=
"first">The style for brace highlighting when no matching brace was found.
</p>
5327 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal">brace_bad=
0x0000ff;
0xFFFFFF;true;false
</tt></p>
5330 <dd><p class=
"first">The style for coloring the caret(the blinking cursor). Only first
5331 and third argument is interpreted.
5332 Set the third argument to true to change the caret into a block caret.
</p>
5333 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal">caret=
0x000000;
0x0;false;false
</tt></p>
5335 <dt>caret_width
</dt>
5336 <dd><p class=
"first">The width for the caret(the blinking cursor). Only the first
5337 argument is interpreted. The width is specified in pixels with
5338 a maximum of three pixel. Use the width
0 to make the caret
5340 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal">caret=
1;
0;false;false
</tt></p>
5342 <dt>current_line
</dt>
5343 <dd><p class=
"first">The style for coloring the background of the current line. Only
5344 the second and third arguments are interpreted. The second argument
5345 is the background color. Use the third argument to enable or
5346 disable background highlighting for the current line (has to be
5348 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal">current_line=
0x0;
0xe5e5e5;true;false
</tt></p>
5350 <dt>indent_guide
</dt>
5351 <dd><p class=
"first">The style for coloring the indentation guides. Only the first and
5352 second arguments are interpreted.
</p>
5353 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal">indent_guide=
0xc0c0c0;
0xffffff;false;false
</tt></p>
5355 <dt>white_space
</dt>
5356 <dd><p class=
"first">The style for coloring the white space if it is shown. The first
5357 both arguments define the foreground and background colors, the
5358 third argument sets whether to use the defined foreground color
5359 or to use the color defined by each filetype for the white space.
5360 The fourth argument defines whether to use the background color.
</p>
5361 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal">white_space=
0xc0c0c0;
0xffffff;true;true
</tt></p>
5363 <dt>margin_linenumber
</dt>
5364 <dd>Line number margin foreground and background colors.
</dd>
5366 <dl class=
"docutils" id=
"folding-settings">
5367 <dt>margin_folding
</dt>
5368 <dd>Fold margin foreground and background colors.
</dd>
5369 <dt>fold_symbol_highlight
</dt>
5370 <dd>Highlight color of folding symbols.
</dd>
5371 <dt>folding_style
</dt>
5372 <dd><p class=
"first">The style of folding icons. Only first and second arguments are
5374 <p>Valid values for the first argument are:
</p>
5376 <li>1 -- for boxes
</li>
5377 <li>2 -- for circles
</li>
5378 <li>3 -- for arrows
</li>
5379 <li>4 -- for +/-
</li>
5381 <p>Valid values for the second argument are:
</p>
5383 <li>0 -- for no lines
</li>
5384 <li>1 -- for straight lines
</li>
5385 <li>2 -- for curved lines
</li>
5387 <p><em>Default:
</em> <tt class=
"docutils literal">folding_style=
1;
1;
</tt></p>
5388 <p class=
"last"><em>Arrows:
</em> <tt class=
"docutils literal">folding_style=
3;
0;
</tt></p>
5390 <dt>folding_horiz_line
</dt>
5391 <dd><p class=
"first">Draw a thin horizontal line at the line where text is folded. Only
5392 first argument is used.
</p>
5393 <p>Valid values for the first argument are:
</p>
5395 <li>0 -- disable, do not draw a line
</li>
5396 <li>1 -- draw the line above folded text
</li>
5397 <li>2 -- draw the line below folded text
</li>
5399 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal">folding_horiz_line=
0;
0;false;false
</tt></p>
5401 <dt>line_wrap_visuals
</dt>
5402 <dd><p class=
"first">First argument: drawing of visual flags to indicate a line is wrapped.
5403 This is a bitmask of the values:
</p>
5405 <li>0 -- No visual flags
</li>
5406 <li>1 -- Visual flag at end of subline of a wrapped line
</li>
5407 <li>2 -- Visual flag at begin of subline of a wrapped line. Subline is
5408 indented by at least
1 to make room for the flag.
</li>
5410 <p>Second argument: wether the visual flags to indicate a line is wrapped
5411 are drawn near the border or near the text. This is a bitmask of the values:
</p>
5413 <li>0 -- Visual flags drawn near border
</li>
5414 <li>1 -- Visual flag at end of subline drawn near text
</li>
5415 <li>2 -- Visual flag at begin of subline drawn near text
</li>
5417 <p>Only first and second arguments are interpreted.
</p>
5418 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal">line_wrap_visuals=
3;
0;false;false
</tt></p>
5420 <dt>line_wrap_indent
</dt>
5421 <dd><p class=
"first">First argument: sets the size of indentation of sublines for wrapped lines
5422 in terms of the width of a space, only used when the second argument is
<tt class=
"docutils literal">0</tt>.
</p>
5423 <p>Second argument: wrapped sublines can be indented to the position of their
5424 first subline or one more indent level. Possible values:
</p>
5426 <li>0 - Wrapped sublines aligned to left of window plus amount set by the first argument
</li>
5427 <li>1 - Wrapped sublines are aligned to first subline indent (use the same indentation)
</li>
5428 <li>2 - Wrapped sublines are aligned to first subline indent plus one more level of indentation
</li>
5430 <p>Only first and second arguments are interpreted.
</p>
5431 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal">line_wrap_indent=
0;
1;false;false
</tt></p>
5433 <dt>translucency
</dt>
5434 <dd><p class=
"first">Translucency for the current line (first argument) and the selection
5435 (second argument). Values between
0 and
256 are accepted.
</p>
5436 <p>Note for Windows
95,
98 and ME users:
5437 keep this value at
256 to disable translucency otherwise Geany might crash.
</p>
5438 <p>Only the first and second arguments are interpreted.
</p>
5439 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal">translucency=
256;
256;false;false
</tt></p>
5441 <dt>marker_line
</dt>
5442 <dd><p class=
"first">The style for a highlighted line (e.g when using Goto line or goto tag).
5443 The foreground color (first argument) is only used when the Markers margin
5444 is enabled (see View menu).
</p>
5445 <p>Only the first and second arguments are interpreted.
</p>
5446 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal">marker_line=
0x000000;
0xffff00;false;false
</tt></p>
5448 <dt>marker_search
</dt>
5449 <dd><p class=
"first">The style for a marked search results (when using
"Mark
" in Search dialogs).
5450 The second argument sets the background color for the drawn rectangle.
</p>
5451 <p>Only the second argument is interpreted.
</p>
5452 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal">marker_search=
0x000000;
0xb8f4b8;false;false
</tt></p>
5454 <dt>marker_mark
</dt>
5455 <dd><p class=
"first">The style for a marked line (e.g when using the
"Toggle Marker
" keybinding
5456 (Ctrl-M)). The foreground color (first argument) is only used
5457 when the Markers margin is enabled (see View menu).
</p>
5458 <p>Only the first and second arguments are interpreted.
</p>
5459 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal">marker_mark=
0x000000;
0xb8f4b8;false;false
</tt></p>
5461 <dt>marker_translucency
</dt>
5462 <dd><p class=
"first">Translucency for the line marker (first argument) and the search marker
5463 (second argument). Values between
0 and
256 are accepted.
</p>
5464 <p>Note for Windows
95,
98 and ME users:
5465 keep this value at
256 to disable translucency otherwise Geany might crash.
</p>
5466 <p>Only the first and second arguments are interpreted.
</p>
5467 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal">marker_translucency=
256;
256;false;false
</tt></p>
5469 <dt>line_height
</dt>
5470 <dd><p class=
"first">Amount of space to be drawn above and below the line's baseline.
5471 The first argument defines the amount of space to be drawn above the line, the second
5472 argument defines the amount of space to be drawn below.
</p>
5473 <p>Only the first and second arguments are interpreted.
</p>
5474 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal">line_height=
0;
0;false;false
</tt></p>
5477 <dd><p class=
"first">The style for coloring the calltips. The first two arguments
5478 define the foreground and background colors, the third and fourth
5479 arguments set whether to use the defined colors.
</p>
5480 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal">calltips=
0xc0c0c0;
0xffffff;false;false
</tt></p>
5484 <div class=
"section" id=
"id5">
5485 <h4><a class=
"toc-backref" href=
"#id206">[settings] section
</a></h4>
5486 <dl class=
"docutils">
5487 <dt>whitespace_chars
</dt>
5488 <dd><p class=
"first">Characters to treat as whitespace. These characters are ignored
5489 when moving, selecting and deleting across word boundaries
5490 (see
<a class=
"reference internal" href=
"#scintilla-keyboard-commands">Scintilla keyboard commands
</a>).
</p>
5491 <p>This should include space (\s) and tab (\t).
</p>
5492 <p class=
"last"><em>Example:
</em> <tt class=
"docutils literal"><span class=
"pre">whitespace_chars=\s\t!\
"#$%
&'()*+,-./:;
<=
>?
@[\\]^`{|}~
</span></tt></p>
5498 <div class=
"section" id=
"filetype-extensions">
5499 <h2><a class=
"toc-backref" href=
"#id207">Filetype extensions
</a></h2>
5501 <p class=
"first admonition-title">Note
</p>
5502 <p class=
"last">To change the default filetype extension used when saving a new file,
5503 see
<a class=
"reference internal" href=
"#filetype-definition-files">Filetype definition files
</a>.
</p>
5505 <p>You can override the list of file extensions that Geany uses to detect
5506 filetypes using the user
<tt class=
"docutils literal">filetype_extensions.conf
</tt> file. Use the
5507 <em>Tools-
>Configuration Files-
>filetype_extensions.conf
</em> menu item. See
5508 also
<a class=
"reference internal" href=
"#configuration-file-paths">Configuration file paths
</a>.
</p>
5509 <p>You should only list lines for filetype extensions that you want to
5510 override in the user configuration file and remove or comment out
5511 others. The patterns are listed after the
<tt class=
"docutils literal">=
</tt> sign, using a
5512 semi-colon separated list of patterns which should be matched for
5514 <p>For example, to override the filetype extensions for Make, the file
5515 should look like:
</p>
5516 <pre class=
"literal-block">
5518 Make=Makefile*;*.mk;Buildfile;
5520 <div class=
"section" id=
"filetype-group-membership">
5521 <h3><a class=
"toc-backref" href=
"#id208">Filetype group membership
</a></h3>
5522 <p>Group membership is also stored in
<tt class=
"docutils literal">filetype_extensions.conf
</tt>. This
5523 file is used to store information Geany needs at startup, whereas the
5524 separate filetype definition files hold information only needed when
5525 a document with their filetype is used.
</p>
5526 <p>The format looks like:
</p>
5527 <pre class=
"literal-block">
5535 <p>The key names cannot be configured.
</p>
5537 <p class=
"first admonition-title">Note
</p>
5538 <p class=
"last">Group membership is only read at startup.
</p>
5542 <div class=
"section" id=
"preferences-file-format">
5543 <h2><a class=
"toc-backref" href=
"#id209">Preferences file format
</a></h2>
5544 <p>The user preferences file
<tt class=
"docutils literal">geany.conf
</tt> holds settings for all the items configured
5545 in the preferences dialog. This file should not be edited while Geany is running
5546 as the file will be overwritten when the preferences in Geany are changed or Geany
5548 <div class=
"section" id=
"build-menu-section">
5549 <h3><a class=
"toc-backref" href=
"#id210">[build-menu] section
</a></h3>
5550 <p>The [build-menu] section contains the configuration of the build menu.
5551 This section can occur in filetype, preferences and project files and
5552 always has the format described here. Different menu items are loaded
5553 from different files, see the table in the
<a class=
"reference internal" href=
"#build-menu-configuration">Build Menu Configuration
</a>
5554 section for details. All the settings can be configured from the dialogs
5555 except the execute command in filetype files and filetype definitions in
5556 the project file, so these are the only ones which need hand editing.
</p>
5557 <p>The build-menu section stores one entry for each setting for each menu item that
5558 is configured. The keys for these settings have the format:
</p>
5560 <tt class=
"docutils literal">GG_NN_FF
</tt></blockquote>
5563 <li>GG - is the menu item group,
<ul>
5564 <li>FT for filetype
</li>
5565 <li>NF for independent (non-filetype)
</li>
5566 <li>EX for execute
</li>
5569 <li>NN - is a two decimal digit number of the item within the group,
5571 <li>FF - is the field,
<ul>
5572 <li>LB for label
</li>
5573 <li>CM for command
</li>
5574 <li>WD for working directory
</li>
5580 <div class=
"section" id=
"project-file-format">
5581 <h2><a class=
"toc-backref" href=
"#id211">Project file format
</a></h2>
5582 <p>The project file contains project related settings and possibly a
5583 record of the current session files.
</p>
5584 <div class=
"section" id=
"build-menu-additions">
5585 <h3><a class=
"toc-backref" href=
"#id212">[build-menu] additions
</a></h3>
5586 <p>The project file also can have extra fields in the [build-menu] section
5587 in addition to those listed in
<a class=
"reference internal" href=
"#build-menu-section">[build-menu] section
</a> above.
</p>
5588 <p>When filetype menu items are configured for the project they are stored
5589 in the project file.
</p>
5590 <p>The
<tt class=
"docutils literal">filetypes
</tt> entry is a list of the filetypes which exist in the
5592 <p>For each filetype the entries for that filetype have the format defined in
5593 <a class=
"reference internal" href=
"#build-menu-section">[build-menu] section
</a> but the key is prefixed by the name of the filetype
5594 as it appears in the
<tt class=
"docutils literal">filetypes
</tt> entry, eg the entry for the label of
5595 filetype menu item
0 for the C filetype would be
</p>
5597 <tt class=
"docutils literal">CFT_00_LB=Label
</tt></blockquote>
5600 <div class=
"section" id=
"templates">
5601 <h2><a class=
"toc-backref" href=
"#id213">Templates
</a></h2>
5602 <p>Geany supports the following templates:
</p>
5604 <li>ChangeLog entry
</li>
5605 <li>File header
</li>
5606 <li>Function description
</li>
5607 <li>Short GPL notice
</li>
5608 <li>Short BSD notice
</li>
5609 <li>File templates
</li>
5611 <p>To use these templates, just open the Edit menu or open the popup menu
5612 by right-clicking in the editor widget, and choose
"Insert Comments
"
5613 and insert templates as you want.
</p>
5614 <p>Some templates (like File header or ChangeLog entry) will always be
5615 inserted at the top of the file.
</p>
5616 <p>To insert a function description, the cursor must be inside
5617 of the function, so that the function name can be determined
5618 automatically. The description will be positioned correctly one line
5619 above the function, just check it out. If the cursor is not inside
5620 of a function or the function name cannot be determined, the inserted
5621 function description won't contain the correct function name but
"unknown
"
5624 <p class=
"first admonition-title">Note
</p>
5625 <p class=
"last">Geany automatically reloads template information when it notices you
5626 save a file in the user's template configuration directory. You can
5627 also force this by selecting
<em>Tools-
>Reload Configuration
</em>.
</p>
5629 <div class=
"section" id=
"template-meta-data">
5630 <h3><a class=
"toc-backref" href=
"#id214">Template meta data
</a></h3>
5631 <p>Meta data can be used with all templates, but by default user set
5632 meta data is only used for the ChangeLog and File header templates.
</p>
5633 <p>In the configuration dialog you can find a tab
"Templates
" (see
5634 <a class=
"reference internal" href=
"#template-preferences">Template preferences
</a>). You can define the default values
5635 which will be inserted in the templates.
</p>
5637 <div class=
"section" id=
"file-templates">
5638 <h3><a class=
"toc-backref" href=
"#id215">File templates
</a></h3>
5639 <p>File templates are templates used as the basis of a new file. To
5640 use them, choose the
<em>New (with Template)
</em> menu item from the
<em>File
</em>
5642 <p>By default, file templates are installed for some filetypes. Custom
5643 file templates can be added by creating the appropriate template file. You can
5644 also edit the default file templates.
</p>
5645 <p>The file's contents are just the text to place in the document, with
5646 optional template wildcards like
<tt class=
"docutils literal">{fileheader}
</tt>. The fileheader
5647 wildcard can be placed anywhere, but it's usually put on the first
5648 line of the file, followed by a blank line.
</p>
5649 <div class=
"section" id=
"adding-file-templates">
5650 <h4><a class=
"toc-backref" href=
"#id216">Adding file templates
</a></h4>
5651 <p>File templates are read from
<tt class=
"docutils literal">templates/files
</tt> under the
5652 <a class=
"reference internal" href=
"#configuration-file-paths">Configuration file paths
</a>.
</p>
5653 <p>The filetype to use is detected from the template file's extension, if
5654 any. For example, creating a file
<tt class=
"docutils literal">module.c
</tt> would add a menu item
5655 which created a new document with the filetype set to 'C'.
</p>
5656 <p>The template file is read from disk when the corresponding menu item is
5660 <div class=
"section" id=
"customizing-templates">
5661 <h3><a class=
"toc-backref" href=
"#id217">Customizing templates
</a></h3>
5662 <p>Each template can be customized to your needs. The templates are
5663 stored in the
<tt class=
"docutils literal"><span class=
"pre">~/.config/geany/templates/
</span></tt> directory (see the section called
5664 <a class=
"reference internal" href=
"#command-line-options">Command line options
</a> for further information about the configuration
5665 directory). Just open the desired template with an editor (ideally,
5666 Geany ;-) ) and edit the template to your needs. There are some
5667 wildcards which will be automatically replaced by Geany at startup.
</p>
5668 <div class=
"section" id=
"template-wildcards">
5669 <h4><a class=
"toc-backref" href=
"#id218">Template wildcards
</a></h4>
5670 <p>All wildcards must be enclosed by
"{
" and
"}
", e.g. {date}.
</p>
5671 <p><strong>Wildcards for character escaping
</strong></p>
5672 <table border=
"1" class=
"docutils">
5678 <thead valign=
"bottom">
5679 <tr><th class=
"head">Wildcard
</th>
5680 <th class=
"head">Description
</th>
5681 <th class=
"head">Available in
</th>
5684 <tbody valign=
"top">
5686 <td>{ Opening Brace (used to prevent other
5687 wildcards being expanded).
</td>
5688 <td>file templates, file header, snippets.
</td>
5691 <td>} Closing Brace.
</td>
5692 <td>file templates, file header, snippets.
</td>
5695 <td>% Percent (used to escape e.g. %block% in
5701 <p><strong>Global wildcards
</strong></p>
5702 <p>These are configurable, see
<a class=
"reference internal" href=
"#template-preferences">Template preferences
</a>.
</p>
5703 <table border=
"1" class=
"docutils">
5709 <thead valign=
"bottom">
5710 <tr><th class=
"head">Wildcard
</th>
5711 <th class=
"head">Description
</th>
5712 <th class=
"head">Available in
</th>
5715 <tbody valign=
"top">
5716 <tr><td>developer
</td>
5717 <td>The name of the developer.
</td>
5718 <td>file templates, file header,
5719 function description, ChangeLog entry,
5720 bsd, gpl, snippets.
</td>
5722 <tr><td>initial
</td>
5723 <td>The developer's initials, e.g.
"ET
" for
5724 Enrico Tröger or
"JFD
" for John Foobar Doe.
</td>
5725 <td>file templates, file header,
5726 function description, ChangeLog entry,
5727 bsd, gpl, snippets.
</td>
5730 <td>The email address of the developer.
</td>
5731 <td>file templates, file header,
5732 function description, ChangeLog entry,
5733 bsd, gpl, snippets.
</td>
5735 <tr><td>company
</td>
5736 <td>The company the developer is working for.
</td>
5737 <td>file templates, file header,
5738 function description, ChangeLog entry,
5739 bsd, gpl, snippets.
</td>
5741 <tr><td>version
</td>
5742 <td>The initial version of a new file.
</td>
5743 <td>file templates, file header,
5744 function description, ChangeLog entry,
5745 bsd, gpl, snippets.
</td>
5749 <p><strong>Date
& time wildcards
</strong></p>
5750 <p>The format for these wildcards can be changed in the preferences
5751 dialog, see
<a class=
"reference internal" href=
"#template-preferences">Template preferences
</a>. You can use any conversion
5752 specifiers which can be used with the ANSI C strftime function.
5753 For details please see
<a class=
"reference external" href=
"http://man.cx/strftime">http://man.cx/strftime
</a>.
</p>
5754 <table border=
"1" class=
"docutils">
5760 <thead valign=
"bottom">
5761 <tr><th class=
"head">Wildcard
</th>
5762 <th class=
"head">Description
</th>
5763 <th class=
"head">Available in
</th>
5766 <tbody valign=
"top">
5768 <td>The current year. Default format is: YYYY.
</td>
5769 <td>file templates, file header,
5770 function description, ChangeLog entry,
5771 bsd, gpl, snippets.
</td>
5774 <td>The current date. Default format:
5776 <td>file templates, file header,
5777 function description, ChangeLog entry,
5778 bsd, gpl, snippets.
</td>
5780 <tr><td>datetime
</td>
5781 <td>The current date and time. Default format:
5782 DD.MM.YYYY HH:mm:ss ZZZZ.
</td>
5783 <td>file templates, file header,
5784 function description, ChangeLog entry,
5785 bsd, gpl, snippets.
</td>
5789 <p><strong>Dynamic wildcards
</strong></p>
5790 <table border=
"1" class=
"docutils">
5796 <thead valign=
"bottom">
5797 <tr><th class=
"head">Wildcard
</th>
5798 <th class=
"head">Description
</th>
5799 <th class=
"head">Available in
</th>
5802 <tbody valign=
"top">
5803 <tr><td>untitled
</td>
5804 <td>The string
"untitled
" (this will be
5805 translated to your locale), used in
5806 file templates.
</td>
5807 <td>file templates, file header,
5808 function description, ChangeLog entry,
5809 bsd, gpl, snippets.
</td>
5811 <tr><td>geanyversion
</td>
5812 <td>The actual Geany version, e.g.
5813 "Geany
1.24".
</td>
5814 <td>file templates, file header,
5815 function description, ChangeLog entry,
5816 bsd, gpl, snippets.
</td>
5818 <tr><td>filename
</td>
5819 <td>The filename of the current file.
5820 For new files, it's only replaced when
5821 first saving if found on the first
4 lines
5823 <td>file header, snippets, file
5826 <tr><td>project
</td>
5827 <td>The current project's name, if any.
</td>
5828 <td>file header, snippets, file templates.
</td>
5830 <tr><td>description
</td>
5831 <td>The current project's description, if any.
</td>
5832 <td>file header, snippets, file templates.
</td>
5834 <tr><td>functionname
</td>
5835 <td>The function name of the function at the
5836 cursor position. This wildcard will only be
5837 replaced in the function description
5839 <td>function description.
</td>
5841 <tr><td>command:path
</td>
5842 <td>Executes the specified command and replace
5843 the wildcard with the command's standard
5844 output. See
<a class=
"reference internal" href=
"#special-command-wildcard">Special {command:} wildcard
</a>
5846 <td>file templates, file header,
5847 function description, ChangeLog entry,
5848 bsd, gpl, snippets.
</td>
5852 <p><strong>Template insertion wildcards
</strong></p>
5853 <table border=
"1" class=
"docutils">
5859 <thead valign=
"bottom">
5860 <tr><th class=
"head">Wildcard
</th>
5861 <th class=
"head">Description
</th>
5862 <th class=
"head">Available in
</th>
5865 <tbody valign=
"top">
5867 <td>This wildcard inserts a short GPL notice.
</td>
5868 <td>file header.
</td>
5871 <td>This wildcard inserts a BSD licence notice.
</td>
5872 <td>file header.
</td>
5874 <tr><td>fileheader
</td>
5875 <td>The file header template. This wildcard
5876 will only be replaced in file templates.
</td>
5877 <td>snippets, file templates.
</td>
5881 <div class=
"section" id=
"special-command-wildcard">
5882 <h5><a class=
"toc-backref" href=
"#id219">Special {command:} wildcard
</a></h5>
5883 <p>The {command:} wildcard is a special one because it can execute
5884 a specified command and put the command's output (stdout) into
5887 <pre class=
"literal-block">
5890 <p>will result in:
</p>
5891 <pre class=
"literal-block">
5892 Linux localhost
2.6.9-
023stab046.2-smp #
1 SMP Mon Dec
10 15:
04:
55 MSK
2007 x86_64 GNU/Linux
5894 <p>Using this wildcard you can insert nearly any arbitrary text into the
5896 <p>In the environment of the executed command the variables
5897 <tt class=
"docutils literal">GEANY_FILENAME
</tt>,
<tt class=
"docutils literal">GEANY_FILETYPE
</tt> and
<tt class=
"docutils literal">GEANY_FUNCNAME
</tt> are set.
5898 The value of these variables is filled in only if Geany knows about it.
5899 For example,
<tt class=
"docutils literal">GEANY_FUNCNAME
</tt> is only filled within the function
5900 description template. However, these variables are
<tt class=
"docutils literal">always
</tt> set,
5901 just maybe with an empty value.
5902 You can easily access them e.g. within an executed shell script using:
</p>
5903 <pre class=
"literal-block">
5907 <p class=
"first admonition-title">Note
</p>
5908 <p class=
"last">If the specified command could not be found or not executed, the wildcard is substituted
5909 by an empty string. In such cases, you can find the occurred error message on Geany's
5910 standard error and in the Help-
>Debug Messages dialog.
</p>
5916 <div class=
"section" id=
"customizing-the-toolbar">
5917 <h2><a class=
"toc-backref" href=
"#id220">Customizing the toolbar
</a></h2>
5918 <p>You can add, remove and reorder the elements in the toolbar by using
5919 the toolbar editor, or by manually editing the configuration file
5920 <tt class=
"docutils literal">ui_toolbar.xml
</tt>.
</p>
5921 <p>The toolbar editor can be opened from the preferences editor on the Toolbar tab or
5922 by right-clicking on the toolbar itself and choosing it from the menu.
</p>
5923 <div class=
"section" id=
"manually-editing-the-toolbar-layout">
5924 <h3><a class=
"toc-backref" href=
"#id221">Manually editing the toolbar layout
</a></h3>
5925 <p>To override the system-wide configuration file, copy it to your user
5926 configuration directory (see
<a class=
"reference internal" href=
"#configuration-file-paths">Configuration file paths
</a>).
</p>
5928 <pre class=
"literal-block">
5929 % cp /usr/local/share/geany/ui_toolbar.xml /home/username/.config/geany/
5931 <p>Then edit it and add any of the available elements listed in the file or remove
5932 any of the existing elements. Of course, you can also reorder the elements as
5933 you wish and add or remove additional separators.
5934 This file must be valid XML, otherwise the global toolbar UI definition
5935 will be used instead.
</p>
5936 <p>Your changes are applied once you save the file.
</p>
5938 <p class=
"first admonition-title">Note
</p>
5939 <ol class=
"last arabic simple">
5940 <li>You cannot add new actions which are not listed below.
</li>
5941 <li>Everything you add or change must be inside the /ui/toolbar/ path.
</li>
5945 <div class=
"section" id=
"available-toolbar-elements">
5946 <h3><a class=
"toc-backref" href=
"#id222">Available toolbar elements
</a></h3>
5947 <table border=
"1" class=
"docutils">
5952 <thead valign=
"bottom">
5953 <tr><th class=
"head">Element name
</th>
5954 <th class=
"head">Description
</th>
5957 <tbody valign=
"top">
5959 <td>Create a new file
</td>
5962 <td>Open an existing file
</td>
5965 <td>Save the current file
</td>
5967 <tr><td>SaveAll
</td>
5968 <td>Save all open files
</td>
5971 <td>Reload the current file from disk
</td>
5974 <td>Close the current file
</td>
5976 <tr><td>CloseAll
</td>
5977 <td>Close all open files
</td>
5980 <td>Print the current file
</td>
5983 <td>Cut the current selection
</td>
5986 <td>Copy the current selection
</td>
5989 <td>Paste the contents of the clipboard
</td>
5992 <td>Delete the current selection
</td>
5995 <td>Undo the last modification
</td>
5998 <td>Redo the last modification
</td>
6000 <tr><td>NavBack
</td>
6001 <td>Navigate back a location
</td>
6004 <td>Navigate forward a location
</td>
6006 <tr><td>Compile
</td>
6007 <td>Compile the current file
</td>
6010 <td>Build the current file, includes a submenu for Make commands. Geany
6011 remembers the last chosen action from the submenu and uses this as default
6012 action when the button itself is clicked.
</td>
6015 <td>Run or view the current file
</td>
6018 <td>Open a color chooser dialog, to interactively pick colors from a palette
</td>
6021 <td>Zoom in the text
</td>
6023 <tr><td>ZoomOut
</td>
6024 <td>Zoom out the text
</td>
6026 <tr><td>UnIndent
</td>
6027 <td>Decrease indentation
</td>
6030 <td>Increase indentation
</td>
6032 <tr><td>Replace
</td>
6033 <td>Replace text in the current document
</td>
6035 <tr><td>SearchEntry
</td>
6036 <td>The search field belonging to the 'Search' element (can be used alone)
</td>
6039 <td>Find the entered text in the current file (only useful if you also
6040 use 'SearchEntry')
</td>
6042 <tr><td>GotoEntry
</td>
6043 <td>The goto field belonging to the 'Goto' element (can be used alone)
</td>
6046 <td>Jump to the entered line number (only useful if you also use 'GotoEntry')
</td>
6048 <tr><td>Preferences
</td>
6049 <td>Show the preferences dialog
</td>
6059 <div class=
"section" id=
"plugin-documentation">
6060 <h1><a class=
"toc-backref" href=
"#id223">Plugin documentation
</a></h1>
6061 <div class=
"section" id=
"html-characters">
6062 <h2><a class=
"toc-backref" href=
"#id224">HTML Characters
</a></h2>
6063 <p>The HTML Characters plugin helps when working with special
6064 characters in XML/HTML, e.g. German Umlauts ü and ä.
</p>
6065 <div class=
"section" id=
"insert-entity-dialog">
6066 <h3><a class=
"toc-backref" href=
"#id225">Insert entity dialog
</a></h3>
6067 <p>When the plugin is enabled, you can insert special character
6068 entities using
<em>Tools-
>Insert Special HTML Characters
</em>.
</p>
6069 <p>This opens up a dialog where you can find a huge amount of special
6070 characters sorted by category that you might like to use inside your
6071 document. You can expand and collapse the categories by clicking on
6072 the little arrow on the left hand side. Once you have found the
6073 desired character click on it and choose
"Insert
". This will insert
6074 the entity for the character at the current cursor position. You
6075 might also like to double click the chosen entity instead.
</p>
6077 <div class=
"section" id=
"replace-special-chars-by-its-entity">
6078 <h3><a class=
"toc-backref" href=
"#id226">Replace special chars by its entity
</a></h3>
6079 <p>To help make a XML/HTML document valid the plugin supports
6080 replacement of special chars known by the plugin. Both bulk
6081 replacement and immediate replacement during typing are supported.
</p>
6082 <dl class=
"docutils">
6083 <dt>A few characters will not be replaced. These are
</dt>
6084 <dd><ul class=
"first last simple">
6089 <li>(
<cite>&nbsp;
</cite>)
</li>
6093 <div class=
"section" id=
"at-typing-time">
6094 <h4><a class=
"toc-backref" href=
"#id227">At typing time
</a></h4>
6095 <p>You can activate/deactivate this feature using the
<em>Tools-
>HTML
6096 Replacement-
>Auto-replace Special Characters
</em> menu item. If it's
6097 activated, all special characters (beside the given exceptions from
6098 above) known by the plugin will be replaced by their entities.
</p>
6099 <p>You could also set a keybinding for the plugin to toggle the status
6100 of this feature.
</p>
6102 <div class=
"section" id=
"bulk-replacement">
6103 <h4><a class=
"toc-backref" href=
"#id228">Bulk replacement
</a></h4>
6104 <p>After inserting a huge amount of text, e.g. by using copy
& paste, the
6105 plugin allows bulk replacement of all known characters (beside the
6106 mentioned exceptions). You can find the function under the same
6107 menu at
<em>Tools-
>HTML Replacement-
>Replace Characters in Selection
</em>, or
6108 configure a keybinding for the plugin.
</p>
6112 <div class=
"section" id=
"save-actions">
6113 <h2><a class=
"toc-backref" href=
"#id229">Save Actions
</a></h2>
6114 <div class=
"section" id=
"auto-save">
6115 <h3><a class=
"toc-backref" href=
"#id230">Auto Save
</a></h3>
6116 <p>This plugin provides an option to automatically save documents.
6117 You can choose to save the current document, or all of your documents, at
6120 <div class=
"section" id=
"save-on-focus-out">
6121 <h3><a class=
"toc-backref" href=
"#id231">Save on focus out
</a></h3>
6122 <p>You can save the current document when the editor's focus goes out.
6123 Every pop-up, menu dialogs, or anything else that can make the editor lose the focus,
6124 will make the current document to be saved.
</p>
6126 <div class=
"section" id=
"instant-save">
6127 <h3><a class=
"toc-backref" href=
"#id232">Instant Save
</a></h3>
6128 <p>This plugin sets on every new file (
<em>File-
>New
</em> or
<em>File-
>New (with template)
</em>)
6129 a randomly chosen filename and set its filetype appropriate to the used template
6130 or when no template was used, to a configurable default filetype.
6131 This enables you to quickly compile, build and/or run the new file without the
6132 need to give it an explicit filename using the Save As dialog. This might be
6133 useful when you often create new files just for testing some code or something
6136 <div class=
"section" id=
"backup-copy">
6137 <h3><a class=
"toc-backref" href=
"#id233">Backup Copy
</a></h3>
6138 <p>This plugin creates a backup copy of the current file in Geany when it is
6139 saved. You can specify the directory where the backup copy is saved and
6140 you can configure the automatically added extension in the configure dialog
6141 in Geany's plugin manager.
</p>
6142 <p>After the plugin was loaded in Geany's plugin manager, every file is
6143 copied into the configured backup directory when the file is saved in Geany.
</p>
6147 <div class=
"section" id=
"contributing-to-this-document">
6148 <h1><a class=
"toc-backref" href=
"#id234">Contributing to this document
</a></h1>
6149 <p>This document (
<tt class=
"docutils literal">geany.txt
</tt>) is written in
<a class=
"reference external" href=
"http://docutils.sourceforge.net/rst.html">reStructuredText
</a>
6150 (or
"reST
"). The source file for it is located in Geany's
<tt class=
"docutils literal">doc
</tt>
6151 subdirectory. If you intend on making changes, you should grab the
6152 source right from Git to make sure you've got the newest version. After
6153 editing the file, to build the HTML document to see how your changes
6154 look, run
"<tt class=
"docutils literal">make doc
</tt>" in the subdirectory
<tt class=
"docutils literal">doc
</tt> of Geany's source
6155 directory. This regenerates the
<tt class=
"docutils literal">geany.html
</tt> file. To generate a PDF
6156 file, use the command
"<tt class=
"docutils literal">make pdf
</tt>" which should generate a file called
6158 <p>After you are happy with your changes, create a patch e.g. by using:
</p>
6159 <pre class=
"literal-block">
6160 % git diff geany.txt
> foo.patch
6162 <p>or even better, by creating a Git-formatted patch which will keep authoring
6163 and description data, by first committing your changes (doing so in a fresh
6164 new branch is recommended for
<cite>matser
</cite> not to diverge from upstream) and then
6165 using git format-patch:
</p>
6166 <pre class=
"literal-block">
6167 % git checkout -b my-documentation-changes # create a fresh branch
6168 % git commit geany.txt
6169 Write a good commit message...
6170 % git format-patch HEAD^
6171 % git checkout master # go back to master
6173 <p>and then submit that file to the mailing list for review.
</p>
6174 <p>Also you can clone the Geany repository at GitHub and send a pull request.
</p>
6175 <p>Note, you will need the Python docutils software package installed
6176 to build the docs. The package is named
<tt class=
"docutils literal"><span class=
"pre">python-docutils
</span></tt> on Debian
6177 and Fedora systems.
</p>
6179 <div class=
"section" id=
"scintilla-keyboard-commands">
6180 <h1><a class=
"toc-backref" href=
"#id235">Scintilla keyboard commands
</a></h1>
6181 <p>Copyright ©
1998,
2006 Neil Hodgson
<neilh(at)scintilla(dot)org
></p>
6182 <p>This appendix is distributed under the terms of the License for
6183 Scintilla and SciTE. A copy of this license can be found in the file
6184 <tt class=
"docutils literal">scintilla/License.txt
</tt> included with the source code of this
6185 program and in the appendix of this document. See
<a class=
"reference internal" href=
"#license-for-scintilla-and-scite">License for
6186 Scintilla and SciTE
</a>.
</p>
6188 <div class=
"section" id=
"keyboard-commands">
6189 <h2><a class=
"toc-backref" href=
"#id236">Keyboard commands
</a></h2>
6190 <p>Keyboard commands for Scintilla mostly follow common Windows and GTK+
6191 conventions. All move keys (arrows, page up/down, home and end)
6192 allows to extend or reduce the stream selection when holding the
6193 Shift key, and the rectangular selection when holding the
6194 appropriate keys (see
<a class=
"reference internal" href=
"#column-mode-editing-rectangular-selections">Column mode editing (rectangular selections)
</a>).
</p>
6195 <p>Some keys may not be available with some national keyboards
6196 or because they are taken by the system such as by a window manager
6197 or GTK. Keyboard equivalents of menu commands are listed in the
6198 menus. Some less common commands with no menu equivalent are:
</p>
6199 <table border=
"1" class=
"docutils">
6204 <thead valign=
"bottom">
6205 <tr><th class=
"head">Action
</th>
6206 <th class=
"head">Shortcut key
</th>
6209 <tbody valign=
"top">
6210 <tr><td>Magnify text size.
</td>
6211 <td>Ctrl-Keypad+
</td>
6213 <tr><td>Reduce text size.
</td>
6214 <td>Ctrl-Keypad-
</td>
6216 <tr><td>Restore text size to normal.
</td>
6217 <td>Ctrl-Keypad/
</td>
6219 <tr><td>Indent block.
</td>
6222 <tr><td>Dedent block.
</td>
6225 <tr><td>Delete to start of word.
</td>
6226 <td>Ctrl-BackSpace
</td>
6228 <tr><td>Delete to end of word.
</td>
6229 <td>Ctrl-Delete
</td>
6231 <tr><td>Delete to start of line.
</td>
6232 <td>Ctrl-Shift-BackSpace
</td>
6234 <tr><td>Go to start of document.
</td>
6237 <tr><td>Extend selection to start of document.
</td>
6238 <td>Ctrl-Shift-Home
</td>
6240 <tr><td>Go to start of display line.
</td>
6243 <tr><td>Extend selection to start of display line.
</td>
6244 <td>Alt-Shift-Home
</td>
6246 <tr><td>Go to end of document.
</td>
6249 <tr><td>Extend selection to end of document.
</td>
6250 <td>Ctrl-Shift-End
</td>
6252 <tr><td>Extend selection to end of display line.
</td>
6253 <td>Alt-Shift-End
</td>
6255 <tr><td>Previous paragraph. Shift extends selection.
</td>
6258 <tr><td>Next paragraph. Shift extends selection.
</td>
6261 <tr><td>Previous word. Shift extends selection.
</td>
6264 <tr><td>Next word. Shift extends selection.
</td>
6271 <div class=
"section" id=
"tips-and-tricks">
6272 <h1><a class=
"toc-backref" href=
"#id237">Tips and tricks
</a></h1>
6273 <div class=
"section" id=
"document-notebook">
6274 <h2><a class=
"toc-backref" href=
"#id238">Document notebook
</a></h2>
6276 <li>Double-click on empty space in the notebook tab bar to open a
6278 <li>Middle-click on a document's notebook tab to close the document.
</li>
6279 <li>Hold
<cite>Ctrl
</cite> and click on any notebook tab to switch to the last used
6281 <li>Double-click on a document's notebook tab to toggle all additional
6282 widgets (to show them again use the View menu or the keyboard
6283 shortcut). The interface pref must be enabled for this to work.
</li>
6286 <div class=
"section" id=
"editor">
6287 <h2><a class=
"toc-backref" href=
"#id239">Editor
</a></h2>
6289 <li>Alt-scroll wheel moves up/down a page.
</li>
6290 <li>Ctrl-scroll wheel zooms in/out.
</li>
6291 <li>Shift-scroll wheel scrolls
8 characters right/left.
</li>
6292 <li>Ctrl-click on a word in a document to perform
<em>Go to Tag Definition
</em>.
</li>
6293 <li>Ctrl-click on a bracket/brace to perform
<em>Go to Matching Brace
</em>.
</li>
6296 <div class=
"section" id=
"interface">
6297 <h2><a class=
"toc-backref" href=
"#id240">Interface
</a></h2>
6299 <li>Double-click on a symbol-list group to expand or compact it.
</li>
6302 <div class=
"section" id=
"gtk-related">
6303 <h2><a class=
"toc-backref" href=
"#id241">GTK-related
</a></h2>
6305 <li>Scrolling the mouse wheel over a notebook tab bar will switch
6306 notebook pages.
</li>
6308 <p>The following are derived from X-Windows features (but GTK still supports
6309 them on Windows):
</p>
6311 <li>Middle-click pastes the last selected text.
</li>
6312 <li>Middle-click on a scrollbar moves the scrollbar to that
6313 position without having to drag it.
</li>
6317 <div class=
"section" id=
"compile-time-options">
6318 <h1><a class=
"toc-backref" href=
"#id242">Compile-time options
</a></h1>
6319 <p>There are some options which can only be changed at compile time,
6320 and some options which are used as the default for configurable
6321 options. To change these options, edit the appropriate source file
6322 in the
<tt class=
"docutils literal">src
</tt> subdirectory. Look for a block of lines starting with
6323 <tt class=
"docutils literal">#define GEANY_*
</tt>. Any definitions which are not listed here should
6326 <p class=
"first admonition-title">Note
</p>
6327 <p class=
"last">Most users should not need to change these options.
</p>
6329 <div class=
"section" id=
"src-geany-h">
6330 <h2><a class=
"toc-backref" href=
"#id243">src/geany.h
</a></h2>
6331 <table border=
"1" class=
"docutils">
6337 <thead valign=
"bottom">
6338 <tr><th class=
"head">Option
</th>
6339 <th class=
"head">Description
</th>
6340 <th class=
"head">Default
</th>
6343 <tbody valign=
"top">
6344 <tr><td>GEANY_STRING_UNTITLED
</td>
6345 <td>A string used as the default name for new
6346 files. Be aware that the string can be
6347 translated, so change it only if you know
6348 what you are doing.
</td>
6351 <tr><td>GEANY_WINDOW_MINIMAL_WIDTH
</td>
6352 <td>The minimal width of the main window.
</td>
6355 <tr><td>GEANY_WINDOW_MINIMAL_HEIGHT
</td>
6356 <td>The minimal height of the main window.
</td>
6359 <tr><td>GEANY_WINDOW_DEFAULT_WIDTH
</td>
6360 <td>The default width of the main window at the
6364 <tr><td>GEANY_WINDOW_DEFAULT_HEIGHT
</td>
6365 <td>The default height of the main window at the
6369 <tr><td><strong>Windows specific
</strong></td>
6373 <tr><td>GEANY_USE_WIN32_DIALOG
</td>
6374 <td>Set this to
1 if you want to use the default
6375 Windows file open and save dialogs instead
6376 GTK's file open and save dialogs. The
6377 default Windows file dialogs are missing
6378 some nice features like choosing a filetype
6379 or an encoding.
<em>Do not touch this setting
6380 when building on a non-Win32 system.
</em></td>
6386 <div class=
"section" id=
"project-h">
6387 <h2><a class=
"toc-backref" href=
"#id244">project.h
</a></h2>
6388 <table border=
"1" class=
"docutils">
6394 <thead valign=
"bottom">
6395 <tr><th class=
"head">Option
</th>
6396 <th class=
"head">Description
</th>
6397 <th class=
"head">Default
</th>
6400 <tbody valign=
"top">
6401 <tr><td>GEANY_PROJECT_EXT
</td>
6402 <td>The default filename extension for Geany
6403 project files. It is used when creating new
6404 projects and as filter mask for the project
6411 <div class=
"section" id=
"filetypes-c">
6412 <h2><a class=
"toc-backref" href=
"#id245">filetypes.c
</a></h2>
6413 <table border=
"1" class=
"docutils">
6419 <thead valign=
"bottom">
6420 <tr><th class=
"head">Option
</th>
6421 <th class=
"head">Description
</th>
6422 <th class=
"head">Default
</th>
6425 <tbody valign=
"top">
6426 <tr><td>GEANY_FILETYPE_SEARCH_LINES
</td>
6427 <td>The number of lines to search for the
6428 filetype with the extract filetype regex.
</td>
6434 <div class=
"section" id=
"editor-h">
6435 <h2><a class=
"toc-backref" href=
"#id246">editor.h
</a></h2>
6436 <table border=
"1" class=
"docutils">
6442 <thead valign=
"bottom">
6443 <tr><th class=
"head">Option
</th>
6444 <th class=
"head">Description
</th>
6445 <th class=
"head">Default
</th>
6448 <tbody valign=
"top">
6449 <tr><td>GEANY_WORDCHARS
</td>
6450 <td>These characters define word boundaries when
6451 making selections and searching using word
6452 matching options.
</td>
6460 <div class=
"section" id=
"keyfile-c">
6461 <h2><a class=
"toc-backref" href=
"#id247">keyfile.c
</a></h2>
6462 <p>These are default settings that can be overridden in the
<a class=
"reference internal" href=
"#preferences">Preferences
</a> dialog.
</p>
6463 <table border=
"1" class=
"docutils">
6469 <thead valign=
"bottom">
6470 <tr><th class=
"head">Option
</th>
6471 <th class=
"head">Description
</th>
6472 <th class=
"head">Default
</th>
6475 <tbody valign=
"top">
6476 <tr><td>GEANY_MIN_SYMBOLLIST_CHARS
</td>
6477 <td>How many characters you need to type to
6478 trigger the autocompletion list.
</td>
6481 <tr><td>GEANY_DISK_CHECK_TIMEOUT
</td>
6482 <td>Time in seconds between checking a file for
6483 external changes.
</td>
6486 <tr><td>GEANY_DEFAULT_TOOLS_MAKE
</td>
6487 <td>The make tool. This can also include a path.
</td>
6488 <td>"make
"</td>
6490 <tr><td>GEANY_DEFAULT_TOOLS_TERMINAL
</td>
6491 <td>A terminal emulator command, see
6492 <a class=
"reference internal" href=
"#terminal-emulators">Terminal emulators
</a>.
</td>
6495 <tr><td>GEANY_DEFAULT_TOOLS_BROWSER
</td>
6496 <td>A web browser. This can also include a path.
</td>
6497 <td>"firefox
"</td>
6499 <tr><td>GEANY_DEFAULT_TOOLS_PRINTCMD
</td>
6500 <td>A printing tool. It should be able to accept
6501 and process plain text files. This can also
6502 include a path.
</td>
6503 <td>"lpr
"</td>
6505 <tr><td>GEANY_DEFAULT_TOOLS_GREP
</td>
6506 <td>A grep tool. It should be compatible with
6507 GNU grep. This can also include a path.
</td>
6508 <td>"grep
"</td>
6510 <tr><td>GEANY_DEFAULT_MRU_LENGTH
</td>
6511 <td>The length of the
"Recent files
" list.
</td>
6514 <tr><td>GEANY_DEFAULT_FONT_SYMBOL_LIST
</td>
6515 <td>The font used in sidebar to show symbols and
6517 <td>"Sans
9"</td>
6519 <tr><td>GEANY_DEFAULT_FONT_MSG_WINDOW
</td>
6520 <td>The font used in the messages window.
</td>
6521 <td>"Sans
9"</td>
6523 <tr><td>GEANY_DEFAULT_FONT_EDITOR
</td>
6524 <td>The font used in the editor window.
</td>
6525 <td>"Monospace
10"</td>
6527 <tr><td>GEANY_TOGGLE_MARK
</td>
6528 <td>A string which is used to mark a toggled
6530 <td>"~
"</td>
6532 <tr><td>GEANY_MAX_AUTOCOMPLETE_WORDS
</td>
6533 <td>How many autocompletion suggestions should
6537 <tr><td>GEANY_DEFAULT_FILETYPE_REGEX
</td>
6538 <td>The default regex to extract filetypes from
6544 <p>The GEANY_DEFAULT_FILETYPE_REGEX default value is -\*-\s*([^\s]+)\s*-\*- which finds Emacs filetypes.
</p>
6545 <p>The GEANY_DEFAULT_TOOLS_TERMINAL default value on Windows is:
</p>
6546 <pre class=
"literal-block">
6549 <p>and on any non-Windows system is:
</p>
6550 <pre class=
"literal-block">
6551 xterm -e
"/bin/sh %c
"
6554 <div class=
"section" id=
"build-c">
6555 <h2><a class=
"toc-backref" href=
"#id248">build.c
</a></h2>
6556 <table border=
"1" class=
"docutils">
6562 <thead valign=
"bottom">
6563 <tr><th class=
"head">Option
</th>
6564 <th class=
"head">Description
</th>
6565 <th class=
"head">Default
</th>
6568 <tbody valign=
"top">
6569 <tr><td>GEANY_BUILD_ERR_HIGHLIGHT_MAX
</td>
6570 <td>Amount of build error indicators to
6571 be shown in the editor window.
6572 This affects the special coloring
6573 when Geany detects a compiler output line as
6574 an error message and then highlights the
6575 corresponding line in the source code.
6576 Usually only the first few messages are
6577 interesting because following errors are
6579 All errors in the Compiler window are parsed
6580 and unaffected by this value.
</td>
6583 <tr><td>PRINTBUILDCMDS
</td>
6584 <td>Every time a build menu item priority
6585 calculation is run, print the state of the
6586 menu item table in the form of the table
6587 in
<a class=
"reference internal" href=
"#build-menu-configuration">Build Menu Configuration
</a>. May be
6588 useful to debug configuration file
6589 overloading. Warning produces a lot of
6590 output. Can also be enabled/disabled by the
6591 debugger by setting printbuildcmds to
1/
0
6592 overriding the compile setting.
</td>
6599 <div class=
"section" id=
"gnu-general-public-license">
6600 <h1><a class=
"toc-backref" href=
"#id249">GNU General Public License
</a></h1>
6601 <pre class=
"literal-block">
6602 GNU GENERAL PUBLIC LICENSE
6603 Version
2, June
1991
6605 Copyright (C)
1989,
1991 Free Software Foundation, Inc.
6606 51 Franklin Street, Fifth Floor, Boston, MA
02110-
1301 USA
6607 Everyone is permitted to copy and distribute verbatim copies
6608 of this license document, but changing it is not allowed.
6612 The licenses for most software are designed to take away your
6613 freedom to share and change it. By contrast, the GNU General Public
6614 License is intended to guarantee your freedom to share and change free
6615 software--to make sure the software is free for all its users. This
6616 General Public License applies to most of the Free Software
6617 Foundation's software and to any other program whose authors commit to
6618 using it. (Some other Free Software Foundation software is covered by
6619 the GNU Library General Public License instead.) You can apply it to
6622 When we speak of free software, we are referring to freedom, not
6623 price. Our General Public Licenses are designed to make sure that you
6624 have the freedom to distribute copies of free software (and charge for
6625 this service if you wish), that you receive source code or can get it
6626 if you want it, that you can change the software or use pieces of it
6627 in new free programs; and that you know you can do these things.
6629 To protect your rights, we need to make restrictions that forbid
6630 anyone to deny you these rights or to ask you to surrender the rights.
6631 These restrictions translate to certain responsibilities for you if you
6632 distribute copies of the software, or if you modify it.
6634 For example, if you distribute copies of such a program, whether
6635 gratis or for a fee, you must give the recipients all the rights that
6636 you have. You must make sure that they, too, receive or can get the
6637 source code. And you must show them these terms so they know their
6640 We protect your rights with two steps: (
1) copyright the software, and
6641 (
2) offer you this license which gives you legal permission to copy,
6642 distribute and/or modify the software.
6644 Also, for each author's protection and ours, we want to make certain
6645 that everyone understands that there is no warranty for this free
6646 software. If the software is modified by someone else and passed on, we
6647 want its recipients to know that what they have is not the original, so
6648 that any problems introduced by others will not reflect on the original
6649 authors' reputations.
6651 Finally, any free program is threatened constantly by software
6652 patents. We wish to avoid the danger that redistributors of a free
6653 program will individually obtain patent licenses, in effect making the
6654 program proprietary. To prevent this, we have made it clear that any
6655 patent must be licensed for everyone's free use or not licensed at all.
6657 The precise terms and conditions for copying, distribution and
6658 modification follow.
6660 GNU GENERAL PUBLIC LICENSE
6661 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
6663 0. This License applies to any program or other work which contains
6664 a notice placed by the copyright holder saying it may be distributed
6665 under the terms of this General Public License. The
"Program
", below,
6666 refers to any such program or work, and a
"work based on the Program
"
6667 means either the Program or any derivative work under copyright law:
6668 that is to say, a work containing the Program or a portion of it,
6669 either verbatim or with modifications and/or translated into another
6670 language. (Hereinafter, translation is included without limitation in
6671 the term
"modification
".) Each licensee is addressed as
"you
".
6673 Activities other than copying, distribution and modification are not
6674 covered by this License; they are outside its scope. The act of
6675 running the Program is not restricted, and the output from the Program
6676 is covered only if its contents constitute a work based on the
6677 Program (independent of having been made by running the Program).
6678 Whether that is true depends on what the Program does.
6680 1. You may copy and distribute verbatim copies of the Program's
6681 source code as you receive it, in any medium, provided that you
6682 conspicuously and appropriately publish on each copy an appropriate
6683 copyright notice and disclaimer of warranty; keep intact all the
6684 notices that refer to this License and to the absence of any warranty;
6685 and give any other recipients of the Program a copy of this License
6686 along with the Program.
6688 You may charge a fee for the physical act of transferring a copy, and
6689 you may at your option offer warranty protection in exchange for a fee.
6691 2. You may modify your copy or copies of the Program or any portion
6692 of it, thus forming a work based on the Program, and copy and
6693 distribute such modifications or work under the terms of Section
1
6694 above, provided that you also meet all of these conditions:
6696 a) You must cause the modified files to carry prominent notices
6697 stating that you changed the files and the date of any change.
6699 b) You must cause any work that you distribute or publish, that in
6700 whole or in part contains or is derived from the Program or any
6701 part thereof, to be licensed as a whole at no charge to all third
6702 parties under the terms of this License.
6704 c) If the modified program normally reads commands interactively
6705 when run, you must cause it, when started running for such
6706 interactive use in the most ordinary way, to print or display an
6707 announcement including an appropriate copyright notice and a
6708 notice that there is no warranty (or else, saying that you provide
6709 a warranty) and that users may redistribute the program under
6710 these conditions, and telling the user how to view a copy of this
6711 License. (Exception: if the Program itself is interactive but
6712 does not normally print such an announcement, your work based on
6713 the Program is not required to print an announcement.)
6715 These requirements apply to the modified work as a whole. If
6716 identifiable sections of that work are not derived from the Program,
6717 and can be reasonably considered independent and separate works in
6718 themselves, then this License, and its terms, do not apply to those
6719 sections when you distribute them as separate works. But when you
6720 distribute the same sections as part of a whole which is a work based
6721 on the Program, the distribution of the whole must be on the terms of
6722 this License, whose permissions for other licensees extend to the
6723 entire whole, and thus to each and every part regardless of who wrote it.
6725 Thus, it is not the intent of this section to claim rights or contest
6726 your rights to work written entirely by you; rather, the intent is to
6727 exercise the right to control the distribution of derivative or
6728 collective works based on the Program.
6730 In addition, mere aggregation of another work not based on the Program
6731 with the Program (or with a work based on the Program) on a volume of
6732 a storage or distribution medium does not bring the other work under
6733 the scope of this License.
6735 3. You may copy and distribute the Program (or a work based on it,
6736 under Section
2) in object code or executable form under the terms of
6737 Sections
1 and
2 above provided that you also do one of the following:
6739 a) Accompany it with the complete corresponding machine-readable
6740 source code, which must be distributed under the terms of Sections
6741 1 and
2 above on a medium customarily used for software interchange; or,
6743 b) Accompany it with a written offer, valid for at least three
6744 years, to give any third party, for a charge no more than your
6745 cost of physically performing source distribution, a complete
6746 machine-readable copy of the corresponding source code, to be
6747 distributed under the terms of Sections
1 and
2 above on a medium
6748 customarily used for software interchange; or,
6750 c) Accompany it with the information you received as to the offer
6751 to distribute corresponding source code. (This alternative is
6752 allowed only for noncommercial distribution and only if you
6753 received the program in object code or executable form with such
6754 an offer, in accord with Subsection b above.)
6756 The source code for a work means the preferred form of the work for
6757 making modifications to it. For an executable work, complete source
6758 code means all the source code for all modules it contains, plus any
6759 associated interface definition files, plus the scripts used to
6760 control compilation and installation of the executable. However, as a
6761 special exception, the source code distributed need not include
6762 anything that is normally distributed (in either source or binary
6763 form) with the major components (compiler, kernel, and so on) of the
6764 operating system on which the executable runs, unless that component
6765 itself accompanies the executable.
6767 If distribution of executable or object code is made by offering
6768 access to copy from a designated place, then offering equivalent
6769 access to copy the source code from the same place counts as
6770 distribution of the source code, even though third parties are not
6771 compelled to copy the source along with the object code.
6773 4. You may not copy, modify, sublicense, or distribute the Program
6774 except as expressly provided under this License. Any attempt
6775 otherwise to copy, modify, sublicense or distribute the Program is
6776 void, and will automatically terminate your rights under this License.
6777 However, parties who have received copies, or rights, from you under
6778 this License will not have their licenses terminated so long as such
6779 parties remain in full compliance.
6781 5. You are not required to accept this License, since you have not
6782 signed it. However, nothing else grants you permission to modify or
6783 distribute the Program or its derivative works. These actions are
6784 prohibited by law if you do not accept this License. Therefore, by
6785 modifying or distributing the Program (or any work based on the
6786 Program), you indicate your acceptance of this License to do so, and
6787 all its terms and conditions for copying, distributing or modifying
6788 the Program or works based on it.
6790 6. Each time you redistribute the Program (or any work based on the
6791 Program), the recipient automatically receives a license from the
6792 original licensor to copy, distribute or modify the Program subject to
6793 these terms and conditions. You may not impose any further
6794 restrictions on the recipients' exercise of the rights granted herein.
6795 You are not responsible for enforcing compliance by third parties to
6798 7. If, as a consequence of a court judgment or allegation of patent
6799 infringement or for any other reason (not limited to patent issues),
6800 conditions are imposed on you (whether by court order, agreement or
6801 otherwise) that contradict the conditions of this License, they do not
6802 excuse you from the conditions of this License. If you cannot
6803 distribute so as to satisfy simultaneously your obligations under this
6804 License and any other pertinent obligations, then as a consequence you
6805 may not distribute the Program at all. For example, if a patent
6806 license would not permit royalty-free redistribution of the Program by
6807 all those who receive copies directly or indirectly through you, then
6808 the only way you could satisfy both it and this License would be to
6809 refrain entirely from distribution of the Program.
6811 If any portion of this section is held invalid or unenforceable under
6812 any particular circumstance, the balance of the section is intended to
6813 apply and the section as a whole is intended to apply in other
6816 It is not the purpose of this section to induce you to infringe any
6817 patents or other property right claims or to contest validity of any
6818 such claims; this section has the sole purpose of protecting the
6819 integrity of the free software distribution system, which is
6820 implemented by public license practices. Many people have made
6821 generous contributions to the wide range of software distributed
6822 through that system in reliance on consistent application of that
6823 system; it is up to the author/donor to decide if he or she is willing
6824 to distribute software through any other system and a licensee cannot
6827 This section is intended to make thoroughly clear what is believed to
6828 be a consequence of the rest of this License.
6830 8. If the distribution and/or use of the Program is restricted in
6831 certain countries either by patents or by copyrighted interfaces, the
6832 original copyright holder who places the Program under this License
6833 may add an explicit geographical distribution limitation excluding
6834 those countries, so that distribution is permitted only in or among
6835 countries not thus excluded. In such case, this License incorporates
6836 the limitation as if written in the body of this License.
6838 9. The Free Software Foundation may publish revised and/or new versions
6839 of the General Public License from time to time. Such new versions will
6840 be similar in spirit to the present version, but may differ in detail to
6841 address new problems or concerns.
6843 Each version is given a distinguishing version number. If the Program
6844 specifies a version number of this License which applies to it and
"any
6845 later version
", you have the option of following the terms and conditions
6846 either of that version or of any later version published by the Free
6847 Software Foundation. If the Program does not specify a version number of
6848 this License, you may choose any version ever published by the Free Software
6851 10. If you wish to incorporate parts of the Program into other free
6852 programs whose distribution conditions are different, write to the author
6853 to ask for permission. For software which is copyrighted by the Free
6854 Software Foundation, write to the Free Software Foundation; we sometimes
6855 make exceptions for this. Our decision will be guided by the two goals
6856 of preserving the free status of all derivatives of our free software and
6857 of promoting the sharing and reuse of software generally.
6861 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
6862 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
6863 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
6864 PROVIDE THE PROGRAM
"AS IS
" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
6865 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
6866 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
6867 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
6868 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
6869 REPAIR OR CORRECTION.
6871 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
6872 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
6873 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
6874 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
6875 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
6876 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
6877 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
6878 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
6879 POSSIBILITY OF SUCH DAMAGES.
6881 END OF TERMS AND CONDITIONS
6883 How to Apply These Terms to Your New Programs
6885 If you develop a new program, and you want it to be of the greatest
6886 possible use to the public, the best way to achieve this is to make it
6887 free software which everyone can redistribute and change under these terms.
6889 To do so, attach the following notices to the program. It is safest
6890 to attach them to the start of each source file to most effectively
6891 convey the exclusion of warranty; and each file should have at least
6892 the
"copyright
" line and a pointer to where the full notice is found.
6894 <one line to give the program's name and a brief idea of what it does.
>
6895 Copyright (C)
<year
> <name of author
>
6897 This program is free software; you can redistribute it and/or modify
6898 it under the terms of the GNU General Public License as published by
6899 the Free Software Foundation; either version
2 of the License, or
6900 (at your option) any later version.
6902 This program is distributed in the hope that it will be useful,
6903 but WITHOUT ANY WARRANTY; without even the implied warranty of
6904 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6905 GNU General Public License for more details.
6907 You should have received a copy of the GNU General Public License along
6908 with this program; if not, write to the Free Software Foundation, Inc.,
6909 51 Franklin Street, Fifth Floor, Boston, MA
02110-
1301 USA.
6912 Also add information on how to contact you by electronic and paper mail.
6914 If the program is interactive, make it output a short notice like this
6915 when it starts in an interactive mode:
6917 Gnomovision version
69, Copyright (C) year name of author
6918 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
6919 This is free software, and you are welcome to redistribute it
6920 under certain conditions; type `show c' for details.
6922 The hypothetical commands `show w' and `show c' should show the appropriate
6923 parts of the General Public License. Of course, the commands you use may
6924 be called something other than `show w' and `show c'; they could even be
6925 mouse-clicks or menu items--whatever suits your program.
6927 You should also get your employer (if you work as a programmer) or your
6928 school, if any, to sign a
"copyright disclaimer
" for the program, if
6929 necessary. Here is a sample; alter the names:
6931 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
6932 `Gnomovision' (which makes passes at compilers) written by James Hacker.
6934 <signature of Ty Coon
>,
1 April
1989
6935 Ty Coon, President of Vice
6937 This General Public License does not permit incorporating your program into
6938 proprietary programs. If your program is a subroutine library, you may
6939 consider it more useful to permit linking proprietary applications with the
6940 library. If this is what you want to do, use the GNU Library General
6941 Public License instead of this License.
6944 <div class=
"section" id=
"license-for-scintilla-and-scite">
6945 <h1><a class=
"toc-backref" href=
"#id250">License for Scintilla and SciTE
</a></h1>
6946 <p>Copyright
1998-
2003 by Neil Hodgson
<neilh(at)scintilla(dot)org
></p>
6947 <p>All Rights Reserved
</p>
6948 <p>Permission to use, copy, modify, and distribute this software and
6949 its documentation for any purpose and without fee is hereby granted,
6950 provided that the above copyright notice appear in all copies and
6951 that both that copyright notice and this permission notice appear in
6952 supporting documentation.
</p>
6953 <p>NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
6954 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
6955 NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
6956 CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
6957 OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
6958 OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
6959 USE OR PERFORMANCE OF THIS SOFTWARE.
</p>
6962 <div class=
"footer">
6963 <hr class=
"footer" />
6964 <a class=
"reference external" href=
"geany.txt">View document source
</a>.
6965 Generated on:
2014-
04-
13 15:
59 UTC.
6966 Generated by
<a class=
"reference external" href=
"http://docutils.sourceforge.net/">Docutils
</a> from
<a class=
"reference external" href=
"http://docutils.sourceforge.net/rst.html">reStructuredText
</a> source.