Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

6812 lines (6721 sloc) 296.199 kB
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="" xml:lang="en" lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.8.1:" />
<meta name="authors" content="Enrico Tröger Nick Treleaven Frank Lanitz Colomban Wendling Matthew Brush" />
<meta name="date" content="2012-06-18" />
<style type="text/css">
:Author: Enrico Troeger
:Contact: enrico(dot)troeger(at)uvena(dot)de
:Copyright: This stylesheet has been placed in the public domain.
Stylesheet for Geany's documentation based on a version of John Gabriele.
@media screen {
body {
background-color: #f2f2f2;
color: #404040;
margin-left: 0.4em;
max-width: 60em;
font-size: 90%;
a {
color: #990000;
a:visited {
color: #7E558E;
a:hover {
text-decoration: none;
h1 {
border-top: 1px dotted;
margin-top: 2em;
h1, h2, h3 {
font-family: sans-serif;
color: #5D0606;
h1.title {
text-align: left }
h2 {
margin-top: 30px;
h2.subtitle {
text-align: left }
h3 {
padding-left: 3px;
blockquote, pre {
border: 1px solid;
padding: 0.4em;
blockquote {
font-family: sans-serif;
background-color: #DBEDD5;
border: 1px dotted;
border-left: 4px solid;
border-color: #9FD98C;
pre {
background-color: #ECDFCE;
border: 1px dotted;
border-left: 4px solid;
border-color: #D9BE9A;
tt, pre, code {
color: #6D4212;
table {
border: 1px solid #D9BE9A;
th {
background-color: #ECDFCE;
border: 1px dotted #D9BE9A;
td {
border: 1px dotted #D9BE9A;
.docinfo-name {
color: #5D0606;
p.admonition-title {
color: #990000;
font-weight: bold;
div.note {
margin: 1em 3em;
padding: 0em;
dt {
font-style: italic;
@media print {
<div class="document" id="geany">
<h1 class="title">Geany</h1>
<h2 class="subtitle" id="a-fast-light-gtk-ide">A fast, light, GTK+ IDE</h2>
<table class="docinfo" frame="void" rules="none">
<col class="docinfo-name" />
<col class="docinfo-content" />
<tbody valign="top">
<tr><th class="docinfo-name">Authors:</th>
<td>Enrico Tröger
<br />Nick Treleaven
<br />Frank Lanitz
<br />Colomban Wendling
<br />Matthew Brush</td></tr>
<tr><th class="docinfo-name">Date:</th>
<tr><th class="docinfo-name">Version:</th>
<p>Copyright © 2005-2012</p>
<p>This document is distributed under the terms of the GNU General Public
License as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version. A copy of this
license can be found in the file COPYING included with the source code
of this program, and also in the chapter <a class="reference internal" href="#gnu-general-public-license">GNU General Public License</a>.</p>
<div class="contents topic" id="contents">
<p class="topic-title first">Contents</p>
<ul class="simple">
<li><a class="reference internal" href="#introduction" id="id7">Introduction</a><ul>
<li><a class="reference internal" href="#about-geany" id="id8">About Geany</a></li>
<li><a class="reference internal" href="#where-to-get-it" id="id9">Where to get it</a></li>
<li><a class="reference internal" href="#license" id="id10">License</a></li>
<li><a class="reference internal" href="#about-this-document" id="id11">About this document</a></li>
<li><a class="reference internal" href="#installation" id="id12">Installation</a><ul>
<li><a class="reference internal" href="#requirements" id="id13">Requirements</a></li>
<li><a class="reference internal" href="#binary-packages" id="id14">Binary packages</a></li>
<li><a class="reference internal" href="#source-compilation" id="id15">Source compilation</a><ul>
<li><a class="reference internal" href="#autotools-based-build-system" id="id16">Autotools based build system</a></li>
<li><a class="reference internal" href="#waf-based-build-system" id="id17">Waf based build system</a><ul>
<li><a class="reference internal" href="#waf-cache" id="id18">Waf cache</a><ul>
<li><a class="reference internal" href="#cleaning-the-cache" id="id19">Cleaning the cache</a></li>
<li><a class="reference internal" href="#custom-installation" id="id20">Custom installation</a></li>
<li><a class="reference internal" href="#dynamic-linking-loader-support-and-vte" id="id21">Dynamic linking loader support and VTE</a></li>
<li><a class="reference internal" href="#build-problems" id="id22">Build problems</a></li>
<li><a class="reference internal" href="#installation-prefix" id="id23">Installation prefix</a></li>
<li><a class="reference internal" href="#usage" id="id24">Usage</a><ul>
<li><a class="reference internal" href="#getting-started" id="id25">Getting started</a></li>
<li><a class="reference internal" href="#the-geany-workspace" id="id26">The Geany workspace</a></li>
<li><a class="reference internal" href="#command-line-options" id="id27">Command line options</a></li>
<li><a class="reference internal" href="#general" id="id28">General</a><ul>
<li><a class="reference internal" href="#startup" id="id29">Startup</a></li>
<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>
<li><a class="reference internal" href="#virtual-terminal-emulator-widget-vte" id="id31">Virtual terminal emulator widget (VTE)</a></li>
<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>
<li><a class="reference internal" href="#documents" id="id33">Documents</a><ul>
<li><a class="reference internal" href="#switching-between-documents" id="id34">Switching between documents</a></li>
<li><a class="reference internal" href="#character-sets-and-unicode-byte-order-mark-bom" id="id35">Character sets and Unicode Byte-Order-Mark (BOM)</a><ul>
<li><a class="reference internal" href="#using-character-sets" id="id36">Using character sets</a></li>
<li><a class="reference internal" href="#in-file-encoding-specification" id="id37">In-file encoding specification</a></li>
<li><a class="reference internal" href="#special-encoding-none" id="id38">Special encoding &quot;None&quot;</a></li>
<li><a class="reference internal" href="#unicode-byte-order-mark-bom" id="id39">Unicode Byte-Order-Mark (BOM)</a></li>
<li><a class="reference internal" href="#editing" id="id40">Editing</a><ul>
<li><a class="reference internal" href="#folding" id="id41">Folding</a></li>
<li><a class="reference internal" href="#column-mode-editing-rectangular-selections" id="id42">Column mode editing (rectangular selections)</a></li>
<li><a class="reference internal" href="#drag-and-drop-of-text" id="id43">Drag and drop of text</a></li>
<li><a class="reference internal" href="#indentation" id="id44">Indentation</a><ul>
<li><a class="reference internal" href="#applying-new-indentation-settings" id="id45">Applying new indentation settings</a></li>
<li><a class="reference internal" href="#detecting-indent-type" id="id46">Detecting indent type</a></li>
<li><a class="reference internal" href="#auto-indentation" id="id47">Auto-indentation</a></li>
<li><a class="reference internal" href="#bookmarks" id="id48">Bookmarks</a></li>
<li><a class="reference internal" href="#code-navigation-history" id="id49">Code navigation history</a></li>
<li><a class="reference internal" href="#sending-text-through-custom-commands" id="id50">Sending text through custom commands</a></li>
<li><a class="reference internal" href="#context-actions" id="id51">Context actions</a></li>
<li><a class="reference internal" href="#autocompletion" id="id52">Autocompletion</a><ul>
<li><a class="reference internal" href="#word-part-completion" id="id53">Word part completion</a></li>
<li><a class="reference internal" href="#scope-autocompletion" id="id54">Scope autocompletion</a></li>
<li><a class="reference internal" href="#user-definable-snippets" id="id55">User-definable snippets</a><ul>
<li><a class="reference internal" href="#snippet-keybindings" id="id56">Snippet keybindings</a></li>
<li><a class="reference internal" href="#inserting-unicode-characters" id="id57">Inserting Unicode characters</a></li>
<li><a class="reference internal" href="#search-replace-and-go-to" id="id58">Search, replace and go to</a><ul>
<li><a class="reference internal" href="#toolbar-entries" id="id59">Toolbar entries</a><ul>
<li><a class="reference internal" href="#search-bar" id="id60">Search bar</a></li>
<li><a class="reference internal" href="#find" id="id61">Find</a><ul>
<li><a class="reference internal" href="#matching-options" id="id62">Matching options</a></li>
<li><a class="reference internal" href="#find-all" id="id63">Find all</a></li>
<li><a class="reference internal" href="#change-font-in-search-dialog-text-fields" id="id64">Change font in search dialog text fields</a></li>
<li><a class="reference internal" href="#find-selection" id="id65">Find selection</a></li>
<li><a class="reference internal" href="#find-usage" id="id66">Find usage</a></li>
<li><a class="reference internal" href="#find-in-files" id="id67">Find in files</a><ul>
<li><a class="reference internal" href="#filtering-out-version-control-files" id="id68">Filtering out version control files</a></li>
<li><a class="reference internal" href="#replace" id="id69">Replace</a><ul>
<li><a class="reference internal" href="#replace-all" id="id70">Replace all</a></li>
<li><a class="reference internal" href="#go-to-tag-definition" id="id71">Go to tag definition</a></li>
<li><a class="reference internal" href="#go-to-tag-declaration" id="id72">Go to tag declaration</a></li>
<li><a class="reference internal" href="#go-to-line" id="id73">Go to line</a></li>
<li><a class="reference internal" href="#regular-expressions" id="id74">Regular expressions</a></li>
<li><a class="reference internal" href="#view-menu" id="id75">View menu</a><ul>
<li><a class="reference internal" href="#color-schemes-menu" id="id76">Color schemes menu</a></li>
<li><a class="reference internal" href="#tags" id="id77">Tags</a><ul>
<li><a class="reference internal" href="#workspace-tags" id="id78">Workspace tags</a></li>
<li><a class="reference internal" href="#global-tags" id="id79">Global tags</a><ul>
<li><a class="reference internal" href="#default-global-tags-files" id="id80">Default global tags files</a></li>
<li><a class="reference internal" href="#global-tags-file-format" id="id81">Global tags file format</a><ul>
<li><a class="reference internal" href="#pipe-separated-format" id="id82">Pipe-separated format</a></li>
<li><a class="reference internal" href="#generating-a-global-tags-file" id="id83">Generating a global tags file</a><ul>
<li><a class="reference internal" href="#generating-c-c-tag-files" id="id84">Generating C/C++ tag files</a></li>
<li><a class="reference internal" href="#generating-tag-files-on-windows" id="id85">Generating tag files on Windows</a></li>
<li><a class="reference internal" href="#c-ignore-tags" id="id86">C ignore.tags</a></li>
<li><a class="reference internal" href="#preferences" id="id87">Preferences</a><ul>
<li><a class="reference internal" href="#general-startup-preferences" id="id88">General Startup preferences</a><ul>
<li><a class="reference internal" href="#id1" id="id89">Startup</a></li>
<li><a class="reference internal" href="#shutdown" id="id90">Shutdown</a></li>
<li><a class="reference internal" href="#paths" id="id91">Paths</a></li>
<li><a class="reference internal" href="#general-miscellaneous-preferences" id="id92">General Miscellaneous preferences</a><ul>
<li><a class="reference internal" href="#miscellaneous" id="id93">Miscellaneous</a></li>
<li><a class="reference internal" href="#search" id="id94">Search</a></li>
<li><a class="reference internal" href="#projects" id="id95">Projects</a></li>
<li><a class="reference internal" href="#interface-preferences" id="id96">Interface preferences</a><ul>
<li><a class="reference internal" href="#sidebar" id="id97">Sidebar</a></li>
<li><a class="reference internal" href="#fonts" id="id98">Fonts</a></li>
<li><a class="reference internal" href="#id2" id="id99">Miscellaneous</a></li>
<li><a class="reference internal" href="#interface-notebook-tab-preferences" id="id100">Interface Notebook tab preferences</a><ul>
<li><a class="reference internal" href="#editor-tabs" id="id101">Editor tabs</a></li>
<li><a class="reference internal" href="#tab-positions" id="id102">Tab positions</a></li>
<li><a class="reference internal" href="#interface-toolbar-preferences" id="id103">Interface Toolbar preferences</a><ul>
<li><a class="reference internal" href="#toolbar" id="id104">Toolbar</a></li>
<li><a class="reference internal" href="#appearance" id="id105">Appearance</a></li>
<li><a class="reference internal" href="#editor-features-preferences" id="id106">Editor Features preferences</a><ul>
<li><a class="reference internal" href="#features" id="id107">Features</a></li>
<li><a class="reference internal" href="#editor-indentation-preferences" id="id108">Editor Indentation preferences</a><ul>
<li><a class="reference internal" href="#indentation-group" id="id109">Indentation group</a></li>
<li><a class="reference internal" href="#editor-completions-preferences" id="id110">Editor Completions preferences</a><ul>
<li><a class="reference internal" href="#completions" id="id111">Completions</a></li>
<li><a class="reference internal" href="#auto-close-quotes-and-brackets" id="id112">Auto-close quotes and brackets</a></li>
<li><a class="reference internal" href="#editor-display-preferences" id="id113">Editor Display preferences</a><ul>
<li><a class="reference internal" href="#display" id="id114">Display</a></li>
<li><a class="reference internal" href="#long-line-marker" id="id115">Long line marker</a></li>
<li><a class="reference internal" href="#virtual-spaces" id="id116">Virtual spaces</a></li>
<li><a class="reference internal" href="#files-preferences" id="id117">Files preferences</a><ul>
<li><a class="reference internal" href="#new-files" id="id118">New files</a></li>
<li><a class="reference internal" href="#saving-files" id="id119">Saving files</a></li>
<li><a class="reference internal" href="#id3" id="id120">Miscellaneous</a></li>
<li><a class="reference internal" href="#tools-preferences" id="id121">Tools preferences</a><ul>
<li><a class="reference internal" href="#tool-paths" id="id122">Tool paths</a></li>
<li><a class="reference internal" href="#commands" id="id123">Commands</a></li>
<li><a class="reference internal" href="#template-preferences" id="id124">Template preferences</a><ul>
<li><a class="reference internal" href="#template-data" id="id125">Template data</a></li>
<li><a class="reference internal" href="#keybinding-preferences" id="id126">Keybinding preferences</a></li>
<li><a class="reference internal" href="#printing-preferences" id="id127">Printing preferences</a></li>
<li><a class="reference internal" href="#various-preferences" id="id128">Various preferences</a></li>
<li><a class="reference internal" href="#terminal-vte-preferences" id="id129">Terminal (VTE) preferences</a><ul>
<li><a class="reference internal" href="#terminal-widget" id="id130">Terminal widget</a></li>
<li><a class="reference internal" href="#project-management" id="id131">Project management</a><ul>
<li><a class="reference internal" href="#new-project" id="id132">New project</a></li>
<li><a class="reference internal" href="#project-properties" id="id133">Project properties</a></li>
<li><a class="reference internal" href="#open-project" id="id134">Open project</a></li>
<li><a class="reference internal" href="#close-project" id="id135">Close project</a></li>
<li><a class="reference internal" href="#build-menu" id="id136">Build menu</a><ul>
<li><a class="reference internal" href="#indicators" id="id137">Indicators</a></li>
<li><a class="reference internal" href="#default-build-menu-items" id="id138">Default build menu items</a><ul>
<li><a class="reference internal" href="#compile" id="id139">Compile</a></li>
<li><a class="reference internal" href="#build" id="id140">Build</a></li>
<li><a class="reference internal" href="#make" id="id141">Make</a></li>
<li><a class="reference internal" href="#make-custom-target" id="id142">Make custom target</a></li>
<li><a class="reference internal" href="#make-object" id="id143">Make object</a></li>
<li><a class="reference internal" href="#next-error" id="id144">Next error</a></li>
<li><a class="reference internal" href="#previous-error" id="id145">Previous error</a></li>
<li><a class="reference internal" href="#execute" id="id146">Execute</a></li>
<li><a class="reference internal" href="#stopping-running-processes" id="id147">Stopping running processes</a><ul>
<li><a class="reference internal" href="#terminal-emulators" id="id148">Terminal emulators</a></li>
<li><a class="reference internal" href="#set-build-commands" id="id149">Set build commands</a></li>
<li><a class="reference internal" href="#build-menu-configuration" id="id150">Build menu configuration</a></li>
<li><a class="reference internal" href="#build-menu-commands-dialog" id="id151">Build menu commands dialog</a><ul>
<li><a class="reference internal" href="#substitutions-in-commands-and-working-directories" id="id152">Substitutions in commands and working directories</a></li>
<li><a class="reference internal" href="#build-menu-keyboard-shortcuts" id="id153">Build menu keyboard shortcuts</a></li>
<li><a class="reference internal" href="#old-settings" id="id154">Old settings</a></li>
<li><a class="reference internal" href="#printing-support" id="id155">Printing support</a></li>
<li><a class="reference internal" href="#plugins" id="id156">Plugins</a><ul>
<li><a class="reference internal" href="#plugin-manager" id="id157">Plugin manager</a></li>
<li><a class="reference internal" href="#keybindings" id="id158">Keybindings</a><ul>
<li><a class="reference internal" href="#switching-documents" id="id159">Switching documents</a></li>
<li><a class="reference internal" href="#configurable-keybindings" id="id160">Configurable keybindings</a><ul>
<li><a class="reference internal" href="#file-keybindings" id="id161">File keybindings</a></li>
<li><a class="reference internal" href="#editor-keybindings" id="id162">Editor keybindings</a></li>
<li><a class="reference internal" href="#clipboard-keybindings" id="id163">Clipboard keybindings</a></li>
<li><a class="reference internal" href="#select-keybindings" id="id164">Select keybindings</a></li>
<li><a class="reference internal" href="#insert-keybindings" id="id165">Insert keybindings</a></li>
<li><a class="reference internal" href="#format-keybindings" id="id166">Format keybindings</a></li>
<li><a class="reference internal" href="#settings-keybindings" id="id167">Settings keybindings</a></li>
<li><a class="reference internal" href="#search-keybindings" id="id168">Search keybindings</a></li>
<li><a class="reference internal" href="#go-to-keybindings" id="id169">Go to keybindings</a></li>
<li><a class="reference internal" href="#view-keybindings" id="id170">View keybindings</a></li>
<li><a class="reference internal" href="#focus-keybindings" id="id171">Focus keybindings</a></li>
<li><a class="reference internal" href="#notebook-tab-keybindings" id="id172">Notebook tab keybindings</a></li>
<li><a class="reference internal" href="#document-keybindings" id="id173">Document keybindings</a></li>
<li><a class="reference internal" href="#project-keybindings" id="id174">Project keybindings</a></li>
<li><a class="reference internal" href="#build-keybindings" id="id175">Build keybindings</a></li>
<li><a class="reference internal" href="#tools-keybindings" id="id176">Tools keybindings</a></li>
<li><a class="reference internal" href="#help-keybindings" id="id177">Help keybindings</a></li>
<li><a class="reference internal" href="#configuration-files" id="id178">Configuration files</a><ul>
<li><a class="reference internal" href="#configuration-file-paths" id="id179">Configuration file paths</a><ul>
<li><a class="reference internal" href="#paths-on-unix-like-systems" id="id180">Paths on Unix-like systems</a></li>
<li><a class="reference internal" href="#paths-on-windows" id="id181">Paths on Windows</a></li>
<li><a class="reference internal" href="#tools-menu-items" id="id182">Tools menu items</a></li>
<li><a class="reference internal" href="#global-configuration-file" id="id183">Global configuration file</a></li>
<li><a class="reference internal" href="#filetype-definition-files" id="id184">Filetype definition files</a><ul>
<li><a class="reference internal" href="#filenames" id="id185">Filenames</a></li>
<li><a class="reference internal" href="#system-files" id="id186">System files</a></li>
<li><a class="reference internal" href="#user-files" id="id187">User files</a></li>
<li><a class="reference internal" href="#custom-filetypes" id="id188">Custom filetypes</a><ul>
<li><a class="reference internal" href="#creating-a-custom-filetype-from-an-existing-filetype" id="id189">Creating a custom filetype from an existing filetype</a></li>
<li><a class="reference internal" href="#filetype-configuration" id="id190">Filetype configuration</a><ul>
<li><a class="reference internal" href="#styling-section" id="id191">[styling] section</a><ul>
<li><a class="reference internal" href="#using-a-named-style" id="id192">Using a named style</a></li>
<li><a class="reference internal" href="#reading-styles-from-another-filetype" id="id193">Reading styles from another filetype</a></li>
<li><a class="reference internal" href="#keywords-section" id="id194">[keywords] section</a></li>
<li><a class="reference internal" href="#lexer-properties-section" id="id195">[lexer_properties] section</a></li>
<li><a class="reference internal" href="#settings-section" id="id196">[settings] section</a></li>
<li><a class="reference internal" href="#indentation-section" id="id197">[indentation] section</a></li>
<li><a class="reference internal" href="#build-settings-section" id="id198">[build_settings] section</a></li>
<li><a class="reference internal" href="#special-file-filetypes-common" id="id199">Special file filetypes.common</a><ul>
<li><a class="reference internal" href="#named-styles-section" id="id200">[named_styles] section</a></li>
<li><a class="reference internal" href="#named-colors-section" id="id201">[named_colors] section</a></li>
<li><a class="reference internal" href="#id4" id="id202">[styling] section</a></li>
<li><a class="reference internal" href="#id5" id="id203">[settings] section</a></li>
<li><a class="reference internal" href="#filetype-extensions" id="id204">Filetype extensions</a></li>
<li><a class="reference internal" href="#filetype-group-membership" id="id205">Filetype group membership</a></li>
<li><a class="reference internal" href="#preferences-file-format" id="id206">Preferences file format</a><ul>
<li><a class="reference internal" href="#build-menu-section" id="id207">[build-menu] section</a></li>
<li><a class="reference internal" href="#project-file-format" id="id208">Project file format</a><ul>
<li><a class="reference internal" href="#build-menu-additions" id="id209">[build-menu] additions</a></li>
<li><a class="reference internal" href="#templates" id="id210">Templates</a><ul>
<li><a class="reference internal" href="#template-meta-data" id="id211">Template meta data</a></li>
<li><a class="reference internal" href="#file-templates" id="id212">File templates</a><ul>
<li><a class="reference internal" href="#adding-file-templates" id="id213">Adding file templates</a></li>
<li><a class="reference internal" href="#customizing-templates" id="id214">Customizing templates</a><ul>
<li><a class="reference internal" href="#template-wildcards" id="id215">Template wildcards</a><ul>
<li><a class="reference internal" href="#special-command-wildcard" id="id216">Special {command:} wildcard</a></li>
<li><a class="reference internal" href="#customizing-the-toolbar" id="id217">Customizing the toolbar</a><ul>
<li><a class="reference internal" href="#manually-editing-the-toolbar-layout" id="id218">Manually editing the toolbar layout</a></li>
<li><a class="reference internal" href="#available-toolbar-elements" id="id219">Available toolbar elements</a></li>
<li><a class="reference internal" href="#plugin-documentation" id="id220">Plugin documentation</a><ul>
<li><a class="reference internal" href="#html-characters" id="id221">HTML Characters</a><ul>
<li><a class="reference internal" href="#insert-entity-dialog" id="id222">Insert entity dialog</a></li>
<li><a class="reference internal" href="#replace-special-chars-by-its-entity" id="id223">Replace special chars by its entity</a><ul>
<li><a class="reference internal" href="#at-typing-time" id="id224">At typing time</a></li>
<li><a class="reference internal" href="#bulk-replacement" id="id225">Bulk replacement</a></li>
<li><a class="reference internal" href="#save-actions" id="id226">Save Actions</a><ul>
<li><a class="reference internal" href="#instant-save" id="id227">Instant Save</a></li>
<li><a class="reference internal" href="#backup-copy" id="id228">Backup Copy</a></li>
<li><a class="reference internal" href="#contributing-to-this-document" id="id229">Contributing to this document</a></li>
<li><a class="reference internal" href="#scintilla-keyboard-commands" id="id230">Scintilla keyboard commands</a><ul>
<li><a class="reference internal" href="#keyboard-commands" id="id231">Keyboard commands</a></li>
<li><a class="reference internal" href="#tips-and-tricks" id="id232">Tips and tricks</a><ul>
<li><a class="reference internal" href="#document-notebook" id="id233">Document notebook</a></li>
<li><a class="reference internal" href="#editor" id="id234">Editor</a></li>
<li><a class="reference internal" href="#interface" id="id235">Interface</a></li>
<li><a class="reference internal" href="#gtk-related" id="id236">GTK-related</a></li>
<li><a class="reference internal" href="#compile-time-options" id="id237">Compile-time options</a><ul>
<li><a class="reference internal" href="#src-geany-h" id="id238">src/geany.h</a></li>
<li><a class="reference internal" href="#project-h" id="id239">project.h</a></li>
<li><a class="reference internal" href="#filetypes-c" id="id240">filetypes.c</a></li>
<li><a class="reference internal" href="#editor-h" id="id241">editor.h</a></li>
<li><a class="reference internal" href="#keyfile-c" id="id242">keyfile.c</a></li>
<li><a class="reference internal" href="#build-c" id="id243">build.c</a></li>
<li><a class="reference internal" href="#gnu-general-public-license" id="id244">GNU General Public License</a></li>
<li><a class="reference internal" href="#license-for-scintilla-and-scite" id="id245">License for Scintilla and SciTE</a></li>
<div class="section" id="introduction">
<h1><a class="toc-backref" href="#id7">Introduction</a></h1>
<div class="section" id="about-geany">
<h2><a class="toc-backref" href="#id8">About Geany</a></h2>
<p>Geany is a small and lightweight Integrated Development Environment. It
was developed to provide a small and fast IDE, which has only a few
dependencies on other packages. Another goal was to be as independent
as possible from a particular Desktop Environment like KDE or GNOME -
Geany only requires the GTK2 runtime libraries.</p>
<p>Some basic features of Geany:</p>
<ul class="simple">
<li>Syntax highlighting</li>
<li>Code folding</li>
<li>Autocompletion of symbols/words</li>
<li>Construct completion/snippets</li>
<li>Auto-closing of XML and HTML tags</li>
<li>Many supported filetypes including C, Java, PHP, HTML, Python, Perl,
Pascal, and others</li>
<li>Symbol lists</li>
<li>Code navigation</li>
<li>Build system to compile and execute your code</li>
<li>Simple project management</li>
<li>Plugin interface</li>
<div class="section" id="where-to-get-it">
<h2><a class="toc-backref" href="#id9">Where to get it</a></h2>
<p>You can obtain Geany from <a class="reference external" href=""></a> or perhaps also from
your distribution. For a list of available packages, please see
<a class="reference external" href=""></a>.</p>
<div class="section" id="license">
<h2><a class="toc-backref" href="#id10">License</a></h2>
<p>Geany is distributed under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version. A copy of this
license can be found in the file COPYING included with the source
code of this program and in the chapter, <a class="reference internal" href="#gnu-general-public-license">GNU General Public License</a>.</p>
<p>The included Scintilla library (found in the subdirectory
<tt class="docutils literal">scintilla/</tt>) has its own license, which can be found in the chapter,
<a class="reference internal" href="#license-for-scintilla-and-scite">License for Scintilla and SciTE</a>.</p>
<div class="section" id="about-this-document">
<h2><a class="toc-backref" href="#id11">About this document</a></h2>
<p>This documentation is available in HTML and text formats.
The latest version can always be found at <a class="reference external" href=""></a>.</p>
<p>If you want to contribute to it, see <a class="reference internal" href="#contributing-to-this-document">Contributing to this document</a>.</p>
<div class="section" id="installation">
<h1><a class="toc-backref" href="#id12">Installation</a></h1>
<div class="section" id="requirements">
<h2><a class="toc-backref" href="#id13">Requirements</a></h2>
<p>You will need the GTK (&gt;= 2.16.0) libraries and their dependencies
(Pango, GLib and ATK). Your distro should provide packages for these,
usually installed by default. For Windows, you can download an installer
from the website which bundles these libraries.</p>
<div class="section" id="binary-packages">
<h2><a class="toc-backref" href="#id14">Binary packages</a></h2>
<p>There are many binary packages available. For an up-to-date but maybe
incomplete list see <a class="reference external" href=""></a>.</p>
<div class="section" id="source-compilation">
<h2><a class="toc-backref" href="#id15">Source compilation</a></h2>
<p>Compiling Geany is quite easy.
To do so, you need the GTK (&gt;= 2.16.0) libraries and header files.
You also need the Pango, GLib and ATK libraries and header files.
All these files are available at <a class="reference external" href=""></a>, but very often
your distro will provide development packages to save the trouble of
building these yourself.</p>
<p>Furthermore you need, of course, a C and C++ compiler. The GNU versions
of these tools are recommended.</p>
<div class="section" id="autotools-based-build-system">
<h3><a class="toc-backref" href="#id16">Autotools based build system</a></h3>
<p>The Autotools based build system is very mature and has been well tested.
To use it, you just need the Make tool, preferably GNU Make.</p>
<p>Then run the following commands:</p>
<pre class="literal-block">
$ ./configure
$ make
<p>Then as root:</p>
<pre class="literal-block">
% make install
<div class="section" id="waf-based-build-system">
<h3><a class="toc-backref" href="#id17">Waf based build system</a></h3>
<p>The Waf build system is still quite young and under heavy development but already in a
usable state. In contrast to the Autotools system, Waf needs Python. So before using Waf, you need
to install Python on your system.
The advantage of the Waf build system over the Autotools based build system is that the whole
build process might be a bit faster. Especially when you use the Waf
cache feature for repetitive builds (e.g. when changing only a few source files
to test something) will become much faster since Waf will cache and re-use the
unchanged built files and only compile the changed code again. See <a class="reference internal" href="#waf-cache">Waf Cache</a> for details.
To build Geany with Waf as run:</p>
<pre class="literal-block">
$ ./waf configure
$ ./waf build
<p>Then as root:</p>
<pre class="literal-block">
% ./waf install
<div class="section" id="waf-cache">
<h4><a class="toc-backref" href="#id18">Waf cache</a></h4>
<p>The Waf build system has a nice and interesting feature which can help to avoid
a lot of unnecessary rebuilding of unchanged code. This often happens when developing new features
or trying to debug something in Geany.
Waf is able to store and retrieve the object files from a cache. This cache is declared
using the environment variable <tt class="docutils literal">WAFCACHE</tt>.
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
this, you first need to create this directory:</p>
<pre class="literal-block">
$ mkdir -p ~/.cache/waf
<p>then add the environment variable to your shell configuration (the following example is for
Bash and should be adjusted to your used shell):</p>
<pre class="literal-block">
export WAFCACHE=/home/username/.cache/waf
<p>Remember to replace <tt class="docutils literal">username</tt> with your actual username.</p>
<p>More information about the Waf cache feature are available at
<a class="reference external" href=""></a>.</p>
<div class="section" id="cleaning-the-cache">
<h5><a class="toc-backref" href="#id19">Cleaning the cache</a></h5>
<p>You should be careful about the size of the cache directory as it may
grow rapidly over time.
Waf doesn't do any cleaning or other house-keeping of the cache yet, so you need to keep it
clean by yourself.
An easy way to keep it clean is to run the following command regularly to remove old
cached files:</p>
<pre class="literal-block">
$ find /home/username/.cache/waf -mtime +14 -exec rm {} \;
<p>This will delete all files in the cache directory which are older than 14 days.</p>
<p>For details about the <tt class="docutils literal">find</tt> command and its options, check its manual page.</p>
<div class="section" id="custom-installation">
<h3><a class="toc-backref" href="#id20">Custom installation</a></h3>
<p>The configure script supports several common options, for a detailed
list, type:</p>
<pre class="literal-block">
$ ./configure --help
<dl class="docutils">
<dd>$ ./waf --help</dd>
<p>(depending on which build system you use).</p>
<p>You may also want to read the INSTALL file for advanced installation
<ul class="simple">
<li>See also <a class="reference internal" href="#compile-time-options">Compile-time options</a>.</li>
<div class="section" id="dynamic-linking-loader-support-and-vte">
<h3><a class="toc-backref" href="#id21">Dynamic linking loader support and VTE</a></h3>
<p>In the case that your system lacks dynamic linking loader support, you
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>
script. This prevents compiling Geany with dynamic linking loader
support for automatically loading <tt class="docutils literal"></tt> if available.</p>
<div class="section" id="build-problems">
<h3><a class="toc-backref" href="#id22">Build problems</a></h3>
<p>If there are any errors during compilation, check your build
environment and try to find the error, otherwise contact the mailing
list or one the authors. Sometimes you might need to ask for specific
help from your distribution.</p>
<div class="section" id="installation-prefix">
<h2><a class="toc-backref" href="#id23">Installation prefix</a></h2>
<p>If you want to find Geany's system files after installation you may
want to know the installation prefix.</p>
<p>Pass the <tt class="docutils literal"><span class="pre">--print-prefix</span></tt> option to Geany to check this - see
<a class="reference internal" href="#command-line-options">Command line options</a>. The first path is the prefix.</p>
<p>On Unix-like systems this is commonly <tt class="docutils literal">/usr</tt> if you installed from
a binary package, or <tt class="docutils literal">/usr/local</tt> if you build from source.</p>
<div class="note">
<p class="first admonition-title">Note</p>
<p class="last">Editing system files is not necessary as you should use the
per-user configuration files instead, which don't need root
permissions. See <a class="reference internal" href="#configuration-files">Configuration files</a>.</p>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#id24">Usage</a></h1>
<div class="section" id="getting-started">
<h2><a class="toc-backref" href="#id25">Getting started</a></h2>
<p>You can start Geany in the following ways:</p>
<li><p class="first">From the Desktop Environment menu:</p>
<p>Choose in your application menu of your used Desktop Environment:
Development --&gt; Geany.</p>
<li><p class="first">From the command line:</p>
<p>To start Geany from a command line, type the following and press
<pre class="literal-block">
% geany
<div class="section" id="the-geany-workspace">
<h2><a class="toc-backref" href="#id26">The Geany workspace</a></h2>
<p>The Geany window is shown in the following figure:</p>
<img alt="./images/main_window.png" src="./images/main_window.png" />
<p>The workspace has the following parts:</p>
<ul class="simple">
<li>The menu.</li>
<li>An optional toolbar.</li>
<li>An optional sidebar that can show the following tabs:<ul>
<li>Documents - A document list, and</li>
<li>Symbols - A list of symbols in your code.</li>
<li>The main editor window.</li>
<li>An optional message window which can show the following tabs:<ul>
<li>Status - A list of status messages.</li>
<li>Compiler - The output of compiling or building programs.</li>
<li>Messages - Results of 'Find Usage', 'Find in Files' and other actions</li>
<li>Scribble - A text scratchpad for any use.</li>
<li>Terminal - An optional terminal window.</li>
<li>A status bar</li>
<p>Most of these can be configured in the <a class="reference internal" href="#interface-preferences">Interface preferences</a>, the
<a class="reference internal" href="#view-menu">View menu</a>, or the popup menu for the relevant area.</p>
<p>Additional tabs may be added to the sidebar and message window by plugins.</p>
<p>The position of the tabs can be selected in the interface preferences.</p>
<p>The sizes of the sidebar and message window can be adjusted by
dragging the dividers.</p>
<div class="section" id="command-line-options">
<h2><a class="toc-backref" href="#id27">Command line options</a></h2>
<table border="1" class="docutils">
<col width="9%" />
<col width="18%" />
<col width="72%" />
<thead valign="bottom">
<tr><th class="head">Short option</th>
<th class="head">Long option</th>
<th class="head">Function</th>
<tbody valign="top">
<td>Set initial line number for the first opened file
(same as --line, do not put a space between the + sign
and the number). E.g. &quot;geany +7; will open the
file and place the cursor in line 7.</td>
<td>Set initial column number for the first opened file.</td>
<tr><td>-c dir_name</td>
<td>Use an alternate configuration directory. The default
configuration directory is <tt class="docutils literal"><span class="pre">~/.config/geany/</span></tt> and that
is where <tt class="docutils literal">geany.conf</tt> and other configuration files
<td>Print a list of Geany's internal filetype names (useful
for snippets configuration).</td>
<td>Generate a global tags file (see
<a class="reference internal" href="#generating-a-global-tags-file">Generating a global tags file</a>).</td>
<td>Don't preprocess C/C++ files when generating tags.</td>
<td>Do not open files in a running instance, force opening
a new instance. Only available if Geany was compiled
with support for Sockets.</td>
<td>Set initial line number for the first opened file.</td>
<td>Return a list of open documents in a running Geany
This can be used to read the currently opened documents in
Geany from an external script or tool. The returned list
is separated by newlines (LF) and consists of the full,
UTF-8 encoded filenames of the documents.
Only available if Geany was compiled with support for
<td>Do not show the message window. Use this option if you
do not need compiler messages or VTE support.</td>
<td>Do not load symbol completion and call tip data. Use this
option if you do not want to use them.</td>
<td>Do not load plugins or plugin support.</td>
<td>Print installation prefix, the data directory, the lib
directory and the locale directory (in that order) to
stdout, one line each. This is mainly intended for plugin
authors to detect installation paths.</td>
<td>Open all files given on the command line in read-only mode.
This only applies to files opened explicitly from the command
line, so files from previous sessions or project files are
<td>Do not load the previous session's files.</td>
<td>Do not load terminal support. Use this option if you do
not want to load the virtual terminal emulator widget
at startup. If you do not have <tt class="docutils literal"></tt> installed,
then terminal-support is automatically disabled. Only
available if Geany was compiled with support for VTE.</td>
<td><p class="first">Use this socket filename for communication with a
running Geany instance. This can be used with the following
command to execute Geany on the current workspace:</p>
<pre class="last literal-block">
geany --socket-file=/tmp/geany-sock-$(xprop -root _NET_CURRENT_DESKTOP | awk '{print $3}')
<td>Specify explicitly the path including filename or only
the filename to the VTE library, e.g.
<tt class="docutils literal">/usr/lib/</tt> or <tt class="docutils literal"></tt>. This option is
only needed when the auto-detection does not work. Only
available if Geany was compiled with support for VTE.</td>
<td>Be verbose (print useful status messages).</td>
<td>Show version information and exit.</td>
<td>Show help information and exit.</td>
<td>[files ...]</td>
<td><p class="first">Open all given files at startup. This option causes
Geany to ignore loading stored files from the last
session (if enabled).
Geany also recognizes line and column information when
appended to the filename with colons, e.g.
&quot;geany; will open the file and
place the cursor in line 10 at column 5.</p>
<p class="last">Projects can also be opened but a project file (*.geany)
must be the first non-option argument. All additionally
given files are ignored.</p>
<p>You can also pass line number and column number information, e.g.:</p>
<pre class="literal-block">
<p>Geany supports all generic GTK options, a list is available on the
help screen.</p>
<div class="section" id="general">
<h2><a class="toc-backref" href="#id28">General</a></h2>
<div class="section" id="startup">
<h3><a class="toc-backref" href="#id29">Startup</a></h3>
<p>At startup, Geany loads all files from the last time Geany was
launched. You can disable this feature in the preferences dialog
(see <a class="reference internal" href="#general-startup-preferences">General Startup preferences</a>).</p>
<p>You can start several instances of Geany, but only the first will
load files from the last session. In the subsequent instances, you
can find these files in the file menu under the &quot;Recent files&quot; item.
By default this contains the last 10 recently opened files. You can
change the number of recently opened files in the preferences dialog.</p>
<p>To run a second instance of Geany, do not specify any filenames on
the command-line, or disable opening files in a running instance
using the appropriate command line option.</p>
<div class="section" id="opening-files-from-the-command-line-in-a-running-instance">
<h3><a class="toc-backref" href="#id30">Opening files from the command-line in a running instance</a></h3>
<p>Geany detects if there is an an instance of itself already running and opens files
from the command-line in that instance. So, Geany can
be used to view and edit files by opening them from other programs
such as a file manager.</p>
<p>You can also pass line number and column number information, e.g.:</p>
<pre class="literal-block">
<p>This would open the file <tt class="docutils literal"></tt> with the cursor on line 55,
column 4.</p>
<p>If you do not like this for some reason, you can disable using the first
instance by using the appropriate command line option -- see the section
called <a class="reference internal" href="#command-line-options">Command line options</a>.</p>
<div class="section" id="virtual-terminal-emulator-widget-vte">
<h3><a class="toc-backref" href="#id31">Virtual terminal emulator widget (VTE)</a></h3>
<p>If you have installed <tt class="docutils literal"></tt> on your system, it is loaded
automatically by Geany, and you will have a terminal widget in the
notebook at the bottom.</p>
<p>If Geany cannot find any <tt class="docutils literal"></tt> at startup, the terminal widget
will not be loaded. So there is no need to install the package containing
this file in order to run Geany. Additionally, you can disable the use
of the terminal widget by command line option, for more information
see the section called <a class="reference internal" href="#command-line-options">Command line options</a>.</p>
<p>You can use this terminal (from now on called VTE) much as you would
a terminal program like xterm. There is basic clipboard support. You
can paste the contents of the clipboard by pressing the right mouse
button to open the popup menu, and choosing Paste. To copy text from
the VTE, just select the desired text and then press the right mouse
button and choose Copy from the popup menu. On systems running the
X Window System you can paste the last selected text by pressing the
middle mouse button in the VTE (on 2-button mice, the middle button
can often be simulated by pressing both mouse buttons together).</p>
<p>In the preferences dialog you can specify a shell which should be
started in the VTE. To make the specified shell a login shell just
use the appropriate command line options for the shell. These options
should be found in the manual page of the shell. For zsh and bash
you can use the argument <tt class="docutils literal"><span class="pre">--login</span></tt>.</p>
<div class="note">
<p class="first admonition-title">Note</p>
<p class="last">Geany tries to load <tt class="docutils literal"></tt>. If this fails, it tries to load
some other filenames. If this fails too, you should check whether you
installed libvte correctly. Again note, Geany will run without this
<p>It could be, that the library is called something else than
<tt class="docutils literal"></tt> (e.g. on FreeBSD 6.0 it is called <tt class="docutils literal"></tt>). If so
please set a link to the correct file (as root):</p>
<pre class="literal-block">
# ln -s /usr/lib/ /usr/lib/
<p>Obviously, you have to adjust the paths and set X to the number of your
<tt class="docutils literal"></tt>.</p>
<p>You can also specify the filename of the VTE library to use on the command
line (see the section called <a class="reference internal" href="#command-line-options">Command line options</a>) or at compile time
by specifying the command line option <tt class="docutils literal"><span class="pre">--with-vte-module-path</span></tt> to
<div class="section" id="defining-own-widget-styles-using-gtkrc-2-0">
<h3><a class="toc-backref" href="#id32">Defining own widget styles using .gtkrc-2.0</a></h3>
<p>You can define your widget style for many of Geany's GUI parts. To
do this, just edit your <tt class="docutils literal"><span class="pre">.gtkrc-2.0</span></tt> (usually found in your home
directory on UNIX-like systems and in the etc subdirectory of your
Geany installation on Windows).</p>
<p>To have a defined style used by Geany you must assign it to
at least one of Geany's widgets. For example use the following line:</p>
<pre class="literal-block">
widget &quot;Geany*&quot; style &quot;geanyStyle&quot;
<p>This would assign your style &quot;geany_style&quot; to all Geany
widgets. You can also assign styles only to specific widgets. At the
moment you can use the following widgets:</p>
<ul class="simple">
<p>An example of a simple <tt class="docutils literal"><span class="pre">.gtkrc-2.0</span></tt>:</p>
<pre class="literal-block">
style &quot;geanyStyle&quot;
font_name=&quot;Sans 12&quot;
widget &quot;GeanyMainWindow&quot; style &quot;geanyStyle&quot;
style &quot;geanyStyle&quot;
font_name=&quot;Sans 10&quot;
widget &quot;GeanyPrefsDialog&quot; style &quot;geanyStyle&quot;
<div class="section" id="documents">
<h2><a class="toc-backref" href="#id33">Documents</a></h2>
<div class="section" id="switching-between-documents">
<h3><a class="toc-backref" href="#id34">Switching between documents</a></h3>
<p>The documents list and the editor tabs are two different ways
to switch between documents using the mouse. When you hit the key
combination to move between tabs, the order is determined by the tab
order. It is not alphabetical as shown in the documents list
(regardless of whether or not editor tabs are visible).</p>
<p>See the <a class="reference internal" href="#notebook-tab-keybindings">Notebook tab keybindings</a> section for useful
shortcuts including for Most-Recently-Used document switching.</p>
<div class="section" id="character-sets-and-unicode-byte-order-mark-bom">
<h2><a class="toc-backref" href="#id35">Character sets and Unicode Byte-Order-Mark (BOM)</a></h2>
<div class="section" id="using-character-sets">
<h3><a class="toc-backref" href="#id36">Using character sets</a></h3>
<p>Geany provides support for detecting and converting character sets. So
you can open and save files in different character sets, and even
convert a file from one character set to another. To do this,
Geany uses the character conversion capabilities of the GLib library.</p>
<p>Only text files are supported, i.e. opening files which contain
NULL-bytes may fail. Geany will try to open the file anyway but it is
likely that the file will be truncated because it can only be read up
to the first occurrence of a NULL-byte. All characters after this
position are lost and are not written when you save the file.</p>
<p>Geany tries to detect the encoding of a file while opening it, but
auto-detecting the encoding of a file is not easy and sometimes an
encoding might not be detected correctly. In this case you have to
set the encoding of the file manually in order to display it
correctly. You can this in the file open dialog by selecting an
encoding in the drop down box or by reloading the file with the
file menu item &quot;Reload as&quot;. The auto-detection works well for most
encodings but there are also some encodings where it is known that
auto-detection has problems.</p>
<p>There are different ways to set different encodings in Geany:</p>
<li><p class="first">Using the file open dialog</p>
<p>This opens the file with the encoding specified in the encoding drop
down box. If the encoding is set to &quot;Detect from file&quot; auto-detection
will be used. If the encoding is set to &quot;Without encoding (None)&quot; the
file will be opened without any character conversion and Geany will
not try to auto-detect the encoding (see below for more information).</p>
<li><p class="first">Using the &quot;Reload as&quot; menu item</p>
<p>This item reloads the current file with the specified encoding. It can
help if you opened a file and found out that the wrong encoding was used.</p>
<li><p class="first">Using the &quot;Set encoding&quot; menu item</p>
<p>Contrary to the above two options, this will not change or reload
the current file unless you save it. It is useful when you want to
change the encoding of the file.</p>
<li><p class="first">Specifying the encoding in the file itself</p>
<p>As mentioned above, auto-detecting the encoding of a file may fail on
some encodings. If you know that Geany doesn't open a certain file,
you can add the specification line, described in the next section,
to the beginning of the file to force Geany to use a specific
encoding when opening the file.</p>
<div class="section" id="in-file-encoding-specification">
<h3><a class="toc-backref" href="#id37">In-file encoding specification</a></h3>
<p>Geany detects meta tags of HTML files which contain charset information
<pre class="literal-block">
&lt;meta http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=ISO-8859-15&quot; /&gt;
<p>and the specified charset is used when opening the file. This is useful if the
encoding of the file cannot be detected properly.
For non-HTML files you can also define a line like:</p>
<pre class="literal-block">
/* geany_encoding=ISO-8859-15 */
<pre class="literal-block">
# geany_encoding=ISO-8859-15 #
<p>to force an encoding to be used. The #, /* and */ are examples
of filetype-specific comment characters. It doesn't matter which
characters are around the string &quot; geany_encoding=ISO-8859-15 &quot; as long
as there is at least one whitespace character before and after this
string. Whitespace characters are in this case a space or tab character.
An example to use this could be you have a file with ISO-8859-15
encoding but Geany constantly detects the file encoding as ISO-8859-1.
Then you simply add such a line to the file and Geany will open it
correctly the next time.</p>
<p>Since Geany 0.15 you can also use lines which match the
regular expression used to find the encoding string:
<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>
<div class="note">
<p class="first admonition-title">Note</p>
<p class="last">These specifications must be in the first 512 bytes of the file.
Anything after the first 512 bytes will not be recognized.</p>
<p>Some examples are:</p>
<pre class="literal-block">
# encoding = ISO-8859-15
<pre class="literal-block">
# coding: ISO-8859-15
<div class="section" id="special-encoding-none">
<h3><a class="toc-backref" href="#id38">Special encoding &quot;None&quot;</a></h3>
<p>There is a special encoding &quot;None&quot; which uses no
encoding. It is useful when you know that Geany cannot auto-detect
the encoding of a file and it is not displayed correctly. Especially
when the file contains NULL-bytes this can be useful to skip auto
detection and open the file properly at least until the occurrence
of the first NULL-byte. Using this encoding opens the file as it is
without any character conversion.</p>
<div class="section" id="unicode-byte-order-mark-bom">
<h3><a class="toc-backref" href="#id39">Unicode Byte-Order-Mark (BOM)</a></h3>
<p>Furthermore, Geany detects a Unicode Byte Order Mark (see
<a class="reference external" href=""></a> for details). Of course,
this feature is only available if the opened file is in a Unicode
encoding. The Byte Order Mark helps to detect the encoding of a file,
e.g. whether it is UTF-16LE or UTF-16BE and so on. On Unix-like systems
using a Byte Order Mark could cause some problems for programs not
expecting it, e.g. the compiler gcc stops
with stray errors, PHP does not parse a script containing a BOM and
script files starting with a she-bang maybe cannot be started. In the
status bar you can easily see whether the file starts with a BOM or
<p>If you want to set a BOM for a file or if you want to remove it
from a file, just use the document menu and toggle the checkbox.</p>
<div class="note">
<p class="first admonition-title">Note</p>
<p class="last">If you are unsure what a BOM is or if you do not understand where
to use it, then it is probably not important for you and you can
safely ignore it.</p>
<div class="section" id="editing">
<h2><a class="toc-backref" href="#id40">Editing</a></h2>
<div class="section" id="folding">
<h3><a class="toc-backref" href="#id41">Folding</a></h3>
<p>Geany provides basic code folding support. Folding means the ability to
show and hide parts of the text in the current file. You can hide
unimportant code sections and concentrate on the parts you are working on
and later you can show hidden sections again. In the editor window there is
a small grey margin on the left side with [+] and [-] symbols which
show hidden parts and hide parts of the file respectively. By
clicking on these icons you can simply show and hide sections which are
marked by vertical lines within this margin. For many filetypes nested
folding is supported, so there may be several fold points within other
fold points.</p>
<div class="note">
<p class="first admonition-title">Note</p>
<p class="last">You can customize the folding icon and line styles - see the
filetypes.common <a class="reference internal" href="#folding-settings">Folding Settings</a>.</p>
<p>If you don't like it or don't need it at all, you can simply disable
folding support completely in the preferences dialog.</p>
<p>The folding behaviour can be changed with the &quot;Fold/Unfold all children of
a fold point&quot; option in the preference dialog. If activated, Geany will
unfold all nested fold points below the current one if they are already
folded (when clicking on a [+] symbol).
When clicking on a [-] symbol, Geany will fold all nested fold points
below the current one if they are unfolded.</p>
<p>This option can be inverted by pressing the Shift
key while clicking on a fold symbol. That means, if the &quot;Fold/Unfold all
children of a fold point&quot; option is enabled, pressing Shift will disable
it for this click and vice versa.</p>
<div class="section" id="column-mode-editing-rectangular-selections">
<h3><a class="toc-backref" href="#id42">Column mode editing (rectangular selections)</a></h3>
<p>There is basic support for column mode editing. To use it, create a
rectangular selection by holding down the Control and Shift keys
(or Alt and Shift on Windows) while selecting some text.
Once a rectangular selection exists you can start editing the text within
this selection and the modifications will be done for every line in the
<p>It is also possible to create a zero-column selection - this is
useful to insert text on multiple lines.</p>
<div class="section" id="drag-and-drop-of-text">
<h3><a class="toc-backref" href="#id43">Drag and drop of text</a></h3>
<p>If you drag selected text in the editor widget of Geany the text is
moved to the position where the mouse pointer is when releasing the
mouse button. Holding Control when releasing the mouse button will
copy the text instead. This behaviour was changed in Geany 0.11 -
before the selected text was copied to the new position.</p>
<div class="section" id="indentation">
<h3><a class="toc-backref" href="#id44">Indentation</a></h3>
<p>Geany allows each document to indent either with a tab character,
multiple spaces or a combination of both. The default indent
settings are set in <a class="reference internal" href="#editor-indentation-preferences">Editor Indentation preferences</a> (see the link
for more information).</p>
<p>The default settings can be overridden per-document using the
Document menu. They can also be overridden by projects - see
<a class="reference internal" href="#project-management">Project management</a>.</p>
<p>The indent mode for the current document is shown on the status bar
as follows:</p>
<dl class="docutils">
<dd>Indent with Tab characters.</dd>
<dd>Indent with spaces.</dd>
<dd>Indent with tabs and spaces, depending on how much indentation is
on a line.</dd>
<div class="section" id="applying-new-indentation-settings">
<h4><a class="toc-backref" href="#id45">Applying new indentation settings</a></h4>
<p>After changing the default settings you may wish to apply the new
settings to every document in the current session. To do this use the
<em>Project-&gt;Apply Default Indentation</em> menu item.</p>
<div class="section" id="detecting-indent-type">
<h4><a class="toc-backref" href="#id46">Detecting indent type</a></h4>
<p>The <em>Detect from file</em> indentation preference can be used to
scan each file as it's opened and set the indent type based on
how many lines start with a tab vs. 2 or more spaces.</p>
<div class="section" id="auto-indentation">
<h3><a class="toc-backref" href="#id47">Auto-indentation</a></h3>
<p>When enabled, auto-indentation happens when pressing <em>Enter</em> in the
Editor. It adds a certain amount of indentation to the new line so the
user doesn't always have to indent each line manually.</p>
<p>Geany has four types of auto-indentation:</p>
<dl class="docutils">
<dd>Disables auto-indentation completely.</dd>
<dd>Adds the same amount of whitespace on a new line as on the last line.</dd>
<dt>Current chars</dt>
<dd>Does the same as <em>Basic</em> but also indents a new line after an opening
brace '{', and de-indents when typing a closing brace '}'. For Python,
a new line will be indented after typing ':' at the end of the
previous line.</dd>
<dt>Match braces</dt>
<dd>Similar to <em>Current chars</em> but the closing brace will be aligned to
match the indentation of the line with the opening brace.</dd>
<p>There is also XML-tag auto-indentation. This is enabled when the
mode is more than just Basic, and is also controlled by a filetype
setting - see <a class="reference internal" href="#xml-indent-tags">xml_indent_tags</a>.</p>
<div class="section" id="bookmarks">
<h3><a class="toc-backref" href="#id48">Bookmarks</a></h3>
<p>Geany provides a handy bookmarking feature that lets you mark one
or more lines in a document, and return the cursor to them using a
key combination.</p>
<p>To place a mark on a line, either left-mouse-click in the left margin
of the editor window, or else use Ctrl-m. This will
produce a small green plus symbol in the margin. You can have as many
marks in a document as you like. Click again (or use Ctrl-m again)
to remove the bookmark. To remove all the marks in a given document,
use &quot;Remove Markers&quot; in the Document menu.</p>
<p>To navigate down your document, jumping from one mark to the next,
use Ctrl-. (control period). To go in the opposite direction on
the page, use Ctrl-, (control comma). Using the bookmarking feature
together with the commands to switch from one editor tab to another
(Ctrl-PgUp/PgDn and Ctrl-Tab) provides a particularly fast way to
navigate around multiple files.</p>
<div class="section" id="code-navigation-history">
<h3><a class="toc-backref" href="#id49">Code navigation history</a></h3>
<p>To ease navigation in source files and especially between
different files, Geany lets you jump between different navigation
points. Currently, this works for the following:</p>
<ul class="simple">
<li><a class="reference internal" href="#go-to-tag-declaration">Go to tag declaration</a></li>
<li><a class="reference internal" href="#go-to-tag-definition">Go to tag definition</a></li>
<li>Symbol list items</li>
<li>Build errors</li>
<li>Message items</li>
<p>When using one of these actions, Geany remembers your current position
and jumps to the new one. If you decide to go back to your previous
position in the file, just use &quot;Navigate back a location&quot;. To
get back to the new position again, just use &quot;Navigate forward a
location&quot;. This makes it easier to navigate in e.g. foreign code
and between different files.</p>
<div class="section" id="sending-text-through-custom-commands">
<h3><a class="toc-backref" href="#id50">Sending text through custom commands</a></h3>
<p>You can define several custom commands in Geany and send the current
selection to one of these commands using the <em>Edit-&gt;Format-&gt;Send
Selection to</em> menu or keybindings. The output of the command will be
used to replace the current selection. This makes it possible to use
text formatting tools with Geany in a general way.</p>
<p>The selected text will be sent to the standard input of the executed
command, so the command should be able to read from it and it should
print all results to its standard output which will be read by
Geany. To help finding errors in executing the command, the output
of the program's standard error will be printed on Geany's standard
<p>If there is no selection, the whole current line is used instead.</p>
<p>To add a custom command, use the <em>Send Selection to-&gt;Set Custom
Commands</em> menu item. Click on <em>Add</em> to get a new item and type the
command. You can also specify some command line options. Empty
commands are not saved.</p>
<p>Normal shell quoting is supported, so you can do things like:</p>
<ul class="simple">
<li><tt class="docutils literal">sed <span class="pre">'s/\./(dot)/g'</span></tt></li>
<p>The above example would normally be done with the <a class="reference internal" href="#replace-all">Replace all</a>
function, but it can be handy to have common commands already set up.</p>
<div class="section" id="context-actions">
<h3><a class="toc-backref" href="#id51">Context actions</a></h3>
<p>You can execute the context action command on the current word at the
cursor position or the available selection. This word or selection
can be used as an argument to the command.
The context action is invoked by a menu entry in the popup menu of the
editor and also a keyboard shortcut (see the section called
<a class="reference internal" href="#keybindings">Keybindings</a>).</p>
<p>The command can be specified in the preferences dialog and also for
each filetype (see &quot;context_action_cmd&quot; in the section called
<a class="reference internal" href="#filetype-configuration">Filetype configuration</a>). When the context action is invoked, the filetype
specific command is used if available, otherwise the command
specified in the preferences dialog is executed.</p>
<p>The current word or selection can be referred with the wildcard &quot;%s&quot;
in the command, it will be replaced by the current word or
selection before the command is executed.</p>
<p>For example a context action can be used to open API documentation
in a browser window, the command to open the PHP API documentation
would be:</p>
<pre class="literal-block">
firefox &quot;;
<p>when executing the command, the %s is substituted by the word near
the cursor position or by the current selection. If the cursor is at
the word &quot;echo&quot;, a browser window will open(assumed your browser is
called firefox) and it will open the address: <a class="reference external" href=""></a>.</p>
<div class="section" id="autocompletion">
<h3><a class="toc-backref" href="#id52">Autocompletion</a></h3>
<p>Geany can offer a list of possible completions for symbols defined in the
tags and for all words in a document.</p>
<p>The autocompletion list for symbols is presented when the first few
characters of the symbol are typed (configurable, see <a class="reference internal" href="#editor-completions-preferences">Editor Completions
preferences</a>, default 4) or when the <em>Complete word</em>
keybinding is pressed (configurable, see <a class="reference internal" href="#editor-keybindings">Editor keybindings</a>,
default Ctrl-Space).</p>
<p>When the defined keybinding is typed and the <em>Autocomplete all words in
document</em> preference (in <a class="reference internal" href="#editor-completions-preferences">Editor Completions preferences</a>)
is selected then the autocompletion list will show all matching words
in the document, if there are no matching symbols.</p>
<p>If you don't want to use autocompletion it can be dismissed until
the next symbol by pressing Escape. The autocompletion list is updated
as more characters are typed so that it only shows completions that start
with the characters typed so far. If no symbols begin with the sequence,
the autocompletion window is closed.</p>
<p>The up and down arrows will move the selected item. The highlighted
item on the autocompletion list can be chosen from the list by pressing
Enter/Return. You can also double-click to select an item. The sequence
will be completed to match the chosen item, and if the <em>Drop rest of
word on completion</em> preference is set (in <a class="reference internal" href="#editor-completions-preferences">Editor Completions
preferences</a>) then any characters after the cursor that match
a symbol or word are deleted.</p>
<div class="section" id="word-part-completion">
<h4><a class="toc-backref" href="#id53">Word part completion</a></h4>
<p>By default, pressing Tab will complete the selected item by word part;
useful e.g. for adding the prefix <tt class="docutils literal">gtk_combo_box_entry_</tt> without typing it
<ul class="simple">
<p>The key combination can be changed from Tab - See <a class="reference internal" href="#editor-keybindings">Editor keybindings</a>.
If you clear/change the key combination for word part completion, Tab
will complete the whole word instead, like Enter.</p>
<div class="section" id="scope-autocompletion">
<h4><a class="toc-backref" href="#id54">Scope autocompletion</a></h4>
<pre class="literal-block">
int i;
char c;
} foo;
<p>When you type <tt class="docutils literal">foo.</tt> it will show an autocompletion list with 'i' and
'c' symbols.</p>
<p>It only works for languages that set parent scope names for e.g. struct
members. Currently this means C-like languages. The C tag parser only
parses global scopes, so this won't work for structs or objects declared
in local scope.</p>
<div class="section" id="user-definable-snippets">
<h3><a class="toc-backref" href="#id55">User-definable snippets</a></h3>
<p>Snippets are small strings or code constructs which can be replaced or
completed to a more complex string. So you can save a lot of time when
typing common strings and letting Geany do the work for you.
To know what to complete or replace Geany reads a configuration file
called <tt class="docutils literal">snippets.conf</tt> at startup.</p>
<p>Maybe you need to often type your name, so define a snippet like this:</p>
<pre class="literal-block">
myname=Enrico Tröger
<p>Every time you write <tt class="docutils literal">myname</tt> &lt;TAB&gt; in Geany, it will replace &quot;myname&quot;
with &quot;Enrico Tröger&quot;. The key to start autocompletion can be changed
in the preferences dialog, by default it is TAB. The corresponding keybinding
is called <cite>Complete snippet</cite>.</p>
<p>You can override the default snippets using the user
<tt class="docutils literal">snippets.conf</tt> file. Use the <em>Tools-&gt;Configuration
Files-&gt;snippets.conf</em> menu item. See also <a class="reference internal" href="#configuration-file-paths">Configuration file paths</a>.</p>
<p>This adds the default settings to the user file if the file doesn't
exist. Alternatively the file can be created manually, adding only
the settings you want to change. All missing settings will be read
from the system snippets file.</p>
<p><strong>Snippet groups</strong></p>
<p>The file <tt class="docutils literal">snippets.conf</tt> contains sections defining snippets that
are available for particular filetypes and in general.</p>
<p>The two sections &quot;Default&quot; and &quot;Special&quot; apply to all filetypes.
&quot;Default&quot; contains all snippets which are available for every
filetype and &quot;Special&quot; contains snippets which can only be used in
other snippets. So you can define often used parts of snippets and
just use the special snippet as a placeholder (see the
<tt class="docutils literal">snippets.conf</tt> for details).</p>
<p>You can define sections with the name of a filetype eg &quot;C++&quot;. The
snippets in that section are only available for use in files with that
filetype. Snippets in filetype sections will hide snippets with the
same name in the &quot;Default&quot; section when used in a file of that
<p><strong>Substitution sequences for snippets</strong></p>
<p>To define snippets you can use several special character sequences which
will be replaced when using the snippet:</p>
<table border="1" class="docutils">
<col width="22%" />
<col width="78%" />
<tbody valign="top">
<tr><td>\n or %newline%</td>
<td>Insert a new line (it will be replaced by the used EOL
char(s): LF, CR/LF, or CR).</td>
<tr><td>\t or %ws%</td>
<td>Insert an indentation step, it will be replaced according
to the current document's indent mode.</td>
<td>\s to force whitespace at beginning or end of a value
('key= value' won't work, use 'key=\svalue')</td>
<td>Place the cursor at this position after completion has
been done. You can define multiple %cursor% wildcards
and use the keybinding <cite>Move cursor in snippet</cite> to jump
to the next defined cursor position in the completed
<td>&quot;...&quot; means the name of a key in the &quot;Special&quot; section.
If you have defined a key &quot;brace_open&quot; in the &quot;Special&quot;
section you can use %brace_open% in any other snippet.</td>
<p>Snippet names must not contain spaces otherwise they won't
work correctly. But beside that you can define almost any
string as a snippet and use it later in Geany. It is not limited
to existing contructs of certain programming languages(like <tt class="docutils literal">if</tt>,
<tt class="docutils literal">for</tt>, <tt class="docutils literal">switch</tt>). Define whatever you need.</p>
<p><strong>Template wildcards</strong></p>
<p>Since Geany 0.15 you can also use most of the available templates wildcards
listed in <a class="reference internal" href="#template-wildcards">Template wildcards</a>. All wildcards which are listed as
<cite>available in snippets</cite> can be used. For instance to improve the above example:</p>
<pre class="literal-block">
myname=My name is {developer}
mysystem=My system: {command:uname -a}
<p>this will replace <tt class="docutils literal">myname</tt> with &quot;My name is &quot; and the value of the template
preference <tt class="docutils literal">developer</tt>.</p>
<p><strong>Word characters</strong></p>
<p>You can change the way Geany recognizes the word to complete,
that is how the start and end of a word is recognised when the
snippet completion is requested. The section &quot;Special&quot; may
contain a key &quot;wordchars&quot; which lists all characters a string may contain
to be recognized as a word for completion. Leave it commented to use
default characters or define it to add or remove characters to fit your
<div class="section" id="snippet-keybindings">
<h4><a class="toc-backref" href="#id56">Snippet keybindings</a></h4>
<p>Normally you would type the snippet name and press Tab. However, you
can define keybindings for snippets under the <em>Keybindings</em> group in
<tt class="docutils literal">snippets.conf</tt>:</p>
<pre class="literal-block">
<div class="note">
<p class="first admonition-title">Note</p>
<p class="last">Snippet keybindings may be overridden by Geany's configurable
<div class="section" id="inserting-unicode-characters">
<h3><a class="toc-backref" href="#id57">Inserting Unicode characters</a></h3>
<p>You can insert Unicode code points by hitting Ctrl-Shift-u, then still holding
Ctrl-Shift, type some hex digits representing the code point for the character
you want and hit Enter or Return (still holding Ctrl-Shift). If you release
Ctrl-Shift before hitting Enter or Return (or any other character), the code
insertion is completed, but the typed character is also entered. In the case
of Enter/Return, it is a newline, as you might expect.</p>
<p>In some earlier versions of Geany, you might need to first unbind Ctrl-Shift-u
in the <a class="reference internal" href="#keybinding-preferences">keybinding preferences</a>, then select <em>Tools-&gt;Reload Configuration</em>
or restart Geany. Note that it works slightly differently from other GTK
applications, in that you'll need to continue to hold down the Ctrl and Shift
keys while typing the code point hex digits (and the Enter or Return to finish the code point).</p>
<div class="section" id="search-replace-and-go-to">
<h2><a class="toc-backref" href="#id58">Search, replace and go to</a></h2>
<p>This section describes search-related commands from the Search menu
and the editor window's popup menu:</p>
<ul class="simple">
<li>Find selection</li>
<li>Find usage</li>
<li>Find in files</li>
<li>Go to tag definition</li>
<li>Go to tag declaration</li>
<li>Go to line</li>
<p>See also <a class="reference internal" href="#search">Search</a> preferences.</p>
<div class="section" id="toolbar-entries">
<h3><a class="toc-backref" href="#id59">Toolbar entries</a></h3>
<p>There are also two toolbar entries:</p>
<ul class="simple">
<li>Search bar</li>
<li>Go to line entry</li>
<p>There are keybindings to focus each of these - see <a class="reference internal" href="#focus-keybindings">Focus
keybindings</a>. Pressing Escape will then focus the editor.</p>
<div class="section" id="search-bar">
<h4><a class="toc-backref" href="#id60">Search bar</a></h4>
<p>The quickest way to find some text is to use the search bar entry in
the toolbar. This performs a case-insensitive search in the current
document whilst you type. Pressing Enter will search again, and pressing
Shift-Enter will search backwards.</p>
<div class="section" id="find">
<h3><a class="toc-backref" href="#id61">Find</a></h3>
<p>The Find dialog is used for finding text in one or more open documents.</p>
<img alt="./images/find_dialog.png" src="./images/find_dialog.png" />
<div class="section" id="matching-options">
<h4><a class="toc-backref" href="#id62">Matching options</a></h4>
<p>The syntax for the <em>Use regular expressions</em> option is shown in
<a class="reference internal" href="#regular-expressions">Regular expressions</a>.</p>
<div class="note">
<p class="first admonition-title">Note</p>
<p class="last"><em>Use escape sequences</em> is implied for regular expressions.</p>
<p>The <em>Use escape sequences</em> option will transform any escaped characters
into their UTF-8 equivalent. For example, \t will be transformed into
a tab character. Other recognized symbols are: \\, \n, \r, \uXXXX
(Unicode characters).</p>
<div class="section" id="find-all">
<h4><a class="toc-backref" href="#id63">Find all</a></h4>
<p>To find all matches, click on the Find All expander. This will reveal
several options:</p>
<ul class="simple">
<li>In Document</li>
<li>In Session</li>
<p>Find All In Document will show a list of matching lines in the
current document in the Messages tab of the Message Window. <em>Find All
In Session</em> does the same for all open documents.</p>
<p>Mark will highlight all matches in the current document with a
colored box. These markers can be removed by selecting the
Remove Markers command from the Document menu.</p>
<div class="section" id="change-font-in-search-dialog-text-fields">
<h4><a class="toc-backref" href="#id64">Change font in search dialog text fields</a></h4>
<p>All search related dialogs use a Monospace for the text input fields to
increase the readability of input text. This is useful when you are
typing input such as regular expressions with spaces, periods and commas which
might it hard to read with a proportional font.</p>
<p>If you want to change the font, you can do this easily
by inserting the following style into your <tt class="docutils literal"><span class="pre">.gtkrc-2.0</span></tt>
(usually found in your home directory on UNIX-like systems and in the
etc subdirectory of your Geany installation on Windows):</p>
<pre class="literal-block">
style &quot;search_style&quot;
font_name=&quot;Monospace 8&quot;
widget &quot;GeanyDialogSearch.*.GtkEntry&quot; style:highest &quot;search_style&quot;
<p>Please note the addition of &quot;:highest&quot; in the last line which sets the priority
of this style to the highest available. Otherwise, the style is ignored
for the search dialogs.</p>
<div class="section" id="find-selection">
<h3><a class="toc-backref" href="#id65">Find selection</a></h3>
<p>The <em>Find Next/Previous Selection</em> commands perform a search for the
current selected text. If nothing is selected, by default the current
word is used instead. This can be customized by the
<em>find_selection_type</em> preference - see <a class="reference internal" href="#various-preferences">Various preferences</a>.</p>
<table border="1" class="docutils">
<col width="10%" />
<col width="90%" />
<thead valign="bottom">
<tr><th class="head">Value</th>
<th class="head"><em>find_selection_type</em> behaviour</th>
<tbody valign="top">
<td>Use the current word (default).</td>
<td>Try the X selection first, then current word.</td>
<td>Repeat last search.</td>
<div class="section" id="find-usage">
<h3><a class="toc-backref" href="#id66">Find usage</a></h3>
<p>Find usage searches all open files. It is similar to the Find All In
Session option in the Find dialog.</p>
<p>If there is a selection, then it is used as the search text; otherwise
the current word is used. The current word is either taken from the
word nearest the edit cursor, or the word underneath the popup menu
click position when the popup menu is used. The search results are
shown in the Messages tab of the Message Window.</p>
<div class="section" id="find-in-files">
<h3><a class="toc-backref" href="#id67">Find in files</a></h3>
<p>Find in files is a more powerful version of Find usage that searches
all files in a certain directory using the Grep tool. The Grep tool
must be correctly set in Preferences to the path of the system's Grep
utility. GNU Grep is recommended (see note below).</p>
<img alt="./images/find_in_files_dialog.png" src="./images/find_in_files_dialog.png" />
<p>The <em>Search</em> field is initially set to the current word in the editor
(depending on <a class="reference internal" href="#search">Search</a> preferences).</p>
<p>The <em>Files</em> setting allows to choose which files are included in the
search, depending on the mode:</p>
<dl class="docutils">
<dd>Search in all files;</dd>
<dd>Use the current project's patterns, see <a class="reference internal" href="#project-properties">Project properties</a>;</dd>
<dd>Use custom patterns.</dd>
<p>Both project and custom patterns use a glob-style syntax, each
pattern separated by a space. To search all <tt class="docutils literal">.c</tt> and <tt class="docutils literal">.h</tt> files,
use: <tt class="docutils literal">*.c *.h</tt>.
Note that an empty pattern list searches in all files rather
than none.</p>
<p>The <em>Directory</em> field is initially set to the current document's directory,
unless this field has already been edited and the current document has
not changed. Otherwise, the current document's directory is prepended to
the drop-down history. This can be disabled - see <a class="reference internal" href="#search">Search</a> preferences.</p>
<p>The <em>Encoding</em> field can be used to define the encoding of the files
to be searched. The entered search text is converted to the chosen encoding
and the search results are converted back to UTF-8.</p>
<p>The <em>Extra options</em> field is used to pass any additional arguments to
the grep tool.</p>
<div class="note">
<p class="first admonition-title">Note</p>
<p class="last">The <em>Files</em> setting uses <tt class="docutils literal"><span class="pre">--include=</span></tt> when searching recursively,
<em>Recurse in subfolders</em> uses <tt class="docutils literal"><span class="pre">-r</span></tt>; both are GNU Grep options and may
not work with other Grep implementations.</p>
<div class="section" id="filtering-out-version-control-files">
<h4><a class="toc-backref" href="#id68">Filtering out version control files</a></h4>
<p>When using the <em>Recurse in subfolders</em> option with a directory that's
under version control, you can set the <em>Extra options</em> field to filter
out version control files.</p>
<p>If you have GNU Grep &gt;= 2.5.2 you can use the <tt class="docutils literal"><span class="pre">--exclude-dir</span></tt>
argument to filter out CVS and hidden directories like <tt class="docutils literal">.svn</tt>.</p>
<p>Example: <tt class="docutils literal"><span class="pre">--exclude-dir=.svn</span> <span class="pre">--exclude-dir=CVS</span></tt></p>
<p>If you have an older Grep, you can try using the <tt class="docutils literal"><span class="pre">--exclude</span></tt> flag
to filter out filenames.</p>
<p>SVN Example: <tt class="docutils literal"><span class="pre">--exclude=*.svn-base</span></tt></p>
<p>The --exclude argument only matches the file name part, not the path.</p>
<div class="section" id="replace">
<h3><a class="toc-backref" href="#id69">Replace</a></h3>
<p>The Replace dialog is used for replacing text in one or more open
<img alt="./images/replace_dialog.png" src="./images/replace_dialog.png" />
<p>The Replace dialog has the same options for matching text as the Find
dialog. See the section <a class="reference internal" href="#matching-options">Matching options</a>.</p>
<p>The <em>Use regular expressions</em> option allows regular expressions to
be used in the search string and back references in the replacement
text -- see the entry for '\n' in <a class="reference internal" href="#regular-expressions">Regular expressions</a>.</p>
<div class="section" id="replace-all">
<h4><a class="toc-backref" href="#id70">Replace all</a></h4>
<p>To replace several matches, click on the <em>Replace All</em> expander. This
will reveal several options:</p>
<ul class="simple">
<li>In Document</li>
<li>In Session</li>
<li>In Selection</li>
<p><em>Replace All In Document</em> will replace all matching text in the
current document. <em>Replace All In Session</em> does the same for all open
documents. <em>Replace All In Selection</em> will replace all matching text
in the current selection of the current document.</p>
<div class="section" id="go-to-tag-definition">
<h3><a class="toc-backref" href="#id71">Go to tag definition</a></h3>
<p>If the current word or selection is the name of a tag definition
(e.g. a function name) and the file containing the tag definition is
open, this command will switch to that file and go to the
corresponding line number. The current word is either the word
nearest the edit cursor, or the word underneath the popup menu click
position when the popup menu is used.</p>
<div class="note">
<p class="first admonition-title">Note</p>
<p class="last">If the corresponding tag is on the current line, Geany will first
look for a tag declaration instead, as this is more useful.
Likewise <em>Go to tag declaration</em> will search for a tag definition
first in this case also.</p>
<div class="section" id="go-to-tag-declaration">
<h3><a class="toc-backref" href="#id72">Go to tag declaration</a></h3>
<p>Like <em>Go to tag definition</em>, but for a forward declaration such as a
C function prototype or <tt class="docutils literal">extern</tt> declaration instead of a function
<div class="section" id="go-to-line">
<h3><a class="toc-backref" href="#id73">Go to line</a></h3>
<p>Go to a particular line number in the current file.</p>
<div class="section" id="regular-expressions">
<h3><a class="toc-backref" href="#id74">Regular expressions</a></h3>
<p>You can use regular expressions in the Find and Replace dialogs
by selecting the <em>Use regular expressions</em> check box (see <a class="reference internal" href="#matching-options">Matching
options</a>). The syntax is Perl compatible. Basic syntax is described
in the table below. For full details, see
<a class="reference external" href=""></a>.</p>
<div class="note">
<p class="first admonition-title">Note</p>
<ol class="last arabic simple">
<li>The <em>Use escape sequences</em> dialog option always applies for regular
<li>Searching backwards with regular expressions is not supported.</li>
<p><strong>In a regular expression, the following characters are interpreted:</strong></p>
<table border="1" class="docutils">
<col width="10%" />
<col width="90%" />
<tbody valign="top">
<td>Matches any character.</td>
<td>This marks the start of a region for tagging a match.</td>
<td>This marks the end of a tagged region.</td>
<td><p class="first">Where n is 1 through 9 refers to the first through ninth tagged
region when searching or replacing.</p>
<p>Searching for (Wiki)\1 matches WikiWiki.</p>
<p class="last">If the search string was Fred([1-9])XXX and the
replace string was Sam\1YYY, when applied to Fred2XXX this
would generate Sam2YYY.</p>
<td>When replacing, the whole matching text.</td>
<td>This matches a word boundary.</td>
<td><p class="first">A backslash followed by d, D, s, S, w or W, becomes a
character class (both inside and outside sets []).</p>
<ul class="last simple">
<li>d: decimal digits</li>
<li>D: any char except decimal digits</li>
<li>s: whitespace (space, \t \n \r \f \v)</li>
<li>S: any char except whitespace (see above)</li>
<li>w: alphanumeric &amp; underscore</li>
<li>W: any char except alphanumeric &amp; underscore</li>
<td>This allows you to use a character x that would otherwise have
a special meaning. For example, \[ would be interpreted as [
and not as the start of a character set. Use \\ for a literal
<td><p class="first">Matches one of the characters in the set. If the first
character in the set is ^, it matches the characters NOT in
the set, i.e. complements the set. A shorthand S-E (start
dash end) is used to specify a set of characters S up to E,
<p>The special characters ] and - have no special
meaning if they appear first in the set. - can also be last
in the set. To include both, put ] first: []A-Z-].</p>
<pre class="last literal-block">
[]|-] matches these 3 chars
[]-|] matches from ] to | chars
[a-z] any lowercase alpha
[^]-] any char except - and ]
[^A-Z] any char except uppercase alpha
[a-zA-Z] any alpha
<td>This matches the start of a line (unless used inside a set, see
<td>This matches the end of a line.</td>
<td>This matches 0 or more times. For example, Sa*m matches Sm, Sam,
Saam, Saaam and so on.</td>
<td>This matches 1 or more times. For example, Sa+m matches Sam,
Saam, Saaam and so on.</td>
<td>This matches 0 or 1 time(s). For example, Joh?n matches John, Jon.</td>
<div class="note">
<p class="first admonition-title">Note</p>
<p class="last">This table is adapted from Scintilla and SciTE documentation,
distributed under the <a class="reference internal" href="#license-for-scintilla-and-scite">License for Scintilla and SciTE</a>.</p>
<div class="section" id="view-menu">
<h2><a class="toc-backref" href="#id75">View menu</a></h2>
<p>The View menu allows various elements of the main window to be shown
or hidden, and also provides various display-related editor options.</p>
<div class="section" id="color-schemes-menu">
<h3><a class="toc-backref" href="#id76">Color schemes menu</a></h3>
<p>The Color schemes menu is available under the <em>View-&gt;Editor</em> submenu.
It lists various color schemes for editor highlighting styles,
including the default scheme first. Other items are available based
on what color scheme files Geany found at startup.</p>
<p>Color scheme files are read from the <a class="reference internal" href="#configuration-file-paths">Configuration file paths</a> under
the <tt class="docutils literal">colorschemes</tt> subdirectory. They should have the extension
<tt class="docutils literal">.conf</tt>. The default color scheme
is read from <tt class="docutils literal">filetypes.common</tt>.</p>
<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
same as for <tt class="docutils literal">filetypes.common</tt>.</p>
<p>The <tt class="docutils literal">[theme_info]</tt> section can contain information about the
theme. The <tt class="docutils literal">name</tt> and <tt class="docutils literal">description</tt> keys are read to set the
menu item text and tooltip, respectively. These keys can have
translations, e.g.:</p>
<pre class="literal-block">
<div class="section" id="tags">
<h2><a class="toc-backref" href="#id77">Tags</a></h2>
<p>Tags are information that relates symbols in a program with the
source file location of the declaration and definition.</p>
<p>Geany has built-in functionality for generating tag information (aka
&quot;workspace tags&quot;) for supported filetypes when you open a file. You
can also have Geany automatically load external tag files (aka &quot;global
tags files&quot;) upon startup, or manually using <em>Tools --&gt; Load Tags</em>.</p>
<p>Geany uses its own tag file format, similar to what <tt class="docutils literal">ctags</tt> uses
(but is incompatible with ctags). You use Geany to generate global
tags files, as described below.</p>
<div class="section" id="workspace-tags">
<h3><a class="toc-backref" href="#id78">Workspace tags</a></h3>
<p>Tags for each document are parsed whenever a file is loaded, saved or
modified (see <em>Symbol list update frequency</em> preference in the <a class="reference internal" href="#editor-completions-preferences">Editor
Completions preferences</a>). These are shown in the Symbol list in the
Sidebar. These tags are also used for autocompletion of symbols and calltips
for all documents open in the current session that have the same filetype.</p>
<p>The <em>Go to Tag</em> commands can be used with all workspace tags. See
<a class="reference internal" href="#go-to-tag-definition">Go to tag definition</a>.</p>
<div class="section" id="global-tags">
<h3><a class="toc-backref" href="#id79">Global tags</a></h3>
<p>Global tags are used to provide autocompletion of symbols and calltips
without having to open the corresponding source files. This is intended
for library APIs, as the tags file only has to be updated when you upgrade
the library.</p>
<p>You can load a custom global tags file in two ways:</p>
<ul class="simple">
<li>Using the <em>Load Tags</em> command in the Tools menu.</li>
<li>By moving or symlinking tags files to the <tt class="docutils literal">tags</tt> subdirectory of
one of the <a class="reference internal" href="#configuration-file-paths">configuration file paths</a> before starting Geany.</li>
<p>You can either download these files or generate your own. They have
the format:</p>
<pre class="literal-block">
<p><em>lang_ext</em> is one of the extensions set for the filetype associated
with the tags. See the section called <a class="reference internal" href="#filetype-extensions">Filetype extensions</a> for
more information.</p>
<div class="section" id="default-global-tags-files">
<h4><a class="toc-backref" href="#id80">Default global tags files</a></h4>
<p>For some languages, a list of global tags is loaded when the
corresponding filetype is first used. Currently these are for:</p>
<ul class="simple">
<li>HTML -- &amp;symbol; completion, e.g. for ampersand, copyright, etc.</li>
<div class="section" id="global-tags-file-format">
<h4><a class="toc-backref" href="#id81">Global tags file format</a></h4>
<p>Global tags files can have two different formats:</p>
<ul class="simple">
<li>Tagmanager format</li>
<li>Pipe-separated format</li>
<p>The first line of global tags files should be a comment, introduced
by <tt class="docutils literal">#</tt> followed by a space and a string like <tt class="docutils literal">format=pipe</tt>
or <tt class="docutils literal">format=tagmanager</tt> respectively, these are case-sensitive.
This helps Geany to read the file properly. If this line
is missing, Geany tries to auto-detect the used format but this
might fail.</p>
<p>The Tagmanager format is a bit more complex and is used for files
created by the <tt class="docutils literal">geany <span class="pre">-g</span></tt> command. There is one tag per line.
Different tag attributes like the return value or the argument list
are separated with different characters indicating the type of the
following argument.</p>
<div class="section" id="pipe-separated-format">
<h5><a class="toc-backref" href="#id82">Pipe-separated format</a></h5>
<p>The Pipe-separated format is easier to read and write.
There is one tag per line and different tag attributes are separated
by the pipe character (<tt class="docutils literal">|</tt>). A line looks like:</p>
<pre class="literal-block">
basename|string|(string path [, string suffix])|
<div class="line-block">
<div class="line">The first field is the tag name (usually a function name).</div>
<div class="line">The second field is the type of the return value.</div>
<div class="line">The third field is the argument list for this tag.</div>
<div class="line">The fourth field is the description for this tag but
currently unused and should be left empty.</div>
<p>Except for the first field (tag name), all other field can be left
empty but the pipe separator must appear for them.</p>
<p>You can easily write your own global tag files using this format.
Just save them in your tags directory, as described earlier in the
section <a class="reference internal" href="#global-tags">Global tags</a>.</p>
<div class="section" id="generating-a-global-tags-file">
<h4><a class="toc-backref" href="#id83">Generating a global tags file</a></h4>
<p>You can generate your own global tags files by parsing a list of
source files. The command is:</p>
<pre class="literal-block">
geany -g [-P] &lt;Tag File&gt; &lt;File list&gt;
<ul class="simple">
<li>Tag File filename should be in the format described earlier --
see the section called <a class="reference internal" href="#global-tags">Global tags</a>.</li>
<li>File list is a list of filenames, each with a full path (unless
you are generating C/C++ tags and have set the CFLAGS environment
variable appropriately).</li>
<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
to process <tt class="docutils literal">#include</tt> directives for C/C++ source files. Use this
option if you want to specify each source file on the command-line
instead of using a 'master' header file. Also can be useful if you
don't want to specify the CFLAGS environment variable.</li>
<p>Example for the wxD library for the D programming language:</p>
<pre class="literal-block">
geany -g wxd.d.tags /home/username/wxd/wx/*.d
<div class="section" id="generating-c-c-tag-files">
<h5><a class="toc-backref" href="#id84">Generating C/C++ tag files</a></h5>
<p>You may need to first setup the <a class="reference internal" href="#c-ignore-tags">C ignore.tags</a> file.</p>
<p>For C/C++ tag files gcc is required by default, so that header files
can be preprocessed to include any other headers they depend upon. If
you do not want this, use the <tt class="docutils literal"><span class="pre">-P</span></tt> option described above.</p>
<p>For preprocessing, the environment variable CFLAGS should be set with
appropriate <tt class="docutils literal"><span class="pre">-I/path</span></tt> include paths. The following example works with
the bash shell, generating tags for the GnomeUI library:</p>
<pre class="literal-block">
CFLAGS=`pkg-config --cflags libgnomeui-2.0` geany -g gnomeui.c.tags \
<p>You can adapt this command to use CFLAGS and header files appropriate
for whichever libraries you want.</p>
<div class="section" id="generating-tag-files-on-windows">
<h5><a class="toc-backref" href="#id85">Generating tag files on Windows</a></h5>
<p>This works basically the same as on other platforms:</p>
<pre class="literal-block">
&quot;c:\program files\geany\bin\geany&quot; -g c:\mytags.php.tags c:\code\somefile.php
<div class="section" id="c-ignore-tags">
<h3><a class="toc-backref" href="#id86">C ignore.tags</a></h3>
<p>You can ignore certain tags for C-based languages if they would lead
to wrong parsing of the code. Use the <em>Tools-&gt;Configuration
Files-&gt;ignore.tags</em> menu item to open the user <tt class="docutils literal">ignore.tags</tt> file.
See also <a class="reference internal" href="#configuration-file-paths">Configuration file paths</a>.</p>
<p>List all tag names you want to ignore in this file, separated by spaces
and/or newlines.</p>
<pre class="literal-block">
<p>This will parse code like:</p>
<p><tt class="docutils literal">gchar **utils_strv_new(const gchar *first, <span class="pre">...)</span>
<p>More detailed information about ignore tags usage from the Exuberant Ctags
manual page:</p>
Specifies a list of identifiers which are to be specially handled
while parsing C and C++ source files. This option is specifically
provided to handle special cases arising through the use of
pre-processor macros. When the identifiers listed are simple identifiers,
these identifiers will be ignored during parsing of the source files.
If an identifier is suffixed with a '+' character, ctags will also
ignore any parenthesis-enclosed argument list which may immediately
follow the identifier in the source files.
If two identifiers are separated with the '=' character, the first
identifiers is replaced by the second identifiers for parsing purposes.</blockquote>
<p>For even more detailed information please read the manual page of
Exuberant Ctags.</p>
<p>Geany extends Ctags with a '*' character suffix - this means use
prefix matching, e.g. G_GNUC_* will match G_GNUC_NULL_TERMINATED, etc.
Note that prefix match items should be put after other items to ensure
that items like G_GNUC_PRINTF+ get parsed correctly.</p>
<div class="section" id="preferences">
<h2><a class="toc-backref" href="#id87">Preferences</a></h2>
<p>You may adjust Geany's settings using the Edit --&gt; Preferences
dialog. Any changes you make there can be applied by hitting either
the Apply or the OK button. These settings will persist between Geany
sessions. Note that most settings here have descriptive popup bubble
help -- just hover the mouse over the item in question to get help
on it.</p>
<p>You may also adjust some View settings (under the View menu) that
persist between Geany sessions. The settings under the Document menu,
however, are only for the current document and revert to defaults
when restarting Geany.</p>
<div class="note">
<p class="first admonition-title">Note</p>
<p class="last">In the paragraphs that follow, the text describing a dialog tab
comes after the screenshot of that tab.</p>
<div class="section" id="general-startup-preferences">
<h3><a class="toc-backref" href="#id88">General Startup preferences</a></h3>
<img alt="./images/pref_dialog_gen_startup.png" src="./images/pref_dialog_gen_startup.png" />
<div class="section" id="id1">
<h4><a class="toc-backref" href="#id89">Startup</a></h4>
<dl class="docutils">
<dt>Load files from the last session</dt>
<dd>On startup, load the same files you had open the last time you
used Geany.</dd>
<dt>Load virtual terminal support</dt>
<dd>Load the library for running a terminal in the message window area.</dd>
<dt>Enable plugin support</dt>
<dd>Allow plugins to be used in Geany.</dd>
<div class="section" id="shutdown">
<h4><a class="toc-backref" href="#id90">Shutdown</a></h4>
<dl class="docutils">
<dt>Save window position and geometry</dt>
<dd>Save the current position and size of the main window so next time
you open Geany it's in the same location.</dd>
<dt>Confirm Exit</dt>
<dd>Have a dialog pop up to confirm that you really want to quit Geany.</dd>
<div class="section" id="paths">
<h4><a class="toc-backref" href="#id91">Paths</a></h4>
<dl class="docutils">
<dt>Startup path</dt>
<dd>Path to start in when opening or saving files.
It must be an absolute path.</dd>
<dt>Project files</dt>
<dd>Path to start in when opening project files.</dd>
<dt>Extra plugin path</dt>
<dd>By default Geany looks in the system installation and the user
configuration - see <a class="reference internal" href="#plugins">Plugins</a>. In addition the path entered here will be
Usually you do not need to set an additional path to search for
plugins. It might be useful when Geany is installed on a multi-user machine
and additional plugins are available in a common location for all users.
Leave blank to not set an additional lookup path.</dd>
<div class="section" id="general-miscellaneous-preferences">
<h3><a class="toc-backref" href="#id92">General Miscellaneous preferences</a></h3>
<img alt="./images/pref_dialog_gen_misc.png" src="./images/pref_dialog_gen_misc.png" />
<div class="section" id="miscellaneous">
<h4><a class="toc-backref" href="#id93">Miscellaneous</a></h4>
<dl class="docutils">
<dt>Beep on errors when compilation has finished</dt>
<dd>Have the computer make a beeping sound when compilation of your program
has completed or any errors occurred.</dd>
<dt>Switch status message list at new message</dt>
<dd>Switch to the status message tab (in the notebook window at the bottom)
once a new status message arrives.</dd>
<dt>Suppress status messages in the status bar</dt>
<dd><p class="first">Remove all messages from the status bar. The messages are still displayed
in the status messages window.</p>
<div class="tip last">
<p class="first admonition-title">Tip</p>
<p class="last">Another option is to use the <em>Switch to Editor</em> keybinding - it
reshows the document statistics on the status bar. See <a class="reference internal" href="#focus-keybindings">Focus
<dt>Use Windows File Open/Save dialogs</dt>
<dd>Defines whether to use the native Windows File Open/Save dialogs or
whether to use the GTK default dialogs.</dd>
<dt>Auto-focus widgets (focus follows mouse)</dt>
<dd>Give the focus automatically to widgets below the mouse cursor.
This works for the main editor widget, the scribble, the toolbar search field
goto line fields and the VTE.</dd>
<div class="section" id="search">
<h4><a class="toc-backref" href="#id94">Search</a></h4>
<dl class="docutils">
<dt>Always wrap search</dt>
<dd>Always wrap search around the document when finding a match.</dd>
<dt>Hide the Find dialog</dt>
<dd>Hide the <a class="reference internal" href="#find">Find</a> dialog after clicking Find Next/Previous.</dd>
<dt>Use the current word under the cursor for Find dialogs</dt>
<dd>Use current word under the cursor when opening the Find, Find in Files or Replace dialog and
there is no selection. When this option is disabled, the search term last used in the
appropriate Find dialog is used.</dd>
<dt>Use the current file's directory for Find in Files</dt>
<dd>When opening the Find in Files dialog, set the directory to search to the directory of the current
active file. When this option is disabled, the directory of the last use of the Find in Files
dialog is used. See <a class="reference internal" href="#find-in-files">Find in Files</a> for details.</dd>
<div class="section" id="projects">
<h4><a class="toc-backref" href="#id95">Projects</a></h4>
<dl class="docutils">
<dt>Use project-based session files</dt>
<dd>Save your current session when closing projects. You will be able to
resume different project sessions, automatically opening the files
you had open previously.</dd>
<dt>Store project file inside the project base directory</dt>
<dd>When creating new projects, the default path for the project file contains
the project base path. Without this option enabled, the default project file
path is one level above the project base path.
In either case, you can easily set the final project file path in the
<em>New Project</em> dialog. This option provides the more common
defaults automatically for convenience.</dd>
<div class="section" id="interface-preferences">
<h3><a class="toc-backref" href="#id96">Interface preferences</a></h3>
<img alt="./images/pref_dialog_interface_interface.png" src="./images/pref_dialog_interface_interface.png" />
<div class="section" id="sidebar">
<h4><a class="toc-backref" href="#id97">Sidebar</a></h4>
<dl class="docutils">
<dt>Show sidebar</dt>
<dd>Whether to show the sidebar at all.</dd>
<dt>Show symbol list</dt>
<dd>Show the list of functions, variables, and other information in the
current document you are editing.</dd>
<dt>Show documents list</dt>
<dd>Show all the documents you have open currently. This can be used to
change between documents (see <a class="reference internal" href="#switching-between-documents">Switching between documents</a>) and
to perform some common operations such as saving, closing and reloading.</dd>
<dd>Whether to place the sidebar on the left or right of the editor window.</dd>
<div class="section" id="fonts">
<h4><a class="toc-backref" href="#id98">Fonts</a></h4>
<dl class="docutils">
<dd>Change the font used to display documents.</dd>
<dt>Symbol list</dt>
<dd>Change the font used for the Symbols sidebar tab.</dd>
<dt>Message window</dt>
<dd>Change the font used for the message window area.</dd>
<div class="section" id="id2">
<h4><a class="toc-backref" href="#id99">Miscellaneous</a></h4>
<dl class="docutils">
<dt>Show status bar</dt>
<dd>Show the status bar at the bottom of the main window. It gives information about
the file you are editing like the line and column you are on, whether any
modifications were done, the file encoding, the filetype and other information.</dd>
<div class="section" id="interface-notebook-tab-preferences">
<h3><a class="toc-backref" href="#id100">Interface Notebook tab preferences</a></h3>
<img alt="./images/pref_dialog_interface_notebook.png" src="./images/pref_dialog_interface_notebook.png" />
<div class="section" id="editor-tabs">
<h4><a class="toc-backref" href="#id101">Editor tabs</a></h4>
<dl class="docutils">
<dt>Show editor tabs</dt>
<dd>Show a notebook tab for all documents so you can switch between them
using the mouse (instead of using the Documents window).</dd>
<dt>Show close buttons</dt>
<dd>Make each tab show a close button so you can easily close open
<dt>Placement of new file tabs</dt>
<dd>Whether to create a document with its notebook tab to the left or
right of all existing tabs.</dd>
<dt>Next to current</dt>
<dd>Whether to place file tabs next to the current tab
rather than at the edges of the notebook.</dd>
<dt>Double-clicking hides all additional widgets</dt>
<dd>Whether to call the View-&gt;Toggle All Additional Widgets command
when double-clicking on a notebook tab.</dd>
<div class="section" id="tab-positions">
<h4><a class="toc-backref" href="#id102">Tab positions</a></h4>
<dl class="docutils">
<dd>Set the positioning of the editor's notebook tabs to the right,
left, top, or bottom of the editing window.</dd>
<dd>Set the positioning of the sidebar's notebook tabs to the right,
left, top, or bottom of the sidebar window.</dd>
<dt>Message window</dt>
<dd>Set the positioning of the message window's notebook tabs to the
right, left, top, or bottom of the message window.</dd>
<div class="section" id="interface-toolbar-preferences">
<h3><a class="toc-backref" href="#id103">Interface Toolbar preferences</a></h3>
<p>Affects the main toolbar underneath the menu bar.</p>
<img alt="./images/pref_dialog_interface_toolbar.png" src="./images/pref_dialog_interface_toolbar.png" />
<div class="section" id="toolbar">
<h4><a class="toc-backref" href="#id104">Toolbar</a></h4>
<dl class="docutils">
<dt>Show Toolbar</dt>
<dd>Whether to show the toolbar.</dd>
<dt>Append Toolbar to the Menu</dt>
<dd>Allows to append the toolbar to the main menu bar instead of placing it below.
This is useful to save vertical space.</dd>
<dt>Customize Toolbar</dt>
<dd>See <a class="reference internal" href="#customizing-the-toolbar">Customizing the toolbar</a>.</dd>
<div class="section" id="appearance">
<h4><a class="toc-backref" href="#id105">Appearance</a></h4>
<dl class="docutils">
<dt>Icon Style</dt>
<dd>Select the toolbar icon style to use - either icons and text, just
icons or just text.
The choice System default uses whatever icon style is set by GTK.</dd>
<dt>Icon size</dt>
<dd>Select the size of the icons you see (large, small or very small).
The choice System default uses whatever icon size is set by GTK.</dd>
<div class="section" id="editor-features-preferences">
<h3><a class="toc-backref" href="#id106">Editor Features preferences</a></h3>
<img alt="./images/pref_dialog_edit_features.png" src="./images/pref_dialog_edit_features.png" />
<div class="section" id="features">
<h4><a class="toc-backref" href="#id107">Features</a></h4>
<dl class="docutils">
<dt>Line wrapping</dt>
<dd>Show long lines wrapped around to new display lines.</dd>
<dl class="docutils" id="smart-home-key">
<dt>&quot;Smart&quot; home key</dt>
<dd>Whether to move the cursor to the first non-whitespace character
on the line when you hit the home key on your keyboard. Pressing it
again will go to the very start of the line.</dd>
<dt>Disable Drag and Drop</dt>
<dd>Do not allow the dragging and dropping of selected text in documents.</dd>
<dt>Code folding</dt>
<dd>Allow groups of lines in a document to be collapsed for easier
<dt>Fold/Unfold all children of a fold point</dt>
<dd>Whether to fold/unfold all child fold points when a parent line
is folded.</dd>
<dt>Use indicators to show compile errors</dt>
<dd>Underline lines with compile errors using red squiggles to indicate
them in the editor area.</dd>
<dt>Newline strip trailing spaces</dt>
<dd>Remove any white space at the end of the line when you hit the
Enter/Return key.</dd>
<dt>Line breaking column</dt>
<dd>The editor column number to insert a newline at when Line Breaking
is enabled for the current document.</dd>
<dt>Comment toggle marker</dt>
<dd>A string which is added when toggling a line comment in a source file.
It is used to mark the comment as toggled.</dd>
<div class="section" id="editor-indentation-preferences">
<h3><a class="toc-backref" href="#id108">Editor Indentation preferences</a></h3>
<img alt="./images/pref_dialog_edit_indentation.png" src="./images/pref_dialog_edit_indentation.png" />
<div class="section" id="indentation-group">
<h4><a class="toc-backref" href="#id109">Indentation group</a></h4>
<p>See <a class="reference internal" href="#indentation">Indentation</a> for more information.</p>
<dl class="docutils">
<dd>The width of a single indent size in spaces. By default the indent
size is equivalent to 4 spaces.</dd>
<dt>Detect width from file</dt>
<dd>Try to detect and set the indent width based on file content, when
a file is opened.</dd>
<dd><p class="first">When Geany inserts indentation, whether to use:</p>
<ul class="simple">
<li>Just Tabs</li>
<li>Just Spaces</li>
<li>Tabs and Spaces, depending on how much indentation is on a line</li>
<p class="last">The <em>Tabs and Spaces</em> indent type is also known as <em>Soft tab
support</em> in some other editors.</p>
<dt>Detect type from file</dt>
<dd>Try to detect and set the indent type based on file content, when
a file is opened.</dd>
<dt>Auto-indent mode</dt>
<dd><p class="first">The type of auto-indentation you wish to use after pressing Enter,
if any.</p>
<dl class="last docutils">
<dd>Just add the indentation of the previous line.</dd>
<dt>Current chars</dt>
<dd>Add indentation based on the current filetype and any characters at
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>
<dt>Match braces</dt>
<dd>Like <em>Current chars</em> but for C-like languages, make a closing
<tt class="docutils literal">}</tt> brace line up with the matching opening brace.</dd>
<dt>Tab key indents</dt>
<dd><p class="first">If set, pressing tab will indent the current line or selection, and
unindent when pressing Shift-tab. Otherwise, the tab key will
insert a tab character into the document (which can be different
from indentation, depending on the indent type).</p>
<div class="note last">
<p class="first admonition-title">Note</p>
<p class="last">There are also separate configurable keybindings for indent &amp;
unindent, but this preference allows the tab key to have different
meanings in different contexts - e.g. for snippet completion.</p>
<div class="section" id="editor-completions-preferences">
<h3><a class="toc-backref" href="#id110">Editor Completions preferences</a></h3>
<img alt="./images/pref_dialog_edit_completions.png" src="./images/pref_dialog_edit_completions.png" />
<div class="section" id="completions">
<h4><a class="toc-backref" href="#id111">Completions</a></h4>
<dl class="docutils">
<dt>Snippet Completion</dt>
<dd>Whether to replace special keywords after typing Tab into a
pre-defined text snippet.
See <a class="reference internal" href="#user-definable-snippets">User-definable snippets</a>.</dd>
<dt>XML/HTML tag auto-closing</dt>
<dd>When you open an XML/HTML tag automatically generate its
completion tag.</dd>
<dt>Automatic continuation multi-line comments</dt>
<dd><p class="first">Continue automatically multi-line comments in languages like C, C++
and Java when a new line is entered inside such a comment.
With this option enabled, Geany will insert a <tt class="docutils literal">*</tt> on every new line
inside a multi-line comment, for example when you press return in the
following C code:</p>
<pre class="literal-block">
* This is a C multi-line comment, press &lt;Return&gt;
<p>then Geany would insert:</p>
<pre class="literal-block">
<p class="last">on the next line with the correct indentation based on the previous line,
as long as the multi-line is not closed by <tt class="docutils literal">*/</tt>.</p>
<dt>Autocomplete symbols</dt>
<dd>When you start to type a symbol name, look for the full string to
allow it to be completed for you.</dd>
<dt>Autocomplete all words in document</dt>
<dd>When you start to type a word, Geany will search the whole document for
words starting with the typed part to complete it, assuming there
are no tag names to show.</dd>
<dt>Drop rest of word on completion</dt>
<dd>Remove any word part to the right of the cursor when choosing a
completion list item.</dd>
<dt>Characters to type for autocompletion</dt>
<dd>Number of characters of a word to type before autocompletion is
<dt>Completion list height</dt>
<dd>The number of rows to display for the autocompletion window.</dd>
<dt>Max. symbol name suggestions</dt>
<dd>The maximum number of items in the autocompletion list.</dd>
<dt>Symbol list update frequency</dt>
<dd><p class="first">The minimum delay (in milliseconds) between two symbol list updates.</p>
<p>This option determines how frequently the tag list is updated for the
current document. The smaller the delay, the more up-to-date the symbol
list (and then the completions); but rebuilding the symbol list has a
cost in performance, especially with large files.</p>
<p>The default value is 250ms, which means the symbol list will be updated
at most four times per second, even if the document changes continuously.</p>
<p class="last">A value of 0 disables automatic updates, so the symbol list will only be
updated upon document saving.</p>
<div class="section" id="auto-close-quotes-and-brackets">
<h4><a class="toc-backref" href="#id112">Auto-close quotes and brackets</a></h4>
<p>Geany can automatically insert a closing bracket and quote characters when
you open them. For instance, you type a <tt class="docutils literal">(</tt> and Geany will automatically
insert <tt class="docutils literal">)</tt>. With the following options, you can define for which
characters this should work.</p>
<dl class="docutils">
<dt>Parenthesis ( )</dt>
<dd>Auto-close parenthesis when typing an opening one</dd>
<dt>Curly brackets { }</dt>
<dd>Auto-close curly brackets (braces) when typing an opening one</dd>
<dt>Square brackets [ ]</dt>
<dd>Auto-close square brackets when typing an opening one</dd>
<dt>Single quotes ' '</dt>
<dd>Auto-close single quotes when typing an opening one</dd>
<dt>Double quotes &quot; &quot;</dt>
<dd>Auto-close double quotes when typing an opening one</dd>
<div class="section" id="editor-display-preferences">
<h3><a class="toc-backref" href="#id113">Editor Display preferences</a></h3>
<p>This is for visual elements displayed in the editor window.</p>
<img alt="./images/pref_dialog_edit_display.png" src="./images/pref_dialog_edit_display.png" />
<div class="section" id="display">
<h4><a class="toc-backref" href="#id114">Display</a></h4>
<dl class="docutils">
<dt>Invert syntax highlighting colors</dt>
<dd>Invert all colors, by default this makes white text on a black
<dt>Show indendation guides</dt>
<dd>Show vertical lines to help show how much leading indentation there
is on each line.</dd>
<dt>Show whitespaces</dt>
<dd>Mark all tabs with an arrow &quot;--&gt;&quot; symbol and spaces with dots to
show which kinds of whitespace are used.</dd>
<dt>Show line endings</dt>
<dd>Display a symbol everywhere that a carriage return or line feed
is present.</dd>
<dt>Show line numbers</dt>
<dd>Show or hide the Line Number margin.</dd>
<dt>Show markers margin</dt>
<dd>Show or hide the small margin right of the line numbers, which is used
to mark lines.</dd>
<dt>Stop scrolling at last line</dt>
<dd>When enabled Geany stops scrolling when at the last line of the document.
Otherwise you can scroll one more page even if there are no real lines.</dd>
<div class="section" id="long-line-marker">
<h4><a class="toc-backref" href="#id115">Long line marker</a></h4>
<p>The long line marker helps to indicate overly-long lines, or as a hint
to the user for when to break the line.</p>
<dl class="docutils">
<dd><dl class="first last docutils">
<dd>Show a thin vertical line in the editor window at the given column
<dd>Change the background color of characters after the given column
position to the color set below. (This is recommended over the
<em>Line</em> setting if you use proportional fonts).</dd>
<dd>Don't mark long lines at all.</dd>
<dt>Long line marker</dt>
<dd>Set this value to a value greater than zero to specify the column
where it should appear.</dd>
<dt>Long line marker color</dt>
<dd>Set the color of the long line marker.</dd>
<div class="section" id="virtual-spaces">
<h4><a class="toc-backref" href="#id116">Virtual spaces</a></h4>
<p>Virtual space is space beyond the end of each line.
The cursor may be moved into virtual space but no real space will be
added to the document until there is some text typed or some other
text insertion command is used.</p>
<dl class="docutils">
<dd>Do not show virtual spaces</dd>
<dt>Only for rectangular selections</dt>
<dd>Only show virtual spaces beyond the end of lines when drawing a rectangular selection</dd>
<dd>Always show virtual spaces beyond the end of lines</dd>
<div class="section" id="files-preferences">
<h3><a class="toc-backref" href="#id117">Files preferences</a></h3>
<img alt="./images/pref_dialog_files.png" src="./images/pref_dialog_files.png" />
<div class="section" id="new-files">
<h4><a class="toc-backref" href="#id118">New files</a></h4>
<dl class="docutils">
<dt>Open new documents from the command-line</dt>
<dd>Whether to create new documents when passing filenames that don't
exist from the command-line.</dd>
<dt>Default encoding (new files)</dt>
<dd>The type of file encoding you wish to use when creating files.</dd>
<dt>Used fixed encoding when opening files</dt>
<dd>Assume all files you are opening are using the type of encoding specified below.</dd>
<dt>Default encoding (existing files)</dt>
<dd>Opens all files with the specified encoding instead of auto-detecting it.
Use this option when it's not possible for Geany to detect the exact encoding.</dd>
<dt>Default end of line characters</dt>
<dd>The end of line characters to which should be used for new files.
On Windows systems, you generally want to use CR/LF which are the common
characters to mark line breaks.
On Unix-like systems, LF is default and CR is used on MAC systems.</dd>
<div class="section" id="saving-files">
<h4><a class="toc-backref" href="#id119">Saving files</a></h4>
<p>Perform formatting operations when a document is saved. These
can each be undone with the Undo command.</p>
<dl class="docutils">
<dt>Ensure newline at file end</dt>
<dd>Add a newline at the end of the document if one is missing.</dd>
<dt>Ensure consistent line endings</dt>
<dd>Ensures that newline characters always get converted before
saving, avoiding mixed line endings in the same file.</dd>
<dt>Strip trailing spaces</dt>
<dd>Remove the trailing spaces on each line of the document.</dd>
<dt>Replace tabs by space</dt>
<dd><p class="first">Replace all tabs in the document with the equivalent number of spaces.</p>
<div class="note last">
<p class="first admonition-title">Note</p>
<p class="last">It is better to use spaces to indent than use this preference - see
<a class="reference internal" href="#indentation">Indentation</a>.</p>
<div class="section" id="id3">
<h4><a class="toc-backref" href="#id120">Miscellaneous</a></h4>
<dl class="docutils">
<dt>Recent files list length</dt>
<dd>The number of files to remember in the recently used files list.</dd>
<dt>Disk check timeout</dt>
<dd><p class="first">The number of seconds to periodically check the current document's
file on disk in case it has changed. Setting it to 0 will disable
this feature.</p>
<div class="note last">
<p class="first admonition-title">Note</p>
<p class="last">These checks are only performed on local files. Remote files are
not checked for changes due to performance issues
(remote files are files in <tt class="docutils literal"><span class="pre">~/.gvfs/</span></tt>).</p>
<div class="section" id="tools-preferences">
<h3><a class="toc-backref" href="#id121">Tools preferences</a></h3>
<img alt="./images/pref_dialog_tools.png" src="./images/pref_dialog_tools.png" />
<div class="section" id="tool-paths">
<h4><a class="toc-backref" href="#id122">Tool paths</a></h4>
<dl class="docutils">
<dd>The location of your terminal executable.</dd>
<dd>The location of your web browser executable.</dd>
<dd>The location of the grep executable.</dd>
<div class="note">
<p class="first admonition-title">Note</p>
<p class="last">For Windows users: at the time of writing it is recommended to use
the grep.exe from the UnxUtils project
(<a class="reference external" href=""></a>). The grep.exe from the
Mingw project for instance might not work with Geany at the moment.</p>
<div class="section" id="commands">
<h4><a class="toc-backref" href="#id123">Commands</a></h4>
<dl class="docutils">
<dt>Context action</dt>
<dd>Set this to a command to execute on the current word.
You can use the &quot;%s&quot; wildcard to pass the current word below the cursor
to the specified command.</dd>
<div class="section" id="template-preferences">
<h3><a class="toc-backref" href="#id124">Template preferences</a></h3>
<p>This data is used as meta data for various template text to insert into
a document, such as the file header. You only need to set fields that
you want to use in your template files.</p>
<img alt="./images/pref_dialog_templ.png" src="./images/pref_dialog_templ.png" />
<div class="section" id="template-data">
<h4><a class="toc-backref" href="#id125">Template data</a></h4>
<dl class="docutils">
<dd>The name of the developer who will be creating files.</dd>
<dd>The initials of the developer.</dd>
<dt>Mail address</dt>
<dd><p class="first">The email address of the developer.</p>
<div class="note last">
<p class="first admonition-title">Note</p>
<p class="last">You may wish to add anti-spam markup, e.g. <tt class="docutils literal">name&lt;at&gt;site&lt;dot&gt;ext</tt>.</p>
<dd>The company the developer is working for.</dd>
<dt>Initial version</dt>
<dd>The initial version of files you will be creating.</dd>
<dd>Specify a format for the the {year} wildcard. You can use any conversion specifiers
which can be used with the ANSI C strftime function. For details please see
<a class="reference external" href=""></a>.</dd>
<dd>Specify a format for the the {date} wildcard. You can use any conversion specifiers
which can be used with the ANSI C strftime function. For details please see
<a class="reference external" href=""></a>.</dd>
<dt>Date &amp; Time</dt>
<dd>Specify a format for the the {datetime} wildcard. You can use any conversion specifiers
which can be used with the ANSI C strftime function. For details please see
<a class="reference external" href=""></a>.</dd>
<div class="section" id="keybinding-preferences">
<h3><a class="toc-backref" href="#id126">Keybinding preferences</a></h3>
<img alt="./images/pref_dialog_keys.png" src="./images/pref_dialog_keys.png" />
<p>There are some commands listed in the keybinding dialog that are not, by default,
bound to a key combination, and may not be available as a menu item.</p>
<div class="note">
<p class="first admonition-title">Note</p>
<p class="last">For more information see the section <a class="reference internal" href="#keybindings">Keybindings</a>.</p>
<div class="section" id="printing-preferences">
<h3><a class="toc-backref" href="#id127">Printing preferences</a></h3>
<img alt="./images/pref_dialog_printing.png" src="./images/pref_dialog_printing.png" />
<dl class="docutils">
<dt>Use external command for printing</dt>
<dd>Use a system command to print your file out.</dd>
<dt>Use native GTK printing</dt>
<dd>Let the GTK GUI toolkit handle your print request.</dd>
<dt>Print line numbers</dt>
<dd>Print the line numbers on the left of your paper.</dd>
<dt>Print page number</dt>
<dd>Print the page number on the bottom right of your paper.</dd>
<dt>Print page header</dt>
<dd>Print a header on every page that is sent to the printer.</dd>
<dt>Use base name of the printed file</dt>
<dd>Don't use the entire path for the header, only the filename.</dd>
<dt>Date format</dt>
<dd>How the date should be printed. You can use the same format
specifiers as in the ANSI C function strftime(). For details please
see <a class="reference external" href=""></a>.</dd>
<div class="section" id="various-preferences