More GTK3 Waf build system adjustments
[geany-mirror.git] / doc / geany.txt
blob2c7d18678a86eacb7984f672402e9dc1094c7f83
1 .. |(version)| replace:: 1.24
3 =======
4  Geany
5 =======
7 -------------------------
8  A fast, light, GTK+ IDE
9 -------------------------
11 :Authors: Enrico Tröger,
12           Nick Treleaven,
13           Frank Lanitz,
14           Colomban Wendling,
15           Matthew Brush
16 :Date: 2013-03-10
17 :Version: |(version)|
19 Copyright © 2005-2012
21 This document is distributed under the terms of the GNU General Public
22 License as published by the Free Software Foundation; either version 2
23 of the License, or (at your option) any later version. A copy of this
24 license can be found in the file COPYING included with the source code
25 of this program, and also in the chapter `GNU General Public License`_.
28 .. contents::
32 Introduction
33 ============
36 About Geany
37 -----------
39 Geany is a small and lightweight Integrated Development Environment. It
40 was developed to provide a small and fast IDE, which has only a few
41 dependencies on other packages. Another goal was to be as independent
42 as possible from a particular Desktop Environment like KDE or GNOME -
43 Geany only requires the GTK2 runtime libraries.
45 Some basic features of Geany:
47 * Syntax highlighting
48 * Code folding
49 * Autocompletion of symbols/words
50 * Construct completion/snippets
51 * Auto-closing of XML and HTML tags
52 * Calltips
53 * Many supported filetypes including C, Java, PHP, HTML, Python, Perl,
54   Pascal, and others
55 * Symbol lists
56 * Code navigation
57 * Build system to compile and execute your code
58 * Simple project management
59 * Plugin interface
63 Where to get it
64 ---------------
66 You can obtain Geany from http://www.geany.org/ or perhaps also from
67 your distribution. For a list of available packages, please see
68 http://www.geany.org/Download/ThirdPartyPackages.
72 License
73 -------
75 Geany is distributed under the terms of the GNU General Public License
76 as published by the Free Software Foundation; either version 2 of
77 the License, or (at your option) any later version. A copy of this
78 license can be found in the file COPYING included with the source
79 code of this program and in the chapter, `GNU General Public License`_.
81 The included Scintilla library (found in the subdirectory
82 ``scintilla/``) has its own license, which can be found in the chapter,
83 `License for Scintilla and SciTE`_.
87 About this document
88 -------------------
90 This documentation is available in HTML and text formats.
91 The latest version can always be found at http://www.geany.org/.
93 If you want to contribute to it, see `Contributing to this document`_.
98 Installation
99 ============
102 Requirements
103 ------------
105 You will need the GTK (>= 2.16.0) libraries and their dependencies
106 (Pango, GLib and ATK). Your distro should provide packages for these,
107 usually installed by default. For Windows, you can download an installer
108 from the website which bundles these libraries.
111 Binary packages
112 ---------------
114 There are many binary packages available. For an up-to-date but maybe
115 incomplete list see http://www.geany.org/Download/ThirdPartyPackages.
118 Source compilation
119 ------------------
121 Compiling Geany is quite easy.
122 To do so, you need the GTK (>= 2.16.0) libraries and header files.
123 You also need the Pango, GLib and ATK libraries and header files.
124 All these files are available at http://www.gtk.org, but very often
125 your distro will provide development packages to save the trouble of
126 building these yourself.
128 Furthermore you need, of course, a C and C++ compiler. The GNU versions
129 of these tools are recommended.
131 Autotools based build system
132 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
134 The Autotools based build system is very mature and has been well tested.
135 To use it, you just need the Make tool, preferably GNU Make.
137 Then run the following commands::
139     $ ./configure
140     $ make
142 Then as root::
144     % make install
146 Waf based build system
147 ^^^^^^^^^^^^^^^^^^^^^^
149 The Waf build system is still quite young and under heavy development but already in a
150 usable state. In contrast to the Autotools system, Waf needs Python. So before using Waf, you need
151 to install Python on your system.
152 The advantage of the Waf build system over the Autotools based build system is that the whole
153 build process might be a bit faster. Especially when you use the Waf
154 cache feature for repetitive builds (e.g. when changing only a few source files
155 to test something) will become much faster since Waf will cache and re-use the
156 unchanged built files and only compile the changed code again. See `Waf Cache`_ for details.
157 To build Geany with Waf as run::
159     $ ./waf configure
160     $ ./waf build
162 Then as root::
164     % ./waf install
166 Waf cache
167 `````````
169 The Waf build system has a nice and interesting feature which can help  to avoid
170 a lot of unnecessary rebuilding of unchanged code. This often happens when developing new features
171 or trying to debug something in Geany.
172 Waf is able to store and retrieve the object files from a cache. This cache is declared
173 using the environment variable ``WAFCACHE``.
174 A possible location of the cache directory could be ``~/.cache/waf``. In order to make use of
175 this, you first need to create this directory::
177         $ mkdir -p ~/.cache/waf
179 then add the environment variable to your shell configuration (the following example is for
180 Bash and should be adjusted to your used shell)::
182         export WAFCACHE=/home/username/.cache/waf
184 Remember to replace ``username`` with your actual username.
186 More information about the Waf cache feature are available at
187 http://code.google.com/p/waf/wiki/CacheObjectFiles.
189 Cleaning the cache
190 ******************
191 You should be careful about the size of the cache directory as it may
192 grow rapidly over time.
193 Waf doesn't do any cleaning or other house-keeping of the cache yet, so you need to keep it
194 clean by yourself.
195 An easy way to keep it clean is to run the following command regularly to remove old
196 cached files::
198     $ find /home/username/.cache/waf -mtime +14 -exec rm {} \;
200 This will delete all files in the cache directory which are older than 14 days.
202 For details about the ``find`` command and its options, check its manual page.
205 Custom installation
206 ^^^^^^^^^^^^^^^^^^^
207 The configure script supports several common options, for a detailed
208 list, type::
210     $ ./configure --help
212 or::
213         $ ./waf --help
215 (depending on which build system you use).
217 You may also want to read the INSTALL file for advanced installation
218 options.
220 * See also `Compile-time options`_.
222 Dynamic linking loader support and VTE
223 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
224 In the case that your system lacks dynamic linking loader support, you
225 probably want to pass the option ``--disable-vte`` to the ``configure``
226 script. This prevents compiling Geany with dynamic linking loader
227 support for automatically loading ``libvte.so.4`` if available.
229 Build problems
230 ^^^^^^^^^^^^^^
231 If there are any errors during compilation, check your build
232 environment and try to find the error, otherwise contact the mailing
233 list or one the authors. Sometimes you might need to ask for specific
234 help from your distribution.
237 Installation prefix
238 -------------------
239 If you want to find Geany's system files after installation you may
240 want to know the installation prefix.
242 Pass the ``--print-prefix`` option to Geany to check this - see
243 `Command line options`_. The first path is the prefix.
245 On Unix-like systems this is commonly ``/usr`` if you installed from
246 a binary package, or ``/usr/local`` if you build from source.
248 .. note::
249     Editing system files is not necessary as you should use the
250     per-user configuration files instead, which don't need root
251     permissions. See `Configuration files`_.
254 Usage
255 =====
258 Getting started
259 ---------------
261 You can start Geany in the following ways:
263 * From the Desktop Environment menu:
265   Choose in your application menu of your used Desktop Environment:
266   Development --> Geany.
268 * From the command line:
270   To start Geany from a command line, type the following and press
271   Return::
273       % geany
275 The Geany workspace
276 -------------------
278 The Geany window is shown in the following figure:
280 .. image:: ./images/main_window.png
282 The workspace has the following parts:
284 * The menu.
285 * An optional toolbar.
286 * An optional sidebar that can show the following tabs:
288   * Documents - A document list, and
289   * Symbols - A list of symbols in your code.
291 * The main editor window.
292 * An optional message window which can show the following tabs:
294   * Status - A list of status messages.
295   * Compiler - The output of compiling or building programs.
296   * Messages - Results of 'Find Usage', 'Find in Files' and other actions
297   * Scribble - A text scratchpad for any use.
298   * Terminal - An optional terminal window.
300 * A status bar
302 Most of these can be configured in the `Interface preferences`_, the
303 `View menu`_, or the popup menu for the relevant area.
305 Additional tabs may be added to the sidebar and message window by plugins.
307 The position of the tabs can be selected in the interface preferences.
309 The sizes of the sidebar and message window can be adjusted by
310 dragging the dividers.
312 Command line options
313 --------------------
315 ============  =======================  =================================================
316 Short option  Long option              Function
317 ============  =======================  =================================================
318 *none*        +number                  Set initial line number for the first opened file
319                                        (same as --line, do not put a space between the + sign
320                                        and the number). E.g. "geany +7 foo.bar" will open the
321                                        file foo.bar and place the cursor in line 7.
323 *none*        --column                 Set initial column number for the first opened file.
325 -c dir_name   --config=directory_name  Use an alternate configuration directory. The default
326                                        configuration directory is ``~/.config/geany/`` and that
327                                        is where ``geany.conf`` and other configuration files
328                                        reside.
330 *none*        --ft-names               Print a list of Geany's internal filetype names (useful
331                                        for snippets configuration).
333 -g            --generate-tags          Generate a global tags file (see
334                                        `Generating a global tags file`_).
336 -P            --no-preprocessing       Don't preprocess C/C++ files when generating tags.
338 -i            --new-instance           Do not open files in a running instance, force opening
339                                        a new instance. Only available if Geany was compiled
340                                        with support for Sockets.
342 -l            --line                   Set initial line number for the first opened file.
344 *none*        --list-documents         Return a list of open documents in a running Geany
345                                        instance.
346                                        This can be used to read the currently opened documents in
347                                        Geany from an external script or tool. The returned list
348                                        is separated by newlines (LF) and consists of the full,
349                                        UTF-8 encoded filenames of the documents.
350                                        Only available if Geany was compiled with support for
351                                        Sockets.
353 -m            --no-msgwin              Do not show the message window. Use this option if you
354                                        do not need compiler messages or VTE support.
356 -n            --no-ctags               Do not load symbol completion and call tip data. Use this
357                                        option if you do not want to use them.
359 -p            --no-plugins             Do not load plugins or plugin support.
361 *none*        --print-prefix           Print installation prefix, the data directory, the lib
362                                        directory and the locale directory (in that order) to
363                                        stdout, one line each. This is mainly intended for plugin
364                                        authors to detect installation paths.
366 -r            --read-only              Open all files given on the command line in read-only mode.
367                                        This only applies to files opened explicitly from the command
368                                        line, so files from previous sessions or project files are
369                                        unaffected.
371 -s            --no-session             Do not load the previous session's files.
373 -t            --no-terminal            Do not load terminal support. Use this option if you do
374                                        not want to load the virtual terminal emulator widget
375                                        at startup. If you do not have ``libvte.so.4`` installed,
376                                        then terminal-support is automatically disabled. Only
377                                        available if Geany was compiled with support for VTE.
379 *none*        --socket-file            Use this socket filename for communication with a
380                                        running Geany instance. This can be used with the following
381                                        command to execute Geany on the current workspace::
383                                          geany --socket-file=/tmp/geany-sock-$(xprop -root _NET_CURRENT_DESKTOP | awk '{print $3}')
385 *none*        --vte-lib                Specify explicitly the path including filename or only
386                                        the filename to the VTE library, e.g.
387                                        ``/usr/lib/libvte.so`` or ``libvte.so``. This option is
388                                        only needed when the auto-detection does not work. Only
389                                        available if Geany was compiled with support for VTE.
391 -v            --verbose                Be verbose (print useful status messages).
393 -V            --version                Show version information and exit.
395 -?            --help                   Show help information and exit.
397 *none*        [files ...]              Open all given files at startup. This option causes
398                                        Geany to ignore loading stored files from the last
399                                        session (if enabled).
400                                        Geany also recognizes line and column information when
401                                        appended to the filename with colons, e.g.
402                                        "geany foo.bar:10:5" will open the file foo.bar and
403                                        place the cursor in line 10 at column 5.
405                                        Projects can also be opened but a project file (\*.geany)
406                                        must be the first non-option argument. All additionally
407                                        given files are ignored.
408 ============  =======================  =================================================
410 You can also pass line number and column number information, e.g.::
412     geany some_file.foo:55:4
414 Geany supports all generic GTK options, a list is available on the
415 help screen.
419 General
420 -------
423 Startup
424 ^^^^^^^
426 At startup, Geany loads all files from the last time Geany was
427 launched. You can disable this feature in the preferences dialog
428 (see `General Startup preferences`_).
430 You can start several instances of Geany, but only the first will
431 load files from the last session. In the subsequent instances, you
432 can find these files in the file menu under the "Recent files" item.
433 By default this contains the last 10 recently opened files. You can
434 change the number of recently opened files in the preferences dialog.
436 To run a second instance of Geany, do not specify any filenames on
437 the command-line, or disable opening files in a running instance
438 using the appropriate command line option.
441 Opening files from the command-line in a running instance
442 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
444 Geany detects if there is an an instance of itself already running and opens files
445 from the command-line in that instance. So, Geany can
446 be used to view and edit files by opening them from other programs
447 such as a file manager.
449 You can also pass line number and column number information, e.g.::
451     geany some_file.foo:55:4
453 This would open the file ``some_file.foo`` with the cursor on line 55,
454 column 4.
456 If you do not like this for some reason, you can disable using the first
457 instance by using the appropriate command line option -- see the section
458 called `Command line options`_.
461 Virtual terminal emulator widget (VTE)
462 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
464 If you have installed ``libvte.so`` on your system, it is loaded
465 automatically by Geany, and you will have a terminal widget in the
466 notebook at the bottom.
468 If Geany cannot find any ``libvte.so`` at startup, the terminal widget
469 will not be loaded. So there is no need to install the package containing
470 this file in order to run Geany. Additionally, you can disable the use
471 of the terminal widget by command line option, for more information
472 see the section called `Command line options`_.
474 You can use this terminal (from now on called VTE) much as you would
475 a terminal program like xterm. There is basic clipboard support. You
476 can paste the contents of the clipboard by pressing the right mouse
477 button to open the popup menu, and choosing Paste. To copy text from
478 the VTE, just select the desired text and then press the right mouse
479 button and choose Copy from the popup menu. On systems running the
480 X Window System you can paste the last selected text by pressing the
481 middle mouse button in the VTE (on 2-button mice, the middle button
482 can often be simulated by pressing both mouse buttons together).
484 In the preferences dialog you can specify a shell which should be
485 started in the VTE. To make the specified shell a login shell just
486 use the appropriate command line options for the shell. These options
487 should be found in the manual page of the shell. For zsh and bash
488 you can use the argument ``--login``.
490 .. note::
491     Geany tries to load ``libvte.so``. If this fails, it tries to load
492     some other filenames. If this fails too, you should check whether you
493     installed libvte correctly. Again note, Geany will run without this
494     library.
496 It could be, that the library is called something else than
497 ``libvte.so`` (e.g. on FreeBSD 6.0 it is called ``libvte.so.8``). If so
498 please set a link to the correct file (as root)::
500     # ln -s /usr/lib/libvte.so.X /usr/lib/libvte.so
502 Obviously, you have to adjust the paths and set X to the number of your
503 ``libvte.so``.
505 You can also specify the filename of the VTE library to use on the command
506 line (see the section called `Command line options`_) or at compile time
507 by specifying the command line option ``--with-vte-module-path`` to
508 ./configure.
511 Defining own widget styles using .gtkrc-2.0
512 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
514 You can define your widget style for many of Geany's GUI parts. To
515 do this, just edit your ``.gtkrc-2.0`` (usually found in your home
516 directory on UNIX-like systems and in the etc subdirectory of your
517 Geany installation on Windows).
519 To have a defined style used by Geany you must assign it to
520 at least one of Geany's widgets. For example use the following line::
522     widget "Geany*" style "geanyStyle"
524 This would assign your style "geany_style" to all Geany
525 widgets. You can also assign styles only to specific widgets. At the
526 moment you can use the following widgets:
528 * GeanyMainWindow
529 * GeanyEditMenu
530 * GeanyToolbarMenu
531 * GeanyDialog
532 * GeanyDialogPrefs
533 * GeanyDialogProject
534 * GeanyDialogSearch
535 * GeanyMenubar
536 * GeanyToolbar
538 An example of a simple ``.gtkrc-2.0``::
540     style "geanyStyle"
541     {
542         font_name="Sans 12"
543     }
544     widget "GeanyMainWindow" style "geanyStyle"
546     style "geanyStyle"
547     {
548         font_name="Sans 10"
549     }
550     widget "GeanyPrefsDialog" style "geanyStyle"
553 Documents
554 ---------
556 Switching between documents
557 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
559 The documents list and the editor tabs are two different ways
560 to switch between documents using the mouse. When you hit the key
561 combination to move between tabs, the order is determined by the tab
562 order. It is not alphabetical as shown in the documents list
563 (regardless of whether or not editor tabs are visible).
565 See the `Notebook tab keybindings`_ section for useful
566 shortcuts including for Most-Recently-Used document switching.
568 Cloning documents
569 ^^^^^^^^^^^^^^^^^
570 The `Document->Clone` menu item copies the current document's text,
571 cursor position and properties into a new untitled document. If
572 there is a selection, only the selected text is copied. This can be
573 useful when making temporary copies of text or for creating
574 documents with similar or identical contents.
577 Character sets and Unicode Byte-Order-Mark (BOM)
578 ------------------------------------------------
581 Using character sets
582 ^^^^^^^^^^^^^^^^^^^^
584 Geany provides support for detecting and converting character sets. So
585 you can open and save files in different character sets, and even
586 convert a file from one character set to another. To do this,
587 Geany uses the character conversion capabilities of the GLib library.
589 Only text files are supported, i.e. opening files which contain
590 NULL-bytes may fail. Geany will try to open the file anyway but it is
591 likely that the file will be truncated because it can only be read up
592 to the first occurrence of a NULL-byte. All characters after this
593 position are lost and are not written when you save the file.
595 Geany tries to detect the encoding of a file while opening it, but
596 auto-detecting the encoding of a file is not easy and sometimes an
597 encoding might not be detected correctly. In this case you have to
598 set the encoding of the file manually in order to display it
599 correctly. You can this in the file open dialog by selecting an
600 encoding in the drop down box or by reloading the file with the
601 file menu item "Reload as". The auto-detection works well for most
602 encodings but there are also some encodings where it is known that
603 auto-detection has problems.
605 There are different ways to set different encodings in Geany:
607 * Using the file open dialog
609   This opens the file with the encoding specified in the encoding drop
610   down box. If the encoding is set to "Detect from file" auto-detection
611   will be used. If the encoding is set to "Without encoding (None)" the
612   file will be opened without any character conversion and Geany will
613   not try to auto-detect the encoding (see below for more information).
615 * Using the "Reload as" menu item
617   This item reloads the current file with the specified encoding. It can
618   help if you opened a file and found out that the wrong encoding was used.
620 * Using the "Set encoding" menu item
622   Contrary to the above two options, this will not change or reload
623   the current file unless you save it. It is useful when you want to
624   change the encoding of the file.
626 * Specifying the encoding in the file itself
628   As mentioned above, auto-detecting the encoding of a file may fail on
629   some encodings. If you know that Geany doesn't open a certain file,
630   you can add the specification line, described in the next section,
631   to the beginning of the file to force Geany to use a specific
632   encoding when opening the file.
635 In-file encoding specification
636 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
638 Geany detects meta tags of HTML files which contain charset information
639 like::
641     <meta http-equiv="content-type" content="text/html; charset=ISO-8859-15" />
643 and the specified charset is used when opening the file. This is useful if the
644 encoding of the file cannot be detected properly.
645 For non-HTML files you can also define a line like::
647     /* geany_encoding=ISO-8859-15 */
649 or::
651     # geany_encoding=ISO-8859-15 #
653 to force an encoding to be used. The #, /\* and \*/ are examples
654 of filetype-specific comment characters. It doesn't matter which
655 characters are around the string " geany_encoding=ISO-8859-15 " as long
656 as there is at least one whitespace character before and after this
657 string. Whitespace characters are in this case a space or tab character.
658 An example to use this could be you have a file with ISO-8859-15
659 encoding but Geany constantly detects the file encoding as ISO-8859-1.
660 Then you simply add such a line to the file and Geany will open it
661 correctly the next time.
663 Since Geany 0.15 you can also use lines which match the
664 regular expression used to find the encoding string:
665 ``coding[\t ]*[:=][\t ]*([a-z0-9-]+)[\t ]*``
667 .. note::
668     These specifications must be in the first 512 bytes of the file.
669     Anything after the first 512 bytes will not be recognized.
671 Some examples are::
673     # encoding = ISO-8859-15
675 or::
677     # coding: ISO-8859-15
679 Special encoding "None"
680 ^^^^^^^^^^^^^^^^^^^^^^^
682 There is a special encoding "None" which uses no
683 encoding. It is useful when you know that Geany cannot auto-detect
684 the encoding of a file and it is not displayed correctly. Especially
685 when the file contains NULL-bytes this can be useful to skip auto
686 detection and open the file properly at least until the occurrence
687 of the first NULL-byte. Using this encoding opens the file as it is
688 without any character conversion.
691 Unicode Byte-Order-Mark (BOM)
692 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
694 Furthermore, Geany detects a Unicode Byte Order Mark (see
695 http://en.wikipedia.org/wiki/Byte_Order_Mark for details). Of course,
696 this feature is only available if the opened file is in a Unicode
697 encoding. The Byte Order Mark helps to detect the encoding of a file,
698 e.g. whether it is UTF-16LE or UTF-16BE and so on. On Unix-like systems
699 using a Byte Order Mark could cause some problems for programs not
700 expecting it, e.g. the compiler gcc stops
701 with stray errors, PHP does not parse a script containing a BOM and
702 script files starting with a she-bang maybe cannot be started. In the
703 status bar you can easily see whether the file starts with a BOM or
704 not.
706 If you want to set a BOM for a file or if you want to remove it
707 from a file, just use the document menu and toggle the checkbox.
709 .. note::
710     If you are unsure what a BOM is or if you do not understand where
711     to use it, then it is probably not important for you and you can
712     safely ignore it.
716 Editing
717 -------
720 Folding
721 ^^^^^^^
723 Geany provides basic code folding support. Folding means the ability to
724 show and hide parts of the text in the current file. You can hide
725 unimportant code sections and concentrate on the parts you are working on
726 and later you can show hidden sections again. In the editor window there is
727 a small grey margin on the left side with [+] and [-] symbols which
728 show hidden parts and hide parts of the file respectively. By
729 clicking on these icons you can simply show and hide sections which are
730 marked by vertical lines within this margin. For many filetypes nested
731 folding is supported, so there may be several fold points within other
732 fold points.
734 .. note::
735     You can customize the folding icon and line styles - see the
736     filetypes.common `Folding Settings`_.
738 If you don't like it or don't need it at all, you can simply disable
739 folding support completely in the preferences dialog.
741 The folding behaviour can be changed with the "Fold/Unfold all children of
742 a fold point" option in the preference dialog. If activated, Geany will
743 unfold all nested fold points below the current one if they are already
744 folded (when clicking on a [+] symbol).
745 When clicking on a [-] symbol, Geany will fold all nested fold points
746 below the current one if they are unfolded.
748 This option can be inverted by pressing the Shift
749 key while clicking on a fold symbol. That means, if the "Fold/Unfold all
750 children of a fold point" option is enabled, pressing Shift will disable
751 it for this click and vice versa.
754 Column mode editing (rectangular selections)
755 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
757 There is basic support for column mode editing. To use it, create a
758 rectangular selection by holding down the Control and Shift keys
759 (or Alt and Shift on Windows) while selecting some text.
760 Once a rectangular selection exists you can start editing the text within
761 this selection and the modifications will be done for every line in the
762 selection.
764 It is also possible to create a zero-column selection - this is
765 useful to insert text on multiple lines.
767 Drag and drop of text
768 ^^^^^^^^^^^^^^^^^^^^^
770 If you drag selected text in the editor widget of Geany the text is
771 moved to the position where the mouse pointer is when releasing the
772 mouse button. Holding Control when releasing the mouse button will
773 copy the text instead. This behaviour was changed in Geany 0.11 -
774 before the selected text was copied to the new position.
777 Indentation
778 ^^^^^^^^^^^
780 Geany allows each document to indent either with a tab character,
781 multiple spaces or a combination of both. The default indent
782 settings are set in `Editor Indentation preferences`_ (see the link
783 for more information).
785 The default settings can be overridden per-document using the
786 Document menu. They can also be overridden by projects - see
787 `Project management`_.
789 The indent mode for the current document is shown on the status bar
790 as follows:
793     Indent with Tab characters.
795     Indent with spaces.
797     Indent with tabs and spaces, depending on how much indentation is
798     on a line.
800 Applying new indentation settings
801 `````````````````````````````````
802 After changing the default settings you may wish to apply the new
803 settings to every document in the current session. To do this use the
804 *Project->Apply Default Indentation* menu item.
806 Detecting indent type
807 `````````````````````
808 The *Detect from file* indentation preference can be used to
809 scan each file as it's opened and set the indent type based on
810 how many lines start with a tab vs. 2 or more spaces.
813 Auto-indentation
814 ^^^^^^^^^^^^^^^^
816 When enabled, auto-indentation happens when pressing *Enter* in the
817 Editor. It adds a certain amount of indentation to the new line so the
818 user doesn't always have to indent each line manually.
820 Geany has four types of auto-indentation:
822 None
823     Disables auto-indentation completely.
824 Basic
825     Adds the same amount of whitespace on a new line as on the last line.
826 Current chars
827     Does the same as *Basic* but also indents a new line after an opening
828     brace '{', and de-indents when typing a closing brace '}'. For Python,
829     a new line will be indented after typing ':' at the end of the
830     previous line.
831 Match braces
832     Similar to *Current chars* but the closing brace will be aligned to
833     match the indentation of the line with the opening brace.
835 There is also XML-tag auto-indentation. This is enabled when the
836 mode is more than just Basic, and is also controlled by a filetype
837 setting - see `xml_indent_tags`_.
840 Bookmarks
841 ^^^^^^^^^
843 Geany provides a handy bookmarking feature that lets you mark one
844 or more lines in a document, and return the cursor to them using a
845 key combination.
847 To place a mark on a line, either left-mouse-click in the left margin
848 of the editor window, or else use Ctrl-m. This will
849 produce a small green plus symbol in the margin. You can have as many
850 marks in a document as you like. Click again (or use Ctrl-m again)
851 to remove the bookmark. To remove all the marks in a given document,
852 use "Remove Markers" in the Document menu.
854 To navigate down your document, jumping from one mark to the next,
855 use Ctrl-. (control period). To go in the opposite direction on
856 the page, use Ctrl-, (control comma). Using the bookmarking feature
857 together with the commands to switch from one editor tab to another
858 (Ctrl-PgUp/PgDn and Ctrl-Tab) provides a particularly fast way to
859 navigate around multiple files.
862 Code navigation history
863 ^^^^^^^^^^^^^^^^^^^^^^^
865 To ease navigation in source files and especially between
866 different files, Geany lets you jump between different navigation
867 points. Currently, this works for the following:
869 * `Go to tag declaration`_
870 * `Go to tag definition`_
871 * Symbol list items
872 * Build errors
873 * Message items
875 When using one of these actions, Geany remembers your current position
876 and jumps to the new one. If you decide to go back to your previous
877 position in the file, just use "Navigate back a location". To
878 get back to the new position again, just use "Navigate forward a
879 location". This makes it easier to navigate in e.g.  foreign code
880 and between different files.
883 Sending text through custom commands
884 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
886 You can define several custom commands in Geany and send the current
887 selection to one of these commands using the *Edit->Format->Send
888 Selection to* menu or keybindings. The output of the command will be
889 used to replace the current selection. This makes it possible to use
890 text formatting tools with Geany in a general way.
892 The selected text will be sent to the standard input of the executed
893 command, so the command should be able to read from it and it should
894 print all results to its standard output which will be read by
895 Geany. To help finding errors in executing the command, the output
896 of the program's standard error will be printed on Geany's standard
897 output.
899 If there is no selection, the whole current line is used instead.
901 To add a custom command, use the *Send Selection to->Set Custom
902 Commands* menu item. Click on *Add* to get a new item and type the
903 command. You can also specify some command line options. Empty
904 commands are not saved.
906 Normal shell quoting is supported, so you can do things like:
908 * ``sed 's/\./(dot)/g'``
910 The above example would normally be done with the `Replace all`_
911 function, but it can be handy to have common commands already set up.
914 Context actions
915 ^^^^^^^^^^^^^^^
917 You can execute the context action command on the current word at the
918 cursor position or the available selection.  This word or selection
919 can be used as an argument to the command.
920 The context action is invoked by a menu entry in the popup menu of the
921 editor and also a keyboard shortcut (see the section called
922 `Keybindings`_).
924 The command can be specified in the preferences dialog and also for
925 each filetype (see "context_action_cmd" in the section called
926 `Filetype configuration`_). When the context action is invoked, the filetype
927 specific command is used if available, otherwise the command
928 specified in the preferences dialog is executed.
930 The current word or selection can be referred with the wildcard "%s"
931 in the command, it will be replaced by the current word or
932 selection before the command is executed.
934 For example a context action can be used to open API documentation
935 in a browser window, the command to open the PHP API documentation
936 would be::
938     firefox "http://www.php.net/%s"
940 when executing the command, the %s is substituted by the word near
941 the cursor position or by the current selection. If the cursor is at
942 the word "echo", a browser window will open(assumed your browser is
943 called firefox) and it will open the address: http://www.php.net/echo.
946 Autocompletion
947 ^^^^^^^^^^^^^^
949 Geany can offer a list of possible completions for symbols defined in the
950 tags and for all words in a document.
952 The autocompletion list for symbols is presented when the first few
953 characters of the symbol are typed (configurable, see `Editor Completions
954 preferences`_, default 4) or when the *Complete word*
955 keybinding is pressed (configurable, see `Editor keybindings`_,
956 default Ctrl-Space).
958 When the defined keybinding is typed and the *Autocomplete all words in
959 document* preference (in `Editor Completions preferences`_)
960 is selected then the autocompletion list will show all matching words
961 in the document, if there are no matching symbols.
963 If you don't want to use autocompletion it can be dismissed until
964 the next symbol by pressing Escape. The autocompletion list is updated
965 as more characters are typed so that it only shows completions that start
966 with the characters typed so far. If no symbols begin with the sequence,
967 the autocompletion window is closed.
969 The up and down arrows will move the selected item. The highlighted
970 item on the autocompletion list can be chosen from the list by pressing
971 Enter/Return. You can also double-click to select an item. The sequence
972 will be completed to match the chosen item, and if the *Drop rest of
973 word on completion* preference is set (in `Editor Completions
974 preferences`_) then any characters after the cursor that match
975 a symbol or word are deleted.
977 Word part completion
978 ````````````````````
979 By default, pressing Tab will complete the selected item by word part;
980 useful e.g. for adding the prefix ``gtk_combo_box_entry_`` without typing it
981 manually:
983 * gtk_com<TAB>
984 * gtk_combo_<TAB>
985 * gtk_combo_box_<e><TAB>
986 * gtk_combo_box_entry_<s><ENTER>
987 * gtk_combo_box_entry_set_text_column
989 The key combination can be changed from Tab - See `Editor keybindings`_.
990 If you clear/change the key combination for word part completion, Tab
991 will complete the whole word instead, like Enter.
993 Scope autocompletion
994 ````````````````````
995 E.g.::
997     struct
998     {
999         int i;
1000         char c;
1001     } foo;
1003 When you type ``foo.`` it will show an autocompletion list with 'i' and
1004 'c' symbols.
1006 It only works for languages that set parent scope names for e.g. struct
1007 members. Currently this means C-like languages. The C tag parser only
1008 parses global scopes, so this won't work for structs or objects declared
1009 in local scope.
1012 User-definable snippets
1013 ^^^^^^^^^^^^^^^^^^^^^^^
1015 Snippets are small strings or code constructs which can be replaced or
1016 completed to a more complex string. So you can save a lot of time when
1017 typing common strings and letting Geany do the work for you.
1018 To know what to complete or replace Geany reads a configuration file
1019 called ``snippets.conf`` at startup.
1021 Maybe you need to often type your name, so define a snippet like this::
1023     [Default]
1024     myname=Enrico Tröger
1026 Every time you write ``myname`` <TAB> in Geany, it will replace "myname"
1027 with "Enrico Tröger". The key to start autocompletion can be changed
1028 in the preferences dialog, by default it is TAB. The corresponding keybinding
1029 is called `Complete snippet`.
1031 **Paths**
1033 You can override the default snippets using the user
1034 ``snippets.conf`` file. Use the *Tools->Configuration
1035 Files->snippets.conf* menu item. See also `Configuration file paths`_.
1037 This adds the default settings to the user file if the file doesn't
1038 exist. Alternatively the file can be created manually, adding only
1039 the settings you want to change. All missing settings will be read
1040 from the system snippets file.
1042 **Snippet groups**
1044 The file ``snippets.conf`` contains sections defining snippets that
1045 are available for particular filetypes and in general.
1047 The two sections "Default" and "Special" apply to all filetypes.
1048 "Default" contains all snippets which are available for every
1049 filetype and "Special" contains snippets which can only be used in
1050 other snippets. So you can define often used parts of snippets and
1051 just use the special snippet as a placeholder (see the
1052 ``snippets.conf`` for details).
1054 You can define sections with the name of a filetype eg "C++".  The
1055 snippets in that section are only available for use in files with that
1056 filetype.  Snippets in filetype sections will hide snippets with the
1057 same name in the "Default" section when used in a file of that
1058 filetype.
1060 **Substitution sequences for snippets**
1062 To define snippets you can use several special character sequences which
1063 will be replaced when using the snippet:
1065 ================  =========================================================
1066 \\n or %newline%  Insert a new line (it will be replaced by the used EOL
1067                   char(s): LF, CR/LF, or CR).
1069 \\t or %ws%       Insert an indentation step, it will be replaced according
1070                   to the current document's indent mode.
1072 \\s               \\s to force whitespace at beginning or end of a value
1073                   ('key= value' won't work, use 'key=\\svalue')
1075 %cursor%          Place the cursor at this position after completion has
1076                   been done. You can define multiple %cursor% wildcards
1077                   and use the keybinding `Move cursor in snippet` to jump
1078                   to the next defined cursor position in the completed
1079                   snippet.
1081 %...%             "..." means the name of a key in the "Special" section.
1082                   If you have defined a key "brace_open" in the "Special"
1083                   section you can use %brace_open% in any other snippet.
1084 ================  =========================================================
1086 Snippet names must not contain spaces otherwise they won't
1087 work correctly. But beside that you can define almost any
1088 string as a snippet and use it later in Geany. It is not limited
1089 to existing contructs of certain programming languages(like ``if``,
1090 ``for``, ``switch``). Define whatever you need.
1092 **Template wildcards**
1094 Since Geany 0.15 you can also use most of the available templates wildcards
1095 listed in `Template wildcards`_. All wildcards which are listed as
1096 `available in snippets` can be used. For instance to improve the above example::
1098     [Default]
1099     myname=My name is {developer}
1100     mysystem=My system: {command:uname -a}
1102 this will replace ``myname`` with "My name is " and the value of the template
1103 preference ``developer``.
1105 **Word characters**
1107 You can change the way Geany recognizes the word to complete,
1108 that is how the start and end of a word is recognised when the
1109 snippet completion is requested. The section "Special" may
1110 contain a key "wordchars" which lists all characters a string may contain
1111 to be recognized as a word for completion. Leave it commented to use
1112 default characters or define it to add or remove characters to fit your
1113 needs.
1115 Snippet keybindings
1116 ```````````````````
1118 Normally you would type the snippet name and press Tab. However, you
1119 can define keybindings for snippets under the *Keybindings* group in
1120 ``snippets.conf``::
1122     [Keybindings]
1123     for=<Ctrl>7
1124     block_cursor=<Ctrl>8
1126 .. note::
1127     Snippet keybindings may be overridden by Geany's configurable
1128     keybindings.
1131 Inserting Unicode characters
1132 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1134 You can insert Unicode code points by hitting Ctrl-Shift-u, then still holding
1135 Ctrl-Shift, type some hex digits representing the code point for the character
1136 you want and hit Enter or Return (still holding Ctrl-Shift). If you release
1137 Ctrl-Shift before hitting Enter or Return (or any other character), the code
1138 insertion is completed, but the typed character is also entered.  In the case
1139 of Enter/Return, it is a newline, as you might expect.
1142 In some earlier versions of Geany, you might need to first unbind Ctrl-Shift-u
1143 in the `keybinding preferences`_, then select *Tools->Reload Configuration*
1144 or restart Geany. Note that it works slightly differently from other GTK
1145 applications, in that you'll need to continue to hold down the Ctrl and Shift
1146 keys while typing the code point hex digits (and the Enter or Return to finish the code point).
1149 Search, replace and go to
1150 -------------------------
1152 This section describes search-related commands from the Search menu
1153 and the editor window's popup menu:
1155 * Find
1156 * Find selection
1157 * Find usage
1158 * Find in files
1159 * Replace
1160 * Go to tag definition
1161 * Go to tag declaration
1162 * Go to line
1164 See also `Search`_ preferences.
1166 Toolbar entries
1167 ^^^^^^^^^^^^^^^
1168 There are also two toolbar entries:
1170 * Search bar
1171 * Go to line entry
1173 There are keybindings to focus each of these - see `Focus
1174 keybindings`_. Pressing Escape will then focus the editor.
1176 Search bar
1177 ``````````
1178 The quickest way to find some text is to use the search bar entry in
1179 the toolbar. This performs a case-insensitive search in the current
1180 document whilst you type. Pressing Enter will search again, and pressing
1181 Shift-Enter will search backwards.
1183 Find
1184 ^^^^
1186 The Find dialog is used for finding text in one or more open documents.
1188 .. image:: ./images/find_dialog.png
1191 Matching options
1192 ````````````````
1194 The syntax for the *Use regular expressions* option is shown in
1195 `Regular expressions`_.
1197 .. note::
1198     *Use escape sequences* is implied for regular expressions.
1200 The *Use escape sequences* option will transform any escaped characters
1201 into their UTF-8 equivalent. For example, \\t will be transformed into
1202 a tab character. Other recognized symbols are: \\\\, \\n, \\r, \\uXXXX
1203 (Unicode characters).
1206 Find all
1207 ````````
1209 To find all matches, click on the Find All expander. This will reveal
1210 several options:
1212 * In Document
1213 * In Session
1214 * Mark
1216 Find All In Document will show a list of matching lines in the
1217 current document in the Messages tab of the Message Window. *Find All
1218 In Session* does the same for all open documents.
1220 Mark will highlight all matches in the current document with a
1221 colored box. These markers can be removed by selecting the
1222 Remove Markers command from the Document menu.
1225 Change font in search dialog text fields
1226 ````````````````````````````````````````
1228 All search related dialogs use a Monospace for the text input fields to
1229 increase the readability of input text. This is useful when you are
1230 typing input such as regular expressions with spaces, periods and commas which
1231 might it hard to read with a proportional font.
1233 If you want to change the font, you can do this easily
1234 by inserting the following style into your ``.gtkrc-2.0``
1235 (usually found in your home directory on UNIX-like systems and in the
1236 etc subdirectory of your Geany installation on Windows)::
1238     style "search_style"
1239     {
1240         font_name="Monospace 8"
1241     }
1242     widget "GeanyDialogSearch.*.GtkEntry" style:highest "search_style"
1244 Please note the addition of ":highest" in the last line which sets the priority
1245 of this style to the highest available. Otherwise, the style is ignored
1246 for the search dialogs.
1249 Find selection
1250 ^^^^^^^^^^^^^^
1251 The *Find Next/Previous Selection* commands perform a search for the
1252 current selected text. If nothing is selected, by default the current
1253 word is used instead. This can be customized by the
1254 *find_selection_type* preference - see `Various preferences`_.
1256 =====   =============================================
1257 Value   *find_selection_type* behaviour
1258 =====   =============================================
1259 0       Use the current word (default).
1260 1       Try the X selection first, then current word.
1261 2       Repeat last search.
1262 =====   =============================================
1265 Find usage
1266 ^^^^^^^^^^
1268 Find usage searches all open files. It is similar to the Find All In
1269 Session option in the Find dialog.
1271 If there is a selection, then it is used as the search text; otherwise
1272 the current word is used. The current word is either taken from the
1273 word nearest the edit cursor, or the word underneath the popup menu
1274 click position when the popup menu is used. The search results are
1275 shown in the Messages tab of the Message Window.
1278 Find in files
1279 ^^^^^^^^^^^^^
1281 Find in files is a more powerful version of Find usage that searches
1282 all files in a certain directory using the Grep tool. The Grep tool
1283 must be correctly set in Preferences to the path of the system's Grep
1284 utility. GNU Grep is recommended (see note below).
1286 .. image:: ./images/find_in_files_dialog.png
1288 The *Search* field is initially set to the current word in the editor
1289 (depending on `Search`_ preferences).
1291 The *Files* setting allows to choose which files are included in the
1292 search, depending on the mode:
1295     Search in all files;
1296 Project
1297     Use the current project's patterns, see `Project properties`_;
1298 Custom
1299     Use custom patterns.
1301 Both project and custom patterns use a glob-style syntax, each
1302 pattern separated by a space. To search all ``.c`` and ``.h`` files,
1303 use: ``*.c *.h``.
1304 Note that an empty pattern list searches in all files rather
1305 than none.
1307 The *Directory* field is initially set to the current document's directory,
1308 unless this field has already been edited and the current document has
1309 not changed. Otherwise, the current document's directory is prepended to
1310 the drop-down history. This can be disabled - see `Search`_ preferences.
1312 The *Encoding* field can be used to define the encoding of the files
1313 to be searched. The entered search text is converted to the chosen encoding
1314 and the search results are converted back to UTF-8.
1316 The *Extra options* field is used to pass any additional arguments to
1317 the grep tool.
1319 .. note::
1320     The *Files* setting uses ``--include=`` when searching recursively,
1321     *Recurse in subfolders* uses ``-r``; both are GNU Grep options and may
1322     not work with other Grep implementations.
1325 Filtering out version control files
1326 ```````````````````````````````````
1328 When using the *Recurse in subfolders* option with a directory that's
1329 under version control, you can set the *Extra options* field to filter
1330 out version control files.
1332 If you have GNU Grep >= 2.5.2 you can use the ``--exclude-dir``
1333 argument to filter out CVS and hidden directories like ``.svn``.
1335 Example: ``--exclude-dir=.svn --exclude-dir=CVS``
1337 If you have an older Grep, you can try using the ``--exclude`` flag
1338 to filter out filenames.
1340 SVN Example: ``--exclude=*.svn-base``
1342 The --exclude argument only matches the file name part, not the path.
1345 Replace
1346 ^^^^^^^
1348 The Replace dialog is used for replacing text in one or more open
1349 documents.
1351 .. image:: ./images/replace_dialog.png
1353 The Replace dialog has the same options for matching text as the Find
1354 dialog. See the section `Matching options`_.
1356 The *Use regular expressions* option allows regular expressions to
1357 be used in the search string and back references in the replacement
1358 text -- see the entry for '\\n' in `Regular expressions`_.
1360 Replace all
1361 ```````````
1363 To replace several matches, click on the *Replace All* expander. This
1364 will reveal several options:
1366 * In Document
1367 * In Session
1368 * In Selection
1370 *Replace All In Document* will replace all matching text in the
1371 current document. *Replace All In Session* does the same for all open
1372 documents. *Replace All In Selection* will replace all matching text
1373 in the current selection of the current document.
1376 Go to tag definition
1377 ^^^^^^^^^^^^^^^^^^^^
1379 If the current word or selection is the name of a tag definition
1380 (e.g. a function name) and the file containing the tag definition is
1381 open, this command will switch to that file and go to the
1382 corresponding line number. The current word is either the word
1383 nearest the edit cursor, or the word underneath the popup menu click
1384 position when the popup menu is used.
1386 .. note::
1387     If the corresponding tag is on the current line, Geany will first
1388     look for a tag declaration instead, as this is more useful.
1389     Likewise *Go to tag declaration* will search for a tag definition
1390     first in this case also.
1393 Go to tag declaration
1394 ^^^^^^^^^^^^^^^^^^^^^
1396 Like *Go to tag definition*, but for a forward declaration such as a
1397 C function prototype or ``extern`` declaration instead of a function
1398 body.
1401 Go to line
1402 ^^^^^^^^^^
1404 Go to a particular line number in the current file.
1407 Regular expressions
1408 ^^^^^^^^^^^^^^^^^^^
1410 You can use regular expressions in the Find and Replace dialogs
1411 by selecting the *Use regular expressions* check box (see `Matching
1412 options`_). The syntax is Perl compatible. Basic syntax is described
1413 in the table below. For full details, see
1414 http://www.geany.org/manual/gtk/glib/glib-regex-syntax.html.
1416 .. note::
1417     1. The *Use escape sequences* dialog option always applies for regular
1418        expressions.
1419     2. Searching backwards with regular expressions is not supported.
1421 **In a regular expression, the following characters are interpreted:**
1423 ======= ============================================================
1424 .       Matches any character.
1426 (       This marks the start of a region for tagging a match.
1428 )       This marks the end of a tagged region.
1430 \\n     Where n is 1 through 9 refers to the first through ninth tagged
1431         region when searching or replacing.
1433         Searching for (Wiki)\\1 matches WikiWiki.
1435         If the search string was Fred([1-9])XXX and the
1436         replace string was Sam\\1YYY, when applied to Fred2XXX this
1437         would generate Sam2YYY.
1439 \\0     When replacing, the whole matching text.
1441 \\b     This matches a word boundary.
1443 \\c     A backslash followed by d, D, s, S, w or W, becomes a
1444         character class (both inside and outside sets []).
1446         * d: decimal digits
1447         * D: any char except decimal digits
1448         * s: whitespace (space, \\t \\n \\r \\f \\v)
1449         * S: any char except whitespace (see above)
1450         * w: alphanumeric & underscore
1451         * W: any char except alphanumeric & underscore
1453 \\x     This allows you to use a character x that would otherwise have
1454         a special meaning. For example, \\[ would be interpreted as [
1455         and not as the start of a character set. Use \\\\ for a literal
1456         backslash.
1458 [...]   Matches one of the characters in the set. If the first
1459         character in the set is ^, it matches the characters NOT in
1460         the set, i.e. complements the set. A shorthand S-E (start
1461         dash end) is used to specify a set of characters S up to E,
1462         inclusive.
1464         The special characters ] and - have no special
1465         meaning if they appear first in the set. - can also be last
1466         in the set. To include both, put ] first: []A-Z-].
1468         Examples::
1470         []|-]    matches these 3 chars
1471         []-|]    matches from ] to | chars
1472         [a-z]    any lowercase alpha
1473         [^]-]    any char except - and ]
1474         [^A-Z]   any char except uppercase alpha
1475         [a-zA-Z] any alpha
1477 ^       This matches the start of a line (unless used inside a set, see
1478         above).
1480 $       This matches the end of a line.
1482 \*      This matches 0 or more times. For example, Sa*m matches Sm, Sam,
1483         Saam, Saaam and so on.
1485 \+      This matches 1 or more times. For example, Sa+m matches Sam,
1486         Saam, Saaam and so on.
1488 \?      This matches 0 or 1 time(s). For example, Joh?n matches John, Jon.
1489 ======= ============================================================
1491 .. note::
1492     This table is adapted from Scintilla and SciTE documentation,
1493     distributed under the `License for Scintilla and SciTE`_.
1497 View menu
1498 ---------
1499 The View menu allows various elements of the main window to be shown
1500 or hidden, and also provides various display-related editor options.
1502 Color schemes menu
1503 ^^^^^^^^^^^^^^^^^^
1504 The Color schemes menu is available under the *View->Editor* submenu.
1505 It lists various color schemes for editor highlighting styles,
1506 including the default scheme first. Other items are available based
1507 on what color scheme files Geany found at startup.
1509 Color scheme files are read from the `Configuration file paths`_ under
1510 the ``colorschemes`` subdirectory. They should have the extension
1511 ``.conf``. The default color scheme
1512 is read from ``filetypes.common``.
1514 The `[named_styles] section`_  and `[named_colors] section`_ are the
1515 same as for ``filetypes.common``.
1517 The ``[theme_info]`` section can contain information about the
1518 theme. The ``name`` and ``description`` keys are read to set the
1519 menu item text and tooltip, respectively. These keys can have
1520 translations, e.g.::
1522     key=Hello
1523     key[de]=Hallo
1524     key[fr_FR]=Bonjour
1526 Tags
1527 ----
1529 Tags are information that relates symbols in a program with the
1530 source file location of the declaration and definition.
1532 Geany has built-in functionality for generating tag information (aka
1533 "workspace tags") for supported filetypes when you open a file.  You
1534 can also have Geany automatically load external tag files (aka "global
1535 tags files") upon startup, or manually using *Tools --> Load Tags*.
1537 Geany uses its own tag file format, similar to what ``ctags`` uses
1538 (but is incompatible with ctags). You use Geany to generate global
1539 tags files, as described below.
1542 Workspace tags
1543 ^^^^^^^^^^^^^^
1545 Tags for each document are parsed whenever a file is loaded, saved or
1546 modified (see *Symbol list update frequency* preference in the `Editor
1547 Completions preferences`_). These are shown in the Symbol list in the
1548 Sidebar. These tags are also used for autocompletion of symbols and calltips
1549 for all documents open in the current session that have the same filetype.
1551 The *Go to Tag* commands can be used with all workspace tags. See
1552 `Go to tag definition`_.
1555 Global tags
1556 ^^^^^^^^^^^
1558 Global tags are used to provide autocompletion of symbols and calltips
1559 without having to open the corresponding source files. This is intended
1560 for library APIs, as the tags file only has to be updated when you upgrade
1561 the library.
1563 You can load a custom global tags file in two ways:
1565 * Using the *Load Tags* command in the Tools menu.
1566 * By moving or symlinking tags files to the ``tags`` subdirectory of
1567   one of the `configuration file paths`_ before starting Geany.
1569 You can either download these files or generate your own. They have
1570 the format::
1572     name.lang_ext.tags
1574 *lang_ext* is one of the extensions set for the filetype associated
1575 with the tags. See the section called `Filetype extensions`_ for
1576 more information.
1579 Default global tags files
1580 `````````````````````````
1582 For some languages, a list of global tags is loaded when the
1583 corresponding filetype is first used. Currently these are for:
1585 * C
1586 * Pascal
1587 * PHP
1588 * HTML -- &symbol; completion, e.g. for ampersand, copyright, etc.
1589 * LaTeX
1590 * Python
1593 Global tags file format
1594 ```````````````````````
1596 Global tags files can have two different formats:
1598 * Tagmanager format
1599 * Pipe-separated format
1601 The first line of global tags files should be a comment, introduced
1602 by ``#`` followed by a space and a string like ``format=pipe``
1603 or ``format=tagmanager`` respectively, these are case-sensitive.
1604 This helps Geany to read the file properly. If this line
1605 is missing, Geany tries to auto-detect the used format but this
1606 might fail.
1609 The Tagmanager format is a bit more complex and is used for files
1610 created by the ``geany -g`` command. There is one tag per line.
1611 Different tag attributes like the return value or the argument list
1612 are separated with different characters indicating the type of the
1613 following argument.
1615 Pipe-separated format
1616 *********************
1617 The Pipe-separated format is easier to read and write.
1618 There is one tag per line and different tag attributes are separated
1619 by the pipe character (``|``). A line looks like::
1621     basename|string|(string path [, string suffix])|
1623 | The first field is the tag name (usually a function name).
1624 | The second field is the type of the return value.
1625 | The third field is the argument list for this tag.
1626 | The fourth field is the description for this tag but
1627   currently unused and should be left empty.
1629 Except for the first field (tag name), all other field can be left
1630 empty but the pipe separator must appear for them.
1632 You can easily write your own global tag files using this format.
1633 Just save them in your tags directory, as described earlier in the
1634 section `Global tags`_.
1637 Generating a global tags file
1638 `````````````````````````````
1640 You can generate your own global tags files by parsing a list of
1641 source files. The command is::
1643     geany -g [-P] <Tag File> <File list>
1645 * Tag File filename should be in the format described earlier --
1646   see the section called `Global tags`_.
1647 * File list is a list of filenames, each with a full path (unless
1648   you are generating C/C++ tags and have set the CFLAGS environment
1649   variable appropriately).
1650 * ``-P`` or ``--no-preprocessing`` disables using the C pre-processor
1651   to process ``#include`` directives for C/C++ source files. Use this
1652   option if you want to specify each source file on the command-line
1653   instead of using a 'master' header file. Also can be useful if you
1654   don't want to specify the CFLAGS environment variable.
1656 Example for the wxD library for the D programming language::
1658     geany -g wxd.d.tags /home/username/wxd/wx/*.d
1661 Generating C/C++ tag files
1662 **************************
1663 You may need to first setup the `C ignore.tags`_ file.
1665 For C/C++ tag files gcc is required by default, so that header files
1666 can be preprocessed to include any other headers they depend upon. If
1667 you do not want this, use the ``-P`` option described above.
1669 For preprocessing, the environment variable CFLAGS should be set with
1670 appropriate ``-I/path`` include paths. The following example works with
1671 the bash shell, generating tags for the GnomeUI library::
1673     CFLAGS=`pkg-config --cflags libgnomeui-2.0` geany -g gnomeui.c.tags \
1674     /usr/include/libgnomeui-2.0/gnome.h
1676 You can adapt this command to use CFLAGS and header files appropriate
1677 for whichever libraries you want.
1680 Generating tag files on Windows
1681 *******************************
1682 This works basically the same as on other platforms::
1684     "c:\program files\geany\bin\geany" -g c:\mytags.php.tags c:\code\somefile.php
1687 C ignore.tags
1688 ^^^^^^^^^^^^^
1690 You can ignore certain tags for C-based languages if they would lead
1691 to wrong parsing of the code. Use the *Tools->Configuration
1692 Files->ignore.tags* menu item to open the user ``ignore.tags`` file.
1693 See also `Configuration file paths`_.
1695 List all tag names you want to ignore in this file, separated by spaces
1696 and/or newlines.
1698 Example::
1700     G_GNUC_NULL_TERMINATED
1701     G_GNUC_PRINTF
1702     G_GNUC_WARN_UNUSED_RESULT
1704 This will parse code like:
1706 ``gchar **utils_strv_new(const gchar *first, ...)
1707 G_GNUC_NULL_TERMINATED;``
1709 More detailed information about ignore tags usage from the Exuberant Ctags
1710 manual page:
1712     Specifies a list of identifiers which are to be specially handled
1713     while  parsing C and C++ source files. This option is specifically
1714     provided to handle special cases arising through the use of
1715     pre-processor macros. When the identifiers listed are simple identifiers,
1716     these identifiers will be ignored during parsing of the source files.
1717     If an identifier is suffixed with a '+' character, ctags will also
1718     ignore any parenthesis-enclosed argument list which may immediately
1719     follow the identifier in the source files.
1720     If two identifiers are separated with the '=' character, the first
1721     identifiers is replaced by the second identifiers for parsing purposes.
1723 For even more detailed information please read the manual page of
1724 Exuberant Ctags.
1726 Geany extends Ctags with a '*' character suffix - this means use
1727 prefix matching, e.g. G_GNUC_* will match G_GNUC_NULL_TERMINATED, etc.
1728 Note that prefix match items should be put after other items to ensure
1729 that items like G_GNUC_PRINTF+ get parsed correctly.
1732 Preferences
1733 -----------
1735 You may adjust Geany's settings using the Edit --> Preferences
1736 dialog. Any changes you make there can be applied by hitting either
1737 the Apply or the OK button. These settings will persist between Geany
1738 sessions. Note that most settings here have descriptive popup bubble
1739 help -- just hover the mouse over the item in question to get help
1740 on it.
1742 You may also adjust some View settings (under the View menu) that
1743 persist between Geany sessions. The settings under the Document menu,
1744 however, are only for the current document and revert to defaults
1745 when restarting Geany.
1747 .. note::
1748     In the paragraphs that follow, the text describing a dialog tab
1749     comes after the screenshot of that tab.
1752 General Startup preferences
1753 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
1755 .. image:: ./images/pref_dialog_gen_startup.png
1757 Startup
1758 ```````
1760 Load files from the last session
1761     On startup, load the same files you had open the last time you
1762     used Geany.
1764 Load virtual terminal support
1765     Load the library for running a terminal in the message window area.
1767 Enable plugin support
1768     Allow plugins to be used in Geany.
1770 Shutdown
1771 ````````
1772 Save window position and geometry
1773     Save the current position and size of the main window so next time
1774     you open Geany it's in the same location.
1776 Confirm Exit
1777     Have a dialog pop up to confirm that you really want to quit Geany.
1779 Paths
1780 `````
1782 Startup path
1783     Path to start in when opening or saving files.
1784     It must be an absolute path.
1786 Project files
1787     Path to start in when opening project files.
1789 Extra plugin path
1790     By default Geany looks in the system installation and the user
1791     configuration - see `Plugins`_. In addition the path entered here will be
1792     searched.
1793     Usually you do not need to set an additional path to search for
1794     plugins. It might be useful when Geany is installed on a multi-user machine
1795     and additional plugins are available in a common location for all users.
1796     Leave blank to not set an additional lookup path.
1799 General Miscellaneous preferences
1800 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1802 .. image:: ./images/pref_dialog_gen_misc.png
1804 Miscellaneous
1805 `````````````
1807 Beep on errors when compilation has finished
1808     Have the computer make a beeping sound when compilation of your program
1809     has completed or any errors occurred.
1811 Switch status message list at new message
1812     Switch to the status message tab (in the notebook window at the bottom)
1813     once a new status message arrives.
1815 Suppress status messages in the status bar
1816     Remove all messages from the status bar. The messages are still displayed
1817     in the status messages window.
1819     .. tip::
1820         Another option is to use the *Switch to Editor* keybinding - it
1821         reshows the document statistics on the status bar. See `Focus
1822         keybindings`_.
1824 Use Windows File Open/Save dialogs
1825     Defines whether to use the native Windows File Open/Save dialogs or
1826     whether to use the GTK default dialogs.
1828 Auto-focus widgets (focus follows mouse)
1829     Give the focus automatically to widgets below the mouse cursor.
1830     This works for the main editor widget, the scribble, the toolbar search field
1831     goto line fields and the VTE.
1833 Search
1834 ``````
1836 Always wrap search
1837     Always wrap search around the document when finding a match.
1839 Hide the Find dialog
1840     Hide the `Find`_ dialog after clicking Find Next/Previous.
1842 Use the current word under the cursor for Find dialogs
1843     Use current word under the cursor when opening the Find, Find in Files or Replace dialog and
1844     there is no selection. When this option is disabled, the search term last used in the
1845     appropriate Find dialog is used.
1847 Use the current file's directory for Find in Files
1848     When opening the Find in Files dialog, set the directory to search to the directory of the current
1849     active file. When this option is disabled, the directory of the last use of the Find in Files
1850     dialog is used. See `Find in Files`_ for details.
1852 Projects
1853 ````````
1855 Use project-based session files
1856     Save your current session when closing projects. You will be able to
1857     resume different project sessions, automatically opening the files
1858     you had open previously.
1860 Store project file inside the project base directory
1861     When creating new projects, the default path for the project file contains
1862     the project base path. Without this option enabled, the default project file
1863     path is one level above the project base path.
1864     In either case, you can easily set the final project file path in the
1865     *New Project* dialog. This option provides the more common
1866     defaults automatically for convenience.
1869 Interface preferences
1870 ^^^^^^^^^^^^^^^^^^^^^
1872 .. image:: ./images/pref_dialog_interface_interface.png
1874 Sidebar
1875 ```````
1877 Show sidebar
1878     Whether to show the sidebar at all.
1880 Show symbol list
1881     Show the list of functions, variables, and other information in the
1882     current document you are editing.
1884 Show documents list
1885     Show all the documents you have open currently. This can be used to
1886     change between documents (see `Switching between documents`_) and
1887     to perform some common operations such as saving, closing and reloading.
1889 Position
1890     Whether to place the sidebar on the left or right of the editor window.
1892 Fonts
1893 `````
1895 Editor
1896     Change the font used to display documents.
1898 Symbol list
1899     Change the font used for the Symbols sidebar tab.
1901 Message window
1902     Change the font used for the message window area.
1904 Miscellaneous
1905 `````````````
1907 Show status bar
1908     Show the status bar at the bottom of the main window. It gives information about
1909     the file you are editing like the line and column you are on, whether any
1910     modifications were done, the file encoding, the filetype and other information.
1912 Interface Notebook tab preferences
1913 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1915 .. image:: ./images/pref_dialog_interface_notebook.png
1917 Editor tabs
1918 ```````````
1920 Show editor tabs
1921     Show a notebook tab for all documents so you can switch between them
1922     using the mouse (instead of using the Documents window).
1924 Show close buttons
1925     Make each tab show a close button so you can easily close open
1926     documents.
1928 Placement of new file tabs
1929     Whether to create a document with its notebook tab to the left or
1930     right of all existing tabs.
1932 Next to current
1933     Whether to place file tabs next to the current tab
1934     rather than at the edges of the notebook.
1936 Double-clicking hides all additional widgets
1937     Whether to call the View->Toggle All Additional Widgets command
1938     when double-clicking on a notebook tab.
1940 Tab positions
1941 `````````````
1943 Editor
1944     Set the positioning of the editor's notebook tabs to the right,
1945     left, top, or bottom of the editing window.
1947 Sidebar
1948     Set the positioning of the sidebar's notebook tabs to the right,
1949     left, top, or bottom of the sidebar window.
1951 Message window
1952     Set the positioning of the message window's notebook tabs to the
1953     right, left, top, or bottom of the message window.
1956 Interface Toolbar preferences
1957 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1959 Affects the main toolbar underneath the menu bar.
1961 .. image:: ./images/pref_dialog_interface_toolbar.png
1963 Toolbar
1964 ```````
1966 Show Toolbar
1967     Whether to show the toolbar.
1969 Append Toolbar to the Menu
1970     Allows to append the toolbar to the main menu bar instead of placing it below.
1971     This is useful to save vertical space.
1973 Customize Toolbar
1974     See `Customizing the toolbar`_.
1976 Appearance
1977 ``````````
1979 Icon Style
1980     Select the toolbar icon style to use - either icons and text, just
1981     icons or just text.
1982     The choice System default uses whatever icon style is set by GTK.
1984 Icon size
1985     Select the size of the icons you see (large, small or very small).
1986     The choice System default uses whatever icon size is set by GTK.
1989 Editor Features preferences
1990 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
1992 .. image:: ./images/pref_dialog_edit_features.png
1994 Features
1995 ````````
1997 Line wrapping
1998     Show long lines wrapped around to new display lines.
2000 .. _smart_home_key:
2002 "Smart" home key
2003     Whether to move the cursor to the first non-whitespace character
2004     on the line when you hit the home key on your keyboard. Pressing it
2005     again will go to the very start of the line.
2007 Disable Drag and Drop
2008     Do not allow the dragging and dropping of selected text in documents.
2010 Code folding
2011     Allow groups of lines in a document to be collapsed for easier
2012     navigation/editing.
2014 Fold/Unfold all children of a fold point
2015     Whether to fold/unfold all child fold points when a parent line
2016     is folded.
2018 Use indicators to show compile errors
2019     Underline lines with compile errors using red squiggles to indicate
2020     them in the editor area.
2022 Newline strips trailing spaces
2023     Remove any whitespace at the end of the line when you hit the
2024     Enter/Return key. See also `Strip trailing spaces`_.
2026 Line breaking column
2027     The editor column number to insert a newline at when Line Breaking
2028     is enabled for the current document.
2030 Comment toggle marker
2031     A string which is added when toggling a line comment in a source file.
2032     It is used to mark the comment as toggled.
2035 Editor Indentation preferences
2036 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2038 .. image:: ./images/pref_dialog_edit_indentation.png
2040 Indentation group
2041 `````````````````
2043 See `Indentation`_ for more information.
2045 Width
2046     The width of a single indent size in spaces. By default the indent
2047     size is equivalent to 4 spaces.
2049 Detect width from file
2050     Try to detect and set the indent width based on file content, when
2051     a file is opened.
2053 Type
2054     When Geany inserts indentation, whether to use:
2056     * Just Tabs
2057     * Just Spaces
2058     * Tabs and Spaces, depending on how much indentation is on a line
2060     The *Tabs and Spaces* indent type is also known as *Soft tab
2061     support* in some other editors.
2063 Detect type from file
2064     Try to detect and set the indent type based on file content, when
2065     a file is opened.
2067 Auto-indent mode
2068     The type of auto-indentation you wish to use after pressing Enter,
2069     if any.
2071     Basic
2072         Just add the indentation of the previous line.
2073     Current chars
2074         Add indentation based on the current filetype and any characters at
2075         the end of the line such as ``{``, ``}`` for C, ``:`` for Python.
2076     Match braces
2077         Like *Current chars* but for C-like languages, make a closing
2078         ``}`` brace line up with the matching opening brace.
2080 Tab key indents
2081     If set, pressing tab will indent the current line or selection, and
2082     unindent when pressing Shift-tab. Otherwise, the tab key will
2083     insert a tab character into the document (which can be different
2084     from indentation, depending on the indent type).
2086     .. note::
2087         There are also separate configurable keybindings for indent &
2088         unindent, but this preference allows the tab key to have different
2089         meanings in different contexts - e.g. for snippet completion.
2091 Editor Completions preferences
2092 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2094 .. image:: ./images/pref_dialog_edit_completions.png
2096 Completions
2097 ```````````
2099 Snippet Completion
2100     Whether to replace special keywords after typing Tab into a
2101     pre-defined text snippet.
2102     See `User-definable snippets`_.
2104 XML/HTML tag auto-closing
2105     When you open an XML/HTML tag automatically generate its
2106     completion tag.
2108 Automatic continuation multi-line comments
2109     Continue automatically multi-line comments in languages like C, C++
2110     and Java when a new line is entered inside such a comment.
2111     With this option enabled, Geany will insert a ``*`` on every new line
2112     inside a multi-line comment, for example when you press return in the
2113     following C code::
2115      /*
2116       * This is a C multi-line comment, press <Return>
2118     then Geany would insert::
2120       *
2122     on the next line with the correct indentation based on the previous line,
2123     as long as the multi-line is not closed by ``*/``.
2125 Autocomplete symbols
2126     When you start to type a symbol name, look for the full string to
2127     allow it to be completed for you.
2129 Autocomplete all words in document
2130     When you start to type a word, Geany will search the whole document for
2131     words starting with the typed part to complete it, assuming there
2132     are no tag names to show.
2134 Drop rest of word on completion
2135     Remove any word part to the right of the cursor when choosing a
2136     completion list item.
2138 Characters to type for autocompletion
2139     Number of characters of a word to type before autocompletion is
2140     displayed.
2142 Completion list height
2143     The number of rows to display for the autocompletion window.
2145 Max. symbol name suggestions
2146     The maximum number of items in the autocompletion list.
2148 Symbol list update frequency
2149     The minimum delay (in milliseconds) between two symbol list updates.
2151     This option determines how frequently the tag list is updated for the
2152     current document. The smaller the delay, the more up-to-date the symbol
2153     list (and then the completions); but rebuilding the symbol list has a
2154     cost in performance, especially with large files.
2156     The default value is 250ms, which means the symbol list will be updated
2157     at most four times per second, even if the document changes continuously.
2159     A value of 0 disables automatic updates, so the symbol list will only be
2160     updated upon document saving.
2163 Auto-close quotes and brackets
2164 ``````````````````````````````
2166 Geany can automatically insert a closing bracket and quote characters when
2167 you open them. For instance, you type a ``(`` and Geany will automatically
2168 insert ``)``. With the following options, you can define for which
2169 characters this should work.
2171 Parenthesis ( )
2172     Auto-close parenthesis when typing an opening one
2174 Curly brackets { }
2175     Auto-close curly brackets (braces) when typing an opening one
2177 Square brackets [ ]
2178     Auto-close square brackets when typing an opening one
2180 Single quotes ' '
2181     Auto-close single quotes when typing an opening one
2183 Double quotes " "
2184     Auto-close double quotes when typing an opening one
2187 Editor Display preferences
2188 ^^^^^^^^^^^^^^^^^^^^^^^^^^
2190 This is for visual elements displayed in the editor window.
2192 .. image:: ./images/pref_dialog_edit_display.png
2194 Display
2195 ```````
2197 Invert syntax highlighting colors
2198     Invert all colors, by default this makes white text on a black
2199     background.
2201 Show indendation guides
2202     Show vertical lines to help show how much leading indentation there
2203     is on each line.
2205 Show whitespaces
2206     Mark all tabs with an arrow "-->" symbol and spaces with dots to
2207     show which kinds of whitespace are used.
2209 Show line endings
2210     Display a symbol everywhere that a carriage return or line feed
2211     is present.
2213 Show line numbers
2214     Show or hide the Line Number margin.
2216 Show markers margin
2217     Show or hide the small margin right of the line numbers, which is used
2218     to mark lines.
2220 Stop scrolling at last line
2221     When enabled Geany stops scrolling when at the last line of the document.
2222     Otherwise you can scroll one more page even if there are no real lines.
2225 Long line marker
2226 ````````````````
2228 The long line marker helps to indicate overly-long lines, or as a hint
2229 to the user for when to break the line.
2231 Type
2232     Line
2233         Show a thin vertical line in the editor window at the given column
2234         position.
2235     Background
2236         Change the background color of characters after the given column
2237         position to the color set below. (This is recommended over the
2238         *Line* setting if you use proportional fonts).
2239     Disabled
2240         Don't mark long lines at all.
2242 Long line marker
2243     Set this value to a value greater than zero to specify the column
2244     where it should appear.
2246 Long line marker color
2247     Set the color of the long line marker.
2250 Virtual spaces
2251 ``````````````
2253 Virtual space is space beyond the end of each line.
2254 The cursor may be moved into virtual space but no real space will be
2255 added to the document until there is some text typed or some other
2256 text insertion command is used.
2258 Disabled
2259     Do not show virtual spaces
2261 Only for rectangular selections
2262     Only show virtual spaces beyond the end of lines when drawing a rectangular selection
2264 Always
2265     Always show virtual spaces beyond the end of lines
2268 Files preferences
2269 ^^^^^^^^^^^^^^^^^
2271 .. image:: ./images/pref_dialog_files.png
2273 New files
2274 `````````
2276 Open new documents from the command-line
2277     Whether to create new documents when passing filenames that don't
2278     exist from the command-line.
2280 Default encoding (new files)
2281     The type of file encoding you wish to use when creating files.
2283 Used fixed encoding when opening files
2284     Assume all files you are opening are using the type of encoding specified below.
2286 Default encoding (existing files)
2287     Opens all files with the specified encoding instead of auto-detecting it.
2288     Use this option when it's not possible for Geany to detect the exact encoding.
2290 Default end of line characters
2291     The end of line characters to which should be used for new files.
2292     On Windows systems, you generally want to use CR/LF which are the common
2293     characters to mark line breaks.
2294     On Unix-like systems, LF is default and CR is used on MAC systems.
2296 Saving files
2297 ````````````
2298 Perform formatting operations when a document is saved. These
2299 can each be undone with the Undo command.
2301 Ensure newline at file end
2302     Add a newline at the end of the document if one is missing.
2304 Ensure consistent line endings
2305     Ensures that newline characters always get converted before
2306     saving, avoiding mixed line endings in the same file.
2308 .. _Strip trailing spaces:
2310 Strip trailing spaces
2311     Remove any whitespace at the end of each document line.
2313     .. note::
2314         This does not apply to Diff documents, e.g. patch files.
2316 Replace tabs by space
2317     Replace all tabs in the document with the equivalent number of spaces.
2319     .. note::
2320         It is better to use spaces to indent than use this preference - see
2321         `Indentation`_.
2323 Miscellaneous
2324 `````````````
2326 Recent files list length
2327     The number of files to remember in the recently used files list.
2329 Disk check timeout
2330     The number of seconds to periodically check the current document's
2331     file on disk in case it has changed. Setting it to 0 will disable
2332     this feature.
2334     .. note::
2335         These checks are only performed on local files. Remote files are
2336         not checked for changes due to performance issues
2337         (remote files are files in ``~/.gvfs/``).
2340 Tools preferences
2341 ^^^^^^^^^^^^^^^^^
2343 .. image:: ./images/pref_dialog_tools.png
2345 Tool paths
2346 ``````````
2348 Terminal
2349     The command to execute a script in a terminal.  Occurrences of %c
2350     in the command are substituted with the run script name, see
2351     `Terminal emulators`_.
2353 Browser
2354     The location of your web browser executable.
2356 Grep
2357     The location of the grep executable.
2359 .. note::
2360     For Windows users: at the time of writing it is recommended to use
2361     the grep.exe from the UnxUtils project
2362     (http://sourceforge.net/projects/unxutils). The grep.exe from the
2363     Mingw project for instance might not work with Geany at the moment.
2365 Commands
2366 ````````
2368 Context action
2369     Set this to a command to execute on the current word.
2370     You can use the "%s" wildcard to pass the current word below the cursor
2371     to the specified command.
2374 Template preferences
2375 ^^^^^^^^^^^^^^^^^^^^
2377 This data is used as meta data for various template text to insert into
2378 a document, such as the file header. You only need to set fields that
2379 you want to use in your template files.
2381 .. image:: ./images/pref_dialog_templ.png
2383 Template data
2384 `````````````
2386 Developer
2387     The name of the developer who will be creating files.
2389 Initials
2390     The initials of the developer.
2392 Mail address
2393     The email address of the developer.
2395     .. note::
2396         You may wish to add anti-spam markup, e.g. ``name<at>site<dot>ext``.
2398 Company
2399     The company the developer is working for.
2401 Initial version
2402     The initial version of files you will be creating.
2404 Year
2405     Specify a format for the the {year} wildcard. You can use any conversion specifiers
2406     which can be used with the ANSI C strftime function.  For details please see
2407     http://man.cx/strftime.
2409 Date
2410     Specify a format for the the {date} wildcard. You can use any conversion specifiers
2411     which can be used with the ANSI C strftime function.  For details please see
2412     http://man.cx/strftime.
2414 Date & Time
2415     Specify a format for the the {datetime} wildcard. You can use any conversion specifiers
2416     which can be used with the ANSI C strftime function.  For details please see
2417     http://man.cx/strftime.
2420 Keybinding preferences
2421 ^^^^^^^^^^^^^^^^^^^^^^
2423 .. image:: ./images/pref_dialog_keys.png
2425 There are some commands listed in the keybinding dialog that are not, by default,
2426 bound to a key combination, and may not be available as a menu item.
2428 .. note::
2429     For more information see the section `Keybindings`_.
2432 Printing preferences
2433 ^^^^^^^^^^^^^^^^^^^^
2435 .. image:: ./images/pref_dialog_printing.png
2437 Use external command for printing
2438     Use a system command to print your file out.
2440 Use native GTK printing
2441     Let the GTK GUI toolkit handle your print request.
2443 Print line numbers
2444     Print the line numbers on the left of your paper.
2446 Print page number
2447     Print the page number on the bottom right of your paper.
2449 Print page header
2450     Print a header on every page that is sent to the printer.
2452 Use base name of the printed file
2453     Don't use the entire path for the header, only the filename.
2455 Date format
2456     How the date should be printed. You can use the same format
2457     specifiers as in the ANSI C function strftime(). For details please
2458     see http://man.cx/strftime.
2461 Various preferences
2462 ^^^^^^^^^^^^^^^^^^^
2464 .. image:: ./images/pref_dialog_various.png
2466 Rarely used preferences, explained in the table below. A few of them require
2467 restart to take effect, and a few other will only affect newly opened or created
2468 documents before restart.
2470 ================================  =========================================  ==========  ===========
2471 Key                               Description                                Default     Applies
2472 ================================  =========================================  ==========  ===========
2473 **Editor related**
2474 use_gtk_word_boundaries           Whether to look for the end of a word      true        to new
2475                                   when using word-boundary related                       documents
2476                                   Scintilla commands (see `Scintilla
2477                                   keyboard commands`_).
2478 brace_match_ltgt                  Whether to highlight <, > angle brackets.  false       immediately
2479 complete_snippets_whilst_editing  Whether to allow completion of snippets    false       immediately
2480                                   when editing an existing line (i.e. there
2481                                   is some text after the current cursor
2482                                   position on the line). Only used when the
2483                                   keybinding `Complete snippet` is set to
2484                                   ``Space``.
2485 show_editor_scrollbars            Whether to display scrollbars. If set to   true        immediately
2486                                   false, the horizontal and vertical
2487                                   scrollbars are hidden completely.
2488 indent_hard_tab_width             The size of a tab character. Don't change  8           immediately
2489                                   it unless you really need to; use the
2490                                   indentation settings instead.
2491 **Interface related**
2492 show_symbol_list_expanders        Whether to show or hide the small          true        to new
2493                                   expander icons on the symbol list                      documents
2494                                   treeview.
2495 allow_always_save                 Whether files can be saved always, even    false       immediately
2496                                   if they don't have any changes.
2497                                   By default, the Save button and menu
2498                                   item are disabled when a file is
2499                                   unchanged. When setting this option to
2500                                   true, the Save button and menu item are
2501                                   always active and files can be saved.
2502 compiler_tab_autoscroll           Whether to automatically scroll to the     true        immediately
2503                                   last line of the output in the Compiler
2504                                   tab.
2505 statusbar_template                The status bar statistics line format.     See below.  immediately
2506                                   (Search in src/ui_utils.c for details).
2507 new_document_after_close          Whether to open a new document after all   false       immediately
2508                                   documents have been closed.
2509 msgwin_status_visible             Whether to show the Status tab in the      true        immediately
2510                                   Messages Window
2511 msgwin_compiler_visible           Whether to show the Compiler tab in the    true        immediately
2512                                   Messages Window
2513 msgwin_messages_visible           Whether to show the Messages tab in the    true        immediately
2514                                   Messages Window
2515 msgwin_scribble_visible           Whether to show the Scribble tab in the    true        immediately
2516                                   Messages Window
2517 ================================  =========================================  ==========  ===========
2519 By default, statusbar_template is empty. This tells Geany to use its
2520 internal default, which is currently:
2522 ``line: %l / %L\t col: %c\t sel: %s\t %w      %t      %mmode: %M      encoding: %e      filetype: %f      scope: %S``
2524 Note that ``\t`` = tab.
2526 ================================  ===========================================  ==========  ===========
2527 Key                               Description                                  Default     Applies
2528 ================================  ===========================================  ==========  ===========
2529 **VTE related**
2530 emulation                         Terminal emulation mode. Only change this    xterm       immediately
2531                                   if you have VTE termcap files other than
2532                                   ``vte/termcap/xterm``.
2533 send_selection_unsafe             By default, Geany strips any trailing        false       immediately
2534                                   newline characters from the current
2535                                   selection before sending it to the terminal
2536                                   to not execute arbitrary code. This is
2537                                   mainly a security feature.
2538                                   If, for whatever reasons, you really want
2539                                   it to be executed directly, set this option
2540                                   to true.
2541 send_cmd_prefix                   String with which prefix the commands sent   Empty       immediately
2542                                   to the shell.  This may be used to tell
2543                                   some shells (BASH with ``HISTCONTROL`` set
2544                                   to ``ignorespace``, ZSH with
2545                                   ``HIST_IGNORE_SPACE`` enabled, etc.) from
2546                                   putting these commands in their history by
2547                                   setting this to a space.  Note that leading
2548                                   spaces must be escaped using `\s` in the
2549                                   configuration file.
2550 **File related**
2551 use_atomic_file_saving            Defines the mode how Geany saves files to    false       immediately
2552                                   disk. If disabled, Geany directly writes
2553                                   the content of the document to disk. This
2554                                   might cause loss of data when there is
2555                                   no more free space on disk to save the
2556                                   file. When set to true, Geany first saves
2557                                   the contents into a temporary file and if
2558                                   this succeeded, the temporary file is
2559                                   moved to the real file to save.
2560                                   This gives better error checking in case of
2561                                   no more free disk space. But it also
2562                                   destroys hard links of the original file
2563                                   and its permissions (e.g. executable flags
2564                                   are reset). Use this with care as it can
2565                                   break things seriously.
2566                                   The better approach would be to ensure your
2567                                   disk won't run out of free space.
2568 use_gio_unsafe_file_saving        Whether to use GIO as the unsafe file        true        immediately
2569                                   saving backend. It is better on most
2570                                   situations but is known not to work
2571                                   correctly on some complex setups.
2572 gio_unsafe_save_backup            Make a backup when using GIO unsafe file     false       immediately
2573                                   saving. Backup is named `filename~`.
2574 **Filetype related**
2575 extract_filetype_regex            Regex to extract filetype name from file     See below.  immediately
2576                                   via capture group one.
2577 **Search related**
2578 find_selection_type               See `Find selection`_.                       0           immediately
2579 **Build Menu related**
2580 number_ft_menu_items              The maximum number of menu items in the      2           on restart
2581                                   filetype section of the Build menu.
2582 number_non_ft_menu_items          The maximum number of menu items in the      3           on restart
2583                                   independent section of the Build menu.
2584 number_exec_menu_items            The maximum number of menu items in the      2           on restart
2585                                   execute section of the Build menu.
2586 ================================  ===========================================  ==========  ===========
2588 The extract_filetype_regex has the default value GEANY_DEFAULT_FILETYPE_REGEX.
2590 Terminal (VTE) preferences
2591 ^^^^^^^^^^^^^^^^^^^^^^^^^^
2593 See also: `Virtual terminal emulator widget (VTE)`_.
2595 .. image:: ./images/pref_dialog_vte.png
2597 Terminal widget
2598 ```````````````
2600 Terminal font
2601     Select the font that will be used in the terminal emulation control.
2603 Foreground color
2604     Select the font color.
2606 Background color
2607     Select the background color of the terminal.
2609 Background image
2610     Select the background image to show behind the terminal's text.
2612 Scrollback lines
2613     The number of lines buffered so that you can scroll though the history.
2615 Shell
2616     The location of the shell on your system.
2618 Scroll on keystroke
2619     Scroll the terminal to the prompt line when pressing a key.
2621 Scroll on output
2622     Scroll the output down.
2624 Cursor blinks
2625     Let the terminal cursor blink.
2627 Override Geany keybindings
2628     Allow the VTE to receive keyboard shortcuts (apart from focus commands).
2630 Disable menu shortcut key (F10 by default)
2631     Disable the menu shortcut when you are in the virtual terminal.
2633 Follow path of the current file
2634     Make the path of the terminal change according to the path of the
2635     current file.
2637 Execute programs in VTE
2638     Execute programs in the virtual terminal instead of using the external
2639     terminal tool.  Note that if you run multiple execute commands at once
2640     the output may become mixed together in the VTE.
2642 Don't use run script
2643     Don't use the simple run script which is usually used to display
2644     the exit status of the executed program.
2645     This can be useful if you already have a program running in the VTE
2646     like a Python console (e.g. ipython). Use this with care.
2649 Project management
2650 ------------------
2652 Project management is optional in Geany. Currently it can be used for:
2654 * Storing and opening session files on a project basis.
2655 * Overriding default settings with project equivalents.
2656 * Configuring the Build menu on a project basis.
2658 A list of session files can be stored and opened with the project
2659 when the *Use project-based session files* preference is enabled,
2660 in the *Project* group of the `Preferences`_ dialog.
2662 As long as a project is open, the Build menu will use
2663 the items defined in project's settings, instead of the defaults.
2664 See `Build Menu Configuration`_ for information on configuring the menu.
2666 The current project's settings are saved when it is closed, or when
2667 Geany is shutdown. When restarting Geany, the previously opened project
2668 file that was in use at the end of the last session will be reopened.
2670 The project menu items are detailed below.
2673 New project
2674 ^^^^^^^^^^^
2676 To create a new project, fill in the *Name* field. By default this
2677 will setup a new project file ``~/projects/name.geany``. Usually it's
2678 best to store all your project files in the same directory (they are
2679 independent of any source directory trees).
2681 The Base path text field is setup to use ``~/projects/name``. This
2682 can safely be set to any existing path -- it will not touch the file
2683 structure contained in it.
2686 Project properties
2687 ^^^^^^^^^^^^^^^^^^
2689 You can set an optional description for the project. Currently it's
2690 only used for a template wildcard - see `Template wildcards`_.
2692 The *Base path* field is used as the directory to run the Build menu commands.
2693 The specified path can be an absolute path or it is considered to be
2694 relative to the project's file name.
2696 The *File patterns* field allows to specify a list of file patterns for the
2697 project, which can be used in the `Find in files`_ dialog.
2699 The *Indentation* tab allows you to override the default
2700 `Indentation`_ settings.
2703 Open project
2704 ^^^^^^^^^^^^
2706 The Open command displays a standard file chooser, starting in
2707 ``~/projects``. Choose a project file named with the ``.geany``
2708 extension.
2710 When project session support is enabled, Geany will close the currently
2711 open files and open the session files associated with the project.
2714 Close project
2715 ^^^^^^^^^^^^^
2717 Project file settings are saved when the project is closed.
2719 When project session support is enabled, Geany will close the project
2720 session files and open any previously closed default session files.
2723 Build menu
2724 ----------
2725 After editing code with Geany, the next step is to compile, link, build,
2726 interpret, run etc.  As Geany supports many languages each with a different
2727 approach to such operations, and as there are also many language independent
2728 software building systems, Geany does not have a built-in build system, nor
2729 does it limit which system you can use.  Instead the build menu provides
2730 a configurable and flexible means of running any external commands to
2731 execute your preferred build system.
2733 This section provides a description of the default configuration of the
2734 build menu and then covers how to configure it, and where the defaults fit in.
2736 Running the commands from within Geany has two benefits:
2738 * The current file is automatically saved before the command is run.
2739 * The output is captured in the Compiler notebook tab and parsed for
2740   warnings or errors.
2742 Warnings and errors that can be parsed for line numbers will be shown in
2743 red in the Compiler tab and you can click on them to switch to the relevant
2744 source file (or open it) and mark the line number.  Also lines with
2745 warnings or errors are marked in the source, see `Indicators`_ below.
2747 .. tip::
2748     If Geany's default error message parsing does not parse errors for
2749     the tool you're using, you can set a custom regex in the Build Commands
2750     Dialog, see `Build Menu Configuration`_.
2752 Indicators
2753 ^^^^^^^^^^
2755 Indicators are red squiggly underlines which are used to highlight
2756 errors which occurred while compiling the current file. So you can
2757 easily see where your code failed to compile. You can remove them by
2758 selecting *Remove Error Indicators* in the Document menu.
2760 If you do not like this feature, you can disable it - see `Editor Features
2761 preferences`_.
2764 Default build menu items
2765 ^^^^^^^^^^^^^^^^^^^^^^^^
2766 Depending on the current file's filetype, the default Build menu will contain
2767 the following items:
2769 * Compile
2770 * Build
2771 * Make All
2772 * Make Custom Target
2773 * Make Object
2774 * Next Error
2775 * Previous Error
2776 * Execute
2777 * Set Build Menu Commands
2780 Compile
2781 ```````
2783 The Compile command has different uses for different kinds of files.
2785 For compilable languages such as C and C++, the Compile command is
2786 set up to compile the current source file into a binary object file.
2788 Java source files will be compiled to class file bytecode.
2790 Interpreted languages such as Perl, Python, Ruby will compile to
2791 bytecode if the language supports it, or will run a syntax check,
2792 or if that is not available will run the file in its language interpreter.
2794 Build
2795 `````
2797 For compilable languages such as C and C++, the Build command will link
2798 the current source file's equivalent object file into an executable. If
2799 the object file does not exist, the source will be compiled and linked
2800 in one step, producing just the executable binary.
2802 Interpreted languages do not use the Build command.
2804 .. note::
2805     If you need complex settings for your build system, or several
2806     different settings, then writing a Makefile and using the Make
2807     commands is recommended; this will also make it easier for users to
2808     build your software.
2811 Make
2812 ````
2814 This runs "make" in the same directory as the
2815 current file.
2817 Make custom target
2818 ``````````````````
2820 This is similar to running 'Make' but you will be prompted for
2821 the make target name to be passed to the Make tool. For example,
2822 typing 'clean' in the dialog prompt will run "make clean".
2825 Make object
2826 ```````````
2828 Make object will run "make current_file.o" in the same directory as
2829 the current file, using the filename for 'current_file'. It is useful
2830 for building just the current file without building the whole project.
2832 Next error
2833 ``````````
2835 The next error item will move to the next detected error in the file.
2837 Previous error
2838 ``````````````
2839 The previous error item will move to the previous detected error in the file.
2841 Execute
2842 ```````
2844 Execute will run the corresponding executable file, shell script or
2845 interpreted script in a terminal window. The command set in the
2846 "Set Build Commands" dialog is run in a script to ensure the terminal
2847 stays open after execution completes.  Note: see `Terminal emulators`_
2848 below for the command format.  Alternatively the built-in VTE can be used
2849 if it is available - see `Virtual terminal emulator widget (VTE)`_.
2851 After your program or script has finished executing, the run script will
2852 prompt you to press the return key. This allows you to review any text
2853 output from the program before the terminal window is closed.
2855 .. note::
2856     The execute command output is not parsed for errors.
2859 Stopping running processes
2860 ``````````````````````````
2862 When there is a running program, the Execute menu item in the menu and
2863 the Run button in the toolbar
2864 each become a stop button so you can stop the current running program (and
2865 any child processes). This works by sending the SIGQUIT signal to the process.
2867 Depending on the process you started it is possible that the process
2868 cannot be stopped. For example this can happen when the process creates
2869 more than one child process.
2872 Terminal emulators
2873 ******************
2875 The Terminal field of the tools preferences tab requires a command to
2876 execute the terminal program and to pass it the name of the Geany run
2877 script that it should execute in a Bourne compatible shell (eg /bin/sh).
2878 The marker "%c" is substituted with the name of the Geany run script,
2879 which is created in the working directory set in the Build commands
2880 dialog, see `Build menu commands dialog`_ for details.
2882 As an example the default (Linux) command is::
2884     xterm -e "/bin/sh %c"
2887 Set build commands
2888 ``````````````````
2890 By default Compile, Build and Execute are fairly basic commands. You
2891 may wish to customise them using *Set Build Commands*.
2893 E.g. for C you can add any include paths and compile flags for the
2894 compiler, any library names and paths for the linker, and any
2895 arguments you want to use when running Execute.
2897 Build menu configuration
2898 ^^^^^^^^^^^^^^^^^^^^^^^^
2900 The build menu has considerable flexibility and configurability, allowing
2901 both menu labels the commands they execute and the directory they execute
2902 in to be configured.
2904 For example, if you change one of the default make commands to run say 'waf'
2905 you can also change the label to match.
2907 These settings are saved automatically when Geany is shut down.
2909 The build menu is divided into four groups of items each with different
2910 behaviors:
2912 * Filetype build commands - are configurable and depend on the filetype of the
2913   current document; they capture output in the compiler tab and parse it for
2914   errors.
2915 * Independent build commands - are configurable and mostly don't depend on the
2916   filetype of the current document; they also capture output in the
2917   compiler tab and parse it for errors.
2918 * Execute commands - are configurable and intended for executing your
2919   program or other long running programs.  The output is not parsed for errors
2920   and is directed to the terminal command selected in preferences.
2921 * Fixed commands - these perform built-in actions:
2923   * Go to the next error.
2924   * Go to the previous error.
2925   * Show the build menu commands dialog.
2927 The maximum numbers of items in each of the configurable groups can be
2928 configured in the `Various preferences`_. Even though the maximum number of
2929 items may have been increased, only those menu items that have values
2930 configured are shown in the menu.
2932 The groups of menu items obtain their configuration from four potential
2933 sources.  The highest priority source that has the menu item defined will
2934 be used. The sources in decreasing priority are:
2936 * A project file if open
2937 * The user preferences
2938 * The system filetype definitions
2939 * The defaults
2941 The detailed relationships between sources and the configurable menu item groups
2942 is shown in the following table.
2944 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
2945 | Group        | Project File        | Preferences              | System Filetype   |  Defaults                     |
2946 +==============+=====================+==========================+===================+===============================+
2947 | Filetype     | Loads From: project | Loads From:              | Loads From:       | None                          |
2948 |              | file                | filetypes.xxx file in    | filetypes.xxx in  |                               |
2949 |              |                     | ~/.config/geany/filedefs | Geany install     |                               |
2950 |              | Saves To: project   |                          |                   |                               |
2951 |              | file                | Saves to: as above,      | Saves to: as user |                               |
2952 |              |                     | creating if needed.      | preferences left. |                               |
2953 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
2954 | Filetype     | Loads From: project | Loads From:              | Loads From:       | 1:                            |
2955 | Independent  | file                | geany.conf file in       | filetypes.xxx in  |   Label: _Make                |
2956 |              |                     | ~/.config/geany          | Geany install     |   Command: make               |
2957 |              | Saves To: project   |                          |                   |                               |
2958 |              | file                | Saves to: as above,      | Saves to: as user | 2:                            |
2959 |              |                     | creating if needed.      | preferences left. |    Label: Make Custom _Target |
2960 |              |                     |                          |                   |    Command: make              |
2961 |              |                     |                          |                   |                               |
2962 |              |                     |                          |                   | 3:                            |
2963 |              |                     |                          |                   |    Label: Make _Object        |
2964 |              |                     |                          |                   |    Command: make %e.o         |
2965 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
2966 | Execute      | Loads From: project | Loads From:              | Loads From:       | Label: _Execute               |
2967 |              | file or else        | geany.conf file in       | filetypes.xxx in  | Command: ./%e                 |
2968 |              | filetype defined in | ~/.config/geany or else  | Geany install     |                               |
2969 |              | project file        | filetypes.xxx file in    |                   |                               |
2970 |              |                     | ~/.config/geany/filedefs | Saves To: as user |                               |
2971 |              | Saves To:           |                          | preferences left. |                               |
2972 |              | project file        | Saves To:                |                   |                               |
2973 |              |                     | filetypes.xxx file in    |                   |                               |
2974 |              |                     | ~/.config/geany/filedefs |                   |                               |
2975 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
2977 The following notes on the table reference cells by coordinate as (group,source):
2979 * General - for filetypes.xxx substitute the appropriate extension for
2980   the filetype of the current document for xxx - see `filenames`_.
2982 * System Filetypes - Labels loaded from these sources are locale sensitive
2983   and can contain translations.
2985 * (Filetype, Project File) and (Filetype, Preferences) - preferences use a full
2986   filetype file so that users can configure all other filetype preferences
2987   as well.  Projects can only configure menu items per filetype.  Saving
2988   in the project file means that there is only one file per project not
2989   a whole directory.
2991 * (Filetype-Independent, System Filetype) - although conceptually strange, defining
2992   filetype-independent commands in a filetype file, this provides the ability to
2993   define filetype dependent default menu items.
2995 * (Execute, Project File) and (Execute, Preferences) - the project independent
2996   execute and preferences independent execute commands can only be set by hand
2997   editing the appropriate file, see `Preferences file format`_ and `Project file
2998   format`_.
3000 Build menu commands dialog
3001 ^^^^^^^^^^^^^^^^^^^^^^^^^^
3003 Most of the configuration of the build menu is done through the Build Menu
3004 Commands Dialog.  You edit the configuration sourced from preferences in the
3005 dialog opened from the Build->Build Menu Commands item and you edit the
3006 configuration from the project in the build tab of the project preferences
3007 dialog.  Both use the same form shown below.
3009 .. image:: ./images/build_menu_commands_dialog.png
3011 The dialog is divided into three sections:
3013 * Filetype build commands (selected based on the current document's filetype).
3014 * Independent build commands (available regardless of filetype).
3015 * Filetype execute commands.
3017 The filetype and independent sections also each contain a field for the regular
3018 expression used for parsing command output for error and warning messages.
3020 The columns in the first three sections allow setting of the label, command,
3021 and working directory to run the command in.
3023 An item with an empty label will not be shown in the menu.
3025 An empty working directory will default to the directory of the current document.
3026 If there is no current document then the command will not run.
3028 The dialog will always show the command selected by priority, not just the
3029 commands configured in this configuration source. This ensures that you always
3030 see what the menu item is going to do if activated.
3032 If the current source of the menu item is higher priority than the
3033 configuration source you are editing then the command will be shown
3034 in the dialog but will be insensitive (greyed out).  This can't happen
3035 with the project source but can with the preferences source dialog.
3037 The clear buttons remove the definition from the configuration source you are editing.
3038 When you do this the command from the next lower priority source will be shown.
3039 To hide lower priority menu items without having anything show in the menu
3040 configure with a nothing in the label but at least one character in the command.
3042 Substitutions in commands and working directories
3043 `````````````````````````````````````````````````
3045 The first occurence of each of the following character sequences in each of the
3046 command and working directory fields is substituted by the items specified below
3047 before the command is run.
3049 * %d - substituted by the absolute path to the directory of the current file.
3050 * %e - substituted by the name of the current file without the extension or path.
3051 * %f - substituted by the name of the current file without the path.
3052 * %p - if a project is open, substituted by the base path from the project.
3054 .. note::
3055    If the basepath set in the project preferences is not an absolute path , then it is
3056    taken as relative to the directory of the project file.  This allows a project file
3057    stored in the source tree to specify all commands and working directories relative
3058    to the tree itself, so that the whole tree including the project file, can be moved
3059    and even checked into and out of version control without having to re-configure the
3060    build menu.
3062 Build menu keyboard shortcuts
3063 `````````````````````````````
3065 Keyboard shortcuts can be defined for the first two filetype menu items, the first three
3066 independent menu items, the first two execute menu items and the fixed menu items.
3067 In the keybindings configuration dialog (see `Keybinding preferences`_)
3068 these items are identified by the default labels shown in the `Build Menu`_ section above.
3070 It is currently not possible to bind keyboard shortcuts to more than these menu items.
3072 You can also use underlines in the labels to set mnemonic characters.
3074 Old settings
3075 ````````````
3077 The configurable Build Menu capability was introduced in Geany 0.19 and
3078 required a new section to be added to the configuration files (See
3079 `Preferences file format`_).  Geany will still load older format project,
3080 preferences and filetype file settings and will attempt to map them into the new
3081 configuration format.  There is not a simple clean mapping between the formats.
3082 The mapping used produces the most sensible results for the majority of cases.
3083 However, if they do not map the way you want, you may have to manually
3084 configure some settings using the Build Commands
3085 Dialog or the Build tab of the project preferences dialog.
3087 Any setting configured in either of these dialogs will override settings mapped from
3088 older format configuration files.
3090 Printing support
3091 ----------------
3093 Since Geany 0.13 there has been printing support using GTK's printing API.
3094 The printed page(s) will look nearly the same as on your screen in Geany.
3095 Additionally, there are some options to modify the printed page(s).
3097 .. note::
3098     The background text color is set to white, except for text with
3099     a white foreground. This allows dark color schemes to save ink
3100     when printing.
3102 You can define whether to print line numbers, page numbers at the bottom of
3103 each page and whether to print a page header on each page. This header
3104 contains the filename of the printed document, the current page number and
3105 the date and time of printing. By default, the file name of the document
3106 with full path information is added to the header. If you prefer to add
3107 only the basename of the file(without any path information) you can set it
3108 in the preferences dialog. You can also adjust the format of the date and
3109 time added to the page header. The available conversion specifiers are the
3110 same as the ones which can be used with the ANSI C strftime function.
3112 All of these settings can also be changed in the print dialog just before
3113 actual printing is done.
3114 On Unix-like systems the provided print dialog offers a print preview. The
3115 preview file is opened with a PDF viewer and by default GTK uses ``evince``
3116 for print preview. If you have not installed evince or just want to use
3117 another PDF viewer, you can change the program to use in the file
3118 ``.gtkrc-2.0`` (usually found in your home directory). Simply add a line
3119 like::
3121     gtk-print-preview-command = "epdfview %f"
3123 at the end of the file. Of course, you can also use xpdf, kpdf or whatever
3124 as the print preview command.
3126 Geany also provides an alternative basic printing support using a custom
3127 print command. However, the printed document contains no syntax highlighting.
3128 You can adjust the command to which the filename is passed in the preferences
3129 dialog. The default command is::
3131     % lpr %f
3133 ``%f`` will be substituted by the filename of the current file. Geany
3134 will not show errors from the command itself, so you should make
3135 sure that it works before(e.g. by trying to execute it from the
3136 command line).
3138 A nicer example, which many prefer is::
3140     % a2ps -1 --medium=A4 -o - %f | xfprint4
3142 But this depends on a2ps and xfprint4. As a replacement for xfprint4,
3143 gtklp or similar programs can be used.
3147 Plugins
3148 -------
3150 Plugins are loaded at startup, if the *Enable plugin support*
3151 general preference is set. There is also a command-line option,
3152 ``-p``, which prevents plugins being loaded. Plugins are scanned in
3153 the following directories:
3155 * ``$prefix/lib/geany`` on Unix-like systems (see `Installation prefix`_)
3156 * The ``lib`` subfolder of the installation path on Windows.
3157 * The ``plugins`` subfolder of the user configuration directory - see
3158   `Configuration file paths`_.
3159 * The `Extra plugin path` preference (usually blank) - see `Paths`_.
3161 Most plugins add menu items to the *Tools* menu when they are loaded.
3163 See also `Plugin documentation`_ for information about single plugins
3164 which are included in Geany.
3166 Plugin manager
3167 ^^^^^^^^^^^^^^
3168 The Plugin Manager dialog lets you choose which plugins
3169 should be loaded at startup. You can also load and unload plugins on the
3170 fly using this dialog. Once you click the checkbox for a specific plugin
3171 in the dialog, it is loaded or unloaded according to its previous state.
3172 By default, no plugins are loaded at startup until you select some.
3173 You can also configure some plugin specific options if the plugin
3174 provides any.
3177 Keybindings
3178 -----------
3180 Geany supports the default keyboard shortcuts for the Scintilla
3181 editing widget. For a list of these commands, see `Scintilla
3182 keyboard commands`_. The Scintilla keyboard shortcuts will be overridden
3183 by any custom keybindings with the same keyboard shortcut.
3186 Switching documents
3187 ^^^^^^^^^^^^^^^^^^^
3189 There are some non-configurable bindings to switch between documents,
3190 listed below. These can also be overridden by custom keybindings.
3192 =============== ==================================
3193 Key             Action
3194 =============== ==================================
3195 Alt-[1-9]       Select left-most tab, from 1 to 9.
3196 Alt-0           Select right-most tab.
3197 =============== ==================================
3199 See also `Notebook tab keybindings`_.
3202 Configurable keybindings
3203 ^^^^^^^^^^^^^^^^^^^^^^^^
3205 For all actions listed below you can define your own keybindings. Open
3206 the Preferences dialog, select the desired action and click on
3207 change. In the resulting dialog you can press the key combination you
3208 want to assign to the action and it will be saved when you press OK.
3209 You can define only one key combination for each action and each key
3210 combination can only be defined for one action.
3212 The following tables list all customizable keyboard shortcuts, those
3213 which are common to many applications are marked with (C) after the
3214 shortcut.
3216 File keybindings
3217 ````````````````
3218 =============================== ========================= ==================================================
3219 Action                          Default shortcut          Description
3220 =============================== ========================= ==================================================
3221 New                             Ctrl-N  (C)               Creates a new file.
3223 Open                            Ctrl-O  (C)               Opens a file.
3225 Open selected file              Ctrl-Shift-O              Opens the selected filename.
3227 Re-open last closed tab                                   Re-opens the last closed document tab.
3229 Save                            Ctrl-S  (C)               Saves the current file.
3231 Save As                                                   Saves the current file under a new name.
3233 Save all                        Ctrl-Shift-S              Saves all open files.
3235 Close all                       Ctrl-Shift-W              Closes all open files.
3237 Close                           Ctrl-W  (C)               Closes the current file.
3239 Reload file                     Ctrl-R  (C)               Reloads the current file. All unsaved changes
3240                                                           will be lost.
3242 Print                           Ctrl-P  (C)               Prints the current file.
3244 Quit                            Ctrl-Q  (C)               Quits Geany.
3245 =============================== ========================= ==================================================
3248 Editor keybindings
3249 ``````````````````
3250 =============================== ========================= ==================================================
3251 Action                          Default shortcut          Description
3252 =============================== ========================= ==================================================
3253 Undo                            Ctrl-Z  (C)               Un-does the last action.
3255 Redo                            Ctrl-Y                    Re-does the last action.
3257 Delete current line(s)          Ctrl-K                    Deletes the current line (and any lines with a
3258                                                           selection).
3260 Delete to line end              Ctrl-Shift-Delete         Deletes from the current caret position to the
3261                                                           end of the current line.
3263 Duplicate line or selection     Ctrl-D                    Duplicates the current line or selection.
3265 Transpose current line                                    Transposes the current line with the previous one.
3267 Scroll to current line          Ctrl-Shift-L              Scrolls the current line into the centre of the
3268                                                           view. The cursor position and or an existing
3269                                                           selection will not be changed.
3271 Scroll up by one line           Alt-Up                    Scrolls the view.
3273 Scroll down by one line         Alt-Down                  Scrolls the view.
3275 Complete word                   Ctrl-Space                Shows the autocompletion list. If already showing
3276                                                           tag completion, it shows document word completion
3277                                                           instead, even if it is not enabled for automatic
3278                                                           completion. Likewise if no tag suggestions are
3279                                                           available, it shows document word completion.
3281 Show calltip                    Ctrl-Shift-Space          Shows a calltip for the current function or
3282                                                           method.
3284 Show macro list                 Ctrl-Return               Shows a list of available macros and variables in
3285                                                           the workspace.
3287 Complete snippet                Tab                       If you type a construct like if or for and press
3288                                                           this key, it will be completed with a matching
3289                                                           template.
3291 Suppress snippet completion                               If you type a construct like if or for and press
3292                                                           this key, it will not be completed, and a space or
3293                                                           tab will be inserted, depending on what the
3294                                                           construct completion keybinding is set to. For
3295                                                           example, if you have set the construct completion
3296                                                           keybinding to space, then setting this to
3297                                                           Shift+space will prevent construct completion and
3298                                                           insert a space.
3300 Context Action                                            Executes a command and passes the current word
3301                                                           (near the cursor position) or selection as an
3302                                                           argument. See the section called `Context
3303                                                           actions`_.
3305 Move cursor in snippet                                    Jumps to the next defined cursor positions in a
3306                                                           completed snippets if multiple cursor positions
3307                                                           where defined.
3309 Word part completion            Tab                       When the autocompletion list is visible, complete
3310                                                           the currently selected item up to the next word
3311                                                           part.
3313 Move line(s) up                 Alt-PageUp                Move the current line or selected lines up by
3314                                                           one line.
3316 Move line(s) down               Alt-PageDown              Move the current line or selected lines down by
3317                                                           one line.
3318 =============================== ========================= ==================================================
3321 Clipboard keybindings
3322 `````````````````````
3323 =============================== ========================= ==================================================
3324 Action                          Default shortcut          Description
3325 =============================== ========================= ==================================================
3326 Cut                             Ctrl-X  (C)               Cut the current selection to the clipboard.
3328 Copy                            Ctrl-C  (C)               Copy the current selection to the clipboard.
3330 Paste                           Ctrl-V  (C)               Paste the clipboard text into the current document.
3332 Cut current line(s)             Ctrl-Shift-X              Cuts the current line (and any lines with a
3333                                                           selection) to the clipboard.
3335 Copy current line(s)            Ctrl-Shift-C              Copies the current line (and any lines with a
3336                                                           selection) to the clipboard.
3337 =============================== ========================= ==================================================
3340 Select keybindings
3341 ``````````````````
3342 =============================== ========================= ==================================================
3343 Action                          Default shortcut          Description
3344 =============================== ========================= ==================================================
3345 Select all                      Ctrl-A  (C)               Makes a selection of all text in the current
3346                                                           document.
3348 Select current word             Alt-Shift-W               Selects the current word under the cursor.
3350 Select current paragraph        Alt-Shift-P               Selects the current paragraph under the cursor
3351                                                           which is defined by two empty lines around it.
3353 Select current line(s)          Alt-Shift-L               Selects the current line under the cursor (and any
3354                                                           partially selected lines).
3356 Select to previous word part                              (Extend) selection to previous word part boundary.
3358 Select to next word part                                  (Extend) selection to next word part boundary.
3359 =============================== ========================= ==================================================
3362 Insert keybindings
3363 ``````````````````
3364 =============================== ========================= ==================================================
3365 Action                          Default shortcut          Description
3366 =============================== ========================= ==================================================
3367 Insert date                     Shift-Alt-D               Inserts a customisable date.
3369 Insert alternative whitespace                             Inserts a tab character when spaces should
3370                                                           be used for indentation and inserts space
3371                                                           characters of the amount of a tab width when
3372                                                           tabs should be used for indentation.
3374 Insert New Line Before Current                            Inserts a new line with indentation.
3376 Insert New Line After Current                             Inserts a new line with indentation.
3377 =============================== ========================= ==================================================
3380 Format keybindings
3381 ``````````````````
3382 =============================== ========================= ==================================================
3383 Action                          Default shortcut          Description
3384 =============================== ========================= ==================================================
3385 Toggle case of selection        Ctrl-Alt-U                Changes the case of the selection. A lowercase
3386                                                           selection will be changed into uppercase and vice
3387                                                           versa. If the selection contains lower- and
3388                                                           uppercase characters, all will be converted to
3389                                                           lowercase.
3391 Comment line                                              Comments current line or selection.
3393 Uncomment line                                            Uncomments current line or selection.
3395 Toggle line commentation        Ctrl-E                    Comments a line if it is not commented or removes
3396                                                           a comment if the line is commented.
3398 Increase indent                 Ctrl-I                    Indents the current line or selection by one tab
3399                                                           or by spaces in the amount of the tab width
3400                                                           setting.
3402 Decrease indent                 Ctrl-U                    Removes one tab or the amount of spaces of
3403                                                           the tab width setting from the indentation of the
3404                                                           current line or selection.
3406 Increase indent by one space                              Indents the current line or selection by one
3407                                                           space.
3409 Decrease indent by one space                              Deindents the current line or selection by one
3410                                                           space.
3412 Smart line indent                                         Indents the current line or all selected lines
3413                                                           with the same indentation as the previous line.
3415 Send to Custom Command 1 (2,3)  Ctrl-1 (2,3)              Passes the current selection to a configured
3416                                                           external command (available for the first
3417                                                           three configured commands, see
3418                                                           `Sending text through custom commands`_ for
3419                                                           details).
3421 Send Selection to Terminal                                Sends the current selection or the current
3422                                                           line (if there is no selection) to the
3423                                                           embedded Terminal (VTE).
3425 Reflow lines/block                                        Reformat selected lines or current
3426                                                           (indented) text block,
3427                                                           breaking lines at the long line marker or the
3428                                                           line breaking column if line breaking is
3429                                                           enabled for the current document.
3430 =============================== ========================= ==================================================
3433 Settings keybindings
3434 ````````````````````
3435 =============================== ========================= ==================================================
3436 Action                          Default shortcut          Description
3437 =============================== ========================= ==================================================
3438 Preferences                     Ctrl-Alt-P                Opens preferences dialog.
3440 Plugin Preferences                                        Opens plugin preferences dialog.
3441 =============================== ========================= ==================================================
3444 Search keybindings
3445 ``````````````````
3446 =============================== ========================= ==================================================
3447 Action                          Default shortcut          Description
3448 =============================== ========================= ==================================================
3449 Find                            Ctrl-F  (C)               Opens the Find dialog.
3451 Find Next                       Ctrl-G                    Finds next result.
3453 Find Previous                   Ctrl-Shift-G              Finds previous result.
3455 Find Next Selection                                       Finds next occurence of selected text.
3457 Find Previous Selection                                   Finds previous occurence of selected text.
3459 Replace                         Ctrl-H  (C)               Opens the Replace dialog.
3461 Find in files                   Ctrl-Shift-F              Opens the Find in files dialog.
3463 Next message                                              Jumps to the line with the next message in
3464                                                           the Messages window.
3466 Previous message                                          Jumps to the line with the previous message
3467                                                           in the Messages window.
3469 Find Usage                      Ctrl-Shift-E              Finds all occurrences of the current word (near
3470                                                           the keyboard cursor) or selection in all open
3471                                                           documents and displays them in the messages
3472                                                           window.
3474 Find Document Usage             Ctrl-Shift-D              Finds all occurrences of the current word (near
3475                                                           the keyboard cursor) or selection in the current
3476                                                           document and displays them in the messages
3477                                                           window.
3479 Mark All                        Ctrl-Shift-M              Highlight all matches of the current
3480                                                           word/selection in the current document
3481                                                           with a colored box. If there's nothing to
3482                                                           find, or the cursor is next to an existing match,
3483                                                           the highlighted matches will be cleared.
3484 =============================== ========================= ==================================================
3487 Go to keybindings
3488 `````````````````
3489 =============================== ========================= ==================================================
3490 Action                          Default shortcut          Description
3491 =============================== ========================= ==================================================
3492 Navigate forward a location     Alt-Right  (C)            Switches to the next location in the navigation
3493                                                           history. See the section called `Code Navigation
3494                                                           History`_.
3496 Navigate back a location        Alt-Left  (C)             Switches to the previous location in the
3497                                                           navigation history. See the section called
3498                                                           `Code navigation history`_.
3500 Go to line                      Ctrl-L                    Focuses the Go to Line entry (if visible) or
3501                                                           shows the Go to line dialog.
3503 Goto matching brace             Ctrl-B                    If the cursor is ahead or behind a brace, then it
3504                                                           is moved to the brace which belongs to the current
3505                                                           one. If this keyboard shortcut is pressed again,
3506                                                           the cursor is moved back to the first brace.
3508 Toggle marker                   Ctrl-M                    Set a marker on the current line, or clear the
3509                                                           marker if there already is one.
3511 Goto next marker                Ctrl-.                    Goto the next marker in the current document.
3513 Goto previous marker            Ctrl-,                    Goto the previous marker in the current document.
3515 Go to tag definition            Ctrl-T                    Jump to the definition of the current word or
3516                                                           selection. See `Go to tag definition`_.
3518 Go to tag declaration           Ctrl-Shift-T              Jump to the declaration of the current word or
3519                                                           selection. See `Go to tag declaration`_.
3521 Go to Start of Line             Home                      Move the caret to the start of the line.
3522                                                           Behaves differently if smart_home_key_ is set.
3524 Go to End of Line               End                       Move the caret to the end of the line.
3526 Go to Start of Display Line     Alt-Home                  Move the caret to the start of the display line.
3527                                                           This is useful when you use line wrapping and
3528                                                           want to jump to the start of the wrapped, virtual
3529                                                           line, not the real start of the whole line.
3530                                                           If the line is not wrapped, it behaves like
3531                                                           `Go to Start of Line`.
3533 Go to End of Display Line       Alt-End                   Move the caret to the end of the display line.
3534                                                           If the line is not wrapped, it behaves like
3535                                                           `Go to End of Line`.
3537 Go to Previous Word Part        Ctrl-/                    Goto the previous part of the current word.
3539 Go to Next Word Part            Ctrl-\\                   Goto the next part of the current word.
3540 =============================== ========================= ==================================================
3542 View keybindings
3543 ````````````````
3544 =============================== ========================= ==================================================
3545 Action                          Default shortcut          Description
3546 =============================== ========================= ==================================================
3547 Fullscreen                      F11  (C)                  Switches to fullscreen mode.
3549 Toggle Messages Window                                    Toggles the message window (status and compiler
3550                                                           messages) on and off.
3552 Toggle Sidebar                                            Shows or hides the sidebar.
3554 Toggle all additional widgets                             Hide and show all additional widgets like the
3555                                                           notebook tabs, the toolbar, the messages window
3556                                                           and the status bar.
3558 Zoom In                         Ctrl-+  (C)               Zooms in the text.
3560 Zoom Out                        Ctrl--  (C)               Zooms out the text.
3562 Zoom Reset                      Ctrl-0                    Reset any previous zoom on the text.
3563 =============================== ========================= ==================================================
3565 Focus keybindings
3566 `````````````````
3567 ================================ ========================= ==================================================
3568 Action                           Default shortcut          Description
3569 ================================ ========================= ==================================================
3570 Switch to Editor                 F2                        Switches to editor widget.
3571                                                            Also reshows the document statistics line
3572                                                            (after a short timeout).
3574 Switch to Search Bar             F7                        Switches to the search bar in the toolbar (if
3575                                                            visible).
3577 Switch to Message Window                                   Focus the Message Window's current tab.
3579 Switch to Compiler                                         Focus the Compiler message window tab.
3581 Switch to Messages                                         Focus the Messages message window tab.
3583 Switch to Scribble               F6                        Switches to scribble widget.
3585 Switch to VTE                    F4                        Switches to VTE widget.
3587 Switch to Sidebar                                          Focus the Sidebar.
3589 Switch to Sidebar Symbol List                              Focus the Symbol list tab in the Sidebar
3590                                                            (if visible).
3592 Switch to Sidebar Document List                            Focus the Document list tab in the Sidebar
3593                                                            (if visible).
3594 ================================ ========================= ==================================================
3597 Notebook tab keybindings
3598 ````````````````````````
3599 =============================== ========================= ==================================================
3600 Action                          Default shortcut          Description
3601 =============================== ========================= ==================================================
3602 Switch to left document         Ctrl-PageUp   (C)         Switches to the previous open document.
3604 Switch to right document        Ctrl-PageDown (C)         Switches to the next open document.
3606 Switch to last used document    Ctrl-Tab                  Switches to the previously shown document (if it's
3607                                                           still open).
3608                                                           Holding Ctrl (or another modifier if the keybinding
3609                                                           has been changed) will show a dialog, then repeated
3610                                                           presses of the keybinding will switch to the 2nd-last
3611                                                           used document, 3rd-last, etc. Also known as
3612                                                           Most-Recently-Used documents switching.
3614 Move document left              Ctrl-Shift-PageUp         Changes the current document with the left hand
3615                                                           one.
3617 Move document right             Ctrl-Shift-PageDown       Changes the current document with the right hand
3618                                                           one.
3620 Move document first                                       Moves the current document to the first position.
3622 Move document last                                        Moves the current document to the last position.
3623 =============================== ========================= ==================================================
3626 Document keybindings
3627 ````````````````````
3628 ==================================== ==================== ==================================================
3629 Action                               Default shortcut     Description
3630 ==================================== ==================== ==================================================
3631 Clone                                                     See `Cloning documents`_.
3633 Replace tabs by space                                     Replaces all tabs with the right amount of spaces.
3635 Replace spaces by tabs                                    Replaces leading spaces with tab characters.
3637 Toggle current fold                                       Toggles the folding state of the current code block.
3639 Fold all                                                  Folds all contractible code blocks.
3641 Unfold all                                                Unfolds all contracted code blocks.
3643 Reload symbol list                   Ctrl-Shift-R         Reloads the tag/symbol list.
3645 Toggle Line wrapping                                      Enables or disables wrapping of long lines.
3647 Toggle Line breaking                                      Enables or disables automatic breaking of long
3648                                                           lines at a configurable column.
3650 Remove Markers                                            Remove any markers on lines or words which
3651                                                           were set by using 'Mark All' in the
3652                                                           search dialog or by manually marking lines.
3654 Remove Error Indicators                                   Remove any error indicators in the
3655                                                           current document.
3657 Remove Markers and Error Indicators                       Combines ``Remove Markers`` and
3658                                                           ``Remove Error Indicators``.
3659 ==================================== ==================== ==================================================
3662 Project keybindings
3663 ```````````````````
3664 =============================== ========================= ==================================================
3665 Action                          Default shortcut          Description
3666 =============================== ========================= ==================================================
3667 New                                                       Create a new project.
3668 Open                                                      Opens a project file.
3669 Properties                                                Shows project properties.
3670 Close                                                     Close the current project.
3671 =============================== ========================= ==================================================
3674 Build keybindings
3675 `````````````````
3676 =============================== ========================= ==================================================
3677 Action                          Default shortcut          Description
3678 =============================== ========================= ==================================================
3679 Compile                         F8                        Compiles the current file.
3681 Build                           F9                        Builds (compiles if necessary and links) the
3682                                                           current file.
3684 Make all                        Shift-F9                  Builds the current file with the Make tool.
3686 Make custom target              Ctrl-Shift-F9             Builds the current file with the Make tool and a
3687                                                           given target.
3689 Make object                     Shift-F8                  Compiles the current file with the Make tool.
3691 Next error                                                Jumps to the line with the next error from the
3692                                                           last build process.
3694 Previous error                                            Jumps to the line with the previous error from
3695                                                           the last build process.
3697 Run                             F5                        Executes the current file in a terminal emulation.
3699 Set Build Commands                                        Opens the build commands dialog.
3700 =============================== ========================= ==================================================
3703 Tools keybindings
3704 `````````````````
3705 =============================== ========================= ==================================================
3706 Action                          Default shortcut          Description
3707 =============================== ========================= ==================================================
3708 Show Color Chooser                                        Opens the Color Chooser dialog.
3709 =============================== ========================= ==================================================
3712 Help keybindings
3713 ````````````````
3714 =============================== ========================= ==================================================
3715 Action                          Default shortcut          Description
3716 =============================== ========================= ==================================================
3717 Help                            F1 (C)                       Opens the manual.
3718 =============================== ========================= ==================================================
3723 Configuration files
3724 ===================
3725 .. warning::
3726     You must use UTF-8 encoding *without BOM* for configuration files.
3729 Configuration file paths
3730 ------------------------
3731 Geany has default configuration files installed for the system and
3732 also per-user configuration files.
3734 The system files should not normally be edited because they will be
3735 overwritten when upgrading Geany.
3737 The user configuration directory can be overridden with the ``-c``
3738 switch, but this is not normally done. See `Command line options`_.
3740 .. note::
3741     Any missing subdirectories in the user configuration directory
3742     will be created when Geany starts.
3744 You can check the paths Geany is using with *Help->Debug Messages*.
3745 Near the top there should be 2 lines with something like::
3747     Geany-INFO: System data dir: /usr/share/geany
3748     Geany-INFO: User config dir: /home/username/.config/geany
3751 Paths on Unix-like systems
3752 ^^^^^^^^^^^^^^^^^^^^^^^^^^
3753 The system path is ``$prefix/share/geany``, where ``$prefix`` is the
3754 path where Geany is installed (see `Installation prefix`_).
3756 The user configuration directory is normally:
3757 ``/home/username/.config/geany``
3759 Paths on Windows
3760 ^^^^^^^^^^^^^^^^
3761 The system path is the ``data`` subfolder of the installation path
3762 on Windows.
3764 The user configuration directory might vary, but on Windows XP it's:
3765 ``C:\Documents and Settings\UserName\Application Data\geany``
3768 Tools menu items
3769 ----------------
3770 There's a *Configuration files* submenu in the *Tools* menu that
3771 contains items for some of the available user configuration files.
3772 Clicking on one opens it in the editor for you to update. Geany will
3773 reload the file after you have saved it.
3775 .. note::
3776     Other configuration files not shown here will need to be opened
3777     manually, and will not be automatically reloaded when saved.
3778     (see *Reload Configuration* below).
3780 There's also a *Reload Configuration* item which can be used if you
3781 updated one of the other configuration files, or modified or added
3782 template files.
3784 *Reload Configuration* is also necessary to update syntax highlighting colors.
3786 .. note::
3787     Syntax highlighting colors aren't updated in open documents after
3788     saving filetypes.common as this may take a significant
3789     amount of time.
3792 Global configuration file
3793 -------------------------
3795 System administrators can add a global configuration file for Geany
3796 which will be used when starting Geany and a user configuration file
3797 does not exist.
3799 The global configuration file is read from ``geany.conf`` in the
3800 system configuration path - see `Configuration file paths`_. It can
3801 contain any settings which are found in the usual configuration file
3802 created by Geany, but does not have to contain all settings.
3804 .. note::
3805     This feature is mainly intended for package maintainers or system
3806     admins who want to set up Geany in a multi user environment and
3807     set some sane default values for this environment. Usually users won't
3808     need to do that.
3812 Filetype definition files
3813 -------------------------
3815 All color definitions and other filetype specific settings are
3816 stored in the filetype definition files. Those settings are colors
3817 for syntax highlighting, general settings like comment characters or
3818 word delimiter characters as well as compiler and linker settings.
3820 See also `Configuration file paths`_.
3822 Filenames
3823 ^^^^^^^^^
3824 Each filetype has a corresponding filetype definition file. The format
3825 for built-in filetype `Foo` is::
3827     filetypes.foo
3829 The extension is normally just the filetype name in lower case.
3831 However there are some exceptions:
3833 =============== =========
3834 Filetype        Extension
3835 =============== =========
3836 C++             cpp
3837 C#              cs
3838 Make            makefile
3839 Matlab/Octave   matlab
3840 =============== =========
3842 There is also the `special file filetypes.common`_.
3844 For `custom filetypes`_, the filename for `Foo` is different::
3846     filetypes.Foo.conf
3848 See the link for details.
3850 System files
3851 ^^^^^^^^^^^^
3852 The system-wide filetype configuration files can be found in the
3853 system configuration path and are called ``filetypes.$ext``,
3854 where $ext is the name of the filetype. For every
3855 filetype there is a corresponding definition file. There is one
3856 exception: ``filetypes.common`` -- this file is for general settings,
3857 which are not specific to a certain filetype.
3859 .. warning::
3860     It is not recommended that users edit the system-wide files,
3861     because they will be overridden when Geany is updated.
3863 User files
3864 ^^^^^^^^^^
3865 To change the settings, copy a file from the system configuration
3866 path to the subdirectory ``filedefs`` in your user configuration
3867 directory. Then you can edit the file and the changes will still be
3868 available after an update of Geany.
3870 Alternatively, you can create the file yourself and add only the
3871 settings you want to change. All missing settings will be read from
3872 the corresponding system configuration file.
3874 Custom filetypes
3875 ^^^^^^^^^^^^^^^^
3876 At startup Geany looks for ``filetypes.*.conf`` files in the system and
3877 user filetype paths, adding any filetypes found with the name matching
3878 the '``*``' wildcard - e.g. ``filetypes.Bar.conf``.
3880 Custom filetypes are not as powerful as built-in filetypes, but
3881 support for the following has been implemented:
3883 * Recognizing and setting the filetype (after the user has manually edited
3884   ``filetype_extensions.conf``).
3885 * Reading filetype settings in the ``[settings]`` section, including:
3886     * Using an existing syntax highlighting lexer (`lexer_filetype`_ key).
3887     * Using an existing tag parser (``tag_parser`` key).
3888 * Build commands (``[build-menu]`` section).
3889 * Loading global tags files (sharing the ``tag_parser`` namespace).
3891 See `Filetype configuration`_ for details on each setting.
3893 Creating a custom filetype from an existing filetype
3894 ````````````````````````````````````````````````````
3895 Because most filetype settings will relate to the syntax
3896 highlighting (e.g. styling, keywords, ``lexer_properties``
3897 sections), it is best to copy an existing filetype file that uses
3898 the lexer you wish to use as the basis of a custom filetype, using
3899 the correct filename extension format shown above, e.g.::
3901     cp filetypes.foo filetypes.Bar.conf
3903 Then add the ``lexer_filetype=Foo`` setting (if not already present)
3904 and add/adjust other settings.
3906 .. warning::
3907     The ``[styling]`` and ``[keywords]`` sections have key names
3908     specific to each filetype/lexer. You must follow the same
3909     names - in particular, some lexers only support one keyword
3910     list, or none.
3913 Filetype configuration
3914 ^^^^^^^^^^^^^^^^^^^^^^
3916 As well as the sections listed below, each filetype file can contain
3917 a [build-menu] section as described in `[build-menu] section`_.
3919 [styling] section
3920 `````````````````
3922 In this section the colors for syntax highlighting are defined. The
3923 manual format is:
3925 * ``key=foreground_color;background_color;bold_flag;italic_flag``
3927 Colors have to be specified as RGB hex values prefixed by
3928 0x or # similar to HTML/CSS hex triplets. For example, all of the following
3929 are valid values for pure red; 0xff0000, 0xf00, #ff0000, or #f00.  The
3930 values are case-insensitive but it is a good idea to use lower-case.
3931 Note that you can also use *named colors* as well by substituting the
3932 color value with the name of a color as defined in the ``[named_colors]``
3933 section, see the `[named_colors] Section`_ for more information.
3935 Bold and italic are flags and should only be "true" or "false". If their
3936 value is something other than "true" or "false", "false" is assumed.
3938 You can omit fields to use the values from the style named ``"default"``.
3940 E.g. ``key=0xff0000;;true``
3942 This makes the key style have red foreground text, default background
3943 color text and bold emphasis.
3945 Using a named style
3946 *******************
3947 The second format uses a *named style* name to reference a style
3948 defined in filetypes.common.
3950 * ``key=named_style``
3951 * ``key2=named_style2,bold,italic``
3953 The bold and italic parts are optional, and if present are used to
3954 toggle the bold or italic flags to the opposite of the named style's
3955 flags. In contrast to style definition booleans, they are a literal
3956 ",bold,italic" and commas are used instead of semi-colons.
3958 E.g. ``key=comment,italic``
3960 This makes the key style match the ``"comment"`` named style, but with
3961 italic emphasis.
3963 To define named styles, see the filetypes.common `[named_styles]
3964 Section`_.
3966 Reading styles from another filetype
3967 ************************************
3968 You can automatically copy all of the styles from another filetype
3969 definition file by using the following syntax for the ``[styling]``
3970 group::
3972         [styling=Foo]
3974 Where Foo is a filetype name. The corresponding ``[styling]``
3975 section from ``filetypes.foo`` will be read.
3977 This is useful when the same lexer is being used for multiple
3978 filetypes (e.g. C/C++/C#/Java/etc).  For example, to make the C++
3979 styling the same as the C styling, you would put the following in
3980 ``filetypes.cpp``::
3982         [styling=C]
3985 [keywords] section
3986 ``````````````````
3988 This section contains keys for different keyword lists specific to
3989 the filetype. Some filetypes do not support keywords, so adding a
3990 new key will not work. You can only add or remove keywords to/from
3991 an existing list.
3993 .. important::
3994     The keywords list must be in one line without line ending characters.
3997 [lexer_properties] section
3998 ``````````````````````````
3999 Here any special properties for the Scintilla lexer can be set in the
4000 format ``key.name.field=some.value``.
4002 Properties Geany uses are listed in the system filetype files. To find
4003 other properties you need Geany's source code::
4005     egrep -o 'GetProperty\w*\("([^"]+)"[^)]+\)' scintilla/Lex*.cxx
4008 [settings] section
4009 ``````````````````
4011 extension
4012     This is the default file extension used when saving files, not
4013     including the period character (``.``). The extension used should
4014     match one of the patterns associated with that filetype (see
4015     `Filetype extensions`_).
4017     *Example:* ``extension=cxx``
4019 wordchars
4020     These characters define word boundaries when making selections
4021     and searching using word matching options.
4023     *Example:* (look at system filetypes.\* files)
4025     .. note::
4026         This overrides the *whitespace_chars* filetypes.common setting.
4028 comment_single
4029     A character or string which is used to comment code. If you want to use
4030     multiline comments only, don't set this but rather comment_open and
4031     comment_close.
4033     Single-line comments are used in priority over multiline comments to
4034     comment a line, e.g. with the `Comment/Uncomment line` command.
4036     *Example:* ``comment_single=//``
4038 comment_open
4039     A character or string which is used to comment code. You need to also
4040     set comment_close to really use multiline comments. If you want to use
4041     single-line comments, prefer setting comment_single.
4043     Multiline comments are used in priority over single-line comments to
4044     comment a block, e.g. template comments.
4046     *Example:* ``comment_open=/*``
4048 comment_close
4049     If multiline comments are used, this is the character or string to
4050     close the comment.
4052     *Example:* ``comment_close=*/``
4054 comment_use_indent
4055     Set this to false if a comment character or string should start at
4056     column 0 of a line. If set to true it uses any indentation of the
4057     line.
4059     Note: Comment indentation
4061     ``comment_use_indent=true`` would generate this if a line is
4062     commented (e.g. with Ctrl-D)::
4064         #command_example();
4066     ``comment_use_indent=false`` would generate this if a line is
4067     commented (e.g. with Ctrl-D)::
4069         #   command_example();
4072     Note: This setting only works for single line comments (like '//',
4073     '#' or ';').
4075     *Example:* ``comment_use_indent=true``
4077 context_action_cmd
4078     A command which can be executed on the current word or the current
4079     selection.
4081     Example usage: Open the API documentation for the
4082     current function call at the cursor position.
4084     The command can
4085     be set for every filetype or if not set, a global command will
4086     be used. The command itself can be specified without the full
4087     path, then it is searched in $PATH. But for security reasons,
4088     it is recommended to specify the full path to the command. The
4089     wildcard %s will be replaced by the current word at the cursor
4090     position or by the current selection.
4092     Hint: for PHP files the following could be quite useful:
4093     context_action_cmd=firefox "http://www.php.net/%s"
4095     *Example:* ``context_action_cmd=devhelp -s "%s"``
4097 tag_parser
4098     The TagManager language name, e.g. "C". Usually the same as the
4099     filetype name.
4101 .. _lexer_filetype:
4103 lexer_filetype
4104     A filetype name to setup syntax highlighting from another filetype.
4105     This must not be recursive, i.e. it should be a filetype name that
4106     doesn't use the *lexer_filetype* key itself, e.g.::
4108         lexer_filetype=C
4109         #lexer_filetype=C++
4111     The second line is wrong, because ``filetypes.cpp`` itself uses
4112     ``lexer_filetype=C``, which would be recursive.
4114 symbol_list_sort_mode
4115     What the default symbol list sort order should be.
4117     =====   =====================================
4118     Value   Meaning
4119     =====   =====================================
4120     0       Sort tags by name
4121     1       Sort tags by appearance (line number)
4122     =====   =====================================
4124 .. _xml_indent_tags:
4126 xml_indent_tags
4127     If this setting is set to *true*, a new line after a line ending with an
4128     unclosed XML/HTML tag will be automatically indented. This only applies
4129     to filetypes for which the HTML or XML lexer is used. Such filetypes have
4130     this setting in their system configuration files.
4133 [indentation] section
4134 `````````````````````
4136 This section allows definition of default indentation settings specific to
4137 the file type, overriding the ones configured in the preferences.  This can
4138 be useful for file types requiring specific indentation settings (e.g. tabs
4139 only for Makefile).  These settings don't override auto-detection if activated.
4141 width
4142     The forced indentation width.
4144 type
4145     The forced indentation type.
4147     =====   =======================
4148     Value   Indentation type
4149     =====   =======================
4150     0       Spaces only
4151     1       Tabs only
4152     2       Mixed (tabs and spaces)
4153     =====   =======================
4156 [build_settings] section
4157 ````````````````````````
4159 As of Geany 0.19 this section is supplemented by the `[build-menu] section`_.
4160 Values that are set in the [build-menu] section will override those in this section.
4162 error_regex
4163     This is a regular expression to parse a filename
4164     and line number from build output. If undefined, Geany will fall
4165     back to its default error message parsing.
4167     Only the first two matches will be read by Geany. Geany will look for
4168     a match that is purely digits, and use this for the line number. The
4169     remaining match will be used as the filename.
4171     *Example:* ``error_regex=(.+):([0-9]+):[0-9]+``
4173     This will parse a message such as:
4174     ``test.py:7:24: E202 whitespace before ']'``
4176 **Build commands**
4178 If any build menu item settings have been configured in the Build Menu Commands
4179 dialog or the Build tab of the project preferences dialog then these
4180 settings are stored in the [build-menu] section and override the settings in
4181 this section for that item.
4183 compiler
4184     This item specifies the command to compile source code files. But
4185     it is also possible to use it with interpreted languages like Perl
4186     or Python. With these filetypes you can use this option as a kind of
4187     syntax parser, which sends output to the compiler message window.
4189     You should quote the filename to also support filenames with
4190     spaces. The following wildcards for filenames are available:
4192     * %f -- complete filename without path
4193     * %e -- filename without path and without extension
4195     *Example:* ``compiler=gcc -Wall -c "%f"``
4197 linker
4198     This item specifies the command to link the file. If the file is not
4199     already compiled, it will be compiled while linking. The -o option
4200     is automatically added by Geany. This item works well with GNU gcc,
4201     but may be problematic with other compilers (esp. with the linker).
4203     *Example:* ``linker=gcc -Wall "%f"``
4205 run_cmd
4206     Use this item to execute your file. It has to have been built
4207     already. Use the %e wildcard to have only the name of the executable
4208     (i.e. without extension) or use the %f wildcard if you need the
4209     complete filename, e.g. for shell scripts.
4211     *Example:* ``run_cmd="./%e"``
4214 Special file filetypes.common
4215 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4217 There is a special filetype definition file called
4218 filetypes.common. This file defines some general non-filetype-specific
4219 settings.
4221 You can open the user filetypes.common with the
4222 *Tools->Configuration Files->filetypes.common* menu item. This adds
4223 the default settings to the user file if the file doesn't exist.
4224 Alternatively the file can be created manually, adding only the
4225 settings you want to change. All missing settings will be read from
4226 the system file.
4228 .. note::
4229     See the `Filetype configuration`_ section for how to define styles.
4232 [named_styles] section
4233 ``````````````````````
4234 Named styles declared here can be used in the [styling] section of any
4235 filetypes.* file.
4237 For example:
4239 *In filetypes.common*::
4241     [named_styles]
4242     foo=0xc00000;0xffffff;false;true
4243     bar=foo
4245 *In filetypes.c*::
4247     [styling]
4248     comment=foo
4250 This saves copying and pasting the whole style definition into several
4251 different files.
4253 .. note::
4254     You can define aliases for named styles, as shown with the ``bar``
4255     entry in the above example, but they must be declared after the
4256     original style.
4259 [named_colors] section
4260 ``````````````````````
4261 Named colors declared here can be used in the ``[styling]`` or
4262 ``[named_styles]`` section of any filetypes.* file or color scheme.
4264 For example::
4266     [named_colors]
4267     my_red_color=#FF0000
4268     my_blue_color=#0000FF
4270     [named_styles]
4271     foo=my_red_color;my_blue_color;false;true
4273 This allows to define a color pallete by name so that to change a color
4274 scheme-wide only involves changing the hex value in a single location.
4276 [styling] section
4277 `````````````````
4278 default
4279     This is the default style. It is used for styling files without a
4280     filetype set.
4282     *Example:* ``default=0x000000;0xffffff;false;false``
4284 selection
4285     The style for coloring selected text. The format is:
4287     * Foreground color
4288     * Background color
4289     * Use foreground color
4290     * Use background color
4292     The colors are only set if the 3rd or 4th argument is true. When
4293     the colors are not overridden, the default is a dark grey
4294     background with syntax highlighted foreground text.
4296     *Example:* ``selection=0xc0c0c0;0x00007F;true;true``
4298 brace_good
4299     The style for brace highlighting when a matching brace was found.
4301     *Example:* ``brace_good=0xff0000;0xFFFFFF;true;false``
4303 brace_bad
4304     The style for brace highlighting when no matching brace was found.
4306     *Example:* ``brace_bad=0x0000ff;0xFFFFFF;true;false``
4308 caret
4309     The style for coloring the caret(the blinking cursor). Only first
4310     and third argument is interpreted.
4311     Set the third argument to true to change the caret into a block caret.
4313     *Example:* ``caret=0x000000;0x0;false;false``
4315 caret_width
4316     The width for the caret(the blinking cursor). Only the first
4317     argument is interpreted. The width is specified in pixels with
4318     a maximum of three pixel. Use the width 0 to make the caret
4319     invisible.
4321     *Example:* ``caret=1;0;false;false``
4323 current_line
4324     The style for coloring the background of the current line. Only
4325     the second and third arguments are interpreted. The second argument
4326     is the background color. Use the third argument to enable or
4327     disable background highlighting for the current line (has to be
4328     true/false).
4330     *Example:* ``current_line=0x0;0xe5e5e5;true;false``
4332 indent_guide
4333     The style for coloring the indentation guides. Only the first and
4334     second arguments are interpreted.
4336     *Example:* ``indent_guide=0xc0c0c0;0xffffff;false;false``
4338 white_space
4339     The style for coloring the white space if it is shown. The first
4340     both arguments define the foreground and background colors, the
4341     third argument sets whether to use the defined foreground color
4342     or to use the color defined by each filetype for the white space.
4343     The fourth argument defines whether to use the background color.
4345     *Example:* ``white_space=0xc0c0c0;0xffffff;true;true``
4347 margin_linenumber
4348     Line number margin foreground and background colors.
4350 .. _Folding Settings:
4352 margin_folding
4353     Fold margin foreground and background colors.
4355 fold_symbol_highlight
4356     Highlight color of folding symbols.
4358 folding_style
4359     The style of folding icons. Only first and second arguments are
4360     used.
4362     Valid values for the first argument are:
4364     * 1 -- for boxes
4365     * 2 -- for circles
4366     * 3 -- for arrows
4367     * 4 -- for +/-
4369     Valid values for the second argument are:
4371     * 0 -- for no lines
4372     * 1 -- for straight lines
4373     * 2 -- for curved lines
4375     *Default:* ``folding_style=1;1;``
4377     *Arrows:* ``folding_style=3;0;``
4379 folding_horiz_line
4380     Draw a thin horizontal line at the line where text is folded. Only
4381     first argument is used.
4383     Valid values for the first argument are:
4385     * 0 -- disable, do not draw a line
4386     * 1 -- draw the line above folded text
4387     * 2 -- draw the line below folded text
4389     *Example:* ``folding_horiz_line=0;0;false;false``
4391 line_wrap_visuals
4392     First argument: drawing of visual flags to indicate a line is wrapped.
4393     This is a bitmask of the values:
4395     * 0 -- No visual flags
4396     * 1 -- Visual flag at end of subline of a wrapped line
4397     * 2 -- Visual flag at begin of subline of a wrapped line. Subline is
4398       indented by at least 1 to make room for the flag.
4400     Second argument: wether the visual flags to indicate a line is wrapped
4401     are drawn near the border or near the text. This is a bitmask of the values:
4403     * 0 -- Visual flags drawn near border
4404     * 1 -- Visual flag at end of subline drawn near text
4405     * 2 -- Visual flag at begin of subline drawn near text
4407     Only first and second arguments are interpreted.
4409     *Example:* ``line_wrap_visuals=3;0;false;false``
4411 line_wrap_indent
4412     First argument: sets the size of indentation of sublines for wrapped lines
4413     in terms of the width of a space, only used when the second argument is ``0``.
4415     Second argument: wrapped sublines can be indented to the position of their
4416     first subline or one more indent level. Possible values:
4418     * 0 - Wrapped sublines aligned to left of window plus amount set by the first argument
4419     * 1 - Wrapped sublines are aligned to first subline indent (use the same indentation)
4420     * 2 - Wrapped sublines are aligned to first subline indent plus one more level of indentation
4422     Only first and second arguments are interpreted.
4424     *Example:* ``line_wrap_indent=0;1;false;false``
4426 translucency
4427     Translucency for the current line (first argument) and the selection
4428     (second argument). Values between 0 and 256 are accepted.
4430     Note for Windows 95, 98 and ME users:
4431     keep this value at 256 to disable translucency otherwise Geany might crash.
4433     Only the first and second arguments are interpreted.
4435     *Example:* ``translucency=256;256;false;false``
4437 marker_line
4438     The style for a highlighted line (e.g when using Goto line or goto tag).
4439     The foreground color (first argument) is only used when the Markers margin
4440     is enabled (see View menu).
4442     Only the first and second arguments are interpreted.
4444     *Example:* ``marker_line=0x000000;0xffff00;false;false``
4446 marker_search
4447     The style for a marked search results (when using "Mark" in Search dialogs).
4448     The second argument sets the background color for the drawn rectangle.
4450     Only the second argument is interpreted.
4452     *Example:* ``marker_search=0x000000;0xb8f4b8;false;false``
4454 marker_mark
4455     The style for a marked line (e.g when using the "Toggle Marker" keybinding
4456     (Ctrl-M)). The foreground color (first argument) is only used
4457     when the Markers margin is enabled (see View menu).
4459     Only the first and second arguments are interpreted.
4461     *Example:* ``marker_mark=0x000000;0xb8f4b8;false;false``
4463 marker_translucency
4464     Translucency for the line marker (first argument) and the search marker
4465     (second argument). Values between 0 and 256 are accepted.
4467     Note for Windows 95, 98 and ME users:
4468     keep this value at 256 to disable translucency otherwise Geany might crash.
4470     Only the first and second arguments are interpreted.
4472     *Example:* ``marker_translucency=256;256;false;false``
4474 line_height
4475     Amount of space to be drawn above and below the line's baseline.
4476     The first argument defines the amount of space to be drawn above the line, the second
4477     argument defines the amount of space to be drawn below.
4479     Only the first and second arguments are interpreted.
4481     *Example:* ``line_height=0;0;false;false``
4483 calltips
4484     The style for coloring the calltips. The first two arguments
4485     define the foreground and background colors, the third and fourth
4486     arguments set whether to use the defined colors.
4488     *Example:* ``calltips=0xc0c0c0;0xffffff;false;false``
4491 [settings] section
4492 ``````````````````
4493 whitespace_chars
4494     Characters to treat as whitespace. These characters are ignored
4495     when moving, selecting and deleting across word boundaries
4496     (see `Scintilla keyboard commands`_).
4498     This should include space (\\s) and tab (\\t).
4500     *Example:* ``whitespace_chars=\s\t!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~``
4504 Filetype extensions
4505 -------------------
4507 To change the default filetype extension used when saving a new file,
4508 see `Filetype definition files`_.
4510 You can override the list of file extensions that Geany uses to detect
4511 filetypes using the user ``filetype_extensions.conf`` file. Use the
4512 *Tools->Configuration Files->filetype_extensions.conf* menu item. See
4513 also `Configuration file paths`_.
4515 You should only list lines for filetype extensions that you want to
4516 override in the user configuration file and remove or comment out
4517 others. The patterns are listed after the ``=`` sign, using a
4518 semi-colon separated list of patterns which should be matched for
4519 that filetype.
4521 For example, to override the filetype extensions for Make, the file
4522 should look like::
4524     [Extensions]
4525     Make=Makefile*;*.mk;Buildfile;
4527 Filetype group membership
4528 -------------------------
4529 Group membership is also stored in ``filetype_extensions.conf``. This
4530 file is used to store information Geany needs at startup, whereas the
4531 separate filetype definition files hold information only needed when
4532 a document with their filetype is used.
4534 The format looks like::
4536     [Groups]
4537     Programming=C;C++;
4538     Script=Perl;Python;
4539     Markup=HTML;XML;
4540     Misc=Diff;Conf;
4541     None=None;
4543 The key names cannot be configured.
4545 .. note::
4546     Group membership is only read at startup.
4548 Preferences file format
4549 -----------------------
4551 The user preferences file ``geany.conf`` holds settings for all the items configured
4552 in the preferences dialog. This file should not be edited while Geany is running
4553 as the file will be overwritten when the preferences in Geany are changed or Geany
4554 is quit.
4557 [build-menu] section
4558 ^^^^^^^^^^^^^^^^^^^^
4560 The [build-menu] section contains the configuration of the build menu.
4561 This section can occur in filetype, preferences and project files and
4562 always has the format described here.  Different menu items are loaded
4563 from different files, see the table in the `Build Menu Configuration`_
4564 section for details.  All the settings can be configured from the dialogs
4565 except the execute command in filetype files and filetype definitions in
4566 the project file, so these are the only ones which need hand editing.
4568 The build-menu section stores one entry for each setting for each menu item that
4569 is configured.  The keys for these settings have the format:
4571   ``GG_NN_FF``
4573 where:
4575 * GG - is the menu item group,
4577   - FT for filetype
4578   - NF for independent (non-filetype)
4579   - EX for execute
4581 * NN - is a two decimal digit number of the item within the group,
4582   starting at 00
4583 * FF - is the field,
4585   - LB for label
4586   - CM for command
4587   - WD for working directory
4590 Project file format
4591 -------------------
4593 The project file contains project related settings and possibly a
4594 record of the current session files.
4597 [build-menu] additions
4598 ^^^^^^^^^^^^^^^^^^^^^^
4600 The project file also can have extra fields in the [build-menu] section
4601 in addition to those listed in `[build-menu] section`_ above.
4603 When filetype menu items are configured for the project they are stored
4604 in the project file.
4606 The ``filetypes`` entry is a list of the filetypes which exist in the
4607 project file.
4609 For each filetype the entries for that filetype have the format defined in
4610 `[build-menu] section`_ but the key is prefixed by the name of the filetype
4611 as it appears in the ``filetypes`` entry, eg the entry for the label of
4612 filetype menu item 0 for the C filetype would be
4614   ``CFT_00_LB=Label``
4617 Templates
4618 ---------
4620 Geany supports the following templates:
4622 * ChangeLog entry
4623 * File header
4624 * Function description
4625 * Short GPL notice
4626 * Short BSD notice
4627 * File templates
4629 To use these templates, just open the Edit menu or open the popup menu
4630 by right-clicking in the editor widget, and choose "Insert Comments"
4631 and insert templates as you want.
4633 Some templates (like File header or ChangeLog entry) will always be
4634 inserted at the top of the file.
4636 To insert a function description, the cursor must be inside
4637 of the function, so that the function name can be determined
4638 automatically. The description will be positioned correctly one line
4639 above the function, just check it out. If the cursor is not inside
4640 of a function or the function name cannot be determined, the inserted
4641 function description won't contain the correct function name but "unknown"
4642 instead.
4644 .. note::
4645     Geany automatically reloads template information when it notices you
4646     save a file in the user's template configuration directory. You can
4647     also force this by selecting *Tools->Reload Configuration*.
4650 Template meta data
4651 ^^^^^^^^^^^^^^^^^^
4653 Meta data can be used with all templates, but by default user set
4654 meta data is only used for the ChangeLog and File header templates.
4656 In the configuration dialog you can find a tab "Templates" (see
4657 `Template preferences`_). You can define the default values
4658 which will be inserted in the templates.
4661 File templates
4662 ^^^^^^^^^^^^^^
4664 File templates are templates used as the basis of a new file. To
4665 use them, choose the *New (with Template)* menu item from the *File*
4666 menu.
4668 By default, file templates are installed for some filetypes. Custom
4669 file templates can be added by creating the appropriate template file. You can
4670 also edit the default file templates.
4672 The file's contents are just the text to place in the document, with
4673 optional template wildcards like ``{fileheader}``. The fileheader
4674 wildcard can be placed anywhere, but it's usually put on the first
4675 line of the file, followed by a blank line.
4677 Adding file templates
4678 `````````````````````
4680 File templates are read from ``templates/files`` under the
4681 `Configuration file paths`_.
4683 The filetype to use is detected from the template file's extension, if
4684 any. For example, creating a file ``module.c`` would add a menu item
4685 which created a new document with the filetype set to 'C'.
4687 The template file is read from disk when the corresponding menu item is
4688 clicked.
4691 Customizing templates
4692 ^^^^^^^^^^^^^^^^^^^^^
4694 Each template can be customized to your needs. The templates are
4695 stored in the ``~/.config/geany/templates/`` directory (see the section called
4696 `Command line options`_ for further information about the configuration
4697 directory). Just open the desired template with an editor (ideally,
4698 Geany ;-) ) and edit the template to your needs. There are some
4699 wildcards which will be automatically replaced by Geany at startup.
4702 Template wildcards
4703 ``````````````````
4705 All wildcards must be enclosed by "{" and "}", e.g. {date}.
4707 **Wildcards for character escaping**
4709 ============== ============================================= =======================================
4710 Wildcard       Description                                   Available in
4711 ============== ============================================= =======================================
4712 ob             { Opening Brace (used to prevent other        file templates, file header, snippets.
4713                wildcards being expanded).
4714 cb             } Closing Brace.                              file templates, file header, snippets.
4715 pc             \% Percent (used to escape e.g. %block% in
4716                snippets).                                    snippets.
4717 ============== ============================================= =======================================
4719 **Global wildcards**
4721 These are configurable, see `Template preferences`_.
4723 ============== ============================================= =======================================
4724 Wildcard       Description                                   Available in
4725 ============== ============================================= =======================================
4726 developer      The name of the developer.                    file templates, file header,
4727                                                              function description, ChangeLog entry,
4728                                                              bsd, gpl, snippets.
4730 initial        The developer's initials, e.g. "ET" for       file templates, file header,
4731                Enrico Tröger or "JFD" for John Foobar Doe.   function description, ChangeLog entry,
4732                                                              bsd, gpl, snippets.
4734 mail           The email address of the developer.           file templates, file header,
4735                                                              function description, ChangeLog entry,
4736                                                              bsd, gpl, snippets.
4738 company        The company the developer is working for.     file templates, file header,
4739                                                              function description, ChangeLog entry,
4740                                                              bsd, gpl, snippets.
4742 version        The initial version of a new file.            file templates, file header,
4743                                                              function description, ChangeLog entry,
4744                                                              bsd, gpl, snippets.
4745 ============== ============================================= =======================================
4747 **Date & time wildcards**
4749 The format for these wildcards can be changed in the preferences
4750 dialog, see `Template preferences`_. You can use any conversion
4751 specifiers which can be used with the ANSI C strftime function.
4752 For details please see http://man.cx/strftime.
4754 ============== ============================================= =======================================
4755 Wildcard       Description                                   Available in
4756 ============== ============================================= =======================================
4757 year           The current year. Default format is: YYYY.    file templates, file header,
4758                                                              function description, ChangeLog entry,
4759                                                              bsd, gpl, snippets.
4761 date           The current date. Default format:             file templates, file header,
4762                YYYY-MM-DD.                                   function description, ChangeLog entry,
4763                                                              bsd, gpl, snippets.
4765 datetime       The current date and time. Default format:    file templates, file header,
4766                DD.MM.YYYY HH:mm:ss ZZZZ.                     function description, ChangeLog entry,
4767                                                              bsd, gpl, snippets.
4768 ============== ============================================= =======================================
4770 **Dynamic wildcards**
4772 ============== ============================================= =======================================
4773 Wildcard       Description                                   Available in
4774 ============== ============================================= =======================================
4775 untitled       The string "untitled" (this will be           file templates, file header,
4776                translated to your locale), used in           function description, ChangeLog entry,
4777                file templates.                               bsd, gpl, snippets.
4779 geanyversion   The actual Geany version, e.g.                file templates, file header,
4780                "Geany |(version)|".                          function description, ChangeLog entry,
4781                                                              bsd, gpl, snippets.
4783 filename       The filename of the current file.             file header, snippets, file
4784                For new files, it's only replaced when        templates.
4785                first saving if found on the first 4 lines
4786                of the file.
4788 project        The current project's name, if any.           file header, snippets, file templates.
4790 description    The current project's description, if any.    file header, snippets, file templates.
4792 functionname   The function name of the function at the      function description.
4793                cursor position. This wildcard will only be
4794                replaced in the function description
4795                template.
4797 command:path   Executes the specified command and replace    file templates, file header,
4798                the wildcard with the command's standard      function description, ChangeLog entry,
4799                output. See `Special {command:} wildcard`_    bsd, gpl, snippets.
4800                for details.
4801 ============== ============================================= =======================================
4803 **Template insertion wildcards**
4805 ============== ============================================= =======================================
4806 Wildcard       Description                                   Available in
4807 ============== ============================================= =======================================
4808 gpl            This wildcard inserts a short GPL notice.     file header.
4810 bsd            This wildcard inserts a BSD licence notice.   file header.
4812 fileheader     The file header template. This wildcard       snippets, file templates.
4813                will only be replaced in file templates.
4814 ============== ============================================= =======================================
4817 Special {command:} wildcard
4818 ***************************
4820 The {command:} wildcard is a special one because it can execute
4821 a specified command and put the command's output (stdout) into
4822 the template.
4824 Example::
4826     {command:uname -a}
4828 will result in::
4830     Linux localhost 2.6.9-023stab046.2-smp #1 SMP Mon Dec 10 15:04:55 MSK 2007 x86_64 GNU/Linux
4832 Using this wildcard you can insert nearly any arbitrary text into the
4833 template.
4835 In the environment of the executed command the variables
4836 ``GEANY_FILENAME``, ``GEANY_FILETYPE`` and ``GEANY_FUNCNAME`` are set.
4837 The value of these variables is filled in only if Geany knows about it.
4838 For example, ``GEANY_FUNCNAME`` is only filled within the function
4839 description template. However, these variables are ``always`` set,
4840 just maybe with an empty value.
4841 You can easily access them e.g. within an executed shell script using::
4843     $GEANY_FILENAME
4846 .. note::
4847     If the specified command could not be found or not executed, the wildcard is substituted
4848     by an empty string. In such cases, you can find the occurred error message on Geany's
4849     standard error and in the Help->Debug Messages dialog.
4852 Customizing the toolbar
4853 -----------------------
4855 You can add, remove and reorder the elements in the toolbar by using
4856 the toolbar editor, or by manually editing the configuration file
4857 ``ui_toolbar.xml``.
4859 The toolbar editor can be opened from the preferences editor on the Toolbar tab or
4860 by right-clicking on the toolbar itself and choosing it from the menu.
4862 Manually editing the toolbar layout
4863 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4865 To override the system-wide configuration file, copy it to your user
4866 configuration directory (see `Configuration file paths`_).
4868 For example::
4870     % cp /usr/local/share/geany/ui_toolbar.xml /home/username/.config/geany/
4872 Then edit it and add any of the available elements listed in the file or remove
4873 any of the existing elements. Of course, you can also reorder the elements as
4874 you wish and add or remove additional separators.
4875 This file must be valid XML, otherwise the global toolbar UI definition
4876 will be used instead.
4878 Your changes are applied once you save the file.
4880 .. note::
4881     (1) You cannot add new actions which are not listed below.
4882     (2) Everything you add or change must be inside the /ui/toolbar/ path.
4885 Available toolbar elements
4886 ^^^^^^^^^^^^^^^^^^^^^^^^^^
4888 ================== ==============================================================================
4889 Element name       Description
4890 ================== ==============================================================================
4891 New                Create a new file
4892 Open               Open an existing file
4893 Save               Save the current file
4894 SaveAll            Save all open files
4895 Reload             Reload the current file from disk
4896 Close              Close the current file
4897 CloseAll           Close all open files
4898 Print              Print the current file
4899 Cut                Cut the current selection
4900 Copy               Copy the current selection
4901 Paste              Paste the contents of the clipboard
4902 Delete             Delete the current selection
4903 Undo               Undo the last modification
4904 Redo               Redo the last modification
4905 NavBack            Navigate back a location
4906 NavFor             Navigate forward a location
4907 Compile            Compile the current file
4908 Build              Build the current file, includes a submenu for Make commands. Geany
4909                    remembers the last chosen action from the submenu and uses this as default
4910                    action when the button itself is clicked.
4911 Run                Run or view the current file
4912 Color              Open a color chooser dialog, to interactively pick colors from a palette
4913 ZoomIn             Zoom in the text
4914 ZoomOut            Zoom out the text
4915 UnIndent           Decrease indentation
4916 Indent             Increase indentation
4917 Replace            Replace text in the current document
4918 SearchEntry        The search field belonging to the 'Search' element (can be used alone)
4919 Search             Find the entered text in the current file (only useful if you also
4920                    use 'SearchEntry')
4921 GotoEntry          The goto field belonging to the 'Goto' element (can be used alone)
4922 Goto               Jump to the entered line number (only useful if you also use 'GotoEntry')
4923 Preferences        Show the preferences dialog
4924 Quit               Quit Geany
4925 ================== ==============================================================================
4929 Plugin documentation
4930 ====================
4932 HTML Characters
4933 ---------------
4935 The HTML Characters plugin helps when working with special
4936 characters in XML/HTML, e.g. German Umlauts ü and ä.
4939 Insert entity dialog
4940 ^^^^^^^^^^^^^^^^^^^^
4942 When the plugin is enabled, you can insert special character
4943 entities using *Tools->Insert Special HTML Characters*.
4945 This opens up a dialog where you can find a huge amount of special
4946 characters sorted by category that you might like to use inside your
4947 document. You can expand and collapse the categories by clicking on
4948 the little arrow on the left hand side. Once you have found the
4949 desired character click on it and choose "Insert". This will insert
4950 the entity for the character at the current cursor position. You
4951 might also like to double click the chosen entity instead.
4954 Replace special chars by its entity
4955 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4957 To help make a XML/HTML document valid the plugin supports
4958 replacement of special chars known by the plugin. Both bulk
4959 replacement and immediate replacement during typing are supported.
4961 A few characters will not be replaced. These are
4962         * "
4963         * &
4964         * <
4965         * >
4966         *   (`&nbsp;`)
4969 At typing time
4970 ``````````````
4972 You can activate/deactivate this feature using the *Tools->HTML
4973 Replacement->Auto-replace Special Characters* menu item. If it's
4974 activated, all special characters (beside the given exceptions from
4975 above) known by the plugin will be replaced by their entities.
4977 You could also set a keybinding for the plugin to toggle the status
4978 of this feature.
4981 Bulk replacement
4982 ````````````````
4984 After inserting a huge amount of text, e.g. by using copy & paste, the
4985 plugin allows bulk replacement of all known characters (beside the
4986 mentioned exceptions). You can find the function under the same
4987 menu at *Tools->HTML Replacement->Replace Characters in Selection*, or
4988 configure a keybinding for the plugin.
4991 Save Actions
4992 ------------
4994 Instant Save
4995 ^^^^^^^^^^^^
4996 This plugin sets on every new file (*File->New* or *File->New (with template)*)
4997 a randomly chosen filename and set its filetype appropriate to the used template
4998 or when no template was used, to a configurable default filetype.
4999 This enables you to quickly compile, build and/or run the new file without the
5000 need to give it an explicit filename using the Save As dialog. This might be
5001 useful when you often create new files just for testing some code or something
5002 similar.
5005 Backup Copy
5006 ^^^^^^^^^^^
5008 This plugin creates a backup copy of the current file in Geany when it is
5009 saved. You can specify the directory where the backup copy is saved and
5010 you can configure the automatically added extension in the configure dialog
5011 in Geany's plugin manager.
5013 After the plugin was loaded in Geany's plugin manager, every file is
5014 copied into the configured backup directory when the file is saved in Geany.
5018 Contributing to this document
5019 =============================
5021 This document (``geany.txt``) is written in `reStructuredText`__
5022 (or "reST"). The source file for it is located in Geany's ``doc``
5023 subdirectory.  If you intend on making changes, you should grab the
5024 source right from Git to make sure you've got the newest version. After
5025 editing the file, to build the HTML document to see how your changes
5026 look, run "``make doc``" in the subdirectory ``doc`` of Geany's source
5027 directory. This regenerates the ``geany.html`` file. To generate a PDF
5028 file, use the command "``make pdf``" which should generate a file called
5029 geany-|(version)|.pdf.
5031 __ http://docutils.sourceforge.net/rst.html
5033 After you are happy with your changes, create a patch e.g. by using::
5035     % git diff geany.txt > foo.patch
5037 or even better, by creating a Git-formatted patch which will keep authoring
5038 and description data, by first committing your changes (doing so in a fresh
5039 new branch is recommended for `matser` not to diverge from upstream) and then
5040 using git format-patch::
5042     % git checkout -b my-documentation-changes # create a fresh branch
5043     % git commit geany.txt
5044     Write a good commit message...
5045     % git format-patch HEAD^
5046     % git checkout master # go back to master
5048 and then submit that file to the mailing list for review.
5050 Also you can clone the Geany repository at GitHub and send a pull request.
5052 Note, you will need the Python docutils software package installed
5053 to build the docs. The package is named ``python-docutils`` on Debian
5054 and Fedora systems.
5059 Scintilla keyboard commands
5060 ===========================
5062 Copyright © 1998, 2006 Neil Hodgson <neilh(at)scintilla(dot)org>
5064 This appendix is distributed under the terms of the License for
5065 Scintilla and SciTE. A copy of this license can be found in the file
5066 ``scintilla/License.txt`` included with the source code of this
5067 program and in the appendix of this document. See `License for
5068 Scintilla and SciTE`_.
5070 20 June 2006
5074 Keyboard commands
5075 -----------------
5077 Keyboard commands for Scintilla mostly follow common Windows and GTK+
5078 conventions. All move keys (arrows, page up/down, home and end)
5079 allows to extend or reduce the stream selection when holding the
5080 Shift key, and the rectangular selection when holding the
5081 appropriate keys (see `Column mode editing (rectangular selections)`_).
5083 Some keys may not be available with some national keyboards
5084 or because they are taken by the system such as by a window manager
5085 or GTK. Keyboard equivalents of menu commands are listed in the
5086 menus. Some less common commands with no menu equivalent are:
5088 =============================================   ======================
5089 Action                                          Shortcut key
5090 =============================================   ======================
5091 Magnify text size.                              Ctrl-Keypad+
5092 Reduce text size.                               Ctrl-Keypad-
5093 Restore text size to normal.                    Ctrl-Keypad/
5094 Indent block.                                   Tab
5095 Dedent block.                                   Shift-Tab
5096 Delete to start of word.                        Ctrl-BackSpace
5097 Delete to end of word.                          Ctrl-Delete
5098 Delete to start of line.                        Ctrl-Shift-BackSpace
5099 Go to start of document.                        Ctrl-Home
5100 Extend selection to start of document.          Ctrl-Shift-Home
5101 Go to start of display line.                    Alt-Home
5102 Extend selection to start of display line.      Alt-Shift-Home
5103 Go to end of document.                          Ctrl-End
5104 Extend selection to end of document.            Ctrl-Shift-End
5105 Extend selection to end of display line.        Alt-Shift-End
5106 Previous paragraph. Shift extends selection.    Ctrl-Up
5107 Next paragraph. Shift extends selection.        Ctrl-Down
5108 Previous word. Shift extends selection.         Ctrl-Left
5109 Next word. Shift extends selection.             Ctrl-Right
5110 =============================================   ======================
5115 Tips and tricks
5116 ===============
5118 Document notebook
5119 -----------------
5121 * Double-click on empty space in the notebook tab bar to open a
5122   new document.
5123 * Middle-click on a document's notebook tab to close the document.
5124 * Hold `Ctrl` and click on any notebook tab to switch to the last used
5125   document.
5126 * Double-click on a document's notebook tab to toggle all additional
5127   widgets (to show them again use the View menu or the keyboard
5128   shortcut). The interface pref must be enabled for this to work.
5130 Editor
5131 ------
5133 * Alt-scroll wheel moves up/down a page.
5134 * Ctrl-scroll wheel zooms in/out.
5135 * Shift-scroll wheel scrolls 8 characters right/left.
5136 * Ctrl-click on a word in a document to perform *Go to Tag Definition*.
5137 * Ctrl-click on a bracket/brace to perform *Go to Matching Brace*.
5139 Interface
5140 ---------
5142 * Double-click on a symbol-list group to expand or compact it.
5144 GTK-related
5145 -----------
5147 * Scrolling the mouse wheel over a notebook tab bar will switch
5148   notebook pages.
5150 The following are derived from X-Windows features (but GTK still supports
5151 them on Windows):
5153 * Middle-click pastes the last selected text.
5154 * Middle-click on a scrollbar moves the scrollbar to that
5155   position without having to drag it.
5159 Compile-time options
5160 ====================
5162 There are some options which can only be changed at compile time,
5163 and some options which are used as the default for configurable
5164 options. To change these options, edit the appropriate source file
5165 in the ``src`` subdirectory. Look for a block of lines starting with
5166 ``#define GEANY_*``. Any definitions which are not listed here should
5167 not be changed.
5169 .. note::
5170     Most users should not need to change these options.
5172 src/geany.h
5173 -----------
5175 ==============================  ============================================  ==================
5176 Option                          Description                                   Default
5177 ==============================  ============================================  ==================
5178 GEANY_STRING_UNTITLED           A string used as the default name for new     untitled
5179                                 files. Be aware that the string can be
5180                                 translated, so change it only if you know
5181                                 what you are doing.
5182 GEANY_WINDOW_MINIMAL_WIDTH      The minimal width of the main window.         620
5183 GEANY_WINDOW_MINIMAL_HEIGHT     The minimal height of the main window.        440
5184 GEANY_WINDOW_DEFAULT_WIDTH      The default width of the main window at the   900
5185                                 first start.
5186 GEANY_WINDOW_DEFAULT_HEIGHT     The default height of the main window at the  600
5187                                 first start.
5188  **Windows specific**
5189 GEANY_USE_WIN32_DIALOG          Set this to 1 if you want to use the default  0
5190                                 Windows file open and save dialogs instead
5191                                 GTK's file open and save dialogs. The
5192                                 default Windows file dialogs are missing
5193                                 some nice features like choosing a filetype
5194                                 or an encoding. *Do not touch this setting
5195                                 when building on a non-Win32 system.*
5196 ==============================  ============================================  ==================
5198 project.h
5199 ---------
5201 ==============================  ============================================  ==================
5202 Option                          Description                                   Default
5203 ==============================  ============================================  ==================
5204 GEANY_PROJECT_EXT               The default filename extension for Geany      geany
5205                                 project files. It is used when creating new
5206                                 projects and as filter mask for the project
5207                                 open dialog.
5208 ==============================  ============================================  ==================
5210 filetypes.c
5211 -----------
5213 ==============================  ============================================  ==================
5214 Option                          Description                                   Default
5215 ==============================  ============================================  ==================
5216 GEANY_FILETYPE_SEARCH_LINES     The number of lines to search for the         2
5217                                 filetype with the extract filetype regex.
5218 ==============================  ============================================  ==================
5220 editor.h
5221 --------
5223 ==============================  ============================================  ==================
5224 Option                          Description                                   Default
5225 ==============================  ============================================  ==================
5226 GEANY_WORDCHARS                 These characters define word boundaries when  a string with:
5227                                 making selections and searching using word    a-z, A-Z, 0-9 and
5228                                 matching options.                             underscore.
5229 ==============================  ============================================  ==================
5231 keyfile.c
5232 ---------
5234 These are default settings that can be overridden in the `Preferences`_ dialog.
5236 ==============================  ============================================  ==================
5237 Option                          Description                                   Default
5238 ==============================  ============================================  ==================
5239 GEANY_MIN_SYMBOLLIST_CHARS      How many characters you need to type to       4
5240                                 trigger the autocompletion list.
5241 GEANY_DISK_CHECK_TIMEOUT        Time in seconds between checking a file for   30
5242                                 external changes.
5243 GEANY_DEFAULT_TOOLS_MAKE        The make tool. This can also include a path.  "make"
5244 GEANY_DEFAULT_TOOLS_TERMINAL    A terminal emulator command, see              See below.
5245                                 `Terminal emulators`_.
5246 GEANY_DEFAULT_TOOLS_BROWSER     A web browser. This can also include a path.  "firefox"
5247 GEANY_DEFAULT_TOOLS_PRINTCMD    A printing tool. It should be able to accept  "lpr"
5248                                 and process plain text files. This can also
5249                                 include a path.
5250 GEANY_DEFAULT_TOOLS_GREP        A grep tool. It should be compatible with     "grep"
5251                                 GNU grep. This can also include a path.
5252 GEANY_DEFAULT_MRU_LENGTH        The length of the "Recent files" list.        10
5253 GEANY_DEFAULT_FONT_SYMBOL_LIST  The font used in sidebar to show symbols and  "Sans 9"
5254                                 open files.
5255 GEANY_DEFAULT_FONT_MSG_WINDOW   The font used in the messages window.         "Sans 9"
5256 GEANY_DEFAULT_FONT_EDITOR       The font used in the editor window.           "Monospace 10"
5257 GEANY_TOGGLE_MARK               A string which is used to mark a toggled      "~ "
5258                                 comment.
5259 GEANY_MAX_AUTOCOMPLETE_WORDS    How many autocompletion suggestions should    30
5260                                 Geany provide.
5261 GEANY_DEFAULT_FILETYPE_REGEX    The default regex to extract filetypes from   See below.
5262                                 files.
5263 ==============================  ============================================  ==================
5265 The GEANY_DEFAULT_FILETYPE_REGEX default value is  -\\*-\\s*([^\\s]+)\\s*-\\*- which finds Emacs filetypes.
5267 The GEANY_DEFAULT_TOOLS_TERMINAL default value on Windows is::
5269     cmd.exe /Q /C %c
5271 and on any non-Windows system is::
5273     xterm -e "/bin/sh %c"
5276 build.c
5277 -------
5279 ==============================  ============================================  ==================
5280 Option                          Description                                   Default
5281 ==============================  ============================================  ==================
5282 GEANY_BUILD_ERR_HIGHLIGHT_MAX   Amount of build error indicators to           50
5283                                 be shown in the editor window.
5284                                 This affects the special coloring
5285                                 when Geany detects a compiler output line as
5286                                 an error message and then highlights the
5287                                 corresponding line in the source code.
5288                                 Usually only the first few messages are
5289                                 interesting because following errors are
5290                                 just after-effects.
5291                                 All errors in the Compiler window are parsed
5292                                 and unaffected by this value.
5293 PRINTBUILDCMDS                  Every time a build menu item priority         FALSE
5294                                 calculation is run, print the state of the
5295                                 menu item table in the form of the table
5296                                 in `Build Menu Configuration`_.  May be
5297                                 useful to debug configuration file
5298                                 overloading.  Warning produces a lot of
5299                                 output.  Can also be enabled/disabled by the
5300                                 debugger by setting printbuildcmds to 1/0
5301                                 overriding the compile setting.
5302 ==============================  ============================================  ==================
5306 GNU General Public License
5307 ==========================
5311                 GNU GENERAL PUBLIC LICENSE
5312                    Version 2, June 1991
5314      Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5315         51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
5316      Everyone is permitted to copy and distribute verbatim copies
5317      of this license document, but changing it is not allowed.
5319                     Preamble
5321       The licenses for most software are designed to take away your
5322     freedom to share and change it.  By contrast, the GNU General Public
5323     License is intended to guarantee your freedom to share and change free
5324     software--to make sure the software is free for all its users.  This
5325     General Public License applies to most of the Free Software
5326     Foundation's software and to any other program whose authors commit to
5327     using it.  (Some other Free Software Foundation software is covered by
5328     the GNU Library General Public License instead.)  You can apply it to
5329     your programs, too.
5331       When we speak of free software, we are referring to freedom, not
5332     price.  Our General Public Licenses are designed to make sure that you
5333     have the freedom to distribute copies of free software (and charge for
5334     this service if you wish), that you receive source code or can get it
5335     if you want it, that you can change the software or use pieces of it
5336     in new free programs; and that you know you can do these things.
5338       To protect your rights, we need to make restrictions that forbid
5339     anyone to deny you these rights or to ask you to surrender the rights.
5340     These restrictions translate to certain responsibilities for you if you
5341     distribute copies of the software, or if you modify it.
5343       For example, if you distribute copies of such a program, whether
5344     gratis or for a fee, you must give the recipients all the rights that
5345     you have.  You must make sure that they, too, receive or can get the
5346     source code.  And you must show them these terms so they know their
5347     rights.
5349       We protect your rights with two steps: (1) copyright the software, and
5350     (2) offer you this license which gives you legal permission to copy,
5351     distribute and/or modify the software.
5353       Also, for each author's protection and ours, we want to make certain
5354     that everyone understands that there is no warranty for this free
5355     software.  If the software is modified by someone else and passed on, we
5356     want its recipients to know that what they have is not the original, so
5357     that any problems introduced by others will not reflect on the original
5358     authors' reputations.
5360       Finally, any free program is threatened constantly by software
5361     patents.  We wish to avoid the danger that redistributors of a free
5362     program will individually obtain patent licenses, in effect making the
5363     program proprietary.  To prevent this, we have made it clear that any
5364     patent must be licensed for everyone's free use or not licensed at all.
5366       The precise terms and conditions for copying, distribution and
5367     modification follow.
5369                 GNU GENERAL PUBLIC LICENSE
5370        TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
5372       0. This License applies to any program or other work which contains
5373     a notice placed by the copyright holder saying it may be distributed
5374     under the terms of this General Public License.  The "Program", below,
5375     refers to any such program or work, and a "work based on the Program"
5376     means either the Program or any derivative work under copyright law:
5377     that is to say, a work containing the Program or a portion of it,
5378     either verbatim or with modifications and/or translated into another
5379     language.  (Hereinafter, translation is included without limitation in
5380     the term "modification".)  Each licensee is addressed as "you".
5382     Activities other than copying, distribution and modification are not
5383     covered by this License; they are outside its scope.  The act of
5384     running the Program is not restricted, and the output from the Program
5385     is covered only if its contents constitute a work based on the
5386     Program (independent of having been made by running the Program).
5387     Whether that is true depends on what the Program does.
5389       1. You may copy and distribute verbatim copies of the Program's
5390     source code as you receive it, in any medium, provided that you
5391     conspicuously and appropriately publish on each copy an appropriate
5392     copyright notice and disclaimer of warranty; keep intact all the
5393     notices that refer to this License and to the absence of any warranty;
5394     and give any other recipients of the Program a copy of this License
5395     along with the Program.
5397     You may charge a fee for the physical act of transferring a copy, and
5398     you may at your option offer warranty protection in exchange for a fee.
5400       2. You may modify your copy or copies of the Program or any portion
5401     of it, thus forming a work based on the Program, and copy and
5402     distribute such modifications or work under the terms of Section 1
5403     above, provided that you also meet all of these conditions:
5405         a) You must cause the modified files to carry prominent notices
5406         stating that you changed the files and the date of any change.
5408         b) You must cause any work that you distribute or publish, that in
5409         whole or in part contains or is derived from the Program or any
5410         part thereof, to be licensed as a whole at no charge to all third
5411         parties under the terms of this License.
5413         c) If the modified program normally reads commands interactively
5414         when run, you must cause it, when started running for such
5415         interactive use in the most ordinary way, to print or display an
5416         announcement including an appropriate copyright notice and a
5417         notice that there is no warranty (or else, saying that you provide
5418         a warranty) and that users may redistribute the program under
5419         these conditions, and telling the user how to view a copy of this
5420         License.  (Exception: if the Program itself is interactive but
5421         does not normally print such an announcement, your work based on
5422         the Program is not required to print an announcement.)
5424     These requirements apply to the modified work as a whole.  If
5425     identifiable sections of that work are not derived from the Program,
5426     and can be reasonably considered independent and separate works in
5427     themselves, then this License, and its terms, do not apply to those
5428     sections when you distribute them as separate works.  But when you
5429     distribute the same sections as part of a whole which is a work based
5430     on the Program, the distribution of the whole must be on the terms of
5431     this License, whose permissions for other licensees extend to the
5432     entire whole, and thus to each and every part regardless of who wrote it.
5434     Thus, it is not the intent of this section to claim rights or contest
5435     your rights to work written entirely by you; rather, the intent is to
5436     exercise the right to control the distribution of derivative or
5437     collective works based on the Program.
5439     In addition, mere aggregation of another work not based on the Program
5440     with the Program (or with a work based on the Program) on a volume of
5441     a storage or distribution medium does not bring the other work under
5442     the scope of this License.
5444       3. You may copy and distribute the Program (or a work based on it,
5445     under Section 2) in object code or executable form under the terms of
5446     Sections 1 and 2 above provided that you also do one of the following:
5448         a) Accompany it with the complete corresponding machine-readable
5449         source code, which must be distributed under the terms of Sections
5450         1 and 2 above on a medium customarily used for software interchange; or,
5452         b) Accompany it with a written offer, valid for at least three
5453         years, to give any third party, for a charge no more than your
5454         cost of physically performing source distribution, a complete
5455         machine-readable copy of the corresponding source code, to be
5456         distributed under the terms of Sections 1 and 2 above on a medium
5457         customarily used for software interchange; or,
5459         c) Accompany it with the information you received as to the offer
5460         to distribute corresponding source code.  (This alternative is
5461         allowed only for noncommercial distribution and only if you
5462         received the program in object code or executable form with such
5463         an offer, in accord with Subsection b above.)
5465     The source code for a work means the preferred form of the work for
5466     making modifications to it.  For an executable work, complete source
5467     code means all the source code for all modules it contains, plus any
5468     associated interface definition files, plus the scripts used to
5469     control compilation and installation of the executable.  However, as a
5470     special exception, the source code distributed need not include
5471     anything that is normally distributed (in either source or binary
5472     form) with the major components (compiler, kernel, and so on) of the
5473     operating system on which the executable runs, unless that component
5474     itself accompanies the executable.
5476     If distribution of executable or object code is made by offering
5477     access to copy from a designated place, then offering equivalent
5478     access to copy the source code from the same place counts as
5479     distribution of the source code, even though third parties are not
5480     compelled to copy the source along with the object code.
5482       4. You may not copy, modify, sublicense, or distribute the Program
5483     except as expressly provided under this License.  Any attempt
5484     otherwise to copy, modify, sublicense or distribute the Program is
5485     void, and will automatically terminate your rights under this License.
5486     However, parties who have received copies, or rights, from you under
5487     this License will not have their licenses terminated so long as such
5488     parties remain in full compliance.
5490       5. You are not required to accept this License, since you have not
5491     signed it.  However, nothing else grants you permission to modify or
5492     distribute the Program or its derivative works.  These actions are
5493     prohibited by law if you do not accept this License.  Therefore, by
5494     modifying or distributing the Program (or any work based on the
5495     Program), you indicate your acceptance of this License to do so, and
5496     all its terms and conditions for copying, distributing or modifying
5497     the Program or works based on it.
5499       6. Each time you redistribute the Program (or any work based on the
5500     Program), the recipient automatically receives a license from the
5501     original licensor to copy, distribute or modify the Program subject to
5502     these terms and conditions.  You may not impose any further
5503     restrictions on the recipients' exercise of the rights granted herein.
5504     You are not responsible for enforcing compliance by third parties to
5505     this License.
5507       7. If, as a consequence of a court judgment or allegation of patent
5508     infringement or for any other reason (not limited to patent issues),
5509     conditions are imposed on you (whether by court order, agreement or
5510     otherwise) that contradict the conditions of this License, they do not
5511     excuse you from the conditions of this License.  If you cannot
5512     distribute so as to satisfy simultaneously your obligations under this
5513     License and any other pertinent obligations, then as a consequence you
5514     may not distribute the Program at all.  For example, if a patent
5515     license would not permit royalty-free redistribution of the Program by
5516     all those who receive copies directly or indirectly through you, then
5517     the only way you could satisfy both it and this License would be to
5518     refrain entirely from distribution of the Program.
5520     If any portion of this section is held invalid or unenforceable under
5521     any particular circumstance, the balance of the section is intended to
5522     apply and the section as a whole is intended to apply in other
5523     circumstances.
5525     It is not the purpose of this section to induce you to infringe any
5526     patents or other property right claims or to contest validity of any
5527     such claims; this section has the sole purpose of protecting the
5528     integrity of the free software distribution system, which is
5529     implemented by public license practices.  Many people have made
5530     generous contributions to the wide range of software distributed
5531     through that system in reliance on consistent application of that
5532     system; it is up to the author/donor to decide if he or she is willing
5533     to distribute software through any other system and a licensee cannot
5534     impose that choice.
5536     This section is intended to make thoroughly clear what is believed to
5537     be a consequence of the rest of this License.
5539       8. If the distribution and/or use of the Program is restricted in
5540     certain countries either by patents or by copyrighted interfaces, the
5541     original copyright holder who places the Program under this License
5542     may add an explicit geographical distribution limitation excluding
5543     those countries, so that distribution is permitted only in or among
5544     countries not thus excluded.  In such case, this License incorporates
5545     the limitation as if written in the body of this License.
5547       9. The Free Software Foundation may publish revised and/or new versions
5548     of the General Public License from time to time.  Such new versions will
5549     be similar in spirit to the present version, but may differ in detail to
5550     address new problems or concerns.
5552     Each version is given a distinguishing version number.  If the Program
5553     specifies a version number of this License which applies to it and "any
5554     later version", you have the option of following the terms and conditions
5555     either of that version or of any later version published by the Free
5556     Software Foundation.  If the Program does not specify a version number of
5557     this License, you may choose any version ever published by the Free Software
5558     Foundation.
5560       10. If you wish to incorporate parts of the Program into other free
5561     programs whose distribution conditions are different, write to the author
5562     to ask for permission.  For software which is copyrighted by the Free
5563     Software Foundation, write to the Free Software Foundation; we sometimes
5564     make exceptions for this.  Our decision will be guided by the two goals
5565     of preserving the free status of all derivatives of our free software and
5566     of promoting the sharing and reuse of software generally.
5568                     NO WARRANTY
5570       11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
5571     FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
5572     OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
5573     PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
5574     OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
5575     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
5576     TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
5577     PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
5578     REPAIR OR CORRECTION.
5580       12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
5581     WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
5582     REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
5583     INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
5584     OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
5585     TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
5586     YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
5587     PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
5588     POSSIBILITY OF SUCH DAMAGES.
5590                  END OF TERMS AND CONDITIONS
5592             How to Apply These Terms to Your New Programs
5594       If you develop a new program, and you want it to be of the greatest
5595     possible use to the public, the best way to achieve this is to make it
5596     free software which everyone can redistribute and change under these terms.
5598       To do so, attach the following notices to the program.  It is safest
5599     to attach them to the start of each source file to most effectively
5600     convey the exclusion of warranty; and each file should have at least
5601     the "copyright" line and a pointer to where the full notice is found.
5603         <one line to give the program's name and a brief idea of what it does.>
5604         Copyright (C) <year>  <name of author>
5606         This program is free software; you can redistribute it and/or modify
5607         it under the terms of the GNU General Public License as published by
5608         the Free Software Foundation; either version 2 of the License, or
5609         (at your option) any later version.
5611         This program is distributed in the hope that it will be useful,
5612         but WITHOUT ANY WARRANTY; without even the implied warranty of
5613         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5614         GNU General Public License for more details.
5616         You should have received a copy of the GNU General Public License along
5617         with this program; if not, write to the Free Software Foundation, Inc.,
5618         51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
5621     Also add information on how to contact you by electronic and paper mail.
5623     If the program is interactive, make it output a short notice like this
5624     when it starts in an interactive mode:
5626         Gnomovision version 69, Copyright (C) year  name of author
5627         Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
5628         This is free software, and you are welcome to redistribute it
5629         under certain conditions; type `show c' for details.
5631     The hypothetical commands `show w' and `show c' should show the appropriate
5632     parts of the General Public License.  Of course, the commands you use may
5633     be called something other than `show w' and `show c'; they could even be
5634     mouse-clicks or menu items--whatever suits your program.
5636     You should also get your employer (if you work as a programmer) or your
5637     school, if any, to sign a "copyright disclaimer" for the program, if
5638     necessary.  Here is a sample; alter the names:
5640       Yoyodyne, Inc., hereby disclaims all copyright interest in the program
5641       `Gnomovision' (which makes passes at compilers) written by James Hacker.
5643       <signature of Ty Coon>, 1 April 1989
5644       Ty Coon, President of Vice
5646     This General Public License does not permit incorporating your program into
5647     proprietary programs.  If your program is a subroutine library, you may
5648     consider it more useful to permit linking proprietary applications with the
5649     library.  If this is what you want to do, use the GNU Library General
5650     Public License instead of this License.
5655 License for Scintilla and SciTE
5656 ===============================
5658 Copyright 1998-2003 by Neil Hodgson <neilh(at)scintilla(dot)org>
5660 All Rights Reserved
5662 Permission to use, copy, modify, and distribute this software and
5663 its documentation for any purpose and without fee is hereby granted,
5664 provided that the above copyright notice appear in all copies and
5665 that both that copyright notice and this permission notice appear in
5666 supporting documentation.
5668 NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
5669 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
5670 NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
5671 CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
5672 OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
5673 OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
5674 USE OR PERFORMANCE OF THIS SOFTWARE.