Add Folding section link to filetypes.common custom settings.
[geany-mirror.git] / doc / geany.txt
blobcd0f88d18d48c2be928e3793c56dafc555c31cd9
1 .. |(version)| replace:: 0.19
3 =======
4  Geany
5 =======
7 -------------------------
8  A fast, light, GTK+ IDE
9 -------------------------
11 :Authors: Enrico Tröger,
12           Nick Treleaven,
13           Frank Lanitz
14 :Date: $Date$
15 :Version: |(version)|
17 Copyright © 2005-2010
19 This document is distributed under the terms of the GNU General Public
20 License as published by the Free Software Foundation; either version 2
21 of the License, or (at your option) any later version. A copy of this
22 license can be found in the file COPYING included with the source code
23 of this program, and also in the chapter `GNU General Public License`_.
26 .. contents::
30 Introduction
31 ============
34 About Geany
35 -----------
37 Geany is a small and lightweight Integrated Development Environment. It
38 was developed to provide a small and fast IDE, which has only a few
39 dependencies on other packages. Another goal was to be as independent
40 as possible from a particular Desktop Environment like KDE or GNOME -
41 Geany only requires the GTK2 runtime libraries.
43 Some basic features of Geany:
45 * Syntax highlighting
46 * Code folding
47 * Autocompletion of symbols/words
48 * Construct completion/snippets
49 * Auto-closing of XML and HTML tags
50 * Calltips
51 * Many supported filetypes including C, Java, PHP, HTML, Python, Perl,
52   Pascal, and others
53 * Symbol lists
54 * Code navigation
55 * Build system to compile and execute your code
56 * Simple project management
57 * Plugin interface
61 Where to get it
62 ---------------
64 You can obtain Geany from http://www.geany.org/ or perhaps also from
65 your distribution. For a list of available packages, please see
66 http://www.geany.org/Download/ThirdPartyPackages.
70 License
71 -------
73 Geany is distributed under the terms of the GNU General Public License
74 as published by the Free Software Foundation; either version 2 of
75 the License, or (at your option) any later version. A copy of this
76 license can be found in the file COPYING included with the source
77 code of this program and in the chapter, `GNU General Public License`_.
79 The included Scintilla library (found in the subdirectory
80 ``scintilla/``) has its own license, which can be found in the chapter,
81 `License for Scintilla and SciTE`_.
85 About this document
86 -------------------
88 This documentation is available in HTML and text formats.
89 The latest version can always be found at http://www.geany.org/.
91 If you want to contribute to it, see `Contributing to this document`_.
96 Installation
97 ============
100 Requirements
101 ------------
103 You will need the GTK (>= 2.8.0) libraries and their dependencies
104 (Pango, GLib and ATK). Your distro should provide packages for these,
105 usually installed by default. For Windows, you can download an installer
106 from the website which bundles these libraries.
109 Binary packages
110 ---------------
112 There are many binary packages available. For an up-to-date but maybe
113 incomplete list see http://www.geany.org/Download/ThirdPartyPackages.
116 Source compilation
117 ------------------
119 Compiling Geany is quite easy.
120 To do so, you need the GTK (>= 2.8.0) libraries and header files.
121 You also need the Pango, GLib and ATK libraries and header files.
122 All these files are available at http://www.gtk.org, but very often
123 your distro will provide development packages to save the trouble of
124 building these yourself.
126 Furthermore you need, of course, a C and C++ compiler. The GNU versions
127 of these tools are recommended.
129 Autotools based build system
130 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
132 The Autotools based build system is very mature and has been well tested.
133 To use it, you just need the Make tool, preferably GNU Make.
135 Then run the following commands::
137     $ ./configure
138     $ make
140 Then as root::
142     % make install
144 Waf based build system
145 ^^^^^^^^^^^^^^^^^^^^^^
147 The Waf build system is still quite young and under heavy development but already in a
148 usable state. In contrast to the Autotools system, Waf needs Python. So before using Waf, you need
149 to install Python on your system.
150 The advantage of the Waf build system over the Autotools based build system is that the whole
151 build process might be a bit faster. Especially when you use the Waf
152 cache feature for repetitive builds (e.g. when changing only a few source files
153 to test something) will become much faster since Waf will cache and re-use the
154 unchanged built files and only compile the changed code again. See `Waf Cache`_ for details.
155 To build Geany with Waf as run::
157     $ ./waf configure
158     $ ./waf build
160 Then as root::
162     % ./waf install
164 Waf Cache
165 `````````
167 The Waf build system has a nice and interesting feature which can help  to avoid
168 a lot of unnecessary rebuilding of unchanged code. This often happens when developing new features
169 or trying to debug something in Geany.
170 Waf is able to store and retrieve the object files from a cache. This cache is declared
171 using the environment variable ``WAFCACHE``.
172 A possible location of the cache directory could be ``~/.cache/waf``. In order to make use of
173 this, you first need to create this directory::
175         $ mkdir -p ~/.cache/waf
177 then add the environment variable to your shell configuration (the following example is for
178 Bash and should be adjusted to your used shell)::
180         export WAFCACHE=/home/username/.cache/waf
182 Remember to replace ``username`` with your actual username.
184 More information about the Waf cache feature are available at
185 http://code.google.com/p/waf/wiki/CacheObjectFiles.
187 Cleaning the Cache
188 ******************
189 You should be careful about the size of the cache directory as it may
190 grow rapidly over time.
191 Waf doesn't do any cleaning or other house-keeping of the cache yet, so you need to keep it
192 clean by yourself.
193 An easy way to keep it clean is to run the following command regularly to remove old
194 cached files::
196     $ find /home/username/.cache/waf -mtime +14 -exec rm {} \;
198 This will delete all files in the cache directory which are older than 14 days.
200 For details about the ``find`` command and its options, check its manual page.
203 Custom installation
204 ^^^^^^^^^^^^^^^^^^^
205 The configure script supports several common options, for a detailed
206 list, type::
208     $ ./configure --help
210 or::
211         $ ./waf --help
213 (depending on which build system you use).
215 You may also want to read the INSTALL file for advanced installation
216 options.
218 * See also `Compile-time options`_.
220 Dynamic linking loader support and VTE
221 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
222 In the case that your system lacks dynamic linking loader support, you
223 probably want to pass the option ``--disable-vte`` to the ``configure``
224 script. This prevents compiling Geany with dynamic linking loader
225 support for automatically loading ``libvte.so.4`` if available.
227 Build problems
228 ^^^^^^^^^^^^^^
229 If there are any errors during compilation, check your build
230 environment and try to find the error, otherwise contact the mailing
231 list or one the authors. Sometimes you might need to ask for specific
232 help from your distribution.
235 Installation prefix
236 -------------------
237 If you want to edit any of Geany's system configuration files after
238 installation you will need to know the installation prefix.  Usually this
239 is not necessary as you can just use per user configuration files and
240 you will not need root permissions.
242 Use the ``--print-prefix`` option to Geany to check - see `Command line
243 options`_. The first path is the prefix.
245 This is commonly ``/usr`` if you installed from a binary package, or
246 ``/usr/local`` if you build from source.
250 Usage
251 =====
254 Getting started
255 ---------------
257 You can start Geany in the following ways:
259 * From the Desktop Environment menu:
261   Choose in your application menu of your used Desktop Environment:
262   Development --> Geany.
264 * From the command line:
266   To start Geany from a command line, type the following and press
267   Return::
269       % geany
271 The Geany workspace
272 -------------------
274 The Geany window is shown in the following figure:
276 .. image:: ./images/main_window.png
278 The workspace has the following parts:
280 * The menu.
281 * An optional toolbar.
282 * An optional sidebar that can show the following tabs:
284   * Documents - A document list, and
285   * Symbols - A list of symbols in your code.
287 * The main editor window.
288 * An optional message window which can show the following tabs:
290   * Status - A list of status messages.
291   * Compiler - The output of compiling or building programs.
292   * Messages - Results of 'Find Usage', 'Find Usage' 'Find in Files' and other actions
293   * Scribble - A text scratchpad for any use.
294   * Terminal - An optional terminal window.
296 * A status bar
298 Additional tabs may be added to the sidebar and message window by plugins.
300 The position of the tabs can be selected in the interface preferences.
302 The sizes of the sidebar and message window can be adjusted by
303 dragging the dividers.
305 Command line options
306 --------------------
308 ============  =======================  =================================================
309 Short option  Long option              Function
310 ============  =======================  =================================================
311 *none*        +number                  Set initial line number for the first opened file
312                                        (same as --line, do not put a space between the + sign
313                                        and the number). E.g. "geany +7 foo.bar" will open the
314                                        file foo.bar and place the cursor in line 7.
316 *none*        --column                 Set initial column number for the first opened file.
318 -c dir_name   --config=directory_name  Use an alternate configuration directory. The default
319                                        configuration directory is ``~/.config/geany/`` and that
320                                        is where ``geany.conf`` and other configuration files
321                                        reside.
323 *none*        --ft-names               Print a list of Geany's internal filetype names (useful
324                                        for snippets configuration).
326 -g            --generate-tags          Generate a global tags file (see
327                                        `Generating a global tags file`_).
329 -P            --no-preprocessing       Don't preprocess C/C++ files when generating tags.
331 -i            --new-instance           Do not open files in a running instance, force opening
332                                        a new instance. Only available if Geany was compiled
333                                        with support for Sockets.
335 -l            --line                   Set initial line number for the first opened file.
337 *none*        --list-documents         Return a list of open documents in a running Geany
338                                        instance.
339                                        This can be used to read the currently opened documents in
340                                        Geany from an external script or tool. The returned list
341                                        is separated by newlines (LF) and consists of the full,
342                                        UTF-8 encoded filenames of the documents.
343                                        Only available if Geany was compiled with support for
344                                        Sockets.
346 -m            --no-msgwin              Do not show the message window. Use this option if you
347                                        do not need compiler messages or VTE support.
349 -n            --no-ctags               Do not load symbol completion and call tip data. Use this
350                                        option if you do not want to use them.
352 -p            --no-plugins             Do not load plugins or plugin support.
354 *none*        --print-prefix           Print installation prefix, the data directory, the lib
355                                        directory and the locale directory (in this order) to
356                                        stdout, one line each. This is mainly intended for plugin
357                                        authors to detect installation paths.
359 -s            --no-session             Do not load the previous session's files.
361 -t            --no-terminal            Do not load terminal support. Use this option if you do
362                                        not want to load the virtual terminal emulator widget
363                                        at startup. If you do not have ``libvte.so.4`` installed,
364                                        then terminal-support is automatically disabled. Only
365                                        available if Geany was compiled with support for VTE.
367 *none*        --socket-file            Use this socket filename for communication with a
368                                        running Geany instance. This can be used with the following
369                                        command to execute Geany on the current workspace::
371                                          geany --socket-file=/tmp/geany-sock-$(xprop -root _NET_CURRENT_DESKTOP | awk '{print $3}')
373 *none*        --vte-lib                Specify explicitly the path including filename or only
374                                        the filename to the VTE library, e.g.
375                                        ``/usr/lib/libvte.so`` or ``libvte.so``. This option is
376                                        only needed when the auto-detection does not work. Only
377                                        available if Geany was compiled with support for VTE.
379 -v            --verbose                Be verbose (print useful status messages).
381 -V            --version                Show version information and exit.
383 -?            --help                   Show help information and exit.
385 *none*        [files ...]              Open all given files at startup. This option causes
386                                        Geany to ignore loading stored files from the last
387                                        session (if enabled).
388                                        Geany also recognizes line and column information when
389                                        appended to the filename with colons, e.g.
390                                        "geany foo.bar:10:5" will open the file foo.bar and
391                                        place the cursor in line 10 at column 5.
393                                        Projects can also be opened but a project file (\*.geany)
394                                        must be the first non-option argument. All additionally
395                                        given files are ignored.
396 ============  =======================  =================================================
398 You can also pass line number and column number information, e.g.::
400     geany some_file.foo:55:4
402 Geany supports all generic GTK options, a list is available on the
403 help screen.
407 General
408 -------
411 Startup
412 ^^^^^^^
414 At startup, Geany loads all files from the last time Geany was
415 launched. You can disable this feature in the preferences dialog
416 (see `General Startup preferences`_). If you specify some
417 files on the command line, only these files will be opened, but you
418 can find the files from the last session in the file menu under the
419 "Recent files" item. By default this contains the last 10 recently
420 opened files. You can change the number of recently opened files in
421 the preferences dialog.
423 You can start several instances of Geany, but only the first will
424 load files from the last session. To run a second instance of Geany,
425 do not specify any filenames on the command-line, or disable opening
426 files in a running instance using the appropriate command line option.
429 Opening files from the command-line in a running instance
430 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
432 Geany detects if there is an an instance of itself already running and opens files
433 from the command-line in that instance. So, Geany can
434 be used to view and edit files by opening them from other programs
435 such as a file manager.
437 You can also pass line number and column number information, e.g.::
439     geany some_file.foo:55:4
441 This would open the file ``some_file.foo`` with the cursor on line 55,
442 column 4.
444 If you do not like this for some reason, you can disable using the first
445 instance by using the appropriate command line option -- see the section
446 called `Command line options`_.
449 Virtual terminal emulator widget (VTE)
450 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
452 If you have installed ``libvte.so`` on your system, it is loaded
453 automatically by Geany, and you will have a terminal widget in the
454 notebook at the bottom.
456 If Geany cannot find any ``libvte.so`` at startup, the terminal widget
457 will not be loaded. So there is no need to install the package containing
458 this file in order to run Geany. Additionally, you can disable the use
459 of the terminal widget by command line option, for more information
460 see the section called `Command line options`_.
462 You can use this terminal (from now on called VTE) much as you would
463 a terminal program like xterm. There is basic clipboard support. You
464 can paste the contents of the clipboard by pressing the right mouse
465 button to open the popup menu, and choosing Paste. To copy text from
466 the VTE, just select the desired text and then press the right mouse
467 button and choose Copy from the popup menu. On systems running the
468 X Window System you can paste the last selected text by pressing the
469 middle mouse button in the VTE (on 2-button mice, the middle button
470 can often be simulated by pressing both mouse buttons together).
472 In the preferences dialog you can specify a shell which should be
473 started in the VTE. To make the specified shell a login shell just
474 use the appropriate command line options for the shell. These options
475 should be found in the manual page of the shell. For zsh and bash
476 you can use the argument ``--login``.
478 .. note::
479     Geany tries to load ``libvte.so``. If this fails, it tries to load
480     some other filenames. If this fails too, you should check whether you
481     installed libvte correctly. Again note, Geany will run without this
482     library.
484 It could be, that the library is called something else than
485 ``libvte.so`` (e.g. on FreeBSD 6.0 it is called ``libvte.so.8``). If so
486 please set a link to the correct file (as root)::
488     # ln -s /usr/lib/libvte.so.X /usr/lib/libvte.so
490 Obviously, you have to adjust the paths and set X to the number of your
491 ``libvte.so``.
493 You can also specify the filename of the VTE library to use on the command
494 line (see the section called `Command line options`_) or at compile time
495 by specifying the command line option ``--with-vte-module-path`` to
496 ./configure.
499 Defining own widget styles using .gtkrc-2.0
500 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
502 You can define your widget style for many of Geany's GUI parts. To
503 do this, just edit your ``.gtkrc-2.0`` (usually found in your home
504 directory on UNIX-like systems and in the etc subdirectory of your
505 Geany installation on Windows).
507 To have a defined style used by Geany you must assign it to
508 at least one of Geany's widgets. For example use the following line::
510     widget "Geany*" style "geanyStyle"
512 This would assign your style "geany_style" to all Geany
513 widgets. You can also assign styles only to specific widgets. At the
514 moment you can use the following widgets:
516 * GeanyMainWindow
517 * GeanyEditMenu
518 * GeanyToolbarMenu
519 * GeanyDialog
520 * GeanyDialogPrefs
521 * GeanyDialogProject
522 * GeanyDialogSearch
523 * GeanyMenubar
524 * GeanyToolbar
526 An example of a simple ``.gtkrc-2.0``::
528     style "geanyStyle"
529     {
530         font_name="Sans 12"
531     }
532     widget "GeanyMainWindow" style "geanyStyle"
534     style "geanyStyle"
535     {
536         font_name="Sans 10"
537     }
538     widget "GeanyPrefsDialog" style "geanyStyle"
541 Documents
542 ---------
544 Switching between documents
545 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
547 The documents list and the editor tabs are two different ways
548 to switch between documents using the mouse. When you hit the key
549 combination to move between tabs, the order is determined by the tab
550 order. Its is not alphabetical as shown in the documents list
551 (regardless of whether or not editor tabs are visible).
553 The tabs can be positioned at the top, bottom, left, or right of the
554 main editing window, by a selection in the interface preferences.
556 See the `Notebook tab keybindings`_ section for useful
557 shortcuts including for Most-Recently-Used document switching.
560 Character sets and Unicode Byte-Order-Mark (BOM)
561 ------------------------------------------------
564 Using character sets
565 ^^^^^^^^^^^^^^^^^^^^
567 Geany provides support for detecting and converting character sets. So
568 you can open and save files in different character sets, and even
569 convert a file from one character set to another. To do this,
570 Geany uses the character conversion capabilities of the GLib library.
572 Only text files are supported, i.e. opening files which contain
573 NULL-bytes may fail. Geany will try to open the file anyway but it is
574 likely that the file will be truncated because it can only be read up
575 to the first occurrence of a NULL-byte. All characters after this
576 position are lost and are not written when you save the file.
578 Geany tries to detect the encoding of a file while opening it, but
579 auto-detecting the encoding of a file is not easy and sometimes an
580 encoding might not be detected correctly. In this case you have to
581 set the encoding of the file manually in order to display it
582 correctly. You can this in the file open dialog by selecting an
583 encoding in the drop down box or by reloading the file with the
584 file menu item "Reload as". The auto-detection works well for most
585 encodings but there are also some encodings where it is known that
586 auto-detection has problems.
588 There are different ways to set different encodings in Geany:
590 * Using the file open dialog
592   This opens the file with the encoding specified in the encoding drop
593   down box. If the encoding is set to "Detect from file" auto-detection
594   will be used. If the encoding is set to "Without encoding (None)" the
595   file will be opened without any character conversion and Geany will
596   not try to auto-detect the encoding (see below for more information).
598 * Using the "Reload as" menu item
600   This item reloads the current file with the specified encoding. It can
601   help if you opened a file and found out that the wrong encoding was used.
603 * Using the "Set encoding" menu item
605   Contrary to the above two options, this will not change or reload
606   the current file unless you save it. It is useful when you want to
607   change the encoding of the file.
609 * Specifying the encoding in the file itself
611   As mentioned above, auto-detecting the encoding of a file may fail on
612   some encodings. If you know that Geany doesn't open a certain file,
613   you can add the specification line, described in the next section,
614   to the beginning of the file to force Geany to use a specific
615   encoding when opening the file.
618 In-file encoding specification
619 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
621 Geany detects meta tags of HTML files which contain charset information
622 like::
624     <meta http-equiv="content-type" content="text/html; charset=ISO-8859-15" />
626 and the specified charset is used when opening the file. This is useful if the
627 encoding of the file cannot be detected properly.
628 For non-HTML files you can also define a line like::
630     /* geany_encoding=ISO-8859-15 */
632 or::
634     # geany_encoding=ISO-8859-15 #
636 to force an encoding to be used. The #, /\* and \*/ are examples
637 of filetype-specific comment characters. It doesn't matter which
638 characters are around the string " geany_encoding=ISO-8859-15 " as long
639 as there is at least one whitespace character before and after this
640 string. Whitespace characters are in this case a space or tab character.
641 An example to use this could be you have a file with ISO-8859-15
642 encoding but Geany constantly detects the file encoding as ISO-8859-1.
643 Then you simply add such a line to the file and Geany will open it
644 correctly the next time.
646 Since Geany 0.15 you can also use lines which match the
647 regular expression used to find the encoding string:
648 ``coding[\t ]*[:=][\t ]*([a-z0-9-]+)[\t ]*``
650 .. note::
651     These specifications must be in the first 512 bytes of the file.
652     Anything after the first 512 bytes will not be recognized.
654 Some examples are::
656     # encoding = ISO-8859-15
658 or::
660     # coding: ISO-8859-15
662 Special encoding "None"
663 ^^^^^^^^^^^^^^^^^^^^^^^
665 There is a special encoding "None" which uses no
666 encoding. It is useful when you know that Geany cannot auto-detect
667 the encoding of a file and it is not displayed correctly. Especially
668 when the file contains NULL-bytes this can be useful to skip auto
669 detection and open the file properly at least until the occurrence
670 of the first NULL-byte. Using this encoding opens the file as it is
671 without any character conversion.
674 Unicode Byte-Order-Mark (BOM)
675 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
677 Furthermore, Geany detects a Unicode Byte Order Mark (see
678 http://en.wikipedia.org/wiki/Byte_Order_Mark for details). Of course,
679 this feature is only available if the opened file is in a Unicode
680 encoding. The Byte Order Mark helps to detect the encoding of a file,
681 e.g. whether it is UTF-16LE or UTF-16BE and so on. On Unix-like systems
682 using a Byte Order Mark could cause some problems for programs not
683 expecting it, e.g. the compiler gcc stops
684 with stray errors, PHP does not parse a script containing a BOM and
685 script files starting with a she-bang maybe cannot be started. In the
686 status bar you can easily see whether the file starts with a BOM or
687 not.
689 If you want to set a BOM for a file or if you want to remove it
690 from a file, just use the document menu and toggle the checkbox.
692 .. note::
693     If you are unsure what a BOM is or if you do not understand where
694     to use it, then it is probably not important for you and you can
695     safely ignore it.
699 Editing
700 -------
703 Folding
704 ^^^^^^^
706 Geany provides basic code folding support. Folding means the ability to
707 show and hide parts of the text in the current file. You can hide
708 unimportant code sections and concentrate on the parts you are working on
709 and later you can show hidden sections again. In the editor window there is
710 a small grey margin on the left side with [+] and [-] symbols which
711 show hidden parts and hide parts of the file respectively. By
712 clicking on these icons you can simply show and hide sections which are
713 marked by vertical lines within this margin. For many filetypes nested
714 folding is supported, so there may be several fold points within other
715 fold points.
717 .. note::
718     You can customize the folding icon and line styles - see the
719     filetypes.common `Folding Settings`_.
721 If you don't like it or don't need it at all, you can simply disable
722 folding support completely in the preferences dialog.
724 The folding behaviour can be changed with the "Fold/Unfold all children of
725 a fold point" option in the preference dialog. If activated, Geany will
726 unfold all nested fold points below the current one if they are already
727 folded (when clicking on a [+] symbol).
728 When clicking on a [-] symbol, Geany will fold all nested fold points
729 below the current one if they are unfolded.
731 This option can be inverted by pressing the Shift
732 key while clicking on a fold symbol. That means, if the "Fold/Unfold all
733 children of a fold point" option is enabled, pressing Shift will disable
734 it for this click and vice versa.
737 Column mode editing (rectangular selections)
738 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
740 There is basic support for column mode editing. To use it, create a
741 rectangular selection by holding down the Control and Shift keys
742 (or Control and Alt if it doesn't work) while
743 selecting some text. It is also possible to create a zero-column selection.
744 Once a rectangular selection exists you can start editing the text within
745 this selection and the modifications will be done for every line in the
746 selection.
749 Drag and drop of text
750 ^^^^^^^^^^^^^^^^^^^^^
752 If you drag selected text in the editor widget of Geany the text is
753 moved to the position where the mouse pointer is when releasing the
754 mouse button. Holding Control when releasing the mouse button will
755 copy the text instead. This behaviour was changed in Geany 0.11 -
756 before the selected text was copied to the new position.
759 Indentation
760 ^^^^^^^^^^^
762 Geany allows each document to indent either with a tab character or
763 multiple spaces. The default indent mode is set in the `Editor Features
764 preferences`_ (see the link for more information). But
765 this can be overridden using either the *Document->Indent Type* menu,
766 or by using the *Detect from file* indentation preference. When enabled,
767 this scans each file that is opened and sets the indent mode based on
768 how many lines start with a tab vs. 2 or more spaces.
770 The indent mode for the current document is shown on the status bar
771 as follows:
774     Indent with Tab characters.
776     Indent with spaces.
778     Indent with tabs and spaces, depending on how much indentation is
779     on a line.
782 Auto-indentation
783 ^^^^^^^^^^^^^^^^
785 When enabled, auto-indentation happens when pressing *Enter* in the
786 Editor. It adds a certain amount of indentation to the new line so the
787 user doesn't always have to indent each line manually.
789 Geany has four types of auto-indentation:
791 None
792     Disables auto-indentation completely.
793 Basic
794     Adds the same amount of whitespace on a new line as on the last line.
795 Current chars
796     Does the same as *Basic* but also indents a new line after an opening
797     brace '{', and de-indents when typing a closing brace '}'. For Python,
798     a new line will be indented after typing ':' at the end of the
799     previous line.
800 Match braces
801     Similar to *Current chars* but the closing brace will be aligned to
802     match the indentation of the line with the opening brace.
805 Bookmarks
806 ^^^^^^^^^
808 Geany provides a handy bookmarking feature that lets you mark one
809 or more lines in a document, and return the cursor to them using a
810 key combination.
812 To place a mark on a line, either left-mouse-click in the left margin
813 of the editor window, or else use Ctrl-m. This will
814 produce a small green plus symbol in the margin. You can have as many
815 marks in a document as you like. Click again (or use Ctrl-m again)
816 to remove the bookmark. To remove all the marks in a given document,
817 use "Remove Markers" in the Document menu.
819 To navigate down your document, jumping from one mark to the next,
820 use Ctrl-. (control period). To go in the opposite direction on
821 the page, use Ctrl-, (control comma). Using the bookmarking feature
822 together with the commands to switch from one editor tab to another
823 (Ctrl-PgUp/PgDn and Ctrl-Tab) provides a particularly fast way to
824 navigate around multiple files.
827 Code navigation history
828 ^^^^^^^^^^^^^^^^^^^^^^^
830 To ease navigation in source files and especially between
831 different files, Geany lets you jump between different navigation
832 points. Currently, this works for the following:
834 * `Go to tag declaration`_
835 * `Go to tag definition`_
836 * Symbol list items
837 * Build errors
838 * Message items
840 When using one of these actions, Geany remembers your current position
841 and jumps to the new one. If you decide to go back to your previous
842 position in the file, just use "Navigate back a location". To
843 get back to the new position again, just use "Navigate forward a
844 location". This makes it easier to navigate in e.g.  foreign code
845 and between different files.
848 Sending text through custom commands
849 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
851 You can define several custom commands in Geany and send the current
852 selection to one of these commands using the "Edit->Format->Send
853 Selection to" menu or keybindings.
854 The output of the command will be
855 used to replace the current selection. This makes it possible to use text
856 formatting tools with Geany in a general way. The selected text will
857 be sent to the standard input of the executed command, so the command
858 should be able to read from it and it should print all results to its
859 standard output which will be read by Geany. To help finding errors
860 in executing the command, the output of the program's standard error
861 will be printed on Geany's standard output.
863 To add a custom command, just go to the Set Custom Commands dialog
864 in the Format sub menu of the Edit and Popup menu. Then click on Add
865 to get a new text entry and type the command. You can also specify
866 some command line options. To delete a command, just clear the text
867 entry and press OK. It will be deleted automatically.
870 Context actions
871 ^^^^^^^^^^^^^^^
873 You can execute the context action command on the current word at the
874 cursor position or the available selection.  This word or selection
875 can be used as an argument to the command.
876 The context action is invoked by a menu entry in the popup menu of the
877 editor and also a keyboard shortcut (see the section called
878 `Keybindings`_).
880 The command can be specified in the preferences dialog and also for
881 each filetype (see "context_action_cmd" in the section called
882 `Format`_). When the context action is invoked, the filetype
883 specific command is used if available, otherwise the command
884 specified in the preferences dialog is executed.
886 The current word or selection can be referred with the wildcard "%s"
887 in the command, it will be replaced by the current word or
888 selection before the command is executed.
890 For example a context action can be used to open API documentation
891 in a browser window, the command to open the PHP API documentation
892 would be::
894     firefox "http://www.php.net/%s"
896 when executing the command, the %s is substituted by the word near
897 the cursor position or by the current selection. If the cursor is at
898 the word "echo", a browser window will open(assumed your browser is
899 called firefox) and it will open the address: http://www.php.net/echo.
902 Autocompletion
903 ^^^^^^^^^^^^^^
905 Geany can offer a list of possible completions for symbols defined in the
906 tags and for all words in a document.
908 The autocompletion list for symbols is presented when the first few
909 characters of the symbol are typed (configurable, see `Editor Completions
910 preferences`_, default 4) or when the *Complete word*
911 keybinding is pressed (configurable, see `Editor keybindings`_,
912 default Ctrl-Space).
914 When the defined keybinding is typed and the *Autocomplete all words in
915 document* preference (in `Editor Completions preferences`_)
916 is selected then the autocompletion list will show all matching words
917 in the document, if there are no matching symbols.
919 If you don't want to use autocompletion it can be dismissed until
920 the next symbol by pressing Escape. The autocompletion list is updated
921 as more characters are typed so that it only shows completions that start
922 with the characters typed so far. If no symbols begin with the sequence,
923 the autocompletion window is closed.
925 The up and down arrows will move the selected item. The highlighted
926 item on the autocompletion list can be chosen from the list by pressing
927 Enter/Return. You can also double-click to select an item. The sequence
928 will be completed to match the chosen item, and if the *Drop rest of
929 word on completion* preference is set (in `Editor Completions
930 preferences`_) then any characters after the cursor that match
931 a symbol or word are deleted.
933 Word part completion
934 ````````````````````
935 By default, pressing Tab will complete the selected item by word part;
936 useful e.g. for adding the prefix ``gtk_combo_box_entry_`` without typing it
937 manually:
939 * gtk_com<TAB>
940 * gtk_combo_<TAB>
941 * gtk_combo_box_<e><TAB>
942 * gtk_combo_box_entry_<s><ENTER>
943 * gtk_combo_box_entry_set_text_column
945 The key combination can be changed from Tab - See `Editor keybindings`_.
946 If you clear/change the key combination for word part completion, Tab
947 will complete the whole word instead, like Enter.
949 Scope autocompletion
950 ````````````````````
951 E.g.::
953     struct
954     {
955         int i;
956         char c;
957     } foo;
959 When you type ``foo.`` it will show an autocompletion list with 'i' and
960 'c' symbols.
962 It only works for languages that set parent scope names for e.g. struct
963 members. Currently this means C-like languages. The C tag parser only
964 parses global scopes, so this won't work for structs or objects declared
965 in local scope.
968 User-definable snippets
969 ^^^^^^^^^^^^^^^^^^^^^^^
971 Snippets are small strings or code constructs which can be replaced or
972 completed to a more complex string. So you can save a lot of time when
973 typing common strings and letting Geany do the work for you.
974 To know what to complete or replace Geany reads a configuration file
975 called ``snippets.conf`` at startup.
977 Maybe you need to often type your name, so define a snippet like this::
979     [Default]
980     myname=Enrico Tröger
982 Every time you write ``myname`` <TAB> in Geany, it will replace "myname"
983 with "Enrico Tröger". The key to start autocompletion can be changed
984 in the preferences dialog, by default it is TAB. The corresponding keybinding
985 is called ``Complete snippet``.
987 The system-wide configuration file can be found in
988 ``$prefix/share/geany``, where ``$prefix`` is the path where Geany is
989 installed (see `Installation prefix`_). It is not recommended to edit the
990 system-wide file, because it will be overridden when Geany is updated.
992 To change the settings, copy the file from ``$prefix/share/geany``
993 in your configuration directory (usually ``~/.config/geany/``).
995 For example::
997     % cp /usr/local/share/geany/snippets.conf /home/username/.config/geany/
999 Then you can edit the file and the changes will remain available
1000 after an update of Geany because the file resides in your
1001 configuration directory. Alternatively, you can create a file
1002 ``~/.config/geany/snippets.conf`` and add only these settings you want
1003 to change. All missing settings will be read from the global snippets
1004 file in ``$prefix/share/geany``.
1006 The file ``snippets.conf`` contains sections defining snippets that
1007 are available for particular filetypes and in general.
1009 The two sections "Default" and "Special" apply to all filetypes.
1010 "Default" contains all snippets which are available for every
1011 filetype and "Special" contains snippets which can only be used in
1012 other snippets. So you can define often used parts of snippets and
1013 just use the special snippet as a placeholder (see the
1014 ``snippets.conf`` for details).
1016 You can define sections with the name of a filetype eg "C++".  The
1017 snippets in that section are only available for use in files with that
1018 filetype.  Snippets in filetype sections will hide snippets with the
1019 same name in the "Default" section when used in a file of that
1020 filetype.
1022 To define snippets you can use several special character sequences which
1023 will be replaced when using the snippet:
1025 **Substitution Sequences for snippets**
1027 ================  =========================================================
1028 \\n or %newline%  Insert a new line (it will be replaced by the used EOL
1029                   char(s): LF, CR/LF, or CR).
1031 \\t or %ws%       Insert an indentation step, it will be replaced according
1032                   to the current document's indent mode.
1034 \\s               \\s to force whitespace at beginning or end of a value
1035                   ('key= value' won't work, use 'key=\\svalue')
1037 %cursor%          Place the cursor at this position after completion has
1038                   been done. You can define multiple %cursor% wildcards
1039                   and use the keybinding ``Move cursor in snippet`` to jump
1040                   to the next defined cursor position in the completed
1041                   snippet.
1043 %...%             "..." means the name of a key in the "Special" section.
1044                   If you have defined a key "brace_open" in the "Special"
1045                   section you can use %brace_open% in any other snippet.
1046 ================  =========================================================
1048 Snippet names must not contain spaces otherwise they won't
1049 work correctly. But beside that you can define almost any
1050 string as a snippet and use it later in Geany. It is not limited
1051 to existing contructs of certain programming languages(like ``if``,
1052 ``for``, ``switch``). Define whatever you need.
1054 Since Geany 0.15 you can also use most of the available templates wildcards
1055 listed in `Template wildcards`_. All wildcards which are listed as
1056 `available in snippets` can be used. For instance to improve the above example::
1058     [Default]
1059     myname=My name is {developer}
1060     mysystem=My system: {command:uname -a}
1062 this will replace ``myname`` with "My name is " and the value of the template
1063 preference ``developer``.
1065 You can change the way Geany recognizes the word to complete,
1066 that is how the start and end of a word is recognised when the
1067 snippet completion is requested. The section "Special" may
1068 contain a key "wordchars" which lists all characters a string may contain
1069 to be recognized as a word for completion. Leave it commented to use
1070 default characters or define it to add or remove characters to fit your
1071 needs.
1074 Inserting Unicode characters
1075 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1077 With GTK 2.10 and above, you can insert Unicode code points by hitting
1078 Ctrl-Shift-u, then still holding Ctrl-Shift, type some hex digits representing
1079 the code point for the character you want and hit Enter or Return (still
1080 holding Ctrl-Shift). If you release Ctrl-Shift before hitting Enter or Return
1081 (or any other character), the code insertion is completed, but the typed
1082 character is also entered.  In the case of Enter/Return, it is a newline, as
1083 you might expect.
1086 In some earlier versions of Geany, you might need to first unbind Ctrl-Shift-u
1087 in the `keybinding preferences`_, then select *Tools->Reload Configuration*
1088 or restart Geany. Note that it works slightly differently from other GTK
1089 applications, in that you'll need to continue to hold down the Ctrl and Shift
1090 keys while typing the code point hex digits (and the Enter or Return to finish the code point).
1092 For GTK < 2.10, it is also possible, but typing the first Ctrl-Shift-u
1093 is not necessary. One problem is that you may find the alphabetic
1094 keys conflict with other Geany keybindings.
1098 Search, replace and go to
1099 -------------------------
1101 This section describes search-related commands from the Search menu
1102 and the editor window's popup menu:
1104 * Find
1105 * Find usage \*
1106 * Find in files
1107 * Replace
1108 * Go to tag definition \*
1109 * Go to tag declaration \*
1110 * Go to line
1112 \* These items are available from the editor window's popup menu, or by
1113 using a keyboard shortcut (see `Search keybindings`_).
1115 Toolbar entries
1116 ^^^^^^^^^^^^^^^
1117 There are also two toolbar entries:
1119 * Search bar
1120 * Go to line entry
1122 There are keybindings to focus each of these - see `Focus
1123 keybindings`_. Pressing Escape will then focus the editor.
1125 Search bar
1126 ``````````
1127 The quickest way to find some text is to use the search bar entry in
1128 the toolbar. This performs a case-insensitive search in the current
1129 document whilst you type. Pressing Enter will search again.
1131 Find
1132 ^^^^
1134 The Find dialog is used for finding text in one or more open documents.
1136 .. image:: ./images/find_dialog.png
1139 Matching options
1140 ````````````````
1142 The syntax for the *Use regular expressions* option is shown in
1143 `Regular expressions`_.
1145 .. note::
1146     *Use escape sequences* is implied for regular expressions.
1148 The *Use escape sequences* option will transform any escaped characters
1149 into their UTF-8 equivalent. For example, \\t will be transformed into
1150 a tab character. Other recognized symbols are: \\\\, \\n, \\r, \\uXXXX
1151 (Unicode characters).
1154 Find all
1155 ````````
1157 To find all matches, click on the Find All expander. This will reveal
1158 several options:
1160 * In Document
1161 * In Session
1162 * Mark
1164 Find All In Document will show a list of matching lines in the
1165 current document in the Messages tab of the Message Window. *Find All
1166 In Session* does the same for all open documents.
1168 Mark will highlight all matches in the current document with a
1169 colored box. These markers can be removed by selecting the
1170 Remove Markers command from the Document menu.
1173 Change font in search dialog text fields
1174 ````````````````````````````````````````
1176 All search related dialogs use a Monospace for the text input fields to
1177 increase the readability of input text. This is useful when you are
1178 typing input such as regular expressions with spaces, periods and commas which
1179 might it hard to read with a proportional font.
1181 If you want to change the font, you can do this easily
1182 by inserting the following style into your ``.gtkrc-2.0``
1183 (usually found in your home directory on UNIX-like systems and in the
1184 etc subdirectory of your Geany installation on Windows)::
1186     style "search_style"
1187     {
1188         font_name="Monospace 8"
1189     }
1190     widget "GeanyDialogSearch.*.GtkEntry" style:highest "search_style"
1192 Please note the addition of ":highest" in the last line which sets the priority
1193 of this style to the highest available. Otherwise, the style is ignored
1194 for the search dialogs.
1197 Find usage
1198 ^^^^^^^^^^
1200 Find usage searches all open files. It is similar to the Find All In
1201 Session option in the Find dialog.
1203 If there is a selection, then it is used as the search text; otherwise
1204 the current word is used. The current word is either taken from the
1205 word nearest the edit cursor, or the word underneath the popup menu
1206 click position when the popup menu is used. The search results are
1207 shown in the Messages tab of the Message Window.
1210 Find in files
1211 ^^^^^^^^^^^^^
1213 Find in files is a more powerful version of Find usage that searches
1214 all files in a certain directory using the Grep tool. The Grep tool
1215 must be correctly set in Preferences to the path of the system's Grep
1216 utility. GNU Grep is recommended.
1218 .. image:: ./images/find_in_files_dialog.png
1221 The Encoding combo box can be used to define the encoding of the files
1222 to be searched. The entered search text is converted to the chosen encoding
1223 and the search results are converted back to UTF-8.
1224 The Extra options field is used to pass any additional arguments to
1225 the grep tool.
1228 Filtering out version control files
1229 ```````````````````````````````````
1231 When using the *Recurse in subfolders* option with a directory that's
1232 under version control, you can set the *Extra options* field to use
1233 grep's ``--exclude`` flag to filter out filenames.
1235 SVN Example: ``--exclude=*.svn-base``
1237 The --exclude argument only matches the file name part, not the path. If
1238 you have GNU Grep >= 2.5.2 you can use the ``--exclude-dir`` argument to
1239 filter out CVS and hidden directories like ``.svn``.
1241 Example: ``--exclude-dir=.* --exclude-dir=CVS``
1244 Replace
1245 ^^^^^^^
1247 The Replace dialog is used for replacing text in one or more open
1248 documents.
1250 .. image:: ./images/replace_dialog.png
1252 The Replace dialog has the same options for matching text as the Find
1253 dialog. See the section `Matching options`_.
1255 The *Use regular expressions* option allows regular expressions to
1256 be used in the search string and back references in the replacement
1257 text -- see the entry for '\\n' in `Regular expressions`_.
1259 Replace all
1260 ```````````
1262 To replace several matches, click on the *Replace All* expander. This
1263 will reveal several options:
1265 * In Document
1266 * In Session
1267 * In Selection
1269 *Replace All In Document* will replace all matching text in the
1270 current document. *Replace All In Session* does the same for all open
1271 documents. *Replace All In Selection* will replace all matching text
1272 in the current selection of the current document.
1275 Go to tag definition
1276 ^^^^^^^^^^^^^^^^^^^^
1278 If the current word is the name of a tag definition (like a function
1279 body) and the file containing the tag definition is open, this command
1280 will switch to that file and go to the corresponding line number. The
1281 current word is either the word nearest the edit cursor,
1282 or the word underneath the popup menu click position when the popup
1283 menu is used.
1286 Go to tag declaration
1287 ^^^^^^^^^^^^^^^^^^^^^
1289 Like Go to tag definition, but for a forward declaration such as a
1290 function prototype or ``extern`` declaration instead of a function
1291 body.
1294 Go to line
1295 ^^^^^^^^^^
1297 Go to a particular line number in the current file.
1300 Regular expressions
1301 ^^^^^^^^^^^^^^^^^^^
1303 You can use regular expressions in the Find and Replace dialogs
1304 by selecting the *Use regular expressions* check box (see `Matching
1305 options`_). The syntax is POSIX compatible, as described in the table
1306 below.
1308 .. note::
1309     1. The *Use escape sequences* dialog option always applies for regular
1310        expressions.
1311     2. Searching backwards with regular expressions is not supported.
1312     3. \\b, \\d, \\s, \\w are GNU extensions and may not be available
1313        on non-GNU POSIX systems unless you built Geany with the
1314        ``--enable-gnu-regex`` option (this is always used on Windows).
1316 **In a regular expression, the following characters are interpreted:**
1318 ======= ============================================================
1319 .       Matches any character.
1321 (       This marks the start of a region for tagging a match.
1323 )       This marks the end of a tagged region.
1325 \\n     Where n is 1 through 9 refers to the first through ninth tagged
1326         region when searching or replacing.
1328         Searching for (Wiki)\\1 matches WikiWiki.
1330         If the search string was Fred([1-9])XXX and the
1331         replace string was Sam\\1YYY, when applied to Fred2XXX this
1332         would generate Sam2YYY.
1334 \\0     When replacing, the whole matching text.
1336 \\b     This matches a word boundary.
1338 \\c     A backslash followed by d, D, s, S, w or W, becomes a
1339         character class (both inside and outside sets []).
1341         * d: decimal digits
1342         * D: any char except decimal digits
1343         * s: whitespace (space, \\t \\n \\r \\f \\v)
1344         * S: any char except whitespace (see above)
1345         * w: alphanumeric & underscore
1346         * W: any char except alphanumeric & underscore
1348 \\x     This allows you to use a character x that would otherwise have
1349         a special meaning. For example, \\[ would be interpreted as [
1350         and not as the start of a character set. Use \\\\ for a literal
1351         backslash.
1353 [...]   Matches one of the characters in the set. If the first
1354         character in the set is ^, it matches the characters NOT in
1355         the set, i.e. complements the set. A shorthand S-E (start
1356         dash end) is used to specify a set of characters S up to E,
1357         inclusive.
1359         The special characters ] and - have no special
1360         meaning if they appear first in the set. - can also be last
1361         in the set. To include both, put ] first: []A-Z-].
1363         Examples::
1365         []|-]    matches these 3 chars
1366         []-|]    matches from ] to | chars
1367         [a-z]    any lowercase alpha
1368         [^]-]    any char except - and ]
1369         [^A-Z]   any char except uppercase alpha
1370         [a-zA-Z] any alpha
1372 ^       This matches the start of a line (unless used inside a set, see
1373         above).
1375 $       This matches the end of a line.
1377 \*      This matches 0 or more times. For example, Sa*m matches Sm, Sam,
1378         Saam, Saaam and so on.
1380 \+      This matches 1 or more times. For example, Sa+m matches Sam,
1381         Saam, Saaam and so on.
1383 \?      This matches 0 or 1 time(s). For example, Joh?n matches John, Jon.
1384 ======= ============================================================
1386 .. note::
1387     This table is adapted from Scintilla and SciTE documentation,
1388     distributed under the `License for Scintilla and SciTE`_.
1392 Tags
1393 ----
1395 Tags are information that relates symbols in a program with the
1396 source file location of the declaration and definition.
1398 Geany has built-in functionality for generating tag information (aka
1399 "workspace tags") for supported filetypes when you open a file.  You
1400 can also have Geany automatically load external tag files (aka "global
1401 tags files") upon startup, or manually using *Tools --> Load Tags*.
1403 Geany uses its own tag file format, similar to what ``ctags`` uses
1404 (but is incompatible with ctags). You use Geany to generate global
1405 tags files, as described below.
1408 Workspace tags
1409 ^^^^^^^^^^^^^^
1411 Tags for each document are parsed whenever a file is loaded or
1412 saved. These are shown in the Symbol list in the Sidebar. These tags
1413 are also used for autocompletion of symbols and calltips for all documents
1414 open in the current session that have the same filetype.
1416 The *Go to Tag* commands can be used with all workspace tags. See
1417 `Go to tag definition`_.
1420 Global tags
1421 ^^^^^^^^^^^
1423 Global tags are used to provide autocompletion of symbols and calltips
1424 without having to open the corresponding source files. This is intended
1425 for library APIs, as the tags file only has to be updated when you upgrade
1426 the library.
1428 You can load a custom global tags file in two ways:
1430 * Using the *Load Tags* command in the Tools menu.
1431 * By creating a directory ``~/.config/geany/tags``, and moving or symlinking
1432   the tags files there before starting Geany.
1433 * By creating a directory ``$prefix/share/geany/tags``, and moving
1434   or symlinking the tags files there before starting Geany.
1435   ``$prefix`` is the installation prefix (see `Installation prefix`_).
1437 You can either download these files or generate your own. They have
1438 the format::
1440     name.lang_ext.tags
1442 *lang_ext* is one of the extensions set for the filetype associated
1443 with the tags. See the section called `Filetype extensions`_ for
1444 more information.
1447 Default global tags files
1448 `````````````````````````
1450 For some languages, a list of global tags is loaded when the
1451 corresponding filetype is first used. Currently these are for:
1453 * C -- GTK+ and GLib
1454 * Pascal
1455 * PHP
1456 * HTML -- &symbol; completion, e.g. for ampersand, copyright, etc.
1457 * LaTeX
1458 * Python
1461 Global tags file format
1462 ```````````````````````
1464 Global tags files can have two different formats:
1466 * Tagmanager format
1467 * Pipe-separated format
1469 The first line of global tags files should be a comment, introduced
1470 by ``#`` followed by a space and a string like ``format=pipe``
1471 or ``format=tagmanager`` respectively, these are case-sensitive.
1472 This helps Geany to read the file properly. If this line
1473 is missing, Geany tries to auto-detect the used format but this
1474 might fail.
1477 The Tagmanager format is a bit more complex and is used for files
1478 created by the ``geany -g`` command. There is one tag per line.
1479 Different tag attributes like the return value or the argument list
1480 are separated with different characters indicating the type of the
1481 following argument.
1483 The Pipe-separated format is easier to read and write.
1484 There is one tag per line and different tag attributes are separated
1485 by the pipe character (``|``). A line looks like::
1487     basename|string|(string path [, string suffix])|
1489 | The first field is the tag name (usually a function name).
1490 | The second field is the type of the return value.
1491 | The third field is the argument list for this tag.
1492 | The fourth field is the description for this tag but
1493   currently unused and should be left empty.
1495 Except for the first field (tag name), all other field can be left
1496 empty but the pipe separator must appear for them.
1498 You can easily write your own global tag files using this format.
1499 Just save them in your tags directory, as described earlier in the
1500 section `Global tags`_.
1503 Generating a global tags file
1504 `````````````````````````````
1506 You can generate your own global tags files by parsing a list of
1507 source files. The command is::
1509     geany -g [-P] <Tag File> <File list>
1511 * Tag File filename should be in the format described earlier --
1512   see the section called `Global tags`_.
1513 * File list is a list of filenames, each with a full path (unless
1514   you are generating C/C++ tags and have set the CFLAGS environment
1515   variable appropriately).
1516 * ``-P`` or ``--no-preprocessing`` disables using the C pre-processor
1517   to process ``#include`` directives for C/C++ source files. Use this
1518   option if you want to specify each source file on the command-line
1519   instead of using a 'master' header file. Also can be useful if you
1520   don't want to specify the CFLAGS environment variable.
1522 Example for the wxD library for the D programming language::
1524     geany -g wxd.d.tags /home/username/wxd/wx/*.d
1527 *Generating C/C++ tag files:*
1529 For C/C++ tag files, gcc and grep are required, so that header files
1530 can be preprocessed to include any other headers they depend upon.
1532 For C/C++ files, the environment variable CFLAGS should be set with
1533 appropriate ``-I/path`` include paths. The following example works with
1534 the bash shell, generating tags for the GnomeUI library::
1536     CFLAGS=`pkg-config --cflags libgnomeui-2.0` geany -g gnomeui.c.tags \
1537     /usr/include/libgnomeui-2.0/gnome.h
1539 You can adapt this command to use CFLAGS and header files appropriate
1540 for whichever libraries you want.
1543 *Replacing the default C/C++ tags file:*
1545 Geany currently uses a default global tags file c99.tags for
1546 C and C++, commonly installed in /usr/share/geany. This file can
1547 be replaced with one containing tags parsed from a different set
1548 of header files. When Geany is next started, your custom tags file
1549 will be loaded instead of the default c99.tags. You should keep a
1550 copy of the generated tags file because it will get overwritten when
1551 upgrading Geany.
1554 Ignore tags
1555 ^^^^^^^^^^^
1557 You can also ignore certain tags if they would lead to wrong parsing of
1558 the code. Simply create a file called "ignore.tags" in your Geany
1559 configuration directory (usually ``~/.config/geany/``). Then list all tags
1560 you want to ignore in this file, separated by spaces and/or newlines.
1562 More detailed information about the usage from the Exuberant Ctags
1563 manual page::
1565     Specifies a list of identifiers which are to be specially handled
1566     while  parsing C and C++ source files. This option is specifically
1567     provided to handle special cases arising through the use of
1568     pre-processor macros. When the identifiers listed are simple identifiers,
1569     these identifiers will be ignored during parsing of the source files.
1570     If an identifier is suffixed with a '+' character, ctags will also
1571     ignore any parenthesis-enclosed argument list which may immediately
1572     follow the identifier in the source files.
1573     If two identifiers are separated with the '=' character, the first
1574     identifiers is replaced by the second identifiers for parsing purposes.
1576 For even more detailed information please read the manual page of
1577 Exuberant Ctags.
1580 Preferences
1581 -----------
1583 You may adjust Geany's settings using the Edit --> Preferences
1584 dialog. Any changes you make there can be applied by hitting either
1585 the Apply or the OK button. These settings will persist between Geany
1586 sessions. Note that most settings here have descriptive popup bubble
1587 help -- just hover the mouse over the item in question to get help
1588 on it.
1590 You may also adjust some View settings (under the View menu) that
1591 persist between Geany sessions. The settings under the Document menu,
1592 however, are only for the current document and revert to defaults
1593 when restarting Geany.
1595 There are also some rarer `Hidden preferences`_.
1597 .. note::
1598     In the paragraphs that follow, the text describing a dialog tab
1599     comes after the screenshot of that tab.
1602 General Startup preferences
1603 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
1605 .. image:: ./images/pref_dialog_gen_startup.png
1607 Startup
1608 ```````
1610 Load files from the last session
1611     On startup, load the same files you had open the last time you
1612     used Geany.
1614 Load virtual terminal support
1615     Load the library for running a terminal in the message window area.
1617 Enable plugin support
1618     Allow plugins to be used in Geany.
1620 Shutdown
1621 ````````
1622 Save window position and geometry
1623     Save the current position and size of the main window so next time
1624     you open Geany it's in the same location.
1626 Confirm Exit
1627     Have a dialog pop up to confirm that you really want to quit Geany.
1629 Paths
1630 `````
1632 Startup path
1633     Path to start in when opening or saving files.
1634     It must be an absolute path.
1635     Leave it blank to use the current working directory.
1637 Project files
1638     Path to start in when opening project files.
1640 Extra plugin path
1641         By default Geany looks in the global installation path and in the
1642         configuration directory. In addition the path entered here will be searched
1643         for plugins. Usually you do not need to set an additional path to search for
1644         plugins. It might be useful when Geany is installed on a multi-user machine
1645         and additional plugins are available in a common location for all users.
1646         Leave blank to not set an additional lookup path.
1649 General Miscellaneous preferences
1650 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1652 .. image:: ./images/pref_dialog_gen_misc.png
1654 Miscellaneous
1655 `````````````
1657 Beep on errors when compilation has finished
1658     Have the computer make a beeping sound when compilation of your program
1659     has completed or any errors occurred.
1661 Switch status message list at new message
1662     Switch to the status message tab (in the notebook window at the bottom)
1663     once a new status message arrives.
1665 Suppress status messages in the status bar
1666     Remove all messages from the status bar. The messages are still displayed
1667     in the status messages window.
1669     .. tip::
1670         Another option is to use the *Switch to Editor* keybinding - it
1671         reshows the document statistics on the status bar. See `Focus
1672         keybindings`_.
1674 Auto-focus widgets (focus follows mouse)
1675     Give the focus automatically to widgets below the mouse cursor.
1676     This works for the main editor widget, the scribble, the toolbar search field
1677     goto line fields and the VTE.
1679 Search
1680 ``````
1682 Always wrap search and hide the Find dialog
1683     Always wrap search around the document and hide the Find dialog after clicking
1684     Find Next/Previous.
1686 Use the current word under the cursor for Find dialogs
1687     Use current word under the cursor when opening the Find, Find in Files or Replace dialog and
1688     there is no selection. When this option is disabled, the search term last used in the
1689     appropriate Find dialog is used.
1691 Use the current file's directory for Find in Files
1692     When opening the Find in Files dialog, set the directory to search to the directory of the current
1693     active file. When this option is disabled, the directory of the last use of the Find in Files
1694     dialog is used.
1696 Projects
1697 ````````
1699 Use project-based session files
1700     Save your current session when closing projects. You will be able to
1701     resume different project sessions, automatically opening the files
1702     you had open previously.
1704 Store project file inside the project base directory
1705     When creating new projects, the default path for the project file contains
1706     the project base path. Without this option enabled, the default project file
1707     path is one level above the project base path.
1708     In either case, you can easily set the final project file path in the
1709     *New Project* dialog. This option provides the more common
1710     defaults automatically for convenience.
1713 Interface preferences
1714 ^^^^^^^^^^^^^^^^^^^^^
1716 .. image:: ./images/pref_dialog_interface.png
1718 Sidebar
1719 ```````
1721 Show sidebar
1722     Whether to show the sidebar at all.
1724 Show symbol list
1725     Show the list of functions, variables, and other information in the
1726     current document you are editing.
1728 Show documents list
1729     Show all the documents you have open currently. This can be used to
1730     change between documents (see `Switching between documents`_) and
1731     to perform some common operations such as saving, closing and reloading.
1733 Position
1734     Whether to place the sidebar on the left or right of the editor window.
1736 Fonts
1737 `````
1739 Editor
1740     Change the font used to display documents.
1742 Symbol list
1743     Change the font used for the Symbols sidebar tab.
1745 Message window
1746     Change the font used for the message window area.
1748 Editor tabs
1749 ```````````
1751 Show editor tabs
1752     Show a notebook tab for all documents so you can switch between them
1753     using the mouse (instead of using the Documents window).
1755 Show close buttons
1756     Make each tab show a close button so you can easily close open
1757     documents.
1759 Placement of new file tabs
1760     Whether to create a document with its notebook tab to the left or
1761     right of all existing tabs.
1763 Double-clicking hides all additional widgets
1764     Whether to call the View->Toggle All Additional Widgets command
1765     when double-clicking on a notebook tab.
1767 Tab positions
1768 `````````````
1770 Editor
1771     Set the positioning of the editor's notebook tabs to the right,
1772     left, top, or bottom of the editing window.
1774 Sidebar
1775     Set the positioning of the sidebar's notebook tabs to the right,
1776     left, top, or bottom of the sidebar window.
1778 Message window
1779     Set the positioning of the message window's notebook tabs to the
1780     right, left, top, or bottom of the message window.
1782 Miscellaneous
1783 `````````````
1785 Show status bar
1786     Show the status bar at the bottom of the main window. It gives information about
1787     the file you are editing like the line and column you are on, whether any
1788     modifications were done, the file encoding, the filetype and other information.
1791 Toolbar preferences
1792 ^^^^^^^^^^^^^^^^^^^
1794 Affects the main toolbar underneath the menu bar.
1796 .. image:: ./images/pref_dialog_toolbar.png
1798 Toolbar
1799 ```````
1801 Show Toolbar
1802     Whether to show the toolbar.
1804 Append Toolbar to the Menu
1805     Allows to append the toolbar to the main menu bar instead of placing it below.
1806     This is useful to save vertical space.
1808 Customize Toolbar
1809     See `Customizing the toolbar`_.
1811 Appearance
1812 ``````````
1814 Icon Style
1815     Select the toolbar icon style to use - either icons and text, just
1816     icons or just text.
1817     The choice System default uses whatever icon style is set by GTK.
1819 Icon size
1820     Select the size of the icons you see (large, small or very small).
1821     The choice System default uses whatever icon size is set by GTK.
1824 Editor Features preferences
1825 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
1827 .. image:: ./images/pref_dialog_edit_features.png
1829 Features
1830 ````````
1832 Line wrapping
1833     Show long lines wrapped around to new display lines.
1835 Enable "smart" home key
1836     Whether to move the cursor to the first non-whitespace character
1837     on the line when you hit the home key on your keyboard. Pressing it
1838     again will go to the very start of the line.
1840 Disable Drag and Drop
1841     Do not allow the dragging and dropping of selected text in documents.
1843 Enable folding
1844     Allow groups of lines in a document to be collapsed for easier
1845     navigation/editing.
1847 Fold/Unfold all children of a fold point
1848     Whether to fold/unfold all child fold points when a parent line
1849     is folded.
1851 Use indicators to show compile errors
1852     Underline lines with compile errors using red squiggles to indicate
1853     them in the editor area.
1855 Newline strip trailing spaces
1856     Remove any white space at the end of the line when you hit the
1857     Enter/Return key.
1859 Line breaking column
1860     The editor column number to insert a newline at when Line Breaking
1861     is enabled for the current document.
1863 Comment toggle marker
1864     A string which is added when toggling a line comment in a source file.
1865     It is used to mark the comment as toggled.
1868 Editor Indentation preferences
1869 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1871 .. image:: ./images/pref_dialog_edit_indentation.png
1873 Indentation group
1874 `````````````````
1876 See `Indentation`_ for more information.
1878 Type
1879     When Geany inserts indentation, whether to use:
1881     * Just Tabs
1882     * Just Spaces
1883     * Tabs and Spaces, depending on how much indentation is on a line
1885     The *Tabs and Spaces* indent type is also known as *Soft tab
1886     support* in some other editors.
1888 Width
1889     The width of a single indent size in spaces. By default the indent
1890     size is equivalent to 4 spaces.
1892 Hard tab width
1893     When the *Tabs and Spaces* indent type is enabled, this is the
1894     display size of a tab. Otherwise this is ignored. Although
1895     configurable, this should usually be set to 8.
1897 Detect from file
1898     Try to detect and set the indent type based on file content, when
1899     a file is opened.
1901 Auto-indent mode
1902     The type of auto-indentation you wish to use after pressing Enter,
1903     if any.
1905     Basic
1906         Just add the indentation of the previous line.
1907     Current chars
1908         Add indentation based on the current filetype and any characters at
1909         the end of the line such as ``{``, ``}`` for C, ``:`` for Python.
1910     Match braces
1911         Like *Current chars* but for C-like languages, make a closing
1912         ``}`` brace line up with the matching opening brace.
1914 Tab key indents
1915     If set, pressing tab will indent the current line or selection, and
1916     unindent when pressing Shift-tab. Otherwise, the tab key will
1917     insert a tab character into the document (which can be different
1918     from indentation, depending on the indent type).
1920     .. note::
1921         There are also separate configurable keybindings for indent &
1922         unindent, but this preference allows the tab key to have different
1923         meanings in different contexts - e.g. for snippet completion.
1925 Editor Completions preferences
1926 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1928 .. image:: ./images/pref_dialog_edit_completions.png
1930 Completions
1931 ```````````
1933 Snippet Completion
1934     Whether to replace special keywords after typing Tab into a
1935     pre-defined text snippet.
1936     See `User-definable snippets`_.
1938 XML tag autocompletion
1939     When you open an XML tag automatically generate its completion tag.
1941 Automatic continuation multi-line comments
1942     Continue automatically multi-line comments in languages like C, C++
1943     and Java when a new line is entered inside such a comment.
1944     With this option enabled, Geany will insert a ``*`` on every new line
1945     inside a multi-line comment, for example when you press return in the
1946     following C code::
1948      /*
1949       * This is a C multi-line comment, press <Return>
1951     then Geany would insert::
1953       *
1955     on the next line with the correct indentation based on the previous line,
1956     as long as the multi-line is not closed by ``*/``.
1958 Autocomplete symbols
1959     When you start to type a symbol name, look for the full string to
1960     allow it to be completed for you.
1962 Autocomplete all words in document
1963     When you start to type a word, Geany will search the whole document for
1964     words starting with the typed part to complete it, assuming there
1965     are no tag names to show.
1967 Drop rest of word on completion
1968     Remove any word part to the right of the cursor when choosing a
1969     completion list item.
1971 Characters to type for autocompletion
1972     Number of characters of a word to type before autocompletion is
1973     displayed.
1975 Completion list height
1976     The number of rows to display for the autocompletion window.
1978 Max. symbol name suggestions
1979     The maximum number of items in the autocompletion list.
1982 Auto-close quotes and brackets
1983 ``````````````````````````````
1985 Geany can automatically insert a closing bracket and quote characters when
1986 you open them. For instance, you type a ``(`` and Geany will automatically
1987 insert ``)``. With the following options, you can define for which
1988 characters this should work.
1990 Parenthesis ( )
1991     Auto-close parenthesis when typing an opening one
1993 Curly brackets { }
1994     Auto-close curly brackets (braces) when typing an opening one
1996 Square brackets [ ]
1997     Auto-close square brackets when typing an opening one
1999 Single quotes ' '
2000     Auto-close single quotes when typing an opening one
2002 Double quotes " "
2003     Auto-close double quotes when typing an opening one
2006 Editor Display preferences
2007 ^^^^^^^^^^^^^^^^^^^^^^^^^^
2009 This is for visual elements displayed in the editor window.
2011 .. image:: ./images/pref_dialog_edit_display.png
2013 Display
2014 ```````
2016 Invert syntax highlighting colors
2017     Invert all colors, by default this makes white text on a black
2018     background.
2020 Show indendation guides
2021     Show vertical lines to help show how much leading indentation there
2022     is on each line.
2024 Show whitespaces
2025     Mark all tabs with an arrow "-->" symbol and spaces with dots to
2026     show which kinds of whitespace are used.
2028 Show line endings
2029     Display a symbol everywhere that a carriage return or line feed
2030     is present.
2032 Show line numbers
2033     Show or hide the Line Number margin.
2035 Show markers margin
2036     Show or hide the small margin right of the line numbers, which is used
2037     to mark lines.
2039 Stop scrolling at last line
2040     When enabled Geany stops scrolling when at the last line of the document.
2041     Otherwise you can scroll one more page even if there are no real lines.
2044 Long line marker
2045 ````````````````
2047 The long line marker helps to indicate overly-long lines, or as a hint
2048 to the user for when to break the line.
2050 Type
2051     Line
2052         Show a thin vertical line in the editor window at the given column
2053         position.
2054     Background
2055         Change the background color of characters after the given column
2056         position to the color set below. (This is recommended over the
2057         *Line* setting if you use proportional fonts).
2058     Disabled
2059         Don't mark long lines at all.
2061 Long line marker
2062     Set this value to a value greater than zero to specify the column
2063     where it should appear.
2065 Long line marker color
2066     Set the color of the long line marker.
2069 Virtual spaces
2070 ``````````````
2072 Virtual space is space beyond the end of each line.
2073 The cursor may be moved into virtual space but no real space will be
2074 added to the document until there is some text typed or some other
2075 text insertion command is used.
2077 Disabled
2078     Do not show virtual spaces
2080 Only for rectangular selections
2081     Only show virtual spaces beyond the end of lines when drawing a rectangular selection
2083 Always
2084     Always show virtual spaces beyond the end of lines
2087 Files preferences
2088 ^^^^^^^^^^^^^^^^^
2090 .. image:: ./images/pref_dialog_files.png
2092 New files
2093 `````````
2095 Open new documents from the command-line
2096     Whether to create new documents when passing filenames that don't
2097     exist from the command-line.
2099 Default encoding (new files)
2100     The type of file encoding you wish to use when creating files.
2102 Used fixed encoding when opening files
2103     Assume all files you are opening are using the type of encoding specified below.
2105 Default encoding (existing files)
2106     Opens all files with the specified encoding instead of auto-detecting it.
2107     Use this option when it's not possible for Geany to detect the exact encoding.
2109 Default end of line characters
2110     The end of line characters to which should be used for new files.
2111     On Windows systems, you generally want to use CR/LF which are the common
2112     characters to mark line breaks.
2113     On Unix-like systems, LF is default and CR is used on MAC systems.
2115 Saving files
2116 ````````````
2117 Perform formatting operations when a document is saved. These
2118 can each be undone with the Undo command.
2120 Ensure newline at file end
2121     Add a newline at the end of the document if one is missing.
2123 Strip trailing spaces
2124     Remove the trailing spaces on each line of the document.
2126 Replace tabs by space
2127     Replace all tabs in the document with the equivalent number of spaces.
2129     .. note::
2130         It is better to use spaces to indent than use this preference - see
2131         `Indentation`_.
2133 Miscellaneous
2134 `````````````
2136 Recent files list length
2137     The number of files to remember in the recently used files list.
2139 Disk check timeout
2140     The number of seconds to periodically check the current document's
2141     file on disk in case it has changed. Setting it to 0 will disable
2142     this feature.
2144     .. note::
2145         These checks are only performed on local files. Remote files are
2146         not checked for changes due to performance issues
2147         (remote files are files in ``~/.gvfs/``).
2150 Tools preferences
2151 ^^^^^^^^^^^^^^^^^
2153 .. image:: ./images/pref_dialog_tools.png
2155 Tool paths
2156 ``````````
2158 Terminal
2159     The location of your terminal executable.
2161 Browser
2162     The location of your web browser executable.
2164 Grep
2165     The location of the grep executable.
2167 .. note::
2168     For Windows users: at the time of writing it is recommended to use
2169     the grep.exe from the UnxUtils project
2170     (http://sourceforge.net/projects/unxutils). The grep.exe from the
2171     Mingw project for instance might not work with Geany at the moment.
2173 Commands
2174 ````````
2176 Context action
2177     Set this to a command to execute on the current word.
2178     You can use the "%s" wildcard to pass the current word below the cursor
2179     to the specified command.
2182 Template preferences
2183 ^^^^^^^^^^^^^^^^^^^^
2185 This data is used as meta data for various template text to insert into
2186 a document, such as the file header. You only need to set fields that
2187 you want to use in your template files.
2189 .. note::
2190     For changes made here to take effect, either selecting
2191     *Tools->Reload Configuration* or restarting Geany is required.
2193 .. image:: ./images/pref_dialog_templ.png
2195 Template data
2196 `````````````
2198 Developer
2199     The name of the developer who will be creating files.
2201 Initials
2202     The initials of the developer.
2204 Mail address
2205     The email address of the developer.
2207     .. note::
2208         You may wish to add anti-spam markup, e.g. ``name<at>site<dot>ext``.
2210 Company
2211     The company the developer is working for.
2213 Initial version
2214     The initial version of files you will be creating.
2216 Year
2217     Specify a format for the the {year} wildcard. You can use any conversion specifiers
2218     which can be used with the ANSI C strftime function.  For details please see
2219     http://man.cx/strftime.
2221 Date
2222     Specify a format for the the {date} wildcard. You can use any conversion specifiers
2223     which can be used with the ANSI C strftime function.  For details please see
2224     http://man.cx/strftime.
2226 Date & Time
2227     Specify a format for the the {datetime} wildcard. You can use any conversion specifiers
2228     which can be used with the ANSI C strftime function.  For details please see
2229     http://man.cx/strftime.
2232 Keybinding preferences
2233 ^^^^^^^^^^^^^^^^^^^^^^
2235 .. image:: ./images/pref_dialog_keys.png
2237 There are some commands listed in the keybinding dialog that are not, by default,
2238 bound to a key combination, and may not be available as a menu item.
2240 .. note::
2241     For more information see the section `Keybindings`_.
2244 Printing preferences
2245 ^^^^^^^^^^^^^^^^^^^^
2247 .. image:: ./images/pref_dialog_printing.png
2249 Use external command for printing
2250     Use a system command to print your file out.
2252 Use native GTK printing
2253     Let the GTK GUI toolkit handle your print request.
2255 Print line numbers
2256     Print the line numbers on the left of your paper.
2258 Print page number
2259     Print the page number on the bottom right of your paper.
2261 Print page header
2262     Print a header on every page that is sent to the printer.
2264 Use base name of the printed file
2265     Don't use the entire path for the header, only the filename.
2267 Date format
2268     How the date should be printed. You can use the same format
2269     specifiers as in the ANSI C function strftime(). For details please
2270     see http://man.cx/strftime.
2273 Terminal (VTE) preferences
2274 ^^^^^^^^^^^^^^^^^^^^^^^^^^
2276 See also: `Virtual terminal emulator widget (VTE)`_.
2278 .. image:: ./images/pref_dialog_vte.png
2280 Terminal widget
2281 ```````````````
2283 Terminal font
2284     Select the font that will be used in the terminal emulation control.
2286 Foreground color
2287     Select the font color.
2289 Background color
2290     Select the background color of the terminal.
2292 Scrollback lines
2293     The number of lines buffered so that you can scroll though the history.
2295 Shell
2296     The location of the shell on your system.
2298 Scroll on keystroke
2299     Scroll the terminal to the prompt line when pressing a key.
2301 Scroll on output
2302     Scroll the output down.
2304 Cursor blinks
2305     Let the terminal cursor blink.
2307 Override Geany keybindings
2308     Allow the VTE to receive keyboard shortcuts (apart from focus commands).
2310 Disable menu shortcut key (F10 by default)
2311     Disable the menu shortcut when you are in the virtual terminal.
2313 Follow path of the current file
2314     Make the path of the terminal change according to the path of the
2315     current file.
2317 Execute programs in VTE
2318     Execute programs in the virtual terminal instead of using the external
2319     terminal tool.  Note that if you run multiple execute commands at once
2320     the output may become mixed together in the VTE.
2322 Don't use run script
2323     Don't use the simple run script which is usually used to display
2324     the exit status of the executed program.
2325     This can be useful if you already have a program running in the VTE
2326     like a Python console (e.g. ipython). Use this with care.
2329 Project Management
2330 ------------------
2332 Project Management is optional in Geany. Currently it can be used for:
2334 * Storing and opening session files on a project basis.
2335 * Configuring the Build menu on a project basis.
2337 A list of session files can be stored and opened with the project
2338 when the *Use project-based session files* preference is enabled,
2339 in the *Project* group of the `Preferences`_ dialog.
2341 As long as a project is open, the Build menu will use
2342 the items defined in project's settings, instead of the defaults.
2343 See `Build Menu Configuration`_ for information on configuring the menu.
2345 The current project's settings are saved when it is closed, or when
2346 Geany is shutdown. When restarting Geany, the previously opened project
2347 file that was in use at the end of the last session will be reopened.
2349 The project menu items are detailed below.
2352 New Project
2353 ^^^^^^^^^^^
2355 To create a new project, fill in the *Name* field. By default this
2356 will setup a new project file ``~/projects/name.geany``. Usually it's
2357 best to store all your project files in the same directory (they are
2358 independent of any source directory trees).
2360 The Base path text field is setup to use ``~/projects/name``. This
2361 can safely be set to any existing path -- it will not touch the file
2362 structure contained in it.
2365 Project Properties
2366 ^^^^^^^^^^^^^^^^^^
2368 You can set an optional description for the project, but it is not
2369 used elsewhere by Geany.
2371 The *Base path* field is used as the directory to run the Build menu commands.
2372 The specified path can be an absolute path or it is considered to be
2373 relative to the project's file name.
2376 Set Base Path Button
2377 ````````````````````
2379 This button is a convenience to set the working directory fields
2380 in the non-filetype Build menu items to %p to use the project base path.
2382 .. note::
2383     Pressing the 'set' button will overright any working directories
2384     you have configured for the project.
2387 Open Project
2388 ^^^^^^^^^^^^
2390 The Open command displays a standard file chooser, starting in
2391 ``~/projects``. Choose a project file named with the ``.geany``
2392 extension.
2394 When project session support is enabled, Geany will close the currently
2395 open files and open the session files associated with the project.
2398 Close Project
2399 ^^^^^^^^^^^^^
2401 Project file settings are saved when the project is closed.
2403 When project session support is enabled, Geany will close the project
2404 session files and open any previously closed default session files.
2407 Build Menu
2408 ----------
2409 After editing code with Geany, the next step is to compile, link, build,
2410 interpret, run etc.  As Geany supports many languages each with a different
2411 approach to such operations, and as there are also many language independant
2412 software building systems, Geany does not have a built in build system, nor
2413 does it limit which system you can use.  Instead the build menu provides
2414 a configurable and flexible means of running any external commands to
2415 execute your preferred build system.
2417 This section provides a description of the default configuration of the
2418 build menu and then covers how to configure it, and where the defaults fit in.
2420 Running the commands from within Geany has two benefits:
2422 * the current file is automatically saved before the command is run
2423 * the output is captured in the Compiler notebook tab and parsed for
2424   warnings or errors
2426 Warnings and errors that can be parsed for line numbers will be shown in
2427 red in the Compiler tab and you can click on them to switch to the relevant
2428 source file (or open it) and mark the line number.  Also lines with
2429 warnings or errors are marked in the source, see `Indicators`_ below.
2431 .. tip::
2432     If Geany's default error message parsing does not parse errors for
2433     the tool you're using, you can set a custom regex in the Build Commands
2434     Dialog, see `Build Menu Configuration`_
2436 Indicators
2437 ^^^^^^^^^^
2439 Indicators are red squiggly underlines which are used to highlight
2440 errors which occurred while compiling the current file. So you can
2441 easily see where your code failed to compile. To remove the indicators,
2442 just select "Remove all indicators" in the document file menu.
2444 If you do not like this feature, you can disable it in the preferences
2445 dialog.
2448 Default Build Menu Items
2449 ^^^^^^^^^^^^^^^^^^^^^^^^
2450 Depending on the current file's filetype, the default Build menu will contain
2451 the following items:
2453 * Compile
2454 * Build
2455 * Make All
2456 * Make Custom Target
2457 * Make Object
2458 * Next Error
2459 * Previous Error
2460 * Execute
2461 * Set Build Menu Commands
2464 Compile
2465 ```````
2467 The Compile command has different uses for different kinds of files.
2469 For compilable languages such as C and C++, the Compile command is
2470 set up to compile the current source file into a binary object file.
2472 Java source files will be compiled to class file bytecode.
2474 Interpreted languages such as Perl, Python, Ruby will compile to
2475 bytecode if the language supports it, or will run a syntax check,
2476 or if that is not available will run the file in its language interpreter.
2479 Build
2480 `````
2482 For compilable languages such as C and C++, the Build command will link
2483 the current source file's equivalent object file into an executable. If
2484 the object file does not exist, the source will be compiled and linked
2485 in one step, producing just the executable binary.
2487 Interpreted languages do not use the Build command.
2490 Make
2491 ````
2493 This runs "make" in the same directory as the
2494 current file.
2496 Make custom target
2497 ``````````````````
2499 This is similar to running 'Make' but you will be prompted for
2500 the make target name to be passed to the Make tool. For example,
2501 typing 'clean' in the dialog prompt will run "make clean".
2504 Make object
2505 ```````````
2507 Make object will run "make current_file.o" in the same directory as
2508 the current file, using the filename for 'current_file'. It is useful
2509 for building just the current file without building the whole project.
2511 Next Error
2512 ``````````
2514 The next error item will move to the next detected error in the file.
2516 Previous Error
2517 ``````````````
2518 The previous error item will move to the previous detected error in the file.
2520 Execute
2521 ```````
2523 Execute will run the corresponding executable file, shell script or
2524 interpreted script in a terminal window. Note that the Terminal tool
2525 path must be correctly set in the Tools tab of the Preferences dialog -
2526 you can use any terminal program that runs a Bourne compatible shell
2527 and accept the "-e" command line argument to start a command or can be
2528 selected to us the build-in VTE if it is available, see
2529 `Virtual terminal emulator widget (VTE)`_.
2531 After your program or script has finished executing, you will be
2532 prompted to press the return key. This allows you to review any text
2533 output from the program before the terminal window is closed.
2535 The execute command output is not parsed for errors.
2538 Stopping running processes
2539 ``````````````````````````
2541 When there is a running program, the Execute menu item in the menu and
2542 the Run button in the toolbar
2543 becomes a stop button and you can stop the current running program. This
2544 works by sending a signal to the process (and its child process(es))
2545 to stop the process. The signal used is SIGQUIT.
2547 Depending on the process you started it is possible that the process
2548 cannot be stopped. For example this can happen when the process creates
2549 more than one child process.
2552 Terminal emulators
2553 ******************
2555 Xterm is known to work properly. If you are using "Terminal"
2556 (the terminal program of Xfce), you should add the command line
2557 option ``--disable-server`` otherwise the started process cannot be
2558 stopped. Just add this option in the preferences dialog on the Tools
2559 tab in the terminal field.
2562 Set Build Commands
2563 ``````````````````
2565 By default the Compile and Build commands invoke the GCC compiler and
2566 linker with only the basic arguments needed by all programs. Using
2567 Set Build Commands you can add any include paths and compile
2568 flags for the compiler, any library names and paths for the linker,
2569 and any arguments you want to use when running Execute.
2571 For details of configuration see `Build Menu Configuration`_ below.
2573 .. note::
2574     If you need complex settings for your build system, or several
2575     different settings, then writing a Makefile and using the Make
2576     commands is recommended; this will also make it easier for users to
2577     build your software.
2579 These settings are saved automatically when Geany is shut down.
2581 Build Menu Configuration
2582 ^^^^^^^^^^^^^^^^^^^^^^^^
2584 The build menu has considerable flexibility and configurability, allowing
2585 both menu labels the commands they execute and the directory they execute
2586 in to be configured.
2588 For example, if you change one of the default make commands to run say 'waf'
2589 you can also change the label to match.
2591 Underlines in the labels set mnemonic characters.
2593 The build menu is divided into four groups of items each with different
2594 behaviors:
2596 * file items - are configurable and depend on the filetype of the current
2597   document, put the output in the compiler tab and parse it for errors
2598 * non-file items - are configurable and mostly don't depend on the filetype
2599   of the current document, put the output in the compiler tab and parse
2600   it for errors
2601 * execute items - are configurable and intended for executing your
2602   program or other long running programs.  The output is not parsed for errors
2603   and is directed to the terminal selected in preferences.
2604 * fixed items - are not configurable because they perform the Geany built in actions,
2605   go to the next error, go to the previous error and show the build menu
2606   commands dialog
2608 The maximum numbers of items in each of the configurable groups can be
2609 configured when Geany starts using hidden settings(see `Preferences File Format`_).
2610 Even though the maximum number of items may have been increased, only
2611 those menu items that have values configured are shown in the menu.
2613 The groups of menu items obtain their configuration from four potential
2614 sources.  The highest pririty source that has the menu item defined will
2615 be used. The sources in decreasing priority are:
2617 * a project file if open
2618 * the user preferences
2619 * the system filetype definitions
2620 * the defaults
2622 The detailed relationships between sources and the configurable menu item groups
2623 is shown in the following table.
2625 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
2626 | Group        | Project File        | Preferences              | System Filetype   |  Defaults                     |
2627 +==============+=====================+==========================+===================+===============================+
2628 | Filetype     | Loads From: project | Loads From:              | Loads From:       | None                          |
2629 |              | file                | filetype.xxx file in     | filetype.xxx in   |                               |
2630 |              |                     | ~/.config/geany/filedefs | Geany install     |                               |
2631 |              | Saves To: project   |                          |                   |                               |
2632 |              | file                | Saves to: as above,      | Saves to: as user |                               |
2633 |              |                     | creating if needed.      | preferences left. |                               |
2634 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
2635 | Non-Filetype | Loads From: project | Loads From:              | Loads From:       | 1:                            |
2636 |              | file                | geany.conf file in       | filetype.xxx in   |   Label: _Make                |
2637 |              |                     | ~/.config/geany          | Geany install     |   Command: make               |
2638 |              | Saves To: project   |                          |                   |                               |
2639 |              | file                | Saves to: as above,      | Saves to: as user | 2:                            |
2640 |              |                     | creating if needed.      | preferences left. |    Label: Make Custom _Target |
2641 |              |                     |                          |                   |    Command: make              |
2642 |              |                     |                          |                   |                               |
2643 |              |                     |                          |                   | 3:                            |
2644 |              |                     |                          |                   |    Label: Make _Object        |
2645 |              |                     |                          |                   |    Command: make %e.o         |
2646 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
2647 | Execute      | Loads From: project | Loads From:              | Loads From:       | Label: _Execute Command: ./%e |
2648 |              | file or else        | geany.conf file in       | filetype.xxx in   |                               |
2649 |              | filetype defined in | ~/.config/geany or else  | Geany install     |                               |
2650 |              | project file        | filetype.xxx file in     |                   |                               |
2651 |              |                     | ~/.config/geany/filedefs | Saves To: as user |                               |
2652 |              | Saves To:           |                          | preferences left  |                               |
2653 |              | project file        | Saves To:                |                   |                               |
2654 |              |                     | filetype.xxx file in     |                   |                               |
2655 |              |                     | ~/.config/geany/filedefs |                   |                               |
2656 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
2658 The following notes on the table reference cells by coordinate as (group,source):
2660 * General - for filetype.xxx substitute the filetype name of the
2661   current document for xxx.
2663 * System Filetypes - Labels loaded from these sources are locale sensitive
2664   and can contain translations.
2666 * (Filetype, Project File) and (Filetype, Preferences) - preferences use a full
2667   filetype file so that users can configure all other filetype preferences
2668   as well.  Projects can only configure menu items per filetype.  Saving
2669   in the project file means that there is only one file per project not
2670   a whole directory.
2672 * (Non-Filetype, System Filetype) - although conceptually strange, defining
2673   non-filetype commands in a filetype file, this provides the ability to
2674   define filetype dependent default menu items.
2676 * (Execute, Project File) and (Execute, Preferences) - the project filetype based execute
2677   configuration and preferences non-filetype based execute can only be set by hand editing the
2678   appropriate file, see `Preferences File Format`_ and `Project File Format`_.
2680 Build Menu Commands Dialog
2681 ^^^^^^^^^^^^^^^^^^^^^^^^^^
2683 Most of the configuration of the build menu is done through the Build Menu
2684 Commands Dialog.  You edit the configuration sourced from preferences in the
2685 dialog opened from the Build->Build Menu Commands item and you edit the
2686 configuration from the project in the build tab of the project preferences
2687 dialog.  Both use the same form shown below.
2689 .. image:: ./images/build_menu_commands_dialog.png
2691 The dialog is divided into three sections:
2693 * Filetype menu items which will be selected based on the filetype of the
2694   currently open document,
2696 * Non-filetype menu items, and
2698 * Execute menu items.
2700 The filetype and non-filetype sections also contains a field for the regular
2701 expression used for parsing command output for error and warning messages.
2703 The columns in the first three sections allow setting of the label, command,
2704 and working directory to run the command in.
2706 An item with an empty label will not be shown in the menu.
2708 An empty working directory will default to the directory of the current document.
2709 If there is no current document then the command will not run.
2711 The dialog will always show the command selected by priority, not just the
2712 commands configured in this configuration source. This ensures that you always
2713 see what the menu item is going to do if activated.
2715 If the current source of the menu item is higher priority than the
2716 configuration source you are editing then the command will be shown
2717 in the dialog but will be insensitive (greyed out).  This can't happen
2718 with the project source but can with the preferences source dialog.
2720 The clear buttons remove the definition from the configuration source you are editing.
2721 When you do this the command from the next lower priority source will be shown.
2722 To hide lower priority menu items without having anything show in the menu
2723 configure with a nothing in the label but at least one character in the command.
2725 Substitutions in Commands and Working Directories
2726 `````````````````````````````````````````````````
2728 The first occurance of each of the following character sequences in each of the
2729 command and working directory fields is substituted by the items specified below
2730 before the command is run.
2732 * %d - substituted by the absolute path to the directory of the current file.
2733 * %e - substituted by the name of the current file without the extension or path.
2734 * %f - substituted by the name of the current file without the path.
2735 * %p - if a project is open, substituted by the base path from the project.
2737 .. note::
2738    If the basepath set in the project preferences is not an absolute path , then it is
2739    taken as relative to the directory of the project file.  This allows a project file
2740    stored in the source tree to specify all commands and working directories relative
2741    to the tree itself, so that the whole tree including the project file, can be moved
2742    and even checked into and out of version control without having to re-configure the
2743    build menu.
2745 Build Menu Keyboard Shortcuts
2746 `````````````````````````````
2748 Keyboard shortcuts can be defiend for the first two filetype menu items, the first three
2749 non-filetype menu items, the first two execute menu items and the fixed menu items.
2750 In the keybindings configuration dialog (see `Keybinding preferences`_)
2751 these items are identified by the default labels shown in the `Build Menu`_ section above.
2753 It is currently not possible to bind keyboard shortcuts to more than these menu items.
2755 Configuration Files
2756 ```````````````````
2758 The configurable Build Menu capability was introduced in Geany V0.19 and
2759 required a new section to be added to the configuration files (See
2760 `Preferences File Format`_).  Geany will still load older format project,
2761 preferences and filetype file settings and will attempt to map them into the new
2762 configuration format.  There is not a simple clean mapping between the formats.
2763 The mapping used produces the most sensible results for the majority of cases.
2764 However, if they do not map the way you want, you may have to manually
2765 configure some settings using the Build Commands
2766 Dialog or the Build tab of the project preferences dialog.
2768 Any setting configured in either of these dialogs will override settings mapped from
2769 older format configuration files.
2771 Printing support
2772 ----------------
2774 Since Geany 0.13 there has been printing support using GTK's printing API.
2775 The printed page(s) will look nearly the same as on your screen in Geany.
2776 Additionally, there are some options to modify the printed page(s).
2778 You can define whether to print line numbers, page numbers at the bottom of
2779 each page and whether to print a page header on each page. This header
2780 contains the filename of the printed document, the current page number and
2781 the date and time of printing. By default, the file name of the document
2782 with full path information is added to the header. If you prefer to add
2783 only the basename of the file(without any path information) you can set it
2784 in the preferences dialog. You can also adjust the format of the date and
2785 time added to the page header. The available conversion specifiers are the
2786 same as the ones which can be used with the ANSI C strftime function.
2788 All of these settings can also be changed in the print dialog just before
2789 actual printing is done.
2790 On Unix-like systems the provided print dialog offers a print preview. The
2791 preview file is opened with a PDF viewer and by default GTK uses ``evince``
2792 for print preview. If you have not installed evince or just want to use
2793 another PDF viewer, you can change the program to use in the file
2794 ``.gtkrc-2.0`` (usually found in your home directory). Simply add a line
2795 like::
2797     gtk-print-preview-command = "epdfview %f"
2799 at the end of the file. Of course, you can also use xpdf, kpdf or whatever
2800 as the print preview command.
2802 Unfortunately, native GTK printing support is only available if Geany was
2803 built against GTK 2.10 (or above) **and** is running with GTK 2.10 (or above).
2804 If not, Geany provides basic printing support. This means you can print a
2805 file by passing the filename of the current file to a command which
2806 actually prints the file. However, the printed document contains no syntax
2807 highlighting. You can adjust the command to which the filename is
2808 passed in the preferences dialog. The default command is::
2810     % lpr %f
2812 ``%f`` will be substituted by the filename of the current file. Geany
2813 will not show errors from the command itself, so you should make
2814 sure that it works before(e.g. by trying to execute it from the
2815 command line).
2817 A nicer example, which many prefer is::
2819     % a2ps -1 --medium=A4 -o - %f | xfprint4
2821 But this depends on a2ps and xfprint4. As a replacement for xfprint4,
2822 gtklp or similar programs can be used.
2826 Plugins
2827 -------
2829 Plugins are loaded at startup, if the *Enable plugin support*
2830 general preference is set. There is also a command-line option,
2831 ``-p``, which prevents plugins being loaded. Plugins are scanned in
2832 the following directories:
2834 *   ``$prefix/lib/geany`` (see `Installation prefix`_)
2835 *   ``~/.config/geany/plugins``
2837 Most plugins add menu items to the *Tools* menu when they are loaded.
2839 Since Geany 0.13, there is a Plugin Manager to let you choose which plugins
2840 should be loaded at startup. You can also load and unload plugins on the
2841 fly using this dialog. Once you click the checkbox for a specific plugin
2842 in the dialog, it is loaded or unloaded according to its previous state.
2843 By default, no plugins are loaded at startup until you select some.
2844 You can also configure some plugin specific options when the plugin
2845 provides some.
2847 See also `Plugin documentation`_ for information about single plugins
2848 which are included in Geany.
2851 Keybindings
2852 -----------
2854 Geany supports the default keyboard shortcuts for the Scintilla
2855 editing widget. For a list of these commands, see `Scintilla
2856 keyboard commands`_. The Scintilla keyboard shortcuts will be overridden
2857 by any custom keybindings with the same keyboard shortcut.
2860 Switching documents
2861 ^^^^^^^^^^^^^^^^^^^
2863 There are a few non-configurable bindings to switch between documents,
2864 listed below. These can also be overridden by custom keybindings.
2866 =============== ==================================
2867 Key             Action
2868 =============== ==================================
2869 Alt-[1-9]       Select left-most tab, from 1 to 9.
2870 Alt-0           Select right-most tab.
2871 Ctrl-Shift-PgUp Select left-most tab.
2872 Ctrl-Shift-PgDn Select right-most tab.
2873 =============== ==================================
2876 Configurable keybindings
2877 ^^^^^^^^^^^^^^^^^^^^^^^^
2879 For all actions listed below you can define your own keybindings. Open
2880 the Preferences dialog, select the desired action and click on
2881 change. In the resulting dialog you can press the key combination you
2882 want to assign to the action and it will be saved when you press OK.
2883 You can define only one key combination for each action and each key
2884 combination can only be defined for one action.
2886 Some of the default key combinations are common across many
2887 applications, for example *Ctrl-N* for New and *Ctrl-O* for Open.
2888 Because they are so common it is not advisable to change these, but
2889 you can add other key combinations for these actions. For example
2890 *Ctrl-O* is set to execute menu_open by default, but you can also
2891 define *Alt-O*, so that the file open dialog is shown by pressing
2892 either *Ctrl-O* or *Alt-O*.
2894 The following tables list all customizable keyboard shortcuts, those
2895 which are common to many applications are marked with (C) after the
2896 shortcut.
2898 File keybindings
2899 ````````````````
2900 =============================== ========================= ==================================================
2901 Action                          Default shortcut          Description
2902 =============================== ========================= ==================================================
2903 New                             Ctrl-N  (C)               Creates a new file.
2905 Open                            Ctrl-O  (C)               Opens a file.
2907 Open selected file              Ctrl-Shift-O              Opens the selected filename.
2909 Re-open last closed tab                                   Re-opens the last closed document tab.
2911 Save                            Ctrl-S  (C)               Saves the current file.
2913 Save As                                                   Saves the current file under a new name.
2915 Save all                        Ctrl-Shift-S              Saves all open files.
2917 Close all                       Ctrl-Shift-W              Closes all open files.
2919 Close                           Ctrl-W  (C)               Closes the current file.
2921 Reload file                     Ctrl-R  (C)               Reloads the current file. All unsaved changes
2922                                                           will be lost.
2924 Print                           Ctrl-P  (C)               Prints the current file.
2925 =============================== ========================= ==================================================
2928 Editor keybindings
2929 ``````````````````
2930 =============================== ========================= ==================================================
2931 Action                          Default shortcut          Description
2932 =============================== ========================= ==================================================
2933 Undo                            Ctrl-Z  (C)               Un-does the last action.
2935 Redo                            Ctrl-Y                    Re-does the last action.
2937 Delete current line(s)          Ctrl-K                    Deletes the current line (and any lines with a
2938                                                           selection).
2940 Delete to line end              Ctrl-Shift-Delete         Deletes from the current caret position to the
2941                                                           end of the current line.
2943 Duplicate line or selection     Ctrl-D                    Duplicates the current line or selection.
2945 Transpose current line          Ctrl-T                    Transposes the current line with the previous one.
2947 Scroll to current line          Ctrl-Shift-L              Scrolls the current line into the centre of the
2948                                                           view. The cursor position and or an existing
2949                                                           selection will not be changed.
2951 Scroll up by one line           Alt-Up                    Scrolls the view.
2953 Scroll down by one line         Alt-Down                  Scrolls the view.
2955 Complete word                   Ctrl-Space                Shows the autocompletion list. If already showing
2956                                                           tag completion, it shows document word completion
2957                                                           instead, even if it is not enabled for automatic
2958                                                           completion. Likewise if no tag suggestions are
2959                                                           available, it shows document word completion.
2961 Show calltip                    Ctrl-Shift-Space          Shows a calltip for the current function or
2962                                                           method.
2964 Show macro list                 Ctrl-Return               Shows a list of available macros and variables in
2965                                                           the workspace.
2967 Complete snippet                Tab                       If you type a construct like if or for and press
2968                                                           this key, it will be completed with a matching
2969                                                           template.
2971 Suppress snippet completion                               If you type a construct like if or for and press
2972                                                           this key, it will not be completed, and a space or
2973                                                           tab will be inserted, depending on what the
2974                                                           construct completion keybinding is set to. For
2975                                                           example, if you have set the construct completion
2976                                                           keybinding to space, then setting this to
2977                                                           Shift+space will prevent construct completion and
2978                                                           insert a space.
2980 Context Action                                            Executes a command and passes the current word
2981                                                           (near the cursor position) or selection as an
2982                                                           argument. See the section called `Context
2983                                                           actions`_.
2985 Move cursor in snippet                                    Jumps to the next defined cursor positions in a
2986                                                           completed snippets if multiple cursor positions
2987                                                           where defined.
2989 Word part completion            Tab                       When the autocompletion list is visible, complete
2990                                                           the currently selected item up to the next word
2991                                                           part.
2993 Move line(s) up                                           Move the current line or selected lines up by
2994                                                           one line.
2996 Move line(s) down                                         Move the current line or selected lines down by
2997                                                           one line.
2998 =============================== ========================= ==================================================
3001 Clipboard keybindings
3002 `````````````````````
3003 =============================== ========================= ==================================================
3004 Action                          Default shortcut          Description
3005 =============================== ========================= ==================================================
3006 Cut                             Ctrl-X  (C)               Cut the current selection to the clipboard.
3008 Copy                            Ctrl-C  (C)               Copy the current selection to the clipboard.
3010 Paste                           Ctrl-V  (C)               Paste the clipboard text into the current document.
3012 Cut current line(s)             Ctrl-Shift-X              Cuts the current line (and any lines with a
3013                                                           selection) to the clipboard.
3015 Copy current line(s)            Ctrl-Shift-C              Copies the current line (and any lines with a
3016                                                           selection) to the clipboard.
3017 =============================== ========================= ==================================================
3020 Select keybindings
3021 ``````````````````
3022 =============================== ========================= ==================================================
3023 Action                          Default shortcut          Description
3024 =============================== ========================= ==================================================
3025 Select all                      Ctrl-A  (C)               Makes a selection of all text in the current
3026                                                           document.
3028 Select current word             Alt-Shift-W               Selects the current word under the cursor.
3030 Select current paragraph        Alt-Shift-P               Selects the current paragraph under the cursor
3031                                                           which is defined by two empty lines around it.
3033 Select current line(s)          Alt-Shift-L               Selects the current line under the cursor (and any
3034                                                           partially selected lines).
3036 Select to previous word part                              (Extend) selection to previous word part boundary.
3038 Select to next word part                                  (Extend) selection to next word part boundary.
3039 =============================== ========================= ==================================================
3042 Insert keybindings
3043 ``````````````````
3044 =============================== ========================= ==================================================
3045 Action                          Default shortcut          Description
3046 =============================== ========================= ==================================================
3047 Insert date                     Shift-Alt-D               Inserts a customisable date.
3049 Insert alternative whitespace                             Inserts a tab character when spaces should
3050                                                           be used for indentation and inserts space
3051                                                           characters of the amount of a tab width when
3052                                                           tabs should be used for indentation.
3053 =============================== ========================= ==================================================
3056 Format keybindings
3057 ``````````````````
3058 =============================== ========================= ==================================================
3059 Action                          Default shortcut          Description
3060 =============================== ========================= ==================================================
3061 Toggle case of selection        Ctrl-Alt-U                Changes the case of the selection. A lowercase
3062                                                           selection will be changed into uppercase and vice
3063                                                           versa. If the selection contains lower- and
3064                                                           uppercase characters, all will be converted to
3065                                                           lowercase.
3067 Comment line                                              Comments current line or selection.
3069 Uncomment line                                            Uncomments current line or selection.
3071 Toggle line commentation        Ctrl-E                    Comments a line if it is not commented or removes
3072                                                           a comment if the line is commented.
3074 Increase indent                 Ctrl-I                    Indents the current line or selection by one tab
3075                                                           or by spaces in the amount of the tab width
3076                                                           setting.
3078 Decrease indent                 Ctrl-U                    Removes one tab or the amount of spaces of
3079                                                           the tab width setting from the indentation of the
3080                                                           current line or selection.
3082 Increase indent by one space                              Indents the current line or selection by one
3083                                                           space.
3085 Decrease indent by one space                              Deindents the current line or selection by one
3086                                                           space.
3088 Smart line indent                                         Indents the current line or all selected lines
3089                                                           with the same indentation as the previous line.
3091 Send to Custom Command 1 (2,3)  Ctrl-1 (2,3)              Passes the current selection to a configured
3092                                                           external command (available for the first
3093                                                           three configured commands, see
3094                                                           `Sending text through custom commands`_ for
3095                                                           details).
3097 Send Selection to Terminal                                Sends the current selection or the current
3098                                                           line (if there is no selection) to the
3099                                                           embedded Terminal (VTE).
3101 Reflow lines/block                                        Reformat selected lines or current
3102                                                           (indented) text block,
3103                                                           breaking lines at the long line marker or the
3104                                                           line breaking column if line breaking is
3105                                                           enabled for the current document.
3106 =============================== ========================= ==================================================
3109 Settings keybindings
3110 ````````````````````
3111 =============================== ========================= ==================================================
3112 Action                          Default shortcut          Description
3113 =============================== ========================= ==================================================
3114 Preferences                     Ctrl-Alt-P                Opens preferences dialog.
3116 Plugin Preferences                                        Opens plugin preferences dialog.
3117 =============================== ========================= ==================================================
3120 Search keybindings
3121 ``````````````````
3122 =============================== ========================= ==================================================
3123 Action                          Default shortcut          Description
3124 =============================== ========================= ==================================================
3125 Find                            Ctrl-F  (C)               Opens the Find dialog.
3127 Find Next                       Ctrl-G                    Finds next result.
3129 Find Previous                   Ctrl-Shift-G              Finds previous result.
3131 Replace                         Ctrl-H  (C)               Opens the Replace dialog.
3133 Find in files                   Ctrl-Shift-F              Opens the Find in files dialog.
3135 Next message                                              Jumps to the line with the next message in
3136                                                           the Messages window.
3138 Previous message                                          Jumps to the line with the previous message
3139                                                           in the Messages window.
3141 Find Usage                                                Finds all occurrences of the current word (near
3142                                                           the keyboard cursor) or selection in all open
3143                                                           documents and displays them in the messages
3144                                                           window.
3146 Find Document Usage                                       Finds all occurrences of the current word (near
3147                                                           the keyboard cursor) or selection in the current
3148                                                           document and displays them in the messages
3149                                                           window.
3151 Mark All                        Ctrl-Shift-M              Highlight all matches of the current
3152                                                           word/selection in the current document
3153                                                           with a colored box. If there's nothing to
3154                                                           find, highlighted matches will be cleared.
3155 =============================== ========================= ==================================================
3158 Go to keybindings
3159 `````````````````
3160 =============================== ========================= ==================================================
3161 Action                          Default shortcut          Description
3162 =============================== ========================= ==================================================
3163 Navigate forward a location                               Switches to the next location in the navigation
3164                                                           history. See the section called `Code Navigation
3165                                                           History`_.
3167 Navigate back a location                                  Switches to the previous location in the
3168                                                           navigation history. See the section called
3169                                                           `Code navigation history`_.
3171 Go to line                      Ctrl-L                    Focuses the Go to Line entry (if visible) or
3172                                                           shows the Go to line dialog.
3174 Goto matching brace             Ctrl-B                    If the cursor is ahead or behind a brace, then it
3175                                                           is moved to the brace which belongs to the current
3176                                                           one. If this keyboard shortcut is pressed again,
3177                                                           the cursor is moved back to the first brace.
3179 Toggle marker                   Ctrl-M                    Set a marker on the current line, or clear the
3180                                                           marker if there already is one.
3182 Goto next marker                Ctrl-.                    Goto the next marker in the current document.
3184 Goto previous marker            Ctrl-,                    Goto the previous marker in the current document.
3186 Go to tag definition                                      Jump to the definition of the current word (near
3187                                                           the keyboard cursor). If the definition cannot be
3188                                                           found (e.g. the relevant file is not open) Geany
3189                                                           will beep and do nothing. See the section called
3190                                                           `Go to tag definition`_.
3192 Go to tag declaration                                     Jump to the declaration of the current word (near
3193                                                           the keyboard cursor). If the declaration cannot be
3194                                                           found (e.g. the relevant file is not open) Geany
3195                                                           will beep and do nothing. See the section called
3196                                                           `Go to tag declaration`_.
3198 Go to Start of Line             Home                      Move the caret to the end of the line indentation
3199                                                           unless it is already there, in which case it moves
3200                                                           it to the start of the line.
3202 Go to End of Line               End                       Move the caret to the end of the line.
3204 Go to End of Display Line       Alt-End                   Move the caret to the end of the display line.
3205                                                           This is useful when you use line wrapping and
3206                                                           want to jump to the end of the wrapped, virtual
3207                                                           line, not the real end of the whole line.
3208                                                           If the line is not wrapped, it behaves like
3209                                                           `Go to End of Line`, see above.
3211 Go to Previous Word Part        Ctrl-/                    Goto the previous part of the current word.
3213 Go to Next Word Part            Ctrl-\                    Goto the next part of the current word.
3214 =============================== ========================= ==================================================
3216 View keybindings
3217 ````````````````
3218 =============================== ========================= ==================================================
3219 Action                          Default shortcut          Description
3220 =============================== ========================= ==================================================
3221 Fullscreen                      F11  (C)                  Switches to fullscreen mode.
3223 Toggle Messages Window                                    Toggles the message window (status and compiler
3224                                                           messages) on and off.
3226 Toggle Sidebar                                            Shows or hides the sidebar.
3228 Toggle all additional widgets                             Hide and show all additional widgets like the
3229                                                           notebook tabs, the toolbar, the messages window
3230                                                           and the status bar.
3232 Zoom In                         Ctrl-+  (C)               Zooms in the text.
3234 Zoom Out                        Ctrl--  (C)               Zooms out the text.
3236 Zoom Reset                      Ctrl-0                    Reset any previous zoom on the text.
3237 =============================== ========================= ==================================================
3239 Focus keybindings
3240 `````````````````
3241 ================================ ========================= ==================================================
3242 Action                           Default shortcut          Description
3243 ================================ ========================= ==================================================
3244 Switch to Editor                 F2                        Switches to editor widget.
3245                                                            Also reshows the document statistics line
3246                                                            (after a short timeout).
3248 Switch to Scribble               F6                        Switches to scribble widget.
3250 Switch to VTE                    F4                        Switches to VTE widget.
3252 Switch to Search Bar             F7                        Switches to the search bar in the toolbar (if
3253                                                            visible).
3255 Switch to Sidebar                                          Focus the Sidebar.
3257 Switch to Compiler                                         Focus the Compiler message window tab.
3259 Switch to Messages                                         Focus the Messages message window tab.
3261 Switch to Message Window                                   Focus the Message Window's current tab.
3263 Switch to Sidebar Document List                            Focus the Document list tab in the Sidebar
3264                                                            (if visible).
3266 Switch to Sidebar Symbol List                              Focus the Symbol list tab in the Sidebar
3267                                                            (if visible).
3268 ================================ ========================= ==================================================
3271 Notebook tab keybindings
3272 ````````````````````````
3273 =============================== ========================= ==================================================
3274 Action                          Default shortcut          Description
3275 =============================== ========================= ==================================================
3276 Switch to left document         Ctrl-PageUp   (C)         Switches to the previous open document.
3278 Switch to right document        Ctrl-PageDown (C)         Switches to the next open document.
3280 Switch to last used document    Ctrl-Tab                  Switches to the previously shown document (if it's
3281                                                           still open).
3282                                                           Holding Ctrl (or another modifier if the keybinding
3283                                                           has been changed) will show a dialog, then repeated
3284                                                           presses of the keybinding will switch to the 2nd-last
3285                                                           used document, 3rd-last, etc. Also known as
3286                                                           Most-Recently-Used documents switching.
3288 Move document left              Alt-PageUp                Changes the current document with the left hand
3289                                                           one.
3291 Move document right             Alt-PageDown              Changes the current document with the right hand
3292                                                           one.
3294 Move document first                                       Moves the current document to the first position.
3296 Move document last                                        Moves the current document to the last position.
3297 =============================== ========================= ==================================================
3300 Document keybindings
3301 ````````````````````
3302 =============================== ========================= ==================================================
3303 Action                          Default shortcut          Description
3304 =============================== ========================= ==================================================
3305 Replace tabs by space                                     Replaces all tabs with the right amount of spaces.
3307 Replace spaces by tabs                                    Replaces all spaces with tab characters.
3309 Toggle current fold                                       Toggles the folding state of the current code block.
3311 Fold all                                                  Folds all contractible code blocks.
3313 Unfold all                                                Unfolds all contracted code blocks.
3315 Reload symbol list              Ctrl-Shift-R              Reloads the tag/symbol list.
3317 Toggle Line wrapping                                      Enables or disables wrapping of long lines.
3319 Toggle Line breaking                                      Enables or disables automatic breaking of long
3320                                                           lines at a configurable column.
3322 Remove Markers                                            Remove any markers on lines or words which
3323                                                           were set by using 'Mark All' in the
3324                                                           search dialog or by manually marking lines.
3326 Remove Error Indicators                                   Remove any error indicators in the
3327                                                           current document.
3328 =============================== ========================= ==================================================
3331 Build keybindings
3332 `````````````````
3333 =============================== ========================= ==================================================
3334 Action                          Default shortcut          Description
3335 =============================== ========================= ==================================================
3336 Compile                         F8                        Compiles the current file.
3338 Build                           F9                        Builds (compiles if necessary and links) the
3339                                                           current file.
3341 Make all                        Shift-F9                  Builds the current file with the Make tool.
3343 Make custom target              Ctrl-Shift-F9             Builds the current file with the Make tool and a
3344                                                           given target.
3346 Make object                                               Compiles the current file with the Make tool.
3348 Next error                                                Jumps to the line with the next error from the
3349                                                           last build process.
3351 Previous error                                            Jumps to the line with the previous error from
3352                                                           the last build process.
3354 Run                             F5                        Executes the current file in a terminal emulation.
3356 Set Build Commands                                        Opens the build commands dialog.
3357 =============================== ========================= ==================================================
3360 Tools keybindings
3361 `````````````````
3362 =============================== ========================= ==================================================
3363 Action                          Default shortcut          Description
3364 =============================== ========================= ==================================================
3365 Show Color Chooser                                        Opens the Color Chooser dialog.
3366 =============================== ========================= ==================================================
3369 Help keybindings
3370 ````````````````
3371 =============================== ========================= ==================================================
3372 Action                          Default shortcut          Description
3373 =============================== ========================= ==================================================
3374 Help                            F1 (C)                       Opens the manual.
3375 =============================== ========================= ==================================================
3380 Configuration files
3381 ===================
3382 .. warning::
3383     You must use UTF-8 encoding *without BOM* for configuration files.
3386 Tools menu items
3387 ----------------
3388 There's a *Configuration files* submenu in the *Tools* menu that
3389 contains items for some of the available user configuration files.
3390 Clicking on one opens it in the editor for you to update. Geany will
3391 reload the file after you have saved it.
3393 .. note::
3394     Other configuration files not shown here will need to be opened
3395     manually, and will not be automatically reloaded when saved.
3396     (see *Reload Configuration* below).
3398 There's also a *Reload Configuration* item which can be used if you
3399 updated one of the other configuration files, or modified or added
3400 template files.
3402 *Reload Configuration* is also necessary to update syntax highlighting colors.
3404 .. note::
3405     Syntax highlighting colors aren't updated in open documents after
3406     saving filetypes.common as this can possibly take a significant
3407     amount of time.
3410 Global configuration file
3411 -------------------------
3413 There is a global configuration file for Geany which will be used for
3414 any settings not defined in the users local configuration file.
3415 Settings present in the local configuration file override those in the global
3416 file.
3418 The global configuration file is read from
3419 ``$prefix/share/geany/geany.conf`` (where ``$prefix`` is the path where
3420 Geany is installed, see `Installation prefix`_) when starting Geany and
3421 an user configuration file does not exist. It can contain any settings
3422 which are found in the usual configuration file created by Geany but
3423 does not have to contain all settings.
3425 .. note::
3426     This feature is mainly intended for package maintainers or system
3427     admins who want to set up Geany in a multi user environment and
3428     set some sane default values for this environment. Usually users won't
3429     need to do that.
3433 Filetype definition files
3434 -------------------------
3436 All color definitions and other filetype specific settings are
3437 stored in the filetype definition files. Those settings are colors
3438 for syntax highlighting, general settings like comment characters or
3439 word delimiter characters as well as compiler and linker settings.
3441 Custom filetypes
3442 ^^^^^^^^^^^^^^^^
3443 At startup Geany looks for ``filetypes.*.conf`` files in the system and
3444 user filetype paths, adding any filetypes found with the name matching
3445 the '``*``' wildcard.
3447 Custom filetypes are not as powerful as built-in filetypes, but the following
3448 have been implemented:
3450 * Recognizing and setting the filetype (after the user has manually edited
3451   ``filetype_extensions.conf``).
3452 * Filetype settings in the [settings] section (see `Format`_).
3453     * Using existing tag parsing (``tag_parser`` key).
3454     * Using existing syntax highlighting (``lexer_filetype`` key).
3455 * Build commands.
3456 * Loading global tags files (namespace will be shared with tag_parser
3457   type).
3459 System files
3460 ^^^^^^^^^^^^
3461 The system-wide configuration files can be found in
3462 ``$prefix/share/geany`` and are called ``filetypes.$ext``,
3463 where ``$prefix`` is the path where Geany is installed (see
3464 `Installation prefix`_) and $ext is the name of the filetype. For every
3465 filetype there is a corresponding definition file. There is one
3466 exception: ``filetypes.common`` -- this file is for general settings,
3467 which are not specific to a certain filetype.
3469 .. warning::
3470     It is not recommended that users edit the system-wide files,
3471     because they will be overridden when Geany is updated.
3473 User files
3474 ^^^^^^^^^^
3475 To change the settings, copy a file from ``$prefix/share/geany`` to
3476 the subdirectory filedefs in your configuration directory (usually
3477 ``~/.config/geany/``).
3479 For example::
3481     % cp /usr/local/share/geany/filetypes.c /home/username/.config/geany/filedefs/
3483 Then you can edit the file and the changes are also
3484 available after an update of Geany because they reside in your
3485 configuration directory. Alternatively, you can create a file
3486 ``~/.config/geany/filedefs/filetypes.X`` and add only these settings you want
3487 to change. All missing settings will be read from the corresponding
3488 global definition file in ``$prefix/share/geany``.
3490 As well as the sections listed below, each filetype file can contain
3491 a [build-menu] section as described in `[build-menu] Section`_.
3493 Format
3494 ^^^^^^
3497 [styling] Section
3498 `````````````````
3500 In this section the colors for syntax highlighting are defined. The
3501 manual format is:
3503 * ``key=foreground_color;background_color;bold_flag;italic_flag``
3505 Colors have to be specified as RGB hex values prefixed by
3506 0x. For example red is 0xff0000, blue is 0x0000ff. The values are
3507 case-insensitive, but it is a good idea to use small letters. Bold
3508 and italic are flags and should only be "true" or "false". If their
3509 value is something other than "true" or "false", "false" is assumed.
3511 You can omit fields to use the values from the style named ``"default"``.
3513 E.g. ``key=0xff0000;;true``
3515 This makes the key style have red foreground text, default background
3516 color text and bold emphasis.
3518 Using a named style
3519 *******************
3520 The second format uses a *named style* name to reference a style
3521 defined in filetypes.common.
3523 * ``key=named_style``
3524 * ``key2=named_style2,bold,italic``
3526 The bold and italic parts are optional, and if present are used to
3527 toggle the bold or italic flags to the opposite of the named style's
3528 flags. In contrast to style definition booleans, they are a literal
3529 ",bold,italic" and commas are used instead of semi-colons.
3531 E.g. ``key=comment,italic``
3533 This makes the key style match the ``"comment"`` named style, but with
3534 italic emphasis.
3536 To define named styles, see the filetypes.common `[named_styles]
3537 Section`_.
3540 [keywords] Section
3541 ``````````````````
3543 This section contains keys for different keyword lists specific to
3544 the filetype. Some filetypes do not support keywords, so adding a
3545 new key will not work. You can only add or remove keywords to/from
3546 an existing list.
3548 .. important::
3549     The keywords list must be in one line without line ending characters.
3552 [lexer_properties] Section
3553 ``````````````````````````
3554 Here any special properties for the Scintilla lexer can be set in the
3555 format ``key.name.field=some.value``.
3558 [settings] Section
3559 ``````````````````
3561 extension
3562     This is the default file extension used when saving files, not
3563     including the period character (``.``). The extension used should
3564     match one of the patterns associated with that filetype (see
3565     `Filetype extensions`_).
3567     *Example:* ``extension=cxx``
3569 wordchars
3570     These characters define word boundaries when making selections
3571     and searching using word matching options.
3573     *Example:* (look at system filetypes.\* files)
3575 comment_open
3576     A character or string which is used to comment code. If you want to
3577     use multiline comments, also set comment_close, otherwise leave it
3578     empty.
3580     *Example:* ``comment_open=/*``
3582 comment_close
3583     If multiline comments are used, this is the character or string to
3584     close the comment.
3586     *Example:* ``comment_close=*/``
3588 comment_use_indent
3589     Set this to false if a comment character or string should start at
3590     column 0 of a line. If set to true it uses any indentation of the
3591     line.
3593     Note: Comment indentation
3595     ``comment_use_indent=true`` would generate this if a line is
3596     commented (e.g. with Ctrl-D)::
3598         #command_example();
3600     ``comment_use_indent=false`` would generate this if a line is
3601     commented (e.g. with Ctrl-D)::
3603         #   command_example();
3606     Note: This setting only works for single line comments (like '//',
3607     '#' or ';').
3609     *Example:* ``comment_use_indent=true``
3611 context_action_cmd
3612     A command which can be executed on the current word or the current
3613     selection.
3615     Example usage: Open the API documentation for the
3616     current function call at the cursor position.
3618     The command can
3619     be set for every filetype or if not set, a global command will
3620     be used. The command itself can be specified without the full
3621     path, then it is searched in $PATH. But for security reasons,
3622     it is recommended to specify the full path to the command. The
3623     wildcard %s will be replaced by the current word at the cursor
3624     position or by the current selection.
3626     Hint: for PHP files the following could be quite useful:
3627     context_action_cmd=firefox "http://www.php.net/%s"
3629     *Example:* ``context_action_cmd=devhelp -s "%s"``
3631 tag_parser
3632     The TagManager language name, e.g. "C".
3634 lexer_filetype
3635     A filetype name to setup syntax highlighting from another filetype.
3636     This must not be recursive, i.e. it should be a filetype name that
3637     doesn't use the lexer_filetype key itself.
3640 [build_settings] Section
3641 ````````````````````````
3643 As of Geany v0.19 this section is supplemented by the `[build-menu] Section`_.
3644 Values that are set in the [build-menu] section will override those in this section.
3646 error_regex
3647     This is a GNU-style extended regular expression to parse a filename
3648     and line number from build output. If undefined, Geany will fall
3649     back to its default error message parsing.
3651     Only the first two matches will be read by Geany. Geany will look for
3652     a match that is purely digits, and use this for the line number. The
3653     remaining match will be used as the filename.
3655     *Example:* ``error_regex=(.+):([0-9]+):[0-9]+``
3657     This will parse a message such as:
3658     ``test.py:7:24: E202 whitespace before ']'``
3660 **Build commands**
3662 If any build menu item settings have been configured in the Build Menu Commands
3663 dialog or the Build tab of the project preferences dialog then these
3664 settings are stored in the [build-menu] section and override the settings in
3665 this section for that item.
3667 compiler
3668     This item specifies the command to compile source code files. But
3669     it is also possible to use it with interpreted languages like Perl
3670     or Python. With these filetypes you can use this option as a kind of
3671     syntax parser, which sends output to the compiler message window.
3673     You should quote the filename to also support filenames with
3674     spaces. The following wildcards for filenames are available:
3676     * %f -- complete filename without path
3677     * %e -- filename without path and without extension
3679     *Example:* ``compiler=gcc -Wall -c "%f"``
3681 linker
3682     This item specifies the command to link the file. If the file is not
3683     already compiled, it will be compiled while linking. The -o option
3684     is automatically added by Geany. This item works well with GNU gcc,
3685     but may be problematic with other compilers (esp. with the linker).
3687     *Example:* ``linker=gcc -Wall "%f"``
3689 run_cmd
3690     Use this item to execute your file. It has to have been built
3691     already. Use the %e wildcard to have only the name of the executable
3692     (i.e. without extension) or use the %f wildcard if you need the
3693     complete filename, e.g. for shell scripts.
3695     *Example:* ``run_cmd="./%e"``
3698 Special file filetypes.common
3699 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3701 There is a special filetype definition file called
3702 filetypes.common. This file defines some general non-filetype-specific
3703 settings.
3705 See the `Format`_ section for how to define styles.
3708 [named_styles] Section
3709 ``````````````````````
3710 Named styles declared here can be used in the [styling] section of any
3711 filetypes.* file.
3713 For example:
3715 *In filetypes.common*::
3717     [named_styles]
3718     foo=0xc00000;0xffffff;false;true
3719     bar=foo
3721 *In filetypes.c*::
3723     [styling]
3724     comment=foo
3726 This saves copying and pasting the whole style definition into several
3727 different files.
3729 .. note::
3730     You can define aliases for named styles, as shown with the ``bar``
3731     entry in the above example, but they must be declared after the
3732     original style.
3735 [styling] Section
3736 `````````````````
3737 default
3738     This is the default style. It is used for styling files without a
3739     filetype set.
3741     *Example:* ``default=0x000000;0xffffff;false;false``
3743 selection
3744     The style for coloring selected text. The format is:
3746     * Foreground color
3747     * Background color
3748     * Use foreground color
3749     * Use background color
3751     The colors are only set if the 3rd or 4th argument is true. When
3752     the colors are not overridden, the default is a dark grey
3753     background with syntax highlighted foreground text.
3755     *Example:* ``selection=0xc0c0c0;0x00007F;true;true``
3757 brace_good
3758     The style for brace highlighting when a matching brace was found.
3760     *Example:* ``brace_good=0xff0000;0xFFFFFF;true;false``
3762 brace_bad
3763     The style for brace highlighting when no matching brace was found.
3765     *Example:* ``brace_bad=0x0000ff;0xFFFFFF;true;false``
3767 caret
3768     The style for coloring the caret(the blinking cursor). Only first
3769     and third argument is interpreted.
3770     Set the third argument to true to change the caret into a block caret.
3772     *Example:* ``caret=0x000000;0x0;false;false``
3774 caret_width
3775     The width for the caret(the blinking cursor). Only the first
3776     argument is interpreted. The width is specified in pixels with
3777     a maximum of three pixel. Use the width 0 to make the caret
3778     invisible.
3780     *Example:* ``caret=1;0;false;false``
3782 current_line
3783     The style for coloring the background of the current line. Only
3784     the second and third arguments are interpreted. The second argument
3785     is the background color. Use the third argument to enable or
3786     disable background highlighting for the current line (has to be
3787     true/false).
3789     *Example:* ``current_line=0x0;0xe5e5e5;true;false``
3791 indent_guide
3792     The style for coloring the indentation guides. Only the first and
3793     second arguments are interpreted.
3795     *Example:* ``indent_guide=0xc0c0c0;0xffffff;false;false``
3797 white_space
3798     The style for coloring the white space if it is shown. The first
3799     both arguments define the foreground and background colors, the
3800     third argument sets whether to use the defined foreground color
3801     or to use the color defined by each filetype for the white space.
3802     The fourth argument defines whether to use the background color.
3804     *Example:* ``white_space=0xc0c0c0;0xffffff;true;true``
3806 .. _Folding Settings:
3808 folding_style
3809     The style of folding icons. Only first and second arguments are
3810     used.
3812     Valid values for the first argument are:
3814     * 1 -- for boxes
3815     * 2 -- for circles
3816     * 3 -- for arrows
3817     * 4 -- for +/-
3819     Valid values for the second argument are:
3821     * 0 -- for no lines
3822     * 1 -- for straight lines
3823     * 2 -- for curved lines
3825     *Default:* ``folding_style=1;1;``
3827     *Arrows:* ``folding_style=3;0;``
3829 folding_horiz_line
3830     Draw a thin horizontal line at the line where text is folded. Only
3831     first argument is used.
3833     Valid values for the first argument are:
3835     * 0 -- disable, do not draw a line
3836     * 1 -- draw the line above folded text
3837     * 2 -- draw the line below folded text
3839     *Example:* ``folding_horiz_line=0;0;false;false``
3841 line_wrap_visuals
3842     First argument: drawing of visual flags to indicate a line is wrapped.
3843     This is a bitmask of the values:
3845     * 0 -- No visual flags
3846     * 1 -- Visual flag at end of subline of a wrapped line
3847     * 2 -- Visual flag at begin of subline of a wrapped line. Subline is
3848       indented by at least 1 to make room for the flag.
3850     Second argument: wether the visual flags to indicate a line is wrapped
3851     are drawn near the border or near the text. This is a bitmask of the values:
3853     * 0 -- Visual flags drawn near border
3854     * 1 -- Visual flag at end of subline drawn near text
3855     * 2 -- Visual flag at begin of subline drawn near text
3857     Only first and second argument is interpreted.
3859     *Example:* ``line_wrap_visuals=3;0;false;false``
3861 line_wrap_indent
3862     First argument: sets the size of indentation of sublines for wrapped lines
3863     in terms of the width of a space, only used when the second argument is ``0``.
3865     Second argument: wrapped sublines can be indented to the position of their
3866     first subline or one more indent level. Possible values:
3868     * 0 - Wrapped sublines aligned to left of window plus amount set by the first argument
3869     * 1 - Wrapped sublines are aligned to first subline indent (use the same indentation)
3870     * 2 - Wrapped sublines are aligned to first subline indent plus one more level of indentation
3872     Only first and second argument is interpreted.
3874     *Example:* ``line_wrap_indent=0;1;false;false``
3876 translucency
3877     Translucency for the current line (first argument) and the selection
3878     (second argument). Values between 0 and 256 are accepted.
3880     Note for Windows 95, 98 and ME users:
3881     keep this value at 256 to disable translucency otherwise Geany might crash.
3883     Only the first and second argument is interpreted.
3885     *Example:* ``translucency=256;256;false;false``
3887 marker_line
3888     The style for a highlighted line (e.g when using Goto line or goto tag).
3889     The foreground color (first argument) is only used when the Markers margin
3890     is enabled (see View menu).
3892     Only the first and second argument is interpreted.
3894     *Example:* ``marker_line=0x000000;0xffff00;false;false``
3896 marker_search
3897     The style for a marked search results (when using "Mark" in Search dialogs).
3898     The second argument sets the background colour for the drawn rectangle.
3900     Only the second argument is interpreted.
3902     *Example:* ``marker_search=0x000000;0xb8f4b8;false;false``
3904 marker_mark
3905     The style for a marked line (e.g when using the "Toggle Marker" keybinding
3906     (Ctrl-M)). The foreground color (first argument) is only used
3907     when the Markers margin is enabled (see View menu).
3909     Only the first and second argument is interpreted.
3911     *Example:* ``marker_mark=0x000000;0xb8f4b8;false;false``
3913 marker_translucency
3914     Translucency for the line marker (first argument) and the search marker
3915     (second argument). Values between 0 and 256 are accepted.
3917     Note for Windows 95, 98 and ME users:
3918     keep this value at 256 to disable translucency otherwise Geany might crash.
3920     Only the first and second argument is interpreted.
3922     *Example:* ``marker_translucency=256;256;false;false``
3924 line_height
3925     Amount of space to be drawn above and below the line's baseline.
3926     The first argument defines the amount of space to be drawn above the line, the second
3927     argument defines the amount of space to be drawn below.
3929     Only the first and second argument is interpreted.
3931     *Example:* ``line_height=0;0;false;false``
3933 calltips
3934     The style for coloring the calltips. The first two arguments
3935     define the foreground and background colors, the third and fourth
3936     arguments set whether to use the defined colors.
3938     *Example:* ``calltips=0xc0c0c0;0xffffff;false;false``
3941 [settings] Section
3942 ``````````````````
3943 whitespace_chars
3944     Characters to treat as whitespace. These characters are ignored
3945     when moving, selecting and deleting across word boundaries
3946     (see `Scintilla keyboard commands`_).
3948     This should include space (\\s) and tab (\\t).
3950     *Example:* ``whitespace_chars=\s\t!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~``
3954 Filetype extensions
3955 -------------------
3957 To change the default filetype extension used when saving a new file,
3958 see `Filetype definition files`_.
3960 You can override the list of file extensions that Geany uses for each
3961 filetype using the ``filetype_extensions.conf`` file.
3963 To override the system-wide configuration file, copy it from
3964 ``$prefix/share/geany`` to your configuration directory, usually
3965 ``~/.config/geany/``. ``$prefix`` is the path where Geany is installed
3966 (see `Installation prefix`_).
3968 For example::
3970     % cp /usr/local/share/geany/filetype_extensions.conf /home/username/.config/geany/
3972 Then edit it and remove all the lines for filetype extensions that
3973 you do not want to override. The remaining lines can be edited after
3974 the ``=`` sign, using a semi-colon separated list of patterns which
3975 should be matched for that filetype.
3977 For example, to set the filetype extensions for Make, the
3978 ``/home/username/.config/geany/filetype_extensions.conf`` file should
3979 look like::
3981     [Extensions]
3982     Make=Makefile*;*.mk;Buildfile;
3984 Preferences File Format
3985 -----------------------
3987 The preferences file ``~/.config/geany/geany.conf`` holds settings for all the items configured
3988 in the preferences dialog. This file should not be edited while Geany is running
3989 as the file will be overwritten when the preferences in Geany are changed or Geany
3990 is quitted.
3993 Hidden preferences
3994 ^^^^^^^^^^^^^^^^^^
3996 There are some rarely used preferences that are not shown in the Preferences
3997 dialog. These can be set by editing the preferences file, then
3998 selecting *Tools->Reload Configuration* or restarting Geany. Search for the
3999 key name, then edit the value. Example:
4001     ``brace_match_ltgt=true``
4003 The table below show the key names of hidden preferences in the
4004 configuration file.
4006 ================================  ===========================================  ==================
4007 Key                               Description                                  Default
4008 ================================  ===========================================  ==================
4009 **Editor related**
4010 brace_match_ltgt                  Whether to highlight <, > angle brackets.    false
4011 show_editor_scrollbars            Whether to display scrollbars. If set to     true
4012                                   false, the horizontal and vertical
4013                                   scrollbars are hidden completely.
4014 use_gtk_word_boundaries           Whether to look for the end of a word when   true
4015                                   using word-boundary related Scintilla
4016                                   commands (see `Scintilla keyboard
4017                                   commands`_).
4018 complete_snippets_whilst_editing  Whether to allow completion of snippets      false
4019                                   when editing an existing line (i.e. there
4020                                   is some text after the current cursor
4021                                   position on the line). Only used when the
4022                                   keybinding ``Complete snippet`` is set to
4023                                   ``Space``.
4024 **Interface related**
4025 show_symbol_list_expanders        Whether to show or hide the small expander   true
4026                                   icons on the symbol list treeview (only
4027                                   available with GTK 2.12 or above).
4028 allow_always_save                 Whether files can be saved always, even if   false
4029                                   they don't have any changes. By default,
4030                                   the Save buttons and menu items are
4031                                   disabled when a file is unchanged. When
4032                                   setting this option to true, the Save
4033                                   buttons and menu items are always active
4034                                   and files can be saved.
4035 **VTE related**
4036 emulation                         Terminal emulation mode. Only change this    xterm
4037                                   if you have VTE termcap files other than
4038                                   ``vte/termcap/xterm``.
4039 send_selection_unsafe             By default, Geany strips any trailing        false
4040                                   newline characters from the current
4041                                   selection before sending it to the terminal
4042                                   to not execute arbitrary code. This is
4043                                   mainly a security feature.
4044                                   If, for whatever reasons, you really want
4045                                   it to be executed directly, set this option
4046                                   to true.
4047 **File related**
4048 use_safe_file_saving              Defines the mode how Geany saves files to    false
4049                                   disk. If disabled, Geany directly writes
4050                                   the content of the document to disk. This
4051                                   might cause in loss of data when there is
4052                                   no more free space on disk to save the
4053                                   file. When set to true, Geany first saves
4054                                   the contents into a temporary file and if
4055                                   this succeeded, the temporary file is
4056                                   moved to the real file to save.
4057                                   This gives better error checking in case of
4058                                   no more free disk space. But it also
4059                                   destroys hard links of the original file
4060                                   and its permissions (e.g. executable flags
4061                                   are reset). Use this with care as it can
4062                                   break things seriously.
4063                                   The better approach would be to ensure your
4064                                   disk won't run out of free space.
4065 **Build Menu related**
4066 number_ft_menu_items              The maximum number of menu items in the      2
4067                                   filetype section of the Build menu.
4068 number_non_ft_menu_items          The maximum number of menu items in the      3
4069                                   non-filetype section of the Build menu.
4070 number_exec_menu_items            The maximum number of menu items in the      2
4071                                   execute section of the Build menu.
4072 ================================  ===========================================  ==================
4074 [build-menu] Section
4075 ^^^^^^^^^^^^^^^^^^^^
4077 The [build-menu] section contains the configuration of the build menu.
4078 This section can occur in filetype, preferences and project files and
4079 always has the format described here.  Different menu items are loaded
4080 from different files, see the table in the `Build Menu Configuration`_
4081 section for details.  All the settings can be configured from the dialogs
4082 except the execute command in filetype files and filetype definitions in
4083 the project file, so these are the only ones which need hand editing.
4085 The build-menu section stores one entry for each setting for each menu item that
4086 is configured.  The keys for these settings have the format:
4088   ``GG_NN_FF``
4090 where:
4092 * GG - is the menu item group,
4094   - FT for filetype
4095   - NF for non-filetype
4096   - EX for execute
4098 * NN - is a two decimal digit number of the item within the group,
4099   starting at 00
4100 * FF - is the field,
4102   - LB for label
4103   - CM for command
4104   - WD for working directory
4107 Project File Format
4108 -------------------
4110 The project file contains project related settings and possibly a
4111 record of the current session files.
4114 [build-menu] Additions
4115 ^^^^^^^^^^^^^^^^^^^^^^
4117 The project file also can have extra fields in the [build-menu] section
4118 in addition to those listed in `[build-menu] Section`_ above.
4120 When filetype menu items are configured for the project they are stored
4121 in the project file.
4123 The ``filetypes`` entry is a list of the filetypes which exist in the
4124 project file.
4126 For each filetype the entries for that filetype have the format defined in
4127 `[build-menu] Section`_ but the key is prefixed by the name of the filetype
4128 as it appears in the ``filetypes`` entry, eg the entry for the label of
4129 filetype menu item 0 for the C filetype would be
4131   ``CFT_00_LB=Label``
4134 Templates
4135 ---------
4137 Geany supports the following templates:
4139 * ChangeLog entry
4140 * File header
4141 * Function description
4142 * Short GPL notice
4143 * Short BSD notice
4144 * File templates
4146 To use these templates, just open the Edit menu or open the popup menu
4147 by right-clicking in the editor widget, and choose "Insert Comments"
4148 and insert templates as you want.
4150 Some templates (like File header or ChangeLog entry) will always be
4151 inserted at the top of the file.
4153 To insert a function description, the cursor must be inside
4154 of the function, so that the function name can be determined
4155 automatically. The description will be positioned correctly one line
4156 above the function, just check it out. If the cursor is not inside
4157 of a function or the function name cannot be determined, the inserted
4158 function description won't contain the correct function name but "unknown"
4159 instead.
4162 Template meta data
4163 ^^^^^^^^^^^^^^^^^^
4165 Meta data can be used with all templates, but by default user set
4166 meta data is only used for the ChangeLog and File header templates.
4168 In the configuration dialog you can find a tab "Templates" (see
4169 `Template preferences`_). You can define the default values
4170 which will be inserted in the templates. You should select
4171 *Tools->Reload Configuration* or restart Geany after making changes.
4174 File templates
4175 ^^^^^^^^^^^^^^
4177 File templates are templates used as the basis of a new file. To
4178 use them, choose the *New (with Template)* menu item from the *File*
4179 menu.
4181 By default, file templates are installed for some filetypes. Custom
4182 file templates can be added by creating the appropriate template file
4183 and then selecting *Tools->Reload Configuration* or restarting Geany. You can
4184 also edit the default file templates.
4186 The file's contents are just the text to place in the document, with
4187 optional template wildcards like ``{fileheader}``. The fileheader
4188 wildcard can be placed anywhere, but it's usually put on the first
4189 line of the file, followed by a blank line.
4191 Custom file templates
4192 `````````````````````
4194 These are read from the following directories:
4196 * ``$prefix/share/geany/templates/files`` (see `Installation prefix`_)
4197 * ``~/.config/geany/templates/files`` (created the first time
4198   Geany is started).
4200 The filetype to use is detected from the template file's extension, if
4201 any. For example, creating a file ``module.c`` would add a menu item
4202 which created a new document with the filetype set to 'C'.
4204 The template file is read from disk when the corresponding menu item is
4205 clicked, so you don't need to select *Tools->Reload Configuration* or restart
4206 Geany after editing a custom file template.
4208 Filetype templates
4209 ``````````````````
4211 .. note::
4212     It's recommended to use custom file templates instead.
4214 Filetype template files are read from the ``~/.config/geany/templates``
4215 directory, and are named "filetype." followed by the filetype
4216 name, e.g. "filetype.python", "filetype.sh", etc. If you are
4217 unsure about the filetype name extensions, they are the same as
4218 the filetype configuration file extensions, commonly installed in
4219 ``/usr/share/geany``, with the prefix "filetypes.".
4221 There is also a template file ``filetype.none`` which is used when
4222 the New command is used without a filetype. This is empty by default.
4225 Customizing templates
4226 ^^^^^^^^^^^^^^^^^^^^^
4228 Each template can be customized to your needs. The templates are
4229 stored in the ``~/.config/geany/templates/`` directory (see the section called
4230 `Command line options`_ for further information about the configuration
4231 directory). Just open the desired template with an editor (ideally,
4232 Geany ;-) ) and edit the template to your needs. There are some
4233 wildcards which will be automatically replaced by Geany at startup.
4236 Template wildcards
4237 ``````````````````
4239 All wildcards must be enclosed by "{" and "}", e.g. {date}.
4241 ============== ============================================= =======================================
4242 Wildcard       Description                                   Available in
4243 ============== ============================================= =======================================
4244 ob             { Opening Brace (used to prevent other        file templates, file header, snippets.
4245                wildcards being expanded).
4246 cb             } Closing Brace.                              file templates, file header, snippets.
4247 pc             \% Percent (used to escape e.g. %block% in
4248                snippets).                                    snippets.
4250 developer      The name of the developer.                    file templates, file header,
4251                                                              function description, ChangeLog entry,
4252                                                              bsd, gpl, snippets.
4254 initial        The developer's initials, e.g. "ET" for       file templates, file header,
4255                Enrico Tröger or "JFD" for John Foobar Doe.   function description, ChangeLog entry,
4256                                                              bsd, gpl, snippets.
4258 mail           The email address of the developer.           file templates, file header,
4259                                                              function description, ChangeLog entry,
4260                                                              bsd, gpl, snippets.
4262 company        The company the developer is working for.     file templates, file header,
4263                                                              function description, ChangeLog entry,
4264                                                              bsd, gpl, snippets.
4266 year [1]_      The current year. Default format is: YYYY.    file templates, file header,
4267                                                              function description, ChangeLog entry,
4268                                                              bsd, gpl, snippets.
4270 version        The initial version of a new file.            file templates, file header,
4271                                                              function description, ChangeLog entry,
4272                                                              bsd, gpl, snippets.
4274 date [1]_      The current date. Default format:             file templates, file header,
4275                YYYY-MM-DD.                                   function description, ChangeLog entry,
4276                                                              bsd, gpl, snippets.
4278 untitled       The string "untitled" (this will be           file templates, file header,
4279                translated to your locale), used in           function description, ChangeLog entry,
4280                file templates.                               bsd, gpl, snippets.
4282 geanyversion   The actual Geany version, e.g.                file templates, file header,
4283                "Geany |(version)|".                          function description, ChangeLog entry,
4284                                                              bsd, gpl, snippets.
4286 datetime [1]_  The current date and time. Default format:    file templates, file header,
4287                DD.MM.YYYY HH:mm:ss ZZZZ.                     function description, ChangeLog entry,
4288                                                              bsd, gpl, snippets.
4290 filename       The filename of the current file.             file header, snippets.
4292 gpl            This wildcard inserts a short GPL notice.     file header.
4294 bsd            This wildcard inserts a BSD licence notice.   file header.
4296 functionname   The function name of the function at the      function description.
4297                cursor position. This wildcard will only be.
4298                replaced in the function description.
4299                template.
4301 fileheader     The file header template. This wildcard       file header, snippets, file.
4302                will only be replaced in filetype             templates.
4303                templates.
4305 command:path   Executes the specified command and replace    file templates, file header,
4306                the wildcard with the command's standard      function description, ChangeLog entry,
4307                output. See `Special {command:} wildcard`_    bsd, gpl, snippets.
4308                for details.
4309 ============== ============================================= =======================================
4312 .. [1] The format for the ``year``, ``date`` and ``datetime`` wildcards can be changed
4313        in the preferences dialog, see `Template preferences`_. You can
4314        use any conversion specifiers which can be used with the ANSI C strftime function.
4315        For details please see http://man.cx/strftime.
4318 Special {command:} wildcard
4319 ***************************
4321 The {command:} wildcard is a special one because it can execute
4322 a specified command and put the command's output (stdout) into
4323 the template.
4325 Example::
4327     {command:uname -a}
4329 will result in::
4331     Linux localhost 2.6.9-023stab046.2-smp #1 SMP Mon Dec 10 15:04:55 MSK 2007 x86_64 GNU/Linux
4333 Using this wildcard you can insert nearly any arbitrary text into the
4334 template.
4336 In the environment of the executed command the variables
4337 ``GEANY_FILENAME``, ``GEANY_FILETYPE`` and ``GEANY_FUNCNAME`` are set.
4338 The value of these variables is filled in only if Geany knows about it.
4339 For example, ``GEANY_FUNCNAME`` is only filled within the function
4340 description template. However, these variables are ``always`` set,
4341 just maybe with an empty value.
4342 You can easily access them e.g. within an executed shell script using::
4344     $GEANY_FILENAME
4347 .. note::
4348     If the specified command could not be found or not executed, the wildcard is substituted
4349     by an empty string. In such cases, you can find the occurred error message on Geany's
4350     standard error and in the Help->Debug Messages dialog.
4353 Customizing the toolbar
4354 -----------------------
4356 You can add, remove and reorder the elements in the toolbar by using the toolbar editor
4357 by manually editing the file ``ui_toolbar.xml``.
4359 The toolbar editor can be opened from the preferences editor on the Toolbar tab or
4360 by right-clicking on the toolbar itself and choosing it from the menu.
4362 Manually editing of the toolbar layout
4363 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4365 To override the system-wide configuration file, copy it from
4366 ``$prefix/share/geany`` to your configuration directory, usually
4367 ``~/.config/geany/``. ``$prefix`` is the path where Geany is installed
4368 (see `Installation prefix`_).
4370 For example::
4372     % cp /usr/local/share/geany/ui_toolbar.xml /home/username/.config/geany/
4374 Then edit it and add any of the available elements listed in the file or remove
4375 any of the existing elements. Of course, you can also reorder the elements as
4376 you wish and add or remove additional separators.
4377 This file must be valid XML, otherwise the global toolbar UI definition
4378 will be used instead.
4380 Your changes are applied once you save the file.
4382 .. note::
4383     (1) You cannot add new actions which are not listed below.
4384     (2) Everything you add or change must be inside the /ui/toolbar/ path.
4387 Available toolbar elements
4388 ^^^^^^^^^^^^^^^^^^^^^^^^^^
4390 ================== ==============================================================================
4391 Element name       Description
4392 ================== ==============================================================================
4393 New                Create a new file
4394 Open               Open an existing file
4395 Save               Save the current file
4396 SaveAll            Save all open files
4397 Reload             Reload the current file from disk
4398 Close              Close the current file
4399 CloseAll           Close all open files
4400 Print              Print the current file
4401 Cut                Cut the current selection
4402 Copy               Copy the current selection
4403 Paste              Paste the contents of the clipboard
4404 Delete             Delete the current selection
4405 Undo               Undo the last modification
4406 Redo               Redo the last modification
4407 NavBack            Navigate back a location
4408 NavFor             Navigate forward a location
4409 Compile            Compile the current file
4410 Build              Build the current file, includes a submenu for Make commands. Geany
4411                    remembers the last chosen action from the submenu and uses this as default
4412                    action when the button itself is clicked.
4413 Run                Run or view the current file
4414 Color              Open a color chooser dialog, to interactively pick colors from a palette
4415 ZoomIn             Zoom in the text
4416 ZoomOut            Zoom out the text
4417 UnIndent           Decrease indentation
4418 Indent             Increase indentation
4419 Replace            Replace text in the current document
4420 SearchEntry        The search field belonging to the 'Search' element (can be used alone)
4421 Search             Find the entered text in the current file (only useful if you also
4422                    use 'SearchEntry')
4423 GotoEntry          The goto field belonging to the 'Goto' element (can be used alone)
4424 Goto               Jump to the entered line number (only useful if you also use 'GotoEntry')
4425 Preferences        Show the preferences dialog
4426 Quit               Quit Geany
4427 ================== ==============================================================================
4431 Plugin documentation
4432 ====================
4434 Save Actions
4435 ------------
4437 Instant Save
4438 ^^^^^^^^^^^^
4439 This plugin sets on every new file (File->New or File-> New (with template))
4440 a randomly chosen filename and set its filetype appropriate to the used template
4441 or when no template was used, to a configurable default filetype.
4442 This enables you to quickly compile, build and/or run the new file without the
4443 need to give it an explicit filename using the Save As dialog. This might be
4444 useful when you often create new files just for testing some code or something
4445 similar.
4448 Backup Copy
4449 ^^^^^^^^^^^
4451 This plugin creates a backup copy of the current file in Geany when it is
4452 saved. You can specify the directory where the backup copy is saved and
4453 you can configure the automatically added extension in the configure dialog
4454 in Geany's plugin manager.
4456 After the plugin was loaded in Geany's plugin manager, every file is
4457 copied into the configured backup directory when the file is saved in Geany.
4461 Contributing to this document
4462 =============================
4464 This document (``geany.txt``) is written in `reStructuredText`__
4465 (or "reST"). The source file for it is located in Geany's ``doc``
4466 subdirectory.  If you intend on making changes, you should grab the
4467 source right from SVN to make sure you've got the newest version. After
4468 editing the file, to build the HTML document to see how your changes
4469 look, run "``make doc``" in the subdirectory ``doc`` of Geany's source
4470 directory. This regenerates the ``geany.html`` file. To generate a PDF
4471 file, use the command "``make pdf``" which should generate a file called
4472 geany-|(version)|.pdf.
4474 __ http://docutils.sourceforge.net/rst.html
4476 After you are happy with your changes, create a patch::
4478     % svn diff geany.txt > foo.patch
4480 and then submit that file to the mailing list for review.
4482 Note, you will need the Python docutils software package installed
4483 to build the docs. The package is named ``python-docutils`` on Debian
4484 and Fedora systems.
4489 Scintilla keyboard commands
4490 ===========================
4492 Copyright © 1998, 2006 Neil Hodgson <neilh(at)scintilla(dot)org>
4494 This appendix is distributed under the terms of the License for
4495 Scintilla and SciTE. A copy of this license can be found in the file
4496 ``scintilla/License.txt`` included with the source code of this
4497 program and in the appendix of this document. See `License for
4498 Scintilla and SciTE`_.
4500 20 June 2006
4504 Keyboard commands
4505 -----------------
4507 Keyboard commands for Scintilla mostly follow common Windows and GTK+
4508 conventions. All move keys (arrows, page up/down, home and end)
4509 allows to extend or reduce the stream selection when holding the
4510 Shift key, and the rectangular selection when holding the Shift and
4511 Ctrl keys. Some keys may not be available with some national keyboards
4512 or because they are taken by the system such as by a window manager
4513 or GTK. Keyboard equivalents of menu commands are listed in the
4514 menus. Some less common commands with no menu equivalent are:
4516 =============================================   ======================
4517 Action                                          Shortcut key
4518 =============================================   ======================
4519 Magnify text size.                              Ctrl+Keypad+
4520 Reduce text size.                               Ctrl+Keypad-
4521 Restore text size to normal.                    Ctrl+Keypad/
4522 Indent block.                                   Tab
4523 Dedent block.                                   Shift+Tab
4524 Delete to start of word.                        Ctrl+BackSpace
4525 Delete to end of word.                          Ctrl+Delete
4526 Delete to start of line.                        Ctrl+Shift+BackSpace
4527 Go to start of document.                        Ctrl+Home
4528 Extend selection to start of document.          Ctrl+Shift+Home
4529 Go to start of display line.                    Alt+Home
4530 Extend selection to start of display line.      Alt+Shift+Home
4531 Go to end of document.                          Ctrl+End
4532 Extend selection to end of document.            Ctrl+Shift+End
4533 Extend selection to end of display line.        Alt+Shift+End
4534 Previous paragraph. Shift extends selection.    Ctrl+Up
4535 Next paragraph. Shift extends selection.        Ctrl+Down
4536 Previous word. Shift extends selection.         Ctrl+Left
4537 Next word. Shift extends selection.             Ctrl+Right
4538 =============================================   ======================
4543 Tips and tricks
4544 ===============
4546 Document notebook
4547 -----------------
4549 * Double-click on empty space in the notebook tab bar to open a
4550   new document.
4551 * Middle-click on a document's notebook tab to close the document.
4552 * Hold `Ctrl` and click on any notebook tab to switch to the last used
4553   document.
4554 * Double-click on a document's notebook tab to toggle all additional
4555   widgets (to show them again use the View menu or the keyboard
4556   shortcut). The interface pref must be enabled for this to work.
4558 Editor
4559 ------
4561 * Alt-scroll wheel moves up/down a page.
4562 * Ctrl-scroll wheel zooms in/out.
4563 * Shift-scroll wheel scrolls 8 characters right/left.
4564 * Ctrl-click on a word in a document to perform *Go to Tag Definition*.
4565 * Ctrl-click on a bracket/brace to perform *Go to Matching Brace*.
4567 Interface
4568 ---------
4570 * Double-click on a symbol-list group to expand or compact it.
4572 GTK-related
4573 -----------
4575 * Scrolling the mouse wheel over a notebook tab bar will switch
4576   notebook pages.
4578 The following are derived from X-Windows features (but GTK still supports
4579 them on Windows):
4581 * Middle-click pastes the last selected text.
4582 * Middle-click on a scrollbar moves the scrollbar to that
4583   position without having to drag it.
4587 Compile-time options
4588 ====================
4590 There are some options which can only be changed at compile time,
4591 and some options which are used as the default for configurable
4592 options. To change these options, edit the appropriate source file
4593 in the ``src`` subdirectory. Look for a block of lines starting with
4594 ``#define GEANY_*``. Any definitions which are not listed here should
4595 not be changed.
4597 .. note::
4598     Most users should not need to change these options.
4600 src/geany.h
4601 -----------
4603 ==============================  ============================================  ==================
4604 Option                          Description                                   Default
4605 ==============================  ============================================  ==================
4606 GEANY_STRING_UNTITLED           A string used as the default name for new     untitled
4607                                 files. Be aware that the string can be
4608                                 translated, so change it only if you know
4609                                 what you are doing.
4610 GEANY_WINDOW_MINIMAL_WIDTH      The minimal width of the main window.         620
4611 GEANY_WINDOW_MINIMAL_HEIGHT     The minimal height of the main window.        440
4612 GEANY_WINDOW_DEFAULT_WIDTH      The default width of the main window at the   900
4613                                 first start.
4614 GEANY_WINDOW_DEFAULT_HEIGHT     The default height of the main window at the  600
4615                                 first start.
4616  **Windows specific**
4617 GEANY_USE_WIN32_DIALOG          Set this to 1 if you want to use the default  0
4618                                 Windows file open and save dialogs instead
4619                                 GTK's file open and save dialogs. The
4620                                 default Windows file dialogs are missing
4621                                 some nice features like choosing a filetype
4622                                 or an encoding. *Do not touch this setting
4623                                 when building on a non-Win32 system.*
4624 ==============================  ============================================  ==================
4626 project.h
4627 ---------
4629 ==============================  ============================================  ==================
4630 Option                          Description                                   Default
4631 ==============================  ============================================  ==================
4632 GEANY_PROJECT_EXT               The default filename extension for Geany      geany
4633                                 project files. It is used when creating new
4634                                 projects and as filter mask for the project
4635                                 open dialog.
4636 ==============================  ============================================  ==================
4638 editor.h
4639 --------
4641 ==============================  ============================================  ==================
4642 Option                          Description                                   Default
4643 ==============================  ============================================  ==================
4644 GEANY_WORDCHARS                 These characters define word boundaries when  a string with:
4645                                 making selections and searching using word    a-z, A-Z, 0-9 and
4646                                 matching options.                             underscore.
4647 ==============================  ============================================  ==================
4649 keyfile.c
4650 ---------
4652 These are default settings that can be overridden in the `Preferences`_ dialog.
4654 ==============================  ============================================  ==================
4655 Option                          Description                                   Default
4656 ==============================  ============================================  ==================
4657 GEANY_MIN_SYMBOLLIST_CHARS      How many characters you need to type to       4
4658                                 trigger the autocompletion list.
4659 GEANY_DISK_CHECK_TIMEOUT        Time in seconds between checking a file for   30
4660                                 external changes.
4661 GEANY_DEFAULT_TOOLS_MAKE        The make tool. This can also include a path.  "make"
4662 GEANY_DEFAULT_TOOLS_TERMINAL    A terminal emulator. It has to accept the     "xterm"
4663                                 command line option "-e". This can also
4664                                 include a path.
4665 GEANY_DEFAULT_TOOLS_BROWSER     A web browser. This can also include a path.  "firefox"
4666 GEANY_DEFAULT_TOOLS_PRINTCMD    A printing tool. It should be able to accept  "lpr"
4667                                 and process plain text files. This can also
4668                                 include a path.
4669 GEANY_DEFAULT_TOOLS_GREP        A grep tool. It should be compatible with     "grep"
4670                                 GNU grep. This can also include a path.
4671 GEANY_DEFAULT_MRU_LENGTH        The length of the "Recent files" list.        10
4672 GEANY_DEFAULT_FONT_SYMBOL_LIST  The font used in sidebar to show symbols and  "Sans 9"
4673                                 open files.
4674 GEANY_DEFAULT_FONT_MSG_WINDOW   The font used in the messages window.         "Sans 9"
4675 GEANY_DEFAULT_FONT_EDITOR       The font used in the editor window.           "Monospace 10"
4676 GEANY_TOGGLE_MARK               A string which is used to mark a toggled      "~ "
4677                                 comment.
4678 GEANY_MAX_AUTOCOMPLETE_WORDS    How many autocompletion suggestions should    30
4679                                 Geany provide.
4680 ==============================  ============================================  ==================
4682 build.h
4683 -------
4685 ==============================  ============================================  ==================
4686 Option                          Description                                   Default
4687 ==============================  ============================================  ==================
4688 GEANY_BUILD_ERR_HIGHLIGHT_MAX   Amount of build error messages which should   100
4689                                 be highlighted in the Compiler message
4690                                 window. This affects the special coloring
4691                                 when Geany detects a compiler output line as
4692                                 an error message and then highlight the
4693                                 corresponding line in the source code.
4694                                 Usually only the first few messages are
4695                                 interesting because following errors are
4696                                 just aftereffects.
4697 ==============================  ============================================  ==================
4699 build.c
4700 -------
4702 ==============================  ============================================  ==================
4703 Option                          Description                                   Default
4704 ==============================  ============================================  ==================
4705 PRINTBUILDCMDS                  Every time a build menu item priority         FALSE
4706                                 calculation is run, print the state of the
4707                                 menu item table in the form of the table
4708                                 in `Build Menu Configuration`_.  May be
4709                                 useful to debug configuration file
4710                                 overloading.  Warning produces a lot of
4711                                 output.  Can also be enabled/disabled by the
4712                                 debugger by setting printbuildcmds to 1/0
4713                                 overriding the compile setting.
4714 ==============================  ============================================  ==================
4718 GNU General Public License
4719 ==========================
4723                 GNU GENERAL PUBLIC LICENSE
4724                    Version 2, June 1991
4726      Copyright (C) 1989, 1991 Free Software Foundation, Inc.
4727         51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
4728      Everyone is permitted to copy and distribute verbatim copies
4729      of this license document, but changing it is not allowed.
4731                     Preamble
4733       The licenses for most software are designed to take away your
4734     freedom to share and change it.  By contrast, the GNU General Public
4735     License is intended to guarantee your freedom to share and change free
4736     software--to make sure the software is free for all its users.  This
4737     General Public License applies to most of the Free Software
4738     Foundation's software and to any other program whose authors commit to
4739     using it.  (Some other Free Software Foundation software is covered by
4740     the GNU Library General Public License instead.)  You can apply it to
4741     your programs, too.
4743       When we speak of free software, we are referring to freedom, not
4744     price.  Our General Public Licenses are designed to make sure that you
4745     have the freedom to distribute copies of free software (and charge for
4746     this service if you wish), that you receive source code or can get it
4747     if you want it, that you can change the software or use pieces of it
4748     in new free programs; and that you know you can do these things.
4750       To protect your rights, we need to make restrictions that forbid
4751     anyone to deny you these rights or to ask you to surrender the rights.
4752     These restrictions translate to certain responsibilities for you if you
4753     distribute copies of the software, or if you modify it.
4755       For example, if you distribute copies of such a program, whether
4756     gratis or for a fee, you must give the recipients all the rights that
4757     you have.  You must make sure that they, too, receive or can get the
4758     source code.  And you must show them these terms so they know their
4759     rights.
4761       We protect your rights with two steps: (1) copyright the software, and
4762     (2) offer you this license which gives you legal permission to copy,
4763     distribute and/or modify the software.
4765       Also, for each author's protection and ours, we want to make certain
4766     that everyone understands that there is no warranty for this free
4767     software.  If the software is modified by someone else and passed on, we
4768     want its recipients to know that what they have is not the original, so
4769     that any problems introduced by others will not reflect on the original
4770     authors' reputations.
4772       Finally, any free program is threatened constantly by software
4773     patents.  We wish to avoid the danger that redistributors of a free
4774     program will individually obtain patent licenses, in effect making the
4775     program proprietary.  To prevent this, we have made it clear that any
4776     patent must be licensed for everyone's free use or not licensed at all.
4778       The precise terms and conditions for copying, distribution and
4779     modification follow.
4781                 GNU GENERAL PUBLIC LICENSE
4782        TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
4784       0. This License applies to any program or other work which contains
4785     a notice placed by the copyright holder saying it may be distributed
4786     under the terms of this General Public License.  The "Program", below,
4787     refers to any such program or work, and a "work based on the Program"
4788     means either the Program or any derivative work under copyright law:
4789     that is to say, a work containing the Program or a portion of it,
4790     either verbatim or with modifications and/or translated into another
4791     language.  (Hereinafter, translation is included without limitation in
4792     the term "modification".)  Each licensee is addressed as "you".
4794     Activities other than copying, distribution and modification are not
4795     covered by this License; they are outside its scope.  The act of
4796     running the Program is not restricted, and the output from the Program
4797     is covered only if its contents constitute a work based on the
4798     Program (independent of having been made by running the Program).
4799     Whether that is true depends on what the Program does.
4801       1. You may copy and distribute verbatim copies of the Program's
4802     source code as you receive it, in any medium, provided that you
4803     conspicuously and appropriately publish on each copy an appropriate
4804     copyright notice and disclaimer of warranty; keep intact all the
4805     notices that refer to this License and to the absence of any warranty;
4806     and give any other recipients of the Program a copy of this License
4807     along with the Program.
4809     You may charge a fee for the physical act of transferring a copy, and
4810     you may at your option offer warranty protection in exchange for a fee.
4812       2. You may modify your copy or copies of the Program or any portion
4813     of it, thus forming a work based on the Program, and copy and
4814     distribute such modifications or work under the terms of Section 1
4815     above, provided that you also meet all of these conditions:
4817         a) You must cause the modified files to carry prominent notices
4818         stating that you changed the files and the date of any change.
4820         b) You must cause any work that you distribute or publish, that in
4821         whole or in part contains or is derived from the Program or any
4822         part thereof, to be licensed as a whole at no charge to all third
4823         parties under the terms of this License.
4825         c) If the modified program normally reads commands interactively
4826         when run, you must cause it, when started running for such
4827         interactive use in the most ordinary way, to print or display an
4828         announcement including an appropriate copyright notice and a
4829         notice that there is no warranty (or else, saying that you provide
4830         a warranty) and that users may redistribute the program under
4831         these conditions, and telling the user how to view a copy of this
4832         License.  (Exception: if the Program itself is interactive but
4833         does not normally print such an announcement, your work based on
4834         the Program is not required to print an announcement.)
4836     These requirements apply to the modified work as a whole.  If
4837     identifiable sections of that work are not derived from the Program,
4838     and can be reasonably considered independent and separate works in
4839     themselves, then this License, and its terms, do not apply to those
4840     sections when you distribute them as separate works.  But when you
4841     distribute the same sections as part of a whole which is a work based
4842     on the Program, the distribution of the whole must be on the terms of
4843     this License, whose permissions for other licensees extend to the
4844     entire whole, and thus to each and every part regardless of who wrote it.
4846     Thus, it is not the intent of this section to claim rights or contest
4847     your rights to work written entirely by you; rather, the intent is to
4848     exercise the right to control the distribution of derivative or
4849     collective works based on the Program.
4851     In addition, mere aggregation of another work not based on the Program
4852     with the Program (or with a work based on the Program) on a volume of
4853     a storage or distribution medium does not bring the other work under
4854     the scope of this License.
4856       3. You may copy and distribute the Program (or a work based on it,
4857     under Section 2) in object code or executable form under the terms of
4858     Sections 1 and 2 above provided that you also do one of the following:
4860         a) Accompany it with the complete corresponding machine-readable
4861         source code, which must be distributed under the terms of Sections
4862         1 and 2 above on a medium customarily used for software interchange; or,
4864         b) Accompany it with a written offer, valid for at least three
4865         years, to give any third party, for a charge no more than your
4866         cost of physically performing source distribution, a complete
4867         machine-readable copy of the corresponding source code, to be
4868         distributed under the terms of Sections 1 and 2 above on a medium
4869         customarily used for software interchange; or,
4871         c) Accompany it with the information you received as to the offer
4872         to distribute corresponding source code.  (This alternative is
4873         allowed only for noncommercial distribution and only if you
4874         received the program in object code or executable form with such
4875         an offer, in accord with Subsection b above.)
4877     The source code for a work means the preferred form of the work for
4878     making modifications to it.  For an executable work, complete source
4879     code means all the source code for all modules it contains, plus any
4880     associated interface definition files, plus the scripts used to
4881     control compilation and installation of the executable.  However, as a
4882     special exception, the source code distributed need not include
4883     anything that is normally distributed (in either source or binary
4884     form) with the major components (compiler, kernel, and so on) of the
4885     operating system on which the executable runs, unless that component
4886     itself accompanies the executable.
4888     If distribution of executable or object code is made by offering
4889     access to copy from a designated place, then offering equivalent
4890     access to copy the source code from the same place counts as
4891     distribution of the source code, even though third parties are not
4892     compelled to copy the source along with the object code.
4894       4. You may not copy, modify, sublicense, or distribute the Program
4895     except as expressly provided under this License.  Any attempt
4896     otherwise to copy, modify, sublicense or distribute the Program is
4897     void, and will automatically terminate your rights under this License.
4898     However, parties who have received copies, or rights, from you under
4899     this License will not have their licenses terminated so long as such
4900     parties remain in full compliance.
4902       5. You are not required to accept this License, since you have not
4903     signed it.  However, nothing else grants you permission to modify or
4904     distribute the Program or its derivative works.  These actions are
4905     prohibited by law if you do not accept this License.  Therefore, by
4906     modifying or distributing the Program (or any work based on the
4907     Program), you indicate your acceptance of this License to do so, and
4908     all its terms and conditions for copying, distributing or modifying
4909     the Program or works based on it.
4911       6. Each time you redistribute the Program (or any work based on the
4912     Program), the recipient automatically receives a license from the
4913     original licensor to copy, distribute or modify the Program subject to
4914     these terms and conditions.  You may not impose any further
4915     restrictions on the recipients' exercise of the rights granted herein.
4916     You are not responsible for enforcing compliance by third parties to
4917     this License.
4919       7. If, as a consequence of a court judgment or allegation of patent
4920     infringement or for any other reason (not limited to patent issues),
4921     conditions are imposed on you (whether by court order, agreement or
4922     otherwise) that contradict the conditions of this License, they do not
4923     excuse you from the conditions of this License.  If you cannot
4924     distribute so as to satisfy simultaneously your obligations under this
4925     License and any other pertinent obligations, then as a consequence you
4926     may not distribute the Program at all.  For example, if a patent
4927     license would not permit royalty-free redistribution of the Program by
4928     all those who receive copies directly or indirectly through you, then
4929     the only way you could satisfy both it and this License would be to
4930     refrain entirely from distribution of the Program.
4932     If any portion of this section is held invalid or unenforceable under
4933     any particular circumstance, the balance of the section is intended to
4934     apply and the section as a whole is intended to apply in other
4935     circumstances.
4937     It is not the purpose of this section to induce you to infringe any
4938     patents or other property right claims or to contest validity of any
4939     such claims; this section has the sole purpose of protecting the
4940     integrity of the free software distribution system, which is
4941     implemented by public license practices.  Many people have made
4942     generous contributions to the wide range of software distributed
4943     through that system in reliance on consistent application of that
4944     system; it is up to the author/donor to decide if he or she is willing
4945     to distribute software through any other system and a licensee cannot
4946     impose that choice.
4948     This section is intended to make thoroughly clear what is believed to
4949     be a consequence of the rest of this License.
4951       8. If the distribution and/or use of the Program is restricted in
4952     certain countries either by patents or by copyrighted interfaces, the
4953     original copyright holder who places the Program under this License
4954     may add an explicit geographical distribution limitation excluding
4955     those countries, so that distribution is permitted only in or among
4956     countries not thus excluded.  In such case, this License incorporates
4957     the limitation as if written in the body of this License.
4959       9. The Free Software Foundation may publish revised and/or new versions
4960     of the General Public License from time to time.  Such new versions will
4961     be similar in spirit to the present version, but may differ in detail to
4962     address new problems or concerns.
4964     Each version is given a distinguishing version number.  If the Program
4965     specifies a version number of this License which applies to it and "any
4966     later version", you have the option of following the terms and conditions
4967     either of that version or of any later version published by the Free
4968     Software Foundation.  If the Program does not specify a version number of
4969     this License, you may choose any version ever published by the Free Software
4970     Foundation.
4972       10. If you wish to incorporate parts of the Program into other free
4973     programs whose distribution conditions are different, write to the author
4974     to ask for permission.  For software which is copyrighted by the Free
4975     Software Foundation, write to the Free Software Foundation; we sometimes
4976     make exceptions for this.  Our decision will be guided by the two goals
4977     of preserving the free status of all derivatives of our free software and
4978     of promoting the sharing and reuse of software generally.
4980                     NO WARRANTY
4982       11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
4983     FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
4984     OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
4985     PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
4986     OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
4987     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
4988     TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
4989     PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
4990     REPAIR OR CORRECTION.
4992       12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
4993     WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
4994     REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
4995     INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
4996     OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
4997     TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
4998     YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
4999     PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
5000     POSSIBILITY OF SUCH DAMAGES.
5002                  END OF TERMS AND CONDITIONS
5004             How to Apply These Terms to Your New Programs
5006       If you develop a new program, and you want it to be of the greatest
5007     possible use to the public, the best way to achieve this is to make it
5008     free software which everyone can redistribute and change under these terms.
5010       To do so, attach the following notices to the program.  It is safest
5011     to attach them to the start of each source file to most effectively
5012     convey the exclusion of warranty; and each file should have at least
5013     the "copyright" line and a pointer to where the full notice is found.
5015         <one line to give the program's name and a brief idea of what it does.>
5016         Copyright (C) <year>  <name of author>
5018         This program is free software; you can redistribute it and/or modify
5019         it under the terms of the GNU General Public License as published by
5020         the Free Software Foundation; either version 2 of the License, or
5021         (at your option) any later version.
5023         This program is distributed in the hope that it will be useful,
5024         but WITHOUT ANY WARRANTY; without even the implied warranty of
5025         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5026         GNU General Public License for more details.
5028         You should have received a copy of the GNU General Public License
5029         along with this program; if not, write to the Free Software
5030         Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
5033     Also add information on how to contact you by electronic and paper mail.
5035     If the program is interactive, make it output a short notice like this
5036     when it starts in an interactive mode:
5038         Gnomovision version 69, Copyright (C) year  name of author
5039         Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
5040         This is free software, and you are welcome to redistribute it
5041         under certain conditions; type `show c' for details.
5043     The hypothetical commands `show w' and `show c' should show the appropriate
5044     parts of the General Public License.  Of course, the commands you use may
5045     be called something other than `show w' and `show c'; they could even be
5046     mouse-clicks or menu items--whatever suits your program.
5048     You should also get your employer (if you work as a programmer) or your
5049     school, if any, to sign a "copyright disclaimer" for the program, if
5050     necessary.  Here is a sample; alter the names:
5052       Yoyodyne, Inc., hereby disclaims all copyright interest in the program
5053       `Gnomovision' (which makes passes at compilers) written by James Hacker.
5055       <signature of Ty Coon>, 1 April 1989
5056       Ty Coon, President of Vice
5058     This General Public License does not permit incorporating your program into
5059     proprietary programs.  If your program is a subroutine library, you may
5060     consider it more useful to permit linking proprietary applications with the
5061     library.  If this is what you want to do, use the GNU Library General
5062     Public License instead of this License.
5067 License for Scintilla and SciTE
5068 ===============================
5070 Copyright 1998-2003 by Neil Hodgson <neilh(at)scintilla(dot)org>
5072 All Rights Reserved
5074 Permission to use, copy, modify, and distribute this software and
5075 its documentation for any purpose and without fee is hereby granted,
5076 provided that the above copyright notice appear in all copies and
5077 that both that copyright notice and this permission notice appear in
5078 supporting documentation.
5080 NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
5081 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
5082 NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
5083 CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
5084 OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
5085 OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
5086 USE OR PERFORMANCE OF THIS SOFTWARE.