Set release date
[geany-mirror.git] / doc / geany.txt
blob5e28722417adb5ca94cbd57e69ae46f85d0e1f2d
1 .. |(version)| replace:: 1.37.1
2 .. -*- reStructuredText -*-
4 =======
5  Geany
6 =======
8 -------------------------
9  A fast, light, GTK+ IDE
10 -------------------------
12 :Authors: Enrico Tröger,
13           Nick Treleaven,
14           Frank Lanitz,
15           Colomban Wendling,
16           Matthew Brush
17 :Date: 2020-11-08
18 :Version: |(version)|
20 Copyright © 2005 The Geany contributors
22 This document is distributed under the terms of the GNU General Public
23 License as published by the Free Software Foundation; either version 2
24 of the License, or (at your option) any later version. A copy of this
25 license can be found in the file COPYING included with the source code
26 of this program, and also in the chapter `GNU General Public License`_.
29 .. contents::
33 Introduction
34 ============
37 About Geany
38 -----------
40 Geany is a small and lightweight Integrated Development Environment. It
41 was developed to provide a small and fast IDE, which has only a few
42 dependencies on other packages. Another goal was to be as independent
43 as possible from a particular Desktop Environment like KDE or GNOME -
44 Geany only requires the GTK+ runtime libraries.
46 Some basic features of Geany:
48 * Syntax highlighting
49 * Code folding
50 * Autocompletion of symbols/words
51 * Construct completion/snippets
52 * Auto-closing of XML and HTML tags
53 * Calltips
54 * Many supported filetypes including C, Java, PHP, HTML, Python, Perl,
55   Pascal, and others
56 * Symbol lists
57 * Code navigation
58 * Build system to compile and execute your code
59 * Simple project management
60 * Plugin interface
64 Where to get it
65 ---------------
67 You can obtain Geany from https://www.geany.org/ or perhaps also from
68 your distribution. For a list of available packages, please see
69 https://www.geany.org/Download/ThirdPartyPackages.
73 License
74 -------
76 Geany is distributed under the terms of the GNU General Public License
77 as published by the Free Software Foundation; either version 2 of
78 the License, or (at your option) any later version. A copy of this
79 license can be found in the file COPYING included with the source
80 code of this program and in the chapter, `GNU General Public License`_.
82 The included Scintilla library (found in the subdirectory
83 ``scintilla/``) has its own license, which can be found in the chapter,
84 `License for Scintilla and SciTE`_.
88 About this document
89 -------------------
91 This documentation is available in HTML and text formats.
92 The latest version can always be found at https://www.geany.org/.
94 If you want to contribute to it, see `Contributing to this document`_.
99 Installation
100 ============
103 Requirements
104 ------------
106 You will need the GTK (>= 2.24) libraries and their dependencies
107 (Pango, GLib and ATK). Your distro should provide packages for these,
108 usually installed by default. For Windows, you can download an installer
109 from the website which bundles these libraries.
112 Binary packages
113 ---------------
115 There are many binary packages available. For an up-to-date but maybe
116 incomplete list see https://www.geany.org/Download/ThirdPartyPackages.
119 Source compilation
120 ------------------
122 Compiling Geany is quite easy.
123 To do so, you need the GTK (>= 2.24) libraries and header files.
124 You also need the Pango, GLib and ATK libraries and header files.
125 All these files are available at http://www.gtk.org, but very often
126 your distro will provide development packages to save the trouble of
127 building these yourself.
129 Furthermore you need, of course, a C and C++ compiler. The GNU versions
130 of these tools are recommended.
132 Autotools based build system
133 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
135 To compile Geany yourself, you just need the Make tool, preferably GNU Make.
137 Then run the following commands::
139     $ ./configure
140     $ make
142 Then as root::
144     % make install
146 Or via sudo::
148     % sudo make install
150 Custom installation
151 ^^^^^^^^^^^^^^^^^^^
152 The configure script supports several common options, for a detailed
153 list, type::
155     $ ./configure --help
158 You may also want to read the INSTALL file for advanced installation
159 options.
161 * See also `Compile-time options`_.
163 Dynamic linking loader support and VTE
164 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
165 In the case that your system lacks dynamic linking loader support, you
166 probably want to pass the option ``--disable-vte`` to the ``configure``
167 script. This prevents compiling Geany with dynamic linking loader
168 support for automatically loading ``libvte.so.4`` if available.
170 Build problems
171 ^^^^^^^^^^^^^^
172 If there are any errors during compilation, check your build
173 environment and try to find the error, otherwise contact the mailing
174 list or one the authors. Sometimes you might need to ask for specific
175 help from your distribution.
178 Installation prefix
179 -------------------
180 If you want to find Geany's system files after installation you may
181 want to know the installation prefix.
183 Pass the ``--print-prefix`` option to Geany to check this - see
184 `Command line options`_. The first path is the prefix.
186 On Unix-like systems this is commonly ``/usr`` if you installed from
187 a binary package, or ``/usr/local`` if you build from source.
189 .. note::
190     Editing system files is not necessary as you should use the
191     per-user configuration files instead, which don't need root
192     permissions. See `Configuration files`_.
195 Usage
196 =====
199 Getting started
200 ---------------
202 You can start Geany in the following ways:
204 * From the Desktop Environment menu:
206   Choose in your application menu of your used Desktop Environment:
207   Development --> Geany.
209   At Windows-systems you will find Geany after installation inside
210   the application menu within its special folder.
212 * From the command line:
214   To start Geany from a command line, type the following and press
215   Return::
217       % geany
219 The Geany workspace
220 -------------------
222 The Geany window is shown in the following figure:
224 .. image:: ./images/main_window.png
226 The workspace has the following parts:
228 * The menu.
229 * An optional toolbar.
230 * An optional sidebar that can show the following tabs:
232   * Documents - A document list, and
233   * Symbols - A list of symbols in your code.
235 * The main editor window.
236 * An optional message window which can show the following tabs:
238   * Status - A list of status messages.
239   * Compiler - The output of compiling or building programs.
240   * Messages - Results of 'Find Usage', 'Find in Files' and other actions
241   * Scribble - A text scratchpad for any use.
242   * Terminal - An optional terminal window.
244 * A status bar
246 Most of these can be configured in the `Interface preferences`_, the
247 `View menu`_, or the popup menu for the relevant area.
249 Additional tabs may be added to the sidebar and message window by plugins.
251 The position of the tabs can be selected in the interface preferences.
253 The sizes of the sidebar and message window can be adjusted by
254 dragging the dividers.
256 Command line options
257 --------------------
259 ============  =======================  =================================================
260 Short option  Long option              Function
261 ============  =======================  =================================================
262 *none*        +number                  Set initial line number for the first opened file
263                                        (same as --line, do not put a space between the + sign
264                                        and the number). E.g. "geany +7 foo.bar" will open the
265                                        file foo.bar and place the cursor in line 7.
267 *none*        --column                 Set initial column number for the first opened file.
269 -c dir_name   --config=directory_name  Use an alternate configuration directory. The default
270                                        configuration directory is ``~/.config/geany/`` and that
271                                        is where ``geany.conf`` and other configuration files
272                                        reside.
274 *none*        --ft-names               Print a list of Geany's internal filetype names (useful
275                                        for snippets configuration).
277 -g            --generate-tags          Generate a global tags file (see
278                                        `Generating a global tags file`_).
280 -P            --no-preprocessing       Don't preprocess C/C++ files when generating tags file.
282 -i            --new-instance           Do not open files in a running instance, force opening
283                                        a new instance. Only available if Geany was compiled
284                                        with support for Sockets.
286 -l            --line                   Set initial line number for the first opened file.
288 *none*        --list-documents         Return a list of open documents in a running Geany
289                                        instance.
290                                        This can be used to read the currently opened documents in
291                                        Geany from an external script or tool. The returned list
292                                        is separated by newlines (LF) and consists of the full,
293                                        UTF-8 encoded filenames of the documents.
294                                        Only available if Geany was compiled with support for
295                                        Sockets.
297 -m            --no-msgwin              Do not show the message window. Use this option if you
298                                        do not need compiler messages or VTE support.
300 -n            --no-ctags               Do not load symbol completion and call tip data. Use this
301                                        option if you do not want to use them.
303 -p            --no-plugins             Do not load plugins or plugin support.
305 *none*        --print-prefix           Print installation prefix, the data directory, the lib
306                                        directory and the locale directory (in that order) to
307                                        stdout, one line each. This is mainly intended for plugin
308                                        authors to detect installation paths.
310 -r            --read-only              Open all files given on the command line in read-only mode.
311                                        This only applies to files opened explicitly from the command
312                                        line, so files from previous sessions or project files are
313                                        unaffected.
315 -s            --no-session             Do not load the previous session's files.
317 -t            --no-terminal            Do not load terminal support. Use this option if you do
318                                        not want to load the virtual terminal emulator widget
319                                        at startup. If you do not have ``libvte.so.4`` installed,
320                                        then terminal-support is automatically disabled. Only
321                                        available if Geany was compiled with support for VTE.
323 *none*        --socket-file            Use this socket filename for communication with a
324                                        running Geany instance. This can be used with the following
325                                        command to execute Geany on the current workspace::
327                                          geany --socket-file=/tmp/geany-sock-$(xprop -root _NET_CURRENT_DESKTOP | awk '{print $3}')
329 *none*        --vte-lib                Specify explicitly the path including filename or only
330                                        the filename to the VTE library, e.g.
331                                        ``/usr/lib/libvte.so`` or ``libvte.so``. This option is
332                                        only needed when the auto-detection does not work. Only
333                                        available if Geany was compiled with support for VTE.
335 -v            --verbose                Be verbose (print useful status messages).
337 -V            --version                Show version information and exit.
339 -?            --help                   Show help information and exit.
341 *none*        [files ...]              Open all given files at startup. This option causes
342                                        Geany to ignore loading stored files from the last
343                                        session (if enabled).
344                                        Geany also recognizes line and column information when
345                                        appended to the filename with colons, e.g.
346                                        "geany foo.bar:10:5" will open the file foo.bar and
347                                        place the cursor in line 10 at column 5.
349                                        Projects can also be opened but a project file (\*.geany)
350                                        must be the first non-option argument. All additionally
351                                        given files are ignored.
352 ============  =======================  =================================================
354 You can also pass line number and column number information, e.g.::
356     geany some_file.foo:55:4
358 Geany supports all generic GTK options, a list is available on the
359 help screen.
363 General
364 -------
367 Startup
368 ^^^^^^^
370 At startup, Geany loads all files from the last time Geany was
371 launched. You can disable this feature in the preferences dialog
372 (see `General Startup preferences`_).
374 You can start several instances of Geany, but only the first will
375 load files from the last session. In the subsequent instances, you
376 can find these files in the file menu under the "Recent files" item.
377 By default this contains the last 10 recently opened files. You can
378 change the number of recently opened files in the preferences dialog.
380 To run a second instance of Geany, do not specify any filenames on
381 the command-line, or disable opening files in a running instance
382 using the appropriate command line option.
385 Opening files from the command-line in a running instance
386 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
388 Geany detects if there is an instance of itself already running and opens files
389 from the command-line in that instance. So, Geany can
390 be used to view and edit files by opening them from other programs
391 such as a file manager.
393 You can also pass line number and column number information, e.g.::
395     geany some_file.foo:55:4
397 This would open the file ``some_file.foo`` with the cursor on line 55,
398 column 4.
400 If you do not like this for some reason, you can disable using the first
401 instance by using the appropriate command line option -- see the section
402 called `Command line options`_.
405 Virtual terminal emulator widget (VTE)
406 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
408 If you have installed ``libvte.so`` on your system, it is loaded
409 automatically by Geany, and you will have a terminal widget in the
410 notebook at the bottom.
412 If Geany cannot find any ``libvte.so`` at startup, the terminal widget
413 will not be loaded. So there is no need to install the package containing
414 this file in order to run Geany. Additionally, you can disable the use
415 of the terminal widget by command line option, for more information
416 see the section called `Command line options`_.
418 You can use this terminal (from now on called VTE) much as you would
419 a terminal program like xterm. There is basic clipboard support. You
420 can paste the contents of the clipboard by pressing the right mouse
421 button to open the popup menu, and choosing Paste. To copy text from
422 the VTE, just select the desired text and then press the right mouse
423 button and choose Copy from the popup menu. On systems running the
424 X Window System you can paste the last selected text by pressing the
425 middle mouse button in the VTE (on 2-button mice, the middle button
426 can often be simulated by pressing both mouse buttons together).
428 In the preferences dialog you can specify a shell which should be
429 started in the VTE. To make the specified shell a login shell just
430 use the appropriate command line options for the shell. These options
431 should be found in the manual page of the shell. For zsh and bash
432 you can use the argument ``--login``.
434 .. note::
435     Geany tries to load ``libvte.so``. If this fails, it tries to load
436     some other filenames. If this fails too, you should check whether you
437     installed libvte correctly. Again note, Geany will run without this
438     library.
440 It could be, that the library is called something else than
441 ``libvte.so`` (e.g. on FreeBSD 6.0 it is called ``libvte.so.8``). If so
442 please set a link to the correct file (as root)::
444     # ln -s /usr/lib/libvte.so.X /usr/lib/libvte.so
446 Obviously, you have to adjust the paths and set X to the number of your
447 ``libvte.so``.
449 You can also specify the filename of the VTE library to use on the command
450 line (see the section called `Command line options`_) or at compile time
451 by specifying the command line option ``--with-vte-module-path`` to
452 ./configure.
455 Defining own widget styles using .gtkrc-2.0
456 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
458 You can define your widget style for many of Geany's GUI parts. To
459 do this, just edit your ``.gtkrc-2.0`` (usually found in your home
460 directory on UNIX-like systems and in the etc subdirectory of your
461 Geany installation on Windows).
463 To have a defined style used by Geany you must assign it to
464 at least one of Geany's widgets. For example use the following line::
466     widget "Geany*" style "geanyStyle"
468 This would assign your style "geany_style" to all Geany
469 widgets. You can also assign styles only to specific widgets. At the
470 moment you can use the following widgets:
472 * GeanyMainWindow
473 * GeanyEditMenu
474 * GeanyToolbarMenu
475 * GeanyDialog
476 * GeanyDialogPrefs
477 * GeanyDialogProject
478 * GeanyDialogSearch
479 * GeanyMenubar
480 * GeanyToolbar
482 An example of a simple ``.gtkrc-2.0``::
484     style "geanyStyle"
485     {
486         font_name="Sans 12"
487     }
488     widget "GeanyMainWindow" style "geanyStyle"
490     style "geanyStyle"
491     {
492         font_name="Sans 10"
493     }
494     widget "GeanyPrefsDialog" style "geanyStyle"
497 Customizing Geany's appearance using GTK+ 3 CSS
498 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
500 To override GTK+ CSS styles, you can use traditional mechanisms or you
501 can create a file named ``geany.css`` in the user configuration directory
502 (usually ``~/.config/geany``) which will be loaded after other CSS styles
503 are applied to allow overriding the default styles.
505 Geany offers a number of CSS IDs which can be used to taylor its
506 appearence. Among the more interesting include:
508 * ``geany-compiler-context`` - the style used for build command output surrounding errors
509 * ``geany-compiler-error`` - the style used for build command errors
510 * ``geany-compiler-message`` - the style other output encountered while running build command
511 * ``geany-document-status-changed`` - the style for document tab labels when the document is changed
512 * ``geany-document-status-disk-changed`` - the style for document tab labels when the file on disk has changed
513 * ``geany-document-status-readyonly``` - the style for document tab labels when the document is read-only
514 * ``geany-search-entry-no-match`` - the style of find/replace diaog entries when no match is found
515 * ``geany-terminal-dirty`` - the style for the message window Terminal tab label when the terminal output has changed.
518 Documents
519 ---------
521 Switching between documents
522 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
524 The documents list and the editor tabs are two different ways
525 to switch between documents using the mouse. When you hit the key
526 combination to move between tabs, the order is determined by the tab
527 order. It is not alphabetical as shown in the documents list
528 (regardless of whether or not editor tabs are visible).
530 See the `Notebook tab keybindings`_ section for useful
531 shortcuts including for Most-Recently-Used document switching.
533 Cloning documents
534 ^^^^^^^^^^^^^^^^^
535 The `Document->Clone` menu item copies the current document's text,
536 cursor position and properties into a new untitled document. If
537 there is a selection, only the selected text is copied. This can be
538 useful when making temporary copies of text or for creating
539 documents with similar or identical contents.
541 Automatic filename insertion on `Save As...`
542 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
543 If a document is saved via `Document->Save As...` then the filename is
544 automatically inserted into the comment header replacing text like
545 `untitled.ext` in the first 3 lines of the file. E.g. if a new ``.c``
546 file is created using `File->New (with Template)` then the text `untitled.c`
547 in line 2 would be replaced with the choosen file name on `Save As...`
548 (this example assumes the default file templates being used).
551 Character sets and Unicode Byte-Order-Mark (BOM)
552 ------------------------------------------------
555 Using character sets
556 ^^^^^^^^^^^^^^^^^^^^
558 Geany provides support for detecting and converting character sets. So
559 you can open and save files in different character sets, and even
560 convert a file from one character set to another. To do this,
561 Geany uses the character conversion capabilities of the GLib library.
563 Only text files are supported, i.e. opening files which contain
564 NULL-bytes may fail. Geany will try to open the file anyway but it is
565 likely that the file will be truncated because it can only be read up
566 to the first occurrence of a NULL-byte. All characters after this
567 position are lost and are not written when you save the file.
569 Geany tries to detect the encoding of a file while opening it, but
570 auto-detecting the encoding of a file is not easy and sometimes an
571 encoding might not be detected correctly. In this case you have to
572 set the encoding of the file manually in order to display it
573 correctly. You can this in the file open dialog by selecting an
574 encoding in the drop down box or by reloading the file with the
575 file menu item "Reload as". The auto-detection works well for most
576 encodings but there are also some encodings where it is known that
577 auto-detection has problems.
579 There are different ways to set different encodings in Geany:
581 * Using the file open dialog
583   This opens the file with the encoding specified in the encoding drop
584   down box. If the encoding is set to "Detect from file" auto-detection
585   will be used. If the encoding is set to "Without encoding (None)" the
586   file will be opened without any character conversion and Geany will
587   not try to auto-detect the encoding (see below for more information).
589 * Using the "Reload as" menu item
591   This item reloads the current file with the specified encoding. It can
592   help if you opened a file and found out that the wrong encoding was used.
594 * Using the "Set encoding" menu item
596   Contrary to the above two options, this will not change or reload
597   the current file unless you save it. It is useful when you want to
598   change the encoding of the file.
600 * Specifying the encoding in the file itself
602   As mentioned above, auto-detecting the encoding of a file may fail on
603   some encodings. If you know that Geany doesn't open a certain file,
604   you can add the specification line, described in the next section,
605   to the beginning of the file to force Geany to use a specific
606   encoding when opening the file.
609 In-file encoding specification
610 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
612 Geany detects meta tags of HTML files which contain charset information
613 like::
615     <meta http-equiv="content-type" content="text/html; charset=ISO-8859-15" />
617 and the specified charset is used when opening the file. This is useful if the
618 encoding of the file cannot be detected properly.
619 For non-HTML files you can also define a line like::
621     /* geany_encoding=ISO-8859-15 */
623 or::
625     # geany_encoding=ISO-8859-15 #
627 to force an encoding to be used. The #, /\* and \*/ are examples
628 of filetype-specific comment characters. It doesn't matter which
629 characters are around the string " geany_encoding=ISO-8859-15 " as long
630 as there is at least one whitespace character before and after this
631 string. Whitespace characters are in this case a space or tab character.
632 An example to use this could be you have a file with ISO-8859-15
633 encoding but Geany constantly detects the file encoding as ISO-8859-1.
634 Then you simply add such a line to the file and Geany will open it
635 correctly the next time.
637 Since Geany 0.15 you can also use lines which match the
638 regular expression used to find the encoding string:
639 ``coding[\t ]*[:=][\t ]*([a-z0-9-]+)[\t ]*``
641 .. note::
642     These specifications must be in the first 512 bytes of the file.
643     Anything after the first 512 bytes will not be recognized.
645 Some examples are::
647     # encoding = ISO-8859-15
649 or::
651     # coding: ISO-8859-15
653 Special encoding "None"
654 ^^^^^^^^^^^^^^^^^^^^^^^
656 There is a special encoding "None" which uses no
657 encoding. It is useful when you know that Geany cannot auto-detect
658 the encoding of a file and it is not displayed correctly. Especially
659 when the file contains NULL-bytes this can be useful to skip auto
660 detection and open the file properly at least until the occurrence
661 of the first NULL-byte. Using this encoding opens the file as it is
662 without any character conversion.
665 Unicode Byte-Order-Mark (BOM)
666 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
668 Furthermore, Geany detects a Unicode Byte Order Mark (see
669 http://en.wikipedia.org/wiki/Byte_Order_Mark for details). Of course,
670 this feature is only available if the opened file is in a Unicode
671 encoding. The Byte Order Mark helps to detect the encoding of a file,
672 e.g. whether it is UTF-16LE or UTF-16BE and so on. On Unix-like systems
673 using a Byte Order Mark could cause some problems for programs not
674 expecting it, e.g. the compiler gcc stops
675 with stray errors, PHP does not parse a script containing a BOM and
676 script files starting with a she-bang maybe cannot be started. In the
677 status bar you can easily see whether the file starts with a BOM or
678 not.
680 If you want to set a BOM for a file or if you want to remove it
681 from a file, just use the document menu and toggle the checkbox.
683 .. note::
684     If you are unsure what a BOM is or if you do not understand where
685     to use it, then it is probably not important for you and you can
686     safely ignore it.
690 Editing
691 -------
694 Folding
695 ^^^^^^^
697 Geany provides basic code folding support. Folding means the ability to
698 show and hide parts of the text in the current file. You can hide
699 unimportant code sections and concentrate on the parts you are working on
700 and later you can show hidden sections again. In the editor window there is
701 a small grey margin on the left side with [+] and [-] symbols which
702 show hidden parts and hide parts of the file respectively. By
703 clicking on these icons you can simply show and hide sections which are
704 marked by vertical lines within this margin. For many filetypes nested
705 folding is supported, so there may be several fold points within other
706 fold points.
708 .. note::
709     You can customize the folding icon and line styles - see the
710     filetypes.common `Folding Settings`_.
712 If you don't like it or don't need it at all, you can simply disable
713 folding support completely in the preferences dialog.
715 The folding behaviour can be changed with the "Fold/Unfold all children of
716 a fold point" option in the preference dialog. If activated, Geany will
717 unfold all nested fold points below the current one if they are already
718 folded (when clicking on a [+] symbol).
719 When clicking on a [-] symbol, Geany will fold all nested fold points
720 below the current one if they are unfolded.
722 This option can be inverted by pressing the Shift
723 key while clicking on a fold symbol. That means, if the "Fold/Unfold all
724 children of a fold point" option is enabled, pressing Shift will disable
725 it for this click and vice versa.
728 Column mode editing (rectangular selections)
729 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
731 There is basic support for column mode editing. To use it, create a
732 rectangular selection by holding down the Control and Shift keys
733 (or Alt and Shift on Windows) while selecting some text.
734 Once a rectangular selection exists you can start editing the text within
735 this selection and the modifications will be done for every line in the
736 selection.
738 It is also possible to create a zero-column selection - this is
739 useful to insert text on multiple lines.
741 Drag and drop of text
742 ^^^^^^^^^^^^^^^^^^^^^
744 If you drag selected text in the editor widget of Geany the text is
745 moved to the position where the mouse pointer is when releasing the
746 mouse button. Holding Control when releasing the mouse button will
747 copy the text instead. This behaviour was changed in Geany 0.11 -
748 before the selected text was copied to the new position.
751 Indentation
752 ^^^^^^^^^^^
754 Geany allows each document to indent either with a tab character,
755 multiple spaces or a combination of both.
757 The *Tabs* setting indents with one tab character per indent level, and
758 displays tabs as the indent width.
760 The *Spaces* setting indents with the number of spaces set in the indent
761 width for each level.
763 The *Tabs and Spaces* setting indents with spaces as above, then converts
764 as many spaces as it can to tab characters at the rate of one tab for
765 each multiple of the `Various preference` setting
766 *indent_hard_tab_width* (default 8) and displays tabs as the
767 *indent_hard_tab_width* value.
769 The default indent settings are set in `Editor Indentation
770 preferences`_ (see the link for more information).
772 The default settings can be overridden per-document using the
773 Document menu. They can also be overridden by projects - see
774 `Project management`_.
776 The indent mode for the current document is shown on the status bar
777 as follows:
780     Indent with Tab characters.
782     Indent with spaces.
784     Indent with tabs and spaces, depending on how much indentation is
785     on a line.
787 Applying new indentation settings
788 `````````````````````````````````
789 After changing the default settings you may wish to apply the new
790 settings to every document in the current session. To do this use the
791 *Project->Apply Default Indentation* menu item.
793 Detecting indent type
794 `````````````````````
795 The *Detect from file* indentation preference can be used to
796 scan each file as it's opened and set the indent type based on
797 how many lines start with a tab vs. 2 or more spaces.
800 Auto-indentation
801 ^^^^^^^^^^^^^^^^
803 When enabled, auto-indentation happens when pressing *Enter* in the
804 Editor. It adds a certain amount of indentation to the new line so the
805 user doesn't always have to indent each line manually.
807 Geany has four types of auto-indentation:
809 None
810     Disables auto-indentation completely.
811 Basic
812     Adds the same amount of whitespace on a new line as on the previous line.
813     For the *Tabs* and the *Spaces* indent types the indentation will use the
814     same combination of characters as the previous line.  The
815     *Tabs and Spaces* indentation type converts as explained above.
816 Current chars
817     Does the same as *Basic* but also indents a new line after an opening
818     brace '{', and de-indents when typing a closing brace '}'. For Python,
819     a new line will be indented after typing ':' at the end of the
820     previous line.
821 Match braces
822     Similar to *Current chars* but the closing brace will be aligned to
823     match the indentation of the line with the opening brace.  This
824     requires the filetype to be one where Geany knows that the Scintilla
825     lexer understands matching braces (C, C++, D, HTML, Pascal, Bash,
826     Perl, TCL).
828 There is also XML-tag auto-indentation. This is enabled when the
829 mode is more than just Basic, and is also controlled by a filetype
830 setting - see `xml_indent_tags`_.
833 Bookmarks
834 ^^^^^^^^^
836 Geany provides a handy bookmarking feature that lets you mark one
837 or more lines in a document, and return the cursor to them using a
838 key combination.
840 To place a mark on a line, either left-mouse-click in the left margin
841 of the editor window, or else use Ctrl-m. This will
842 produce a small green plus symbol in the margin. You can have as many
843 marks in a document as you like. Click again (or use Ctrl-m again)
844 to remove the bookmark. To remove all the marks in a given document,
845 use "Remove Markers" in the Document menu.
847 To navigate down your document, jumping from one mark to the next,
848 use Ctrl-. (control period). To go in the opposite direction on
849 the page, use Ctrl-, (control comma). Using the bookmarking feature
850 together with the commands to switch from one editor tab to another
851 (Ctrl-PgUp/PgDn and Ctrl-Tab) provides a particularly fast way to
852 navigate around multiple files.
855 Code navigation history
856 ^^^^^^^^^^^^^^^^^^^^^^^
858 To ease navigation in source files and especially between
859 different files, Geany lets you jump between different navigation
860 points. Currently, this works for the following:
862 * `Go to symbol declaration`_
863 * `Go to symbol definition`_
864 * Symbol list items
865 * Build errors
866 * Message items
868 When using one of these actions, Geany remembers your current position
869 and jumps to the new one. If you decide to go back to your previous
870 position in the file, just use "Navigate back a location". To
871 get back to the new position again, just use "Navigate forward a
872 location". This makes it easier to navigate in e.g.  foreign code
873 and between different files.
876 Sending text through custom commands
877 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
879 You can define several custom commands in Geany and send the current
880 selection to one of these commands using the *Edit->Format->Send
881 Selection to* menu or keybindings. The output of the command will be
882 used to replace the current selection. This makes it possible to use
883 text formatting tools with Geany in a general way.
885 The selected text will be sent to the standard input of the executed
886 command, so the command should be able to read from it and it should
887 print all results to its standard output which will be read by
888 Geany. To help finding errors in executing the command, the output
889 of the program's standard error will be printed on Geany's standard
890 output.
892 If there is no selection, the whole current line is used instead.
894 To add a custom command, use the *Send Selection to->Set Custom
895 Commands* menu item. Click on *Add* to get a new item and type the
896 command. You can also specify some command line options. Empty
897 commands are not saved.
899 Normal shell quoting is supported, so you can do things like:
901 * ``sed 's/\./(dot)/g'``
903 The above example would normally be done with the `Replace all`_
904 function, but it can be handy to have common commands already set up.
906 Note that the command is not run in a shell, so if you want to use
907 shell features like pipes and command chains, you need to explicitly
908 launch the shell and pass it your command:
910 * ``sh -c 'sort | uniq'``
913 Context actions
914 ^^^^^^^^^^^^^^^
916 You can execute the context action command on the current word at the
917 cursor position or the available selection.  This word or selection
918 can be used as an argument to the command.
919 The context action is invoked by a menu entry in the popup menu of the
920 editor and also a keyboard shortcut (see the section called
921 `Keybindings`_).
923 The command can be specified in the preferences dialog and also for
924 each filetype (see "context_action_cmd" in the section called
925 `Filetype configuration`_). When the context action is invoked, the filetype
926 specific command is used if available, otherwise the command
927 specified in the preferences dialog is executed.
929 The current word or selection can be referred with the wildcard "%s"
930 in the command, it will be replaced by the current word or
931 selection before the command is executed.
933 For example a context action can be used to open API documentation
934 in a browser window, the command to open the PHP API documentation
935 would be::
937     firefox "http://www.php.net/%s"
939 when executing the command, the %s is substituted by the word near
940 the cursor position or by the current selection. If the cursor is at
941 the word "echo", a browser window will open(assumed your browser is
942 called firefox) and it will open the address: http://www.php.net/echo.
945 Autocompletion
946 ^^^^^^^^^^^^^^
948 Geany can offer a list of possible completions for symbols defined in the
949 tags files and for all words in open documents.
951 The autocompletion list for symbols is presented when the first few
952 characters of the symbol are typed (configurable, see `Editor Completions
953 preferences`_, default 4) or when the *Complete word*
954 keybinding is pressed (configurable, see `Editor keybindings`_,
955 default Ctrl-Space).
957 When the defined keybinding is typed and the *Autocomplete all words in
958 document* preference (in `Editor Completions preferences`_)
959 is selected then the autocompletion list will show all matching words
960 in the document, if there are no matching symbols.
962 If you don't want to use autocompletion it can be dismissed until
963 the next symbol by pressing Escape. The autocompletion list is updated
964 as more characters are typed so that it only shows completions that start
965 with the characters typed so far. If no symbols begin with the sequence,
966 the autocompletion window is closed.
968 The up and down arrows will move the selected item. The highlighted
969 item on the autocompletion list can be chosen from the list by pressing
970 Enter/Return. You can also double-click to select an item. The sequence
971 will be completed to match the chosen item, and if the *Drop rest of
972 word on completion* preference is set (in `Editor Completions
973 preferences`_) then any characters after the cursor that match
974 a symbol or word are deleted.
976 Word part completion
977 ````````````````````
978 By default, pressing Tab will complete the selected item by word part;
979 useful e.g. for adding the prefix ``gtk_combo_box_entry_`` without typing it
980 manually:
982 * gtk_com<TAB>
983 * gtk_combo_<TAB>
984 * gtk_combo_box_<e><TAB>
985 * gtk_combo_box_entry_<s><ENTER>
986 * gtk_combo_box_entry_set_text_column
988 The key combination can be changed from Tab - See `Editor keybindings`_.
989 If you clear/change the key combination for word part completion, Tab
990 will complete the whole word instead, like Enter.
992 Scope autocompletion
993 ````````````````````
994 E.g.::
996     struct
997     {
998         int i;
999         char c;
1000     } foo;
1002 When you type ``foo.`` it will show an autocompletion list with 'i' and
1003 'c' symbols.
1005 It only works for languages that set parent scope names for e.g. struct
1006 members. Currently this means C-like languages. The C parser only
1007 parses global scopes, so this won't work for structs or objects declared
1008 in local scope.
1011 User-definable snippets
1012 ^^^^^^^^^^^^^^^^^^^^^^^
1014 Snippets are small strings or code constructs which can be replaced or
1015 completed to a more complex string. So you can save a lot of time when
1016 typing common strings and letting Geany do the work for you.
1017 To know what to complete or replace Geany reads a configuration file
1018 called ``snippets.conf`` at startup.
1020 Maybe you need to often type your name, so define a snippet like this::
1022     [Default]
1023     myname=Enrico Tröger
1025 Every time you write ``myname`` <TAB> in Geany, it will replace "myname"
1026 with "Enrico Tröger". The key to start autocompletion can be changed
1027 in the preferences dialog, by default it is TAB. The corresponding keybinding
1028 is called `Complete snippet`.
1030 **Paths**
1032 You can override the default snippets using the user
1033 ``snippets.conf`` file. Use the *Tools->Configuration
1034 Files->snippets.conf* menu item. See also `Configuration file paths`_.
1036 This adds the default settings to the user file if the file doesn't
1037 exist. Alternatively the file can be created manually, adding only
1038 the settings you want to change. All missing settings will be read
1039 from the system snippets file.
1041 **Snippet groups**
1043 The file ``snippets.conf`` contains sections defining snippets that
1044 are available for particular filetypes and in general.
1046 The two sections "Default" and "Special" apply to all filetypes.
1047 "Default" contains all snippets which are available for every
1048 filetype and "Special" contains snippets which can only be used in
1049 other snippets. So you can define often used parts of snippets and
1050 just use the special snippet as a placeholder (see the
1051 ``snippets.conf`` for details).
1053 You can define sections with the name of a filetype eg "C++".  The
1054 snippets in that section are only available for use in files with that
1055 filetype.  Snippets in filetype sections will hide snippets with the
1056 same name in the "Default" section when used in a file of that
1057 filetype.
1059 **Substitution sequences for snippets**
1061 To define snippets you can use several special character sequences which
1062 will be replaced when using the snippet:
1064 ================  =========================================================
1065 \\n or %newline%  Insert a new line (it will be replaced by the used EOL
1066                   char(s): LF, CR/LF, or CR).
1068 \\t or %ws%       Insert an indentation step, it will be replaced according
1069                   to the current document's indent mode.
1071 \\s               \\s to force whitespace at beginning or end of a value
1072                   ('key= value' won't work, use 'key=\\svalue')
1074 %cursor%          Place the cursor at this position after completion has
1075                   been done. You can define multiple %cursor% wildcards
1076                   and use the keybinding `Move cursor in snippet` to jump
1077                   to the next defined cursor position in the completed
1078                   snippet.
1080 %...%             "..." means the name of a key in the "Special" section.
1081                   If you have defined a key "brace_open" in the "Special"
1082                   section you can use %brace_open% in any other snippet.
1083 ================  =========================================================
1085 Snippet names must not contain spaces otherwise they won't
1086 work correctly. But beside that you can define almost any
1087 string as a snippet and use it later in Geany. It is not limited
1088 to existing contructs of certain programming languages(like ``if``,
1089 ``for``, ``switch``). Define whatever you need.
1091 **Template wildcards**
1093 Since Geany 0.15 you can also use most of the available templates wildcards
1094 listed in `Template wildcards`_. All wildcards which are listed as
1095 `available in snippets` can be used. For instance to improve the above example::
1097     [Default]
1098     myname=My name is {developer}
1099     mysystem=My system: {command:uname -a}
1101 this will replace ``myname`` with "My name is " and the value of the template
1102 preference ``developer``.
1104 **Word characters**
1106 You can change the way Geany recognizes the word to complete,
1107 that is how the start and end of a word is recognised when the
1108 snippet completion is requested. The section "Special" may
1109 contain a key "wordchars" which lists all characters a string may contain
1110 to be recognized as a word for completion. Leave it commented to use
1111 default characters or define it to add or remove characters to fit your
1112 needs.
1114 Snippet keybindings
1115 ```````````````````
1117 Normally you would type the snippet name and press Tab. However, you
1118 can define keybindings for snippets under the *Keybindings* group in
1119 ``snippets.conf``::
1121     [Keybindings]
1122     for=<Ctrl>7
1123     block_cursor=<Ctrl>8
1125 .. note::
1126     Snippet keybindings may be overridden by Geany's configurable
1127     keybindings.
1130 Inserting Unicode characters
1131 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1133 You can insert Unicode code points by hitting Ctrl-Shift-u, then still holding
1134 Ctrl-Shift, type some hex digits representing the code point for the character
1135 you want and hit Enter or Return (still holding Ctrl-Shift). If you release
1136 Ctrl-Shift before hitting Enter or Return (or any other character), the code
1137 insertion is completed, but the typed character is also entered.  In the case
1138 of Enter/Return, it is a newline, as you might expect.
1141 In some earlier versions of Geany, you might need to first unbind Ctrl-Shift-u
1142 in the `keybinding preferences`_, then select *Tools->Reload Configuration*
1143 or restart Geany. Note that it works slightly differently from other GTK
1144 applications, in that you'll need to continue to hold down the Ctrl and Shift
1145 keys while typing the code point hex digits (and the Enter or Return to finish the code point).
1148 Inserting color values
1149 ^^^^^^^^^^^^^^^^^^^^^^
1151 You can insert a color value by selecting *Tools->Color Chooser* from the menu.
1152 A dialog appears to select the wanted color. If the cursor is placed inside a
1153 *#RRGGBB* format color value then the dialog will show that color after opening.
1154 On clicking on *Apply* or *Select* the code for the chosen color will be inserted
1155 in the format *#RRGGBB*. If text is selected, then it will be replaced with the
1156 color code on the first click on *Apply* or *Select*. If no text is selected or
1157 on subsequent clicks the color code is inserted at the current cursor position.
1160 Search, replace and go to
1161 -------------------------
1163 This section describes search-related commands from the Search menu
1164 and the editor window's popup menu:
1166 * Find
1167 * Find selection
1168 * Find usage
1169 * Find in files
1170 * Replace
1171 * Go to symbol definition
1172 * Go to symbol declaration
1173 * Go to line
1175 See also `Search`_ preferences.
1177 Toolbar entries
1178 ^^^^^^^^^^^^^^^
1179 There are also two toolbar entries:
1181 * Search bar
1182 * Go to line entry
1184 There are keybindings to focus each of these - see `Focus
1185 keybindings`_. Pressing Escape will then focus the editor.
1187 Search bar
1188 ``````````
1189 The quickest way to find some text is to use the search bar entry in
1190 the toolbar. This performs a case-insensitive search in the current
1191 document whilst you type. Pressing Enter will search again, and pressing
1192 Shift-Enter will search backwards.
1194 Find
1195 ^^^^
1197 The Find dialog is used for finding text in one or more open documents.
1199 .. image:: ./images/find_dialog.png
1202 Matching options
1203 ````````````````
1205 The syntax for the *Use regular expressions* option is shown in
1206 `Regular expressions`_.
1208 .. note::
1209     *Use escape sequences* is implied for regular expressions.
1211 The *Use multi-line matching* option enables multi-line regular
1212 expressions instead of single-line ones.  See `Regular expressions`_ for
1213 more details on the differences between the two modes.
1215 The *Use escape sequences* option will transform any escaped characters
1216 into their UTF-8 equivalent. For example, \\t will be transformed into
1217 a tab character. Other recognized symbols are: \\\\, \\n, \\r, \\uXXXX
1218 (Unicode characters).
1221 Find all
1222 ````````
1224 To find all matches, click on the Find All expander. This will reveal
1225 several options:
1227 * In Document
1228 * In Session
1229 * Mark
1231 Find All In Document will show a list of matching lines in the
1232 current document in the Messages tab of the Message Window. *Find All
1233 In Session* does the same for all open documents.
1235 Mark will highlight all matches in the current document with a
1236 colored box. These markers can be removed by selecting the
1237 Remove Markers command from the Document menu.
1240 Change font in search dialog text fields
1241 ````````````````````````````````````````
1243 All search related dialogs use a Monospace for the text input fields to
1244 increase the readability of input text. This is useful when you are
1245 typing input such as regular expressions with spaces, periods and commas which
1246 might it hard to read with a proportional font.
1248 If you want to change the font, you can do this easily
1249 by inserting the following style into your ``.gtkrc-2.0``
1250 (usually found in your home directory on UNIX-like systems and in the
1251 etc subdirectory of your Geany installation on Windows)::
1253     style "search_style"
1254     {
1255         font_name="Monospace 8"
1256     }
1257     widget "GeanyDialogSearch.*.GtkEntry" style:highest "search_style"
1259 Please note the addition of ":highest" in the last line which sets the priority
1260 of this style to the highest available. Otherwise, the style is ignored
1261 for the search dialogs.
1264 Find selection
1265 ^^^^^^^^^^^^^^
1266 The *Find Next/Previous Selection* commands perform a search for the
1267 current selected text. If nothing is selected, by default the current
1268 word is used instead. This can be customized by the
1269 *find_selection_type* preference - see `Various preferences`_.
1271 =====   =============================================
1272 Value   *find_selection_type* behaviour
1273 =====   =============================================
1274 0       Use the current word (default).
1275 1       Try the X selection first, then current word.
1276 2       Repeat last search.
1277 =====   =============================================
1280 Find usage
1281 ^^^^^^^^^^
1283 *Find Usage* searches all open files. It is similar to the *Find All In
1284 Session* option in the Find dialog.
1286 If there is a selection, then it is used as the search text; otherwise
1287 the current word is used. The current word is either taken from the
1288 word nearest the edit cursor, or the word underneath the popup menu
1289 click position when the popup menu is used. The search results are
1290 shown in the Messages tab of the Message Window.
1292 .. note::
1293     You can also use Find Usage for symbol list items from the popup
1294     menu.
1297 Find in files
1298 ^^^^^^^^^^^^^
1300 *Find in Files* is a more powerful version of *Find Usage* that searches
1301 all files in a certain directory using the Grep tool. The Grep tool
1302 must be correctly set in Preferences to the path of the system's Grep
1303 utility. GNU Grep is recommended (see note below).
1305 .. image:: ./images/find_in_files_dialog.png
1307 The *Search* field is initially set to the current word in the editor
1308 (depending on `Search`_ preferences).
1310 The *Files* setting allows to choose which files are included in the
1311 search, depending on the mode:
1314     Search in all files;
1315 Project
1316     Use the current project's patterns, see `Project properties`_;
1317 Custom
1318     Use custom patterns.
1320 Both project and custom patterns use a glob-style syntax, each
1321 pattern separated by a space. To search all ``.c`` and ``.h`` files,
1322 use: ``*.c *.h``.
1323 Note that an empty pattern list searches in all files rather
1324 than none.
1326 The *Directory* field is initially set to the current document's directory,
1327 unless this field has already been edited and the current document has
1328 not changed. Otherwise, the current document's directory is prepended to
1329 the drop-down history. This can be disabled - see `Search`_ preferences.
1331 The *Encoding* field can be used to define the encoding of the files
1332 to be searched. The entered search text is converted to the chosen encoding
1333 and the search results are converted back to UTF-8.
1335 The *Extra options* field is used to pass any additional arguments to
1336 the grep tool.
1338 .. note::
1339     The *Files* setting uses ``--include=`` when searching recursively,
1340     *Recurse in subfolders* uses ``-r``; both are GNU Grep options and may
1341     not work with other Grep implementations.
1344 Filtering out version control files
1345 ```````````````````````````````````
1347 When using the *Recurse in subfolders* option with a directory that's
1348 under version control, you can set the *Extra options* field to filter
1349 out version control files.
1351 If you have GNU Grep >= 2.5.2 you can use the ``--exclude-dir``
1352 argument to filter out CVS and hidden directories like ``.svn``.
1354 Example: ``--exclude-dir=.svn --exclude-dir=CVS``
1356 If you have an older Grep, you can try using the ``--exclude`` flag
1357 to filter out filenames.
1359 SVN Example: ``--exclude=*.svn-base``
1361 The --exclude argument only matches the file name part, not the path.
1364 Replace
1365 ^^^^^^^
1367 The Replace dialog is used for replacing text in one or more open
1368 documents.
1370 .. image:: ./images/replace_dialog.png
1372 The Replace dialog has the same options for matching text as the Find
1373 dialog. See the section `Matching options`_.
1375 The *Use regular expressions* option allows regular expressions to
1376 be used in the search string and back references in the replacement
1377 text -- see the entry for '\\n' in `Regular expressions`_.
1379 Replace all
1380 ```````````
1382 To replace several matches, click on the *Replace All* expander. This
1383 will reveal several options:
1385 * In Document
1386 * In Session
1387 * In Selection
1389 *Replace All In Document* will replace all matching text in the
1390 current document. *Replace All In Session* does the same for all open
1391 documents. *Replace All In Selection* will replace all matching text
1392 in the current selection of the current document.
1395 Go to symbol definition
1396 ^^^^^^^^^^^^^^^^^^^^^^^
1398 If the current word or selection is the name of a symbol definition
1399 (e.g. a function name) and the file containing the symbol definition is
1400 open, this command will switch to that file and go to the
1401 corresponding line number. The current word is either the word
1402 nearest the edit cursor, or the word underneath the popup menu click
1403 position when the popup menu is used.
1405 If there are more symbols with the same name to which the goto can be performed,
1406 a pop up is shown with a list of all the occurrences. After selecting a symbol
1407 from the list Geany jumps to the corresponding symbol location. Geany tries to
1408 suggest the nearest symbol (symbol from the current file, other open documents
1409 or current directory) as the best candidate for the goto and places this symbol
1410 at the beginning of the list typed in boldface.
1412 .. note::
1413     If the corresponding symbol is on the current line, Geany will first
1414     look for a symbol declaration instead, as this is more useful.
1415     Likewise *Go to symbol declaration* will search for a symbol definition
1416     first in this case also.
1419 Go to symbol declaration
1420 ^^^^^^^^^^^^^^^^^^^^^^^^
1422 Like *Go to symbol definition*, but for a forward declaration such as a
1423 C function prototype or ``extern`` declaration instead of a function
1424 body.
1427 Go to line
1428 ^^^^^^^^^^
1430 Go to a particular line number in the current file.
1433 Regular expressions
1434 ^^^^^^^^^^^^^^^^^^^
1436 You can use regular expressions in the Find and Replace dialogs
1437 by selecting the *Use regular expressions* check box (see `Matching
1438 options`_). The syntax is Perl compatible. Basic syntax is described
1439 in the table below. For full details, see
1440 https://www.geany.org/manual/gtk/glib/glib-regex-syntax.html.
1442 By default regular expressions are matched on a line-by-line basis.
1443 If you are interested in multi-line regular expressions, matched against
1444 the whole buffer at once, see the section `Multi-line regular expressions`_
1445 below.
1447 .. note::
1448     1. The *Use escape sequences* dialog option always applies for regular
1449        expressions.
1450     2. Searching backwards with regular expressions is not supported.
1451     3. The *Use multi-line matching* dialog option to select single or
1452        multi-line matching.
1454 **In a regular expression, the following characters are interpreted:**
1456 ======= ============================================================
1457 .       Matches any character.
1459 (       This marks the start of a region for tagging a match.
1461 )       This marks the end of a tagged region.
1463 \\n     Where n is 1 through 9 refers to the first through ninth tagged
1464         region when searching or replacing.
1466         Searching for (Wiki)\\1 matches WikiWiki.
1468         If the search string was Fred([1-9])XXX and the
1469         replace string was Sam\\1YYY, when applied to Fred2XXX this
1470         would generate Sam2YYY.
1472 \\0     When replacing, the whole matching text.
1474 \\b     This matches a word boundary.
1476 \\c     A backslash followed by d, D, s, S, w or W, becomes a
1477         character class (both inside and outside sets []).
1479         * d: decimal digits
1480         * D: any char except decimal digits
1481         * s: whitespace (space, \\t \\n \\r \\f \\v)
1482         * S: any char except whitespace (see above)
1483         * w: alphanumeric & underscore
1484         * W: any char except alphanumeric & underscore
1486 \\x     This allows you to use a character x that would otherwise have
1487         a special meaning. For example, \\[ would be interpreted as [
1488         and not as the start of a character set. Use \\\\ for a literal
1489         backslash.
1491 [...]   Matches one of the characters in the set. If the first
1492         character in the set is ^, it matches the characters NOT in
1493         the set, i.e. complements the set. A shorthand S-E (start
1494         dash end) is used to specify a set of characters S up to E,
1495         inclusive.
1497         The special characters ] and - have no special
1498         meaning if they appear first in the set. - can also be last
1499         in the set. To include both, put ] first: []A-Z-].
1501         Examples::
1503         []|-]    matches these 3 chars
1504         []-|]    matches from ] to | chars
1505         [a-z]    any lowercase alpha
1506         [^]-]    any char except - and ]
1507         [^A-Z]   any char except uppercase alpha
1508         [a-zA-Z] any alpha
1510 ^       This matches the start of a line (unless used inside a set, see
1511         above).
1513 $       This matches the end of a line.
1515 \*      This matches 0 or more times. For example, Sa*m matches Sm, Sam,
1516         Saam, Saaam and so on.
1518 \+      This matches 1 or more times. For example, Sa+m matches Sam,
1519         Saam, Saaam and so on.
1521 \?      This matches 0 or 1 time(s). For example, Joh?n matches John, Jon.
1522 ======= ============================================================
1524 .. note::
1525     This table is adapted from Scintilla and SciTE documentation,
1526     distributed under the `License for Scintilla and SciTE`_.
1529 Multi-line regular expressions
1530 ``````````````````````````````
1532 .. note::
1533     The *Use multi-line matching* dialog option enables multi-line
1534     regular expressions.
1536 Multi-line regular expressions work just like single-line ones but a
1537 match can span several lines.
1539 While the syntax is the same, a few practical differences applies:
1541 ======= ============================================================
1542 .       Matches any character but newlines.  This behavior can be changed
1543         to also match newlines using the (?s) option, see
1544         https://www.geany.org/manual/gtk/glib/glib-regex-syntax.html#idp5671632
1546 [^...]  A negative range (see above) *will* match newlines if they are
1547         not explicitly listed in that negative range.  For example, range
1548         [^a-z] will match newlines, while range [^a-z\\r\\n] won't.
1549         While this is the expected behavior, it can lead to tricky
1550         problems if one doesn't think about it when writing an expression.
1551 ======= ============================================================
1554 View menu
1555 ---------
1556 The View menu allows various elements of the main window to be shown
1557 or hidden, and also provides various display-related editor options.
1559 Color schemes dialog
1560 ^^^^^^^^^^^^^^^^^^^^
1561 The Color Schemes dialog is available under the *View->Change Color Scheme*
1562 menu item. It lists various color schemes for editor highlighting
1563 styles, including the default scheme first. Other items are available
1564 based on what color scheme files Geany found at startup.
1566 Color scheme files are read from the `Configuration file paths`_ under
1567 the ``colorschemes`` subdirectory. They should have the extension
1568 ``.conf``. The default color scheme
1569 is read from ``filetypes.common``.
1571 The `[named_styles] section`_  and `[named_colors] section`_ are the
1572 same as for ``filetypes.common``.
1574 The ``[theme_info]`` section can contain information about the
1575 theme. The ``name`` and ``description`` keys are read to set the
1576 menu item text and tooltip, respectively. These keys can have
1577 translations, e.g.::
1579     key=Hello
1580     key[de]=Hallo
1581     key[fr_FR]=Bonjour
1583 Symbols and tags files
1584 ----------------------
1586 Upon opening, files of supported filetypes are parsed to extract the symbol
1587 information (aka "workspace symbols"). You can also have Geany automatically
1588 load external files containing the symbol information (aka "global
1589 tags files") upon startup, or manually using *Tools --> Load Tags File*.
1591 Geany uses its own tags file format, similar to what ``ctags`` uses
1592 (but is incompatible with ctags). You use Geany to generate global
1593 tags files, as described below.
1596 Workspace symbols
1597 ^^^^^^^^^^^^^^^^^
1599 Each document is parsed for symbols whenever a file is loaded, saved or
1600 modified (see *Symbol list update frequency* preference in the `Editor
1601 Completions preferences`_). These are shown in the Symbol list in the
1602 Sidebar. These symbols are also used for autocompletion and calltips
1603 for all documents open in the current session that have the same filetype.
1605 The *Go to Symbol* commands can be used with all workspace symbols. See
1606 `Go to symbol definition`_.
1609 Global tags files
1610 ^^^^^^^^^^^^^^^^^
1612 Global tags files are used to provide symbols for autocompletion and calltips
1613 without having to open the source files containing these symbols. This is intended
1614 for library APIs, as the tags file only has to be updated when you upgrade
1615 the library.
1617 You can load a custom global tags file in two ways:
1619 * Using the *Load Tags File* command in the Tools menu.
1620 * By moving or symlinking tags files to the ``tags`` subdirectory of
1621   one of the `configuration file paths`_ before starting Geany.
1623 You can either download these files or generate your own. They have
1624 the format::
1626     name.lang_ext.tags
1628 *lang_ext* is one of the extensions set for the filetype associated
1629 with the tags parser. See the section called `Filetype extensions`_ for
1630 more information.
1633 Default global tags files
1634 `````````````````````````
1636 Some global tags files are distributed with Geany and will be loaded
1637 automatically when the corresponding filetype is first used. Currently
1638 this includes global tags files for these languages:
1640 * C
1641 * Pascal
1642 * PHP
1643 * HTML -- &symbol; completion, e.g. for ampersand, copyright, etc.
1644 * LaTeX
1645 * Python
1648 Global tags file format
1649 ```````````````````````
1651 Global tags files can have three different formats:
1653 * Tagmanager format
1654 * Pipe-separated format
1655 * CTags format
1657 The first line of global tags files should be a comment, introduced
1658 by ``#`` followed by a space and a string like ``format=pipe``,
1659 ``format=ctags`` or ``format=tagmanager`` respectively, these are
1660 case-sensitive.  This helps Geany to read the file properly. If this
1661 line is missing, Geany tries to auto-detect the used format but this
1662 might fail.
1665 The Tagmanager format is a bit more complex and is used for files
1666 created by the ``geany -g`` command. There is one symbol per line.
1667 Different symbol attributes like the return value or the argument list
1668 are separated with different characters indicating the type of the
1669 following argument.  This is the more complete and recommended tags file
1670 format.
1672 Pipe-separated format
1673 *********************
1674 The Pipe-separated format is easier to read and write.
1675 There is one symbol per line and different symbol attributes are separated
1676 by the pipe character (``|``). A line looks like::
1678     basename|string|(string path [, string suffix])|
1680 | The first field is the symbol name (usually a function name).
1681 | The second field is the type of the return value.
1682 | The third field is the argument list for this symbol.
1683 | The fourth field is the description for this symbol but
1684   currently unused and should be left empty.
1686 Except for the first field (symbol name), all other field can be left
1687 empty but the pipe separator must appear for them.
1689 You can easily write your own global tags files using this format.
1690 Just save them in your tags directory, as described earlier in the
1691 section `Global tags files`_.
1693 CTags format
1694 ************
1695 This is the format that ctags generates, and that is used by Vim.
1696 This format is compatible with the format historically used by Vi.
1698 The format is described at http://ctags.sourceforge.net/FORMAT, but
1699 for the full list of existing extensions please refer to ctags.
1700 However, note that Geany may actually only honor a subset of the
1701 existing extensions.
1703 Generating a global tags file
1704 `````````````````````````````
1706 You can generate your own global tags files by parsing a list of
1707 source files. The command is::
1709     geany -g [-P] <Tags File> <File list>
1711 * Tags File filename should be in the format described earlier --
1712   see the section called `Global tags files`_.
1713 * File list is a list of filenames, each with a full path (unless
1714   you are generating C/C++ tags files and have set the CFLAGS environment
1715   variable appropriately).
1716 * ``-P`` or ``--no-preprocessing`` disables using the C pre-processor
1717   to process ``#include`` directives for C/C++ source files. Use this
1718   option if you want to specify each source file on the command-line
1719   instead of using a 'master' header file. Also can be useful if you
1720   don't want to specify the CFLAGS environment variable.
1722 Example for the wxD library for the D programming language::
1724     geany -g wxd.d.tags /home/username/wxd/wx/*.d
1727 Generating C/C++ tags files
1728 ***************************
1729 You may need to first setup the `C ignore.tags`_ file.
1731 For C/C++ tags files gcc is required by default, so that header files
1732 can be preprocessed to include any other headers they depend upon. If
1733 you do not want this, use the ``-P`` option described above.
1735 For preprocessing, the environment variable CFLAGS should be set with
1736 appropriate ``-I/path`` include paths. The following example works with
1737 the bash shell, generating a tags file for the GnomeUI library::
1739     CFLAGS=`pkg-config --cflags libgnomeui-2.0` geany -g gnomeui.c.tags \
1740     /usr/include/libgnomeui-2.0/gnome.h
1742 You can adapt this command to use CFLAGS and header files appropriate
1743 for whichever libraries you want.
1746 Generating tags files on Windows
1747 ********************************
1748 This works basically the same as on other platforms::
1750     "c:\program files\geany\bin\geany" -g c:\mytags.php.tags c:\code\somefile.php
1753 C ignore.tags
1754 ^^^^^^^^^^^^^
1756 You can ignore certain symbols for C-based languages if they would lead
1757 to wrong parsing of the code. Use the *Tools->Configuration
1758 Files->ignore.tags* menu item to open the user ``ignore.tags`` file.
1759 See also `Configuration file paths`_.
1761 List all symbol names you want to ignore in this file, separated by spaces
1762 and/or newlines.
1764 Example::
1766     G_GNUC_NULL_TERMINATED
1767     G_GNUC_PRINTF
1768     G_GNUC_WARN_UNUSED_RESULT
1770 This will parse code like:
1772 ``gchar **utils_strv_new(const gchar *first, ...)
1773 G_GNUC_NULL_TERMINATED;``
1775 More detailed information about ignore.tags usage from the Exuberant Ctags
1776 manual page:
1778     Specifies a list of identifiers which are to be specially handled
1779     while  parsing C and C++ source files. This option is specifically
1780     provided to handle special cases arising through the use of
1781     pre-processor macros. When the identifiers listed are simple identifiers,
1782     these identifiers will be ignored during parsing of the source files.
1783     If an identifier is suffixed with a '+' character, ctags will also
1784     ignore any parenthesis-enclosed argument list which may immediately
1785     follow the identifier in the source files.
1786     If two identifiers are separated with the '=' character, the first
1787     identifiers is replaced by the second identifiers for parsing purposes.
1789 For even more detailed information please read the manual page of
1790 Exuberant Ctags.
1792 Geany extends Ctags with a '*' character suffix - this means use
1793 prefix matching, e.g. G_GNUC_* will match G_GNUC_NULL_TERMINATED, etc.
1794 Note that prefix match items should be put after other items to ensure
1795 that items like G_GNUC_PRINTF+ get parsed correctly.
1798 Preferences
1799 -----------
1801 You may adjust Geany's settings using the Edit --> Preferences
1802 dialog. Any changes you make there can be applied by hitting either
1803 the Apply or the OK button. These settings will persist between Geany
1804 sessions. Note that most settings here have descriptive popup bubble
1805 help -- just hover the mouse over the item in question to get help
1806 on it.
1808 You may also adjust some View settings (under the View menu) that
1809 persist between Geany sessions. The settings under the Document menu,
1810 however, are only for the current document and revert to defaults
1811 when restarting Geany.
1813 .. note::
1814     In the paragraphs that follow, the text describing a dialog tab
1815     comes after the screenshot of that tab.
1818 General Startup preferences
1819 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
1821 .. image:: ./images/pref_dialog_gen_startup.png
1823 Startup
1824 ```````
1826 Load files from the last session
1827     On startup, load the same files you had open the last time you
1828     used Geany.
1830 Load virtual terminal support
1831     Load the library for running a terminal in the message window area.
1833 Enable plugin support
1834     Allow plugins to be used in Geany.
1836 Shutdown
1837 ````````
1838 Save window position and geometry
1839     Save the current position and size of the main window so next time
1840     you open Geany it's in the same location.
1842 Confirm Exit
1843     Have a dialog pop up to confirm that you really want to quit Geany.
1845 Paths
1846 `````
1848 Startup path
1849     Path to start in when opening or saving files.
1850     It must be an absolute path.
1852 Project files
1853     Path to start in when opening project files.
1855 Extra plugin path
1856     By default Geany looks in the system installation and the user
1857     configuration - see `Plugins`_. In addition the path entered here will be
1858     searched.
1859     Usually you do not need to set an additional path to search for
1860     plugins. It might be useful when Geany is installed on a multi-user machine
1861     and additional plugins are available in a common location for all users.
1862     Leave blank to not set an additional lookup path.
1865 General Miscellaneous preferences
1866 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1868 .. image:: ./images/pref_dialog_gen_misc.png
1870 Miscellaneous
1871 `````````````
1873 Beep on errors when compilation has finished
1874     Have the computer make a beeping sound when compilation of your program
1875     has completed or any errors occurred.
1877 Switch status message list at new message
1878     Switch to the status message tab (in the notebook window at the bottom)
1879     once a new status message arrives.
1881 Suppress status messages in the status bar
1882     Remove all messages from the status bar. The messages are still displayed
1883     in the status messages window.
1885     .. tip::
1886         Another option is to use the *Switch to Editor* keybinding - it
1887         reshows the document statistics on the status bar. See `Focus
1888         keybindings`_.
1890 Use Windows File Open/Save dialogs
1891     Defines whether to use the native Windows File Open/Save dialogs or
1892     whether to use the GTK default dialogs.
1894 Auto-focus widgets (focus follows mouse)
1895     Give the focus automatically to widgets below the mouse cursor.
1896     This works for the main editor widget, the scribble, the toolbar search field
1897     goto line fields and the VTE.
1899 Search
1900 ``````
1902 Always wrap search
1903     Always wrap search around the document when finding a match.
1905 Hide the Find dialog
1906     Hide the `Find`_ dialog after clicking Find Next/Previous.
1908 Use the current word under the cursor for Find dialogs
1909     Use current word under the cursor when opening the Find, Find in Files or Replace dialog and
1910     there is no selection. When this option is disabled, the search term last used in the
1911     appropriate Find dialog is used.
1913 Use the current file's directory for Find in Files
1914     When opening the Find in Files dialog, set the directory to search to the directory of the current
1915     active file. When this option is disabled, the directory of the last use of the Find in Files
1916     dialog is used. See `Find in Files`_ for details.
1918 Projects
1919 ````````
1921 Use project-based session files
1922     Save your current session when closing projects. You will be able to
1923     resume different project sessions, automatically opening the files
1924     you had open previously.
1926 Store project file inside the project base directory
1927     When creating new projects, the default path for the project file contains
1928     the project base path. Without this option enabled, the default project file
1929     path is one level above the project base path.
1930     In either case, you can easily set the final project file path in the
1931     *New Project* dialog. This option provides the more common
1932     defaults automatically for convenience.
1935 Interface preferences
1936 ^^^^^^^^^^^^^^^^^^^^^
1938 .. image:: ./images/pref_dialog_interface_interface.png
1940 Sidebar
1941 ```````
1943 Show sidebar
1944     Whether to show the sidebar at all.
1946 Show symbol list
1947     Show the list of functions, variables, and other information in the
1948     current document you are editing.
1950 Show documents list
1951     Show all the documents you have open currently. This can be used to
1952     change between documents (see `Switching between documents`_) and
1953     to perform some common operations such as saving, closing and reloading.
1955 Position
1956     Whether to place the sidebar on the left or right of the editor window.
1958 Message window
1959 ``````````````
1961 Position
1962     Whether to place the message window on the bottom or right of the editor window.
1964 Fonts
1965 `````
1967 Editor
1968     Change the font used to display documents.
1970 Symbol list
1971     Change the font used for the Symbols sidebar tab.
1973 Message window
1974     Change the font used for the message window area.
1976 Miscellaneous
1977 `````````````
1979 Show status bar
1980     Show the status bar at the bottom of the main window. It gives information about
1981     the file you are editing like the line and column you are on, whether any
1982     modifications were done, the file encoding, the filetype and other information.
1984 Interface Notebook tab preferences
1985 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1987 .. image:: ./images/pref_dialog_interface_notebook.png
1989 Editor tabs
1990 ```````````
1992 Show editor tabs
1993     Show a notebook tab for all documents so you can switch between them
1994     using the mouse (instead of using the Documents window).
1996 Show close buttons
1997     Make each tab show a close button so you can easily close open
1998     documents.
2000 Placement of new file tabs
2001     Whether to create a document with its notebook tab to the left or
2002     right of all existing tabs.
2004 Next to current
2005     Whether to place file tabs next to the current tab
2006     rather than at the edges of the notebook.
2008 Double-clicking hides all additional widgets
2009     Whether to call the View->Toggle All Additional Widgets command
2010     when double-clicking on a notebook tab.
2012 Tab positions
2013 `````````````
2015 Editor
2016     Set the positioning of the editor's notebook tabs to the right,
2017     left, top, or bottom of the editing window.
2019 Sidebar
2020     Set the positioning of the sidebar's notebook tabs to the right,
2021     left, top, or bottom of the sidebar window.
2023 Message window
2024     Set the positioning of the message window's notebook tabs to the
2025     right, left, top, or bottom of the message window.
2028 Interface Toolbar preferences
2029 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2031 Affects the main toolbar underneath the menu bar.
2033 .. image:: ./images/pref_dialog_interface_toolbar.png
2035 Toolbar
2036 ```````
2038 Show Toolbar
2039     Whether to show the toolbar.
2041 Append Toolbar to the Menu
2042     Allows to append the toolbar to the main menu bar instead of placing it below.
2043     This is useful to save vertical space.
2045 Customize Toolbar
2046     See `Customizing the toolbar`_.
2048 Appearance
2049 ``````````
2051 Icon Style
2052     Select the toolbar icon style to use - either icons and text, just
2053     icons or just text.
2054     The choice System default uses whatever icon style is set by GTK.
2056 Icon size
2057     Select the size of the icons you see (large, small or very small).
2058     The choice System default uses whatever icon size is set by GTK.
2061 Editor Features preferences
2062 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2064 .. image:: ./images/pref_dialog_edit_features.png
2066 Features
2067 ````````
2069 Line wrapping
2070     Show long lines wrapped around to new display lines.
2072 .. _smart_home_key:
2074 "Smart" home key
2075     Whether to move the cursor to the first non-whitespace character
2076     on the line when you hit the home key on your keyboard. Pressing it
2077     again will go to the very start of the line.
2079 Disable Drag and Drop
2080     Do not allow the dragging and dropping of selected text in documents.
2082 Code folding
2083     Allow groups of lines in a document to be collapsed for easier
2084     navigation/editing.
2086 Fold/Unfold all children of a fold point
2087     Whether to fold/unfold all child fold points when a parent line
2088     is folded.
2090 Use indicators to show compile errors
2091     Underline lines with compile errors using red squiggles to indicate
2092     them in the editor area.
2094 Newline strips trailing spaces
2095     Remove any whitespace at the end of the line when you hit the
2096     Enter/Return key. See also `Strip trailing spaces`_.  Note
2097     auto indentation is calculated before stripping, so although this
2098     setting will clear a blank line, it will not set the next line
2099     indentation back to zero.
2101 Line breaking column
2102     The editor column number to insert a newline at when Line Breaking
2103     is enabled for the current document.
2105 Comment toggle marker
2106     A string which is added when toggling a line comment in a source file.
2107     It is used to mark the comment as toggled.
2110 Editor Indentation preferences
2111 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2113 .. image:: ./images/pref_dialog_edit_indentation.png
2115 Indentation group
2116 `````````````````
2118 See `Indentation`_ for more information.
2120 Width
2121     The width of a single indent size in spaces. By default the indent
2122     size is equivalent to 4 spaces.
2124 Detect width from file
2125     Try to detect and set the indent width based on file content, when
2126     a file is opened.
2128 Type
2129     When Geany inserts indentation, whether to use:
2131     * Just Tabs
2132     * Just Spaces
2133     * Tabs and Spaces, depending on how much indentation is on a line
2135     The *Tabs and Spaces* indent type is also known as *Soft tab
2136     support* in some other editors.
2138 Detect type from file
2139     Try to detect and set the indent type based on file content, when
2140     a file is opened.
2142 Auto-indent mode
2143     The type of auto-indentation you wish to use after pressing Enter,
2144     if any.
2146     Basic
2147         Just add the indentation of the previous line.
2148     Current chars
2149         Add indentation based on the current filetype and any characters at
2150         the end of the line such as ``{``, ``}`` for C, ``:`` for Python.
2151     Match braces
2152         Like *Current chars* but for C-like languages, make a closing
2153         ``}`` brace line up with the matching opening brace.
2155 Tab key indents
2156     If set, pressing tab will indent the current line or selection, and
2157     unindent when pressing Shift-tab. Otherwise, the tab key will
2158     insert a tab character into the document (which can be different
2159     from indentation, depending on the indent type).
2161     .. note::
2162         There are also separate configurable keybindings for indent &
2163         unindent, but this preference allows the tab key to have different
2164         meanings in different contexts - e.g. for snippet completion.
2166 Editor Completions preferences
2167 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2169 .. image:: ./images/pref_dialog_edit_completions.png
2171 Completions
2172 ```````````
2174 Snippet Completion
2175     Whether to replace special keywords after typing Tab into a
2176     pre-defined text snippet.
2177     See `User-definable snippets`_.
2179 XML/HTML tag auto-closing
2180     When you open an XML/HTML tag automatically generate its
2181     completion tag.
2183 Automatic continuation multi-line comments
2184     Continue automatically multi-line comments in languages like C, C++
2185     and Java when a new line is entered inside such a comment.
2186     With this option enabled, Geany will insert a ``*`` on every new line
2187     inside a multi-line comment, for example when you press return in the
2188     following C code::
2190      /*
2191       * This is a C multi-line comment, press <Return>
2193     then Geany would insert::
2195       *
2197     on the next line with the correct indentation based on the previous line,
2198     as long as the multi-line is not closed by ``*/``.
2200 Autocomplete symbols
2201     When you start to type a symbol name, look for the full string to
2202     allow it to be completed for you.
2204 Autocomplete all words in document
2205     When you start to type a word, Geany will search the whole document for
2206     words starting with the typed part to complete it, assuming there
2207     are no symbol names to show.
2209 Drop rest of word on completion
2210     Remove any word part to the right of the cursor when choosing a
2211     completion list item.
2213 Characters to type for autocompletion
2214     Number of characters of a word to type before autocompletion is
2215     displayed.
2217 Completion list height
2218     The number of rows to display for the autocompletion window.
2220 Max. symbol name suggestions
2221     The maximum number of items in the autocompletion list.
2223 Symbol list update frequency
2224     The minimum delay (in milliseconds) between two symbol list updates.
2226     This option determines how frequently the symbol list is updated for the
2227     current document. The smaller the delay, the more up-to-date the symbol
2228     list (and then the completions); but rebuilding the symbol list has a
2229     cost in performance, especially with large files.
2231     The default value is 250ms, which means the symbol list will be updated
2232     at most four times per second, even if the document changes continuously.
2234     A value of 0 disables automatic updates, so the symbol list will only be
2235     updated upon document saving.
2238 Auto-close quotes and brackets
2239 ``````````````````````````````
2241 Geany can automatically insert a closing bracket and quote characters when
2242 you open them. For instance, you type a ``(`` and Geany will automatically
2243 insert ``)``. With the following options, you can define for which
2244 characters this should work.
2246 Parenthesis ( )
2247     Auto-close parenthesis when typing an opening one
2249 Curly brackets { }
2250     Auto-close curly brackets (braces) when typing an opening one
2252 Square brackets [ ]
2253     Auto-close square brackets when typing an opening one
2255 Single quotes ' '
2256     Auto-close single quotes when typing an opening one
2258 Double quotes " "
2259     Auto-close double quotes when typing an opening one
2262 Editor Display preferences
2263 ^^^^^^^^^^^^^^^^^^^^^^^^^^
2265 This is for visual elements displayed in the editor window.
2267 .. image:: ./images/pref_dialog_edit_display.png
2269 Display
2270 ```````
2272 Invert syntax highlighting colors
2273     Invert all colors, by default this makes white text on a black
2274     background.
2276 Show indendation guides
2277     Show vertical lines to help show how much leading indentation there
2278     is on each line.
2280 Show whitespaces
2281     Mark all tabs with an arrow "-->" symbol and spaces with dots to
2282     show which kinds of whitespace are used.
2284 Show line endings
2285     Display a symbol everywhere that a carriage return or line feed
2286     is present.
2288 Show line numbers
2289     Show or hide the Line Number margin.
2291 Show markers margin
2292     Show or hide the small margin right of the line numbers, which is used
2293     to mark lines.
2295 Stop scrolling at last line
2296     When enabled Geany stops scrolling when at the last line of the document.
2297     Otherwise you can scroll one more page even if there are no real lines.
2299 Lines visible around the cursor
2300     The number of lines to maintain between the cursor and the top and bottom
2301     edges of the view. This allows some lines of context around the cursor to
2302     always be visible. If *Stop scrolling at last line* is disabled, the cursor
2303     will never reach the bottom edge when this value is greater than 0.
2306 Long line marker
2307 ````````````````
2309 The long line marker helps to indicate overly-long lines, or as a hint
2310 to the user for when to break the line.
2312 Type
2313     Line
2314         Show a thin vertical line in the editor window at the given column
2315         position.
2316     Background
2317         Change the background color of characters after the given column
2318         position to the color set below. (This is recommended over the
2319         *Line* setting if you use proportional fonts).
2320     Disabled
2321         Don't mark long lines at all.
2323 Long line marker
2324     Set this value to a value greater than zero to specify the column
2325     where it should appear.
2327 Long line marker color
2328     Set the color of the long line marker.
2331 Virtual spaces
2332 ``````````````
2334 Virtual space is space beyond the end of each line.
2335 The cursor may be moved into virtual space but no real space will be
2336 added to the document until there is some text typed or some other
2337 text insertion command is used.
2339 Disabled
2340     Do not show virtual spaces
2342 Only for rectangular selections
2343     Only show virtual spaces beyond the end of lines when drawing a rectangular selection
2345 Always
2346     Always show virtual spaces beyond the end of lines
2349 Files preferences
2350 ^^^^^^^^^^^^^^^^^
2352 .. image:: ./images/pref_dialog_files.png
2354 New files
2355 `````````
2357 Open new documents from the command-line
2358     Whether to create new documents when passing filenames that don't
2359     exist from the command-line.
2361 Default encoding (new files)
2362     The type of file encoding you wish to use when creating files.
2364 Used fixed encoding when opening files
2365     Assume all files you are opening are using the type of encoding specified below.
2367 Default encoding (existing files)
2368     Opens all files with the specified encoding instead of auto-detecting it.
2369     Use this option when it's not possible for Geany to detect the exact encoding.
2371 Default end of line characters
2372     The end of line characters to which should be used for new files.
2373     On Windows systems, you generally want to use CR/LF which are the common
2374     characters to mark line breaks.
2375     On Unix-like systems, LF is default and CR is used on MAC systems.
2377 Saving files
2378 ````````````
2379 Perform formatting operations when a document is saved. These
2380 can each be undone with the Undo command.
2382 Ensure newline at file end
2383     Add a newline at the end of the document if one is missing.
2385 Ensure consistent line endings
2386     Ensures that newline characters always get converted before
2387     saving, avoiding mixed line endings in the same file.
2389 .. _Strip trailing spaces:
2391 Strip trailing spaces
2392     Remove any whitespace at the end of each document line.
2394     .. note::
2395         This does not apply to Diff documents, e.g. patch files.
2397 Replace tabs with spaces
2398     Replace all tabs in the document with the equivalent number of spaces.
2400     .. note::
2401         It is better to use spaces to indent than use this preference - see
2402         `Indentation`_.
2404 Miscellaneous
2405 `````````````
2407 Recent files list length
2408     The number of files to remember in the recently used files list.
2410 Disk check timeout
2411     The number of seconds to periodically check the current document's
2412     file on disk in case it has changed. Setting it to 0 will disable
2413     this feature.
2415     .. note::
2416         These checks are only performed on local files. Remote files are
2417         not checked for changes due to performance issues
2418         (remote files are files in ``~/.gvfs/``).
2421 Tools preferences
2422 ^^^^^^^^^^^^^^^^^
2424 .. image:: ./images/pref_dialog_tools.png
2426 Tool paths
2427 ``````````
2429 Terminal
2430     The command to execute a script in a terminal.  Occurrences of %c
2431     in the command are substituted with the run script name, see
2432     `Terminal emulators`_.
2434 Browser
2435     The location of your web browser executable.
2437 Grep
2438     The location of the grep executable.
2440 .. note::
2441     For Windows users: at the time of writing it is recommended to use
2442     the grep.exe from the UnxUtils project
2443     (http://sourceforge.net/projects/unxutils). The grep.exe from the
2444     Mingw project for instance might not work with Geany at the moment.
2446 Commands
2447 ````````
2449 Context action
2450     Set this to a command to execute on the current word.
2451     You can use the "%s" wildcard to pass the current word below the cursor
2452     to the specified command.
2455 Template preferences
2456 ^^^^^^^^^^^^^^^^^^^^
2458 This data is used as meta data for various template text to insert into
2459 a document, such as the file header. You only need to set fields that
2460 you want to use in your template files.
2462 .. image:: ./images/pref_dialog_templ.png
2464 Template data
2465 `````````````
2467 Developer
2468     The name of the developer who will be creating files.
2470 Initials
2471     The initials of the developer.
2473 Mail address
2474     The email address of the developer.
2476     .. note::
2477         You may wish to add anti-spam markup, e.g. ``name<at>site<dot>ext``.
2479 Company
2480     The company the developer is working for.
2482 Initial version
2483     The initial version of files you will be creating.
2485 Year
2486     Specify a format for the {year} wildcard. You can use any conversion specifiers
2487     which can be used with the ANSI C strftime function.  For details please see
2488     http://man.cx/strftime.
2490 Date
2491     Specify a format for the {date} wildcard. You can use any conversion specifiers
2492     which can be used with the ANSI C strftime function.  For details please see
2493     http://man.cx/strftime.
2495 Date & Time
2496     Specify a format for the {datetime} wildcard. You can use any conversion specifiers
2497     which can be used with the ANSI C strftime function.  For details please see
2498     http://man.cx/strftime.
2501 Keybinding preferences
2502 ^^^^^^^^^^^^^^^^^^^^^^
2504 .. image:: ./images/pref_dialog_keys.png
2506 There are some commands listed in the keybinding dialog that are not, by default,
2507 bound to a key combination, and may not be available as a menu item.
2509 .. note::
2510     For more information see the section `Keybindings`_.
2513 Printing preferences
2514 ^^^^^^^^^^^^^^^^^^^^
2516 .. image:: ./images/pref_dialog_printing.png
2518 Use external command for printing
2519     Use a system command to print your file out.
2521 Use native GTK printing
2522     Let the GTK GUI toolkit handle your print request.
2524 Print line numbers
2525     Print the line numbers on the left of your paper.
2527 Print page number
2528     Print the page number on the bottom right of your paper.
2530 Print page header
2531     Print a header on every page that is sent to the printer.
2533 Use base name of the printed file
2534     Don't use the entire path for the header, only the filename.
2536 Date format
2537     How the date should be printed. You can use the same format
2538     specifiers as in the ANSI C function strftime(). For details please
2539     see http://man.cx/strftime.
2542 Various preferences
2543 ^^^^^^^^^^^^^^^^^^^
2545 .. image:: ./images/pref_dialog_various.png
2547 Rarely used preferences, explained in the table below. A few of them require
2548 restart to take effect, and a few other will only affect newly opened or created
2549 documents before restart.
2551 ================================  ===========================================  ==========  ===========
2552 Key                               Description                                  Default     Applies
2553 ================================  ===========================================  ==========  ===========
2554 **``editor`` group**
2555 use_gtk_word_boundaries           Whether to look for the end of a word        true        to new
2556                                   when using word-boundary related                         documents
2557                                   Scintilla commands (see `Scintilla
2558                                   keyboard commands`_).
2559 brace_match_ltgt                  Whether to highlight <, > angle brackets.    false       immediately
2560 complete_snippets_whilst_editing  Whether to allow completion of snippets      false       immediately
2561                                   when editing an existing line (i.e. there
2562                                   is some text after the current cursor
2563                                   position on the line). Only used when the
2564                                   keybinding `Complete snippet` is set to
2565                                   ``Space``.
2566 show_editor_scrollbars            Whether to display scrollbars. If set to     true        immediately
2567                                   false, the horizontal and vertical
2568                                   scrollbars are hidden completely.
2569 indent_hard_tab_width             The size of a tab character. Don't change    8           immediately
2570                                   it unless you really need to; use the
2571                                   indentation settings instead.
2572 editor_ime_interaction            Input method editor (IME)'s candidate        0           to new
2573                                   window behaviour. May be 0 (windowed) or                 documents
2574                                   1 (inline)
2575 **``interface`` group**
2576 show_symbol_list_expanders        Whether to show or hide the small            true        to new
2577                                   expander icons on the symbol list                        documents
2578                                   treeview.
2579 compiler_tab_autoscroll           Whether to automatically scroll to the       true        immediately
2580                                   last line of the output in the Compiler
2581                                   tab.
2582 statusbar_template                The status bar statistics line format.       See below.  immediately
2583                                   (See `Statusbar Templates`_ for details).
2584 new_document_after_close          Whether to open a new document after all     false       immediately
2585                                   documents have been closed.
2586 msgwin_status_visible             Whether to show the Status tab in the        true        immediately
2587                                   Messages Window
2588 msgwin_compiler_visible           Whether to show the Compiler tab in the      true        immediately
2589                                   Messages Window
2590 msgwin_messages_visible           Whether to show the Messages tab in the      true        immediately
2591                                   Messages Window
2592 msgwin_scribble_visible           Whether to show the Scribble tab in the      true        immediately
2593                                   Messages Window
2594 **``terminal`` group**
2595 send_selection_unsafe             By default, Geany strips any trailing        false       immediately
2596                                   newline characters from the current
2597                                   selection before sending it to the terminal
2598                                   to not execute arbitrary code. This is
2599                                   mainly a security feature.
2600                                   If, for whatever reasons, you really want
2601                                   it to be executed directly, set this option
2602                                   to true.
2603 send_cmd_prefix                   String with which prefix the commands sent   Empty       immediately
2604                                   to the shell.  This may be used to tell
2605                                   some shells (BASH with ``HISTCONTROL`` set
2606                                   to ``ignorespace``, ZSH with
2607                                   ``HIST_IGNORE_SPACE`` enabled, etc.) from
2608                                   putting these commands in their history by
2609                                   setting this to a space.  Note that leading
2610                                   spaces must be escaped using `\s` in the
2611                                   configuration file.
2612 **``files`` group**
2613 allow_always_save                 Whether files can be saved always, even      false       immediately
2614                                   if they don't have any changes.
2615                                   By default, the Save button and menu
2616                                   item are disabled when a file is
2617                                   unchanged. When setting this option to
2618                                   true, the Save button and menu item are
2619                                   always active and files can be saved.
2620 use_atomic_file_saving            Defines the mode how Geany saves files to    false       immediately
2621                                   disk. If disabled, Geany directly writes
2622                                   the content of the document to disk. This
2623                                   might cause loss of data when there is
2624                                   no more free space on disk to save the
2625                                   file. When set to true, Geany first saves
2626                                   the contents into a temporary file and if
2627                                   this succeeded, the temporary file is
2628                                   moved to the real file to save.
2629                                   This gives better error checking in case of
2630                                   no more free disk space. But it also
2631                                   destroys hard links of the original file
2632                                   and its permissions (e.g. executable flags
2633                                   are reset). Use this with care as it can
2634                                   break things seriously.
2635                                   The better approach would be to ensure your
2636                                   disk won't run out of free space.
2637 use_gio_unsafe_file_saving        Whether to use GIO as the unsafe file        true        immediately
2638                                   saving backend. It is better on most
2639                                   situations but is known not to work
2640                                   correctly on some complex setups.
2641 gio_unsafe_save_backup            Make a backup when using GIO unsafe file     false       immediately
2642                                   saving. Backup is named `filename~`.
2643 keep_edit_history_on_reload       Whether to maintain the edit history when    true        immediately
2644                                   reloading a file, and allow the operation
2645                                   to be reverted.
2646 reload_clean_doc_on_file_change   Whether to automatically reload documents    false       immediately
2647                                   that have no changes but which have changed
2648                                   on disk.
2649                                   If unsaved changes exist then the user is
2650                                   prompted to reload manually.
2651 save_config_on_file_change        Automatically save Geany's configuration     true        immediately
2652                                   to disk once the document list changes
2653                                   (i.e. new documents are opened, saved or
2654                                   closed). This helps to prevent accidentally
2655                                   losing the session file list or other
2656                                   changed settings when Geany is not shut
2657                                   down cleanly. Disable this option if your
2658                                   configuration directory is on a slow drive,
2659                                   network share or similar and you experience
2660                                   problems.
2661 extract_filetype_regex            Regex to extract filetype name from file     See link    immediately
2662                                   via capture group one.
2663                                   See `ft_regex`_ for default.
2664 **``search`` group**
2665 find_selection_type               See `Find selection`_.                       0           immediately
2666 replace_and_find_by_default       Set ``Replace & Find`` button as default so  true        immediately
2667                                   it will be activated when the Enter key is
2668                                   pressed while one of the text fields has
2669                                   focus.
2670 **``build`` group**
2671 number_ft_menu_items              The maximum number of menu items in the      2           on restart
2672                                   filetype build section of the Build menu.
2673 number_non_ft_menu_items          The maximum number of menu items in the      3           on restart
2674                                   independent build section.
2675 number_exec_menu_items            The maximum number of menu items in the      2           on restart
2676                                   execute section of the Build menu.
2677 **``socket`` group**
2678 socket_remote_cmd_port            TCP port number to be used for inter         2           on restart
2679                                   process communication (i.e. with other
2680                                   Geany instances, e.g. "Open with Geany").
2681                                   Only available on Windows, valid port
2682                                   range: 1024 to 65535.
2683 ================================  ===========================================  ==========  ===========
2685 Statusbar Templates
2686 ```````````````````
2688 The default statusbar template is (note ``\t`` = tab):
2690 ``line: %l / %L\t col: %c\t sel: %s\t %w      %t      %mmode: %M      encoding: %e      filetype: %f      scope: %S``
2692 Settings the preference to an empty string will also cause Geany to use this
2693 internal default.
2695 The following format characters are available for the statusbar template:
2697 ============  ===========================================================
2698 Placeholder   Description
2699 ============  ===========================================================
2700   ``%l``      The current line number starting at 1
2701   ``%L``      The total number of lines
2702   ``%c``      The current column number starting at 0, including virtual
2703               space.
2704   ``%C``      The current column number starting at 1, including virtual
2705               space.
2706   ``%s``      The number of selected characters or if only whole lines
2707               selected, the number of selected lines.
2708   ``%n``      The number of selected characters, even if only whole lines
2709               are selected.
2710   ``%w``      Shows ``RO`` when the document is in read-only mode,
2711               otherwise shows whether the editor is in overtype (OVR)
2712               or insert (INS) mode.
2713   ``%t``      Shows the indentation mode, either tabs (TAB),
2714               spaces (SP) or both (T/S).
2715   ``%m``      Shows whether the document is modified (MOD) or nothing.
2716   ``%M``      The name of the document's line-endings (ex. ``Unix (LF)``)
2717   ``%e``      The name of the document's encoding (ex. UTF-8).
2718   ``%f``      The filetype of the document (ex. None, Python, C, etc).
2719   ``%S``      The name of the scope where the caret is located.
2720   ``%p``      The caret position in the entire document starting at 0.
2721   ``%r``      Shows whether the document is read-only (RO) or nothing.
2722   ``%Y``      The Scintilla style number at the caret position. This is
2723               useful if you're debugging color schemes or related code.
2724 ============  ===========================================================
2726 Terminal (VTE) preferences
2727 ^^^^^^^^^^^^^^^^^^^^^^^^^^
2729 See also: `Virtual terminal emulator widget (VTE)`_.
2731 .. image:: ./images/pref_dialog_vte.png
2733 Terminal widget
2734 ```````````````
2736 Terminal font
2737     Select the font that will be used in the terminal emulation control.
2739 Foreground color
2740     Select the font color.
2742 Background color
2743     Select the background color of the terminal.
2745 Background image
2746     Select the background image to show behind the terminal's text.
2748 Scrollback lines
2749     The number of lines buffered so that you can scroll though the history.
2751 Shell
2752     The location of the shell on your system.
2754 Scroll on keystroke
2755     Scroll the terminal to the prompt line when pressing a key.
2757 Scroll on output
2758     Scroll the output down.
2760 Cursor blinks
2761     Let the terminal cursor blink.
2763 Override Geany keybindings
2764     Allow the VTE to receive keyboard shortcuts (apart from focus commands).
2766 Disable menu shortcut key (F10 by default)
2767     Disable the menu shortcut when you are in the virtual terminal.
2769 Follow path of the current file
2770     Make the path of the terminal change according to the path of the
2771     current file.
2773 Execute programs in VTE
2774     Execute programs in the virtual terminal instead of using the external
2775     terminal tool.  Note that if you run multiple execute commands at once
2776     the output may become mixed together in the VTE.
2778 Don't use run script
2779     Don't use the simple run script which is usually used to display
2780     the exit status of the executed program.
2781     This can be useful if you already have a program running in the VTE
2782     like a Python console (e.g. ipython). Use this with care.
2785 Project management
2786 ------------------
2788 Project management is optional in Geany. Currently it can be used for:
2790 * Storing and opening session files on a project basis.
2791 * Overriding default settings with project equivalents.
2792 * Configuring the Build menu on a project basis.
2794 A list of session files can be stored and opened with the project
2795 when the *Use project-based session files* preference is enabled,
2796 in the `Projects`_ group of the `General Miscellaneous preferences`_ tab
2797 of the `Preferences`_ dialog.
2799 As long as a project is open, the Build menu will use
2800 the items defined in project's settings, instead of the defaults.
2801 See `Build Menu Configuration`_ for information on configuring the menu.
2803 The current project's settings are saved when it is closed, or when
2804 Geany is shutdown. When restarting Geany, the previously opened project
2805 file that was in use at the end of the last session will be reopened.
2807 The project menu items are detailed below.
2810 New project
2811 ^^^^^^^^^^^
2813 To create a new project, fill in the *Name* field. By default this
2814 will setup a new project file ``~/projects/name.geany``. Usually it's
2815 best to store all your project files in the same directory (they are
2816 independent of any source directory trees).
2818 The Base path text field is setup to use ``~/projects/name``. This
2819 can safely be set to any existing path -- it will not touch the file
2820 structure contained in it.
2823 Project properties
2824 ^^^^^^^^^^^^^^^^^^
2826 You can set an optional description for the project. Currently it's
2827 only used for a template wildcard - see `Template wildcards`_.
2829 The *Base path* field is used as the directory to run the Build menu commands.
2830 The specified path can be an absolute path or it is considered to be
2831 relative to the project's file name.
2833 The *File patterns* field allows to specify a list of file patterns for the
2834 project, which can be used in the `Find in files`_ dialog.
2836 The *Indentation* tab allows you to override the default
2837 `Indentation`_ settings.
2840 Open project
2841 ^^^^^^^^^^^^
2843 The Open command displays a standard file chooser, starting in
2844 ``~/projects``. Choose a project file named with the ``.geany``
2845 extension.
2847 When project session support is enabled, Geany will close the currently
2848 open files and open the session files associated with the project.
2851 Close project
2852 ^^^^^^^^^^^^^
2854 Project file settings are saved when the project is closed.
2856 When project session support is enabled, Geany will close the project
2857 session files and open any previously closed default session files.
2860 Build menu
2861 ----------
2862 After editing code with Geany, the next step is to compile, link, build,
2863 interpret, run etc.  As Geany supports many languages each with a different
2864 approach to such operations, and as there are also many language independent
2865 software building systems, Geany does not have a built-in build system, nor
2866 does it limit which system you can use.  Instead the build menu provides
2867 a configurable and flexible means of running any external commands to
2868 execute your preferred build system.
2870 This section provides a description of the default configuration of the
2871 build menu and then covers how to configure it, and where the defaults fit in.
2873 Running the commands from within Geany has two benefits:
2875 * The current file is automatically saved before the command is run.
2876 * The output is captured in the Compiler notebook tab and parsed for
2877   warnings or errors.
2879 Warnings and errors that can be parsed for line numbers will be shown in
2880 red in the Compiler tab and you can click on them to switch to the relevant
2881 source file (or open it) and mark the line number.  Also lines with
2882 warnings or errors are marked in the source, see `Indicators`_ below.
2884 .. tip::
2885     If Geany's default error message parsing does not parse errors for
2886     the tool you're using, you can set a custom regex in the
2887     `Set Build Commands dialog`_, see `Build Menu Configuration`_.
2889 Indicators
2890 ^^^^^^^^^^
2892 Indicators are red squiggly underlines which are used to highlight
2893 errors which occurred while compiling the current file. So you can
2894 easily see where your code failed to compile. You can remove them by
2895 selecting *Remove Error Indicators* in the Document menu.
2897 If you do not like this feature, you can disable it - see `Editor Features
2898 preferences`_.
2901 Default build menu items
2902 ^^^^^^^^^^^^^^^^^^^^^^^^
2903 Depending on the current file's filetype, the default Build menu will contain
2904 the following items:
2906 * Compile
2907 * Build
2908 * Lint
2909 * Make All
2910 * Make Custom Target
2911 * Make Object
2912 * Next Error
2913 * Previous Error
2914 * Execute
2915 * Set Build Menu Commands
2918 Compile
2919 ```````
2921 The Compile command has different uses for different kinds of files.
2923 For compilable languages such as C and C++, the Compile command is
2924 set up to compile the current source file into a binary object file.
2926 Java source files will be compiled to class file bytecode.
2928 Interpreted languages such as Perl, Python, Ruby will compile to
2929 bytecode if the language supports it, or will run a syntax check,
2930 or if that is not available will run the file in its language interpreter.
2932 Build
2933 `````
2935 For compilable languages such as C and C++, the Build command will link
2936 the current source file's equivalent object file into an executable. If
2937 the object file does not exist, the source will be compiled and linked
2938 in one step, producing just the executable binary.
2940 Interpreted languages do not use the Build command.
2942 .. note::
2943     If you need complex settings for your build system, or several
2944     different settings, then writing a Makefile and using the Make
2945     commands is recommended; this will also make it easier for users to
2946     build your software.
2948 Lint
2949 ````
2951 Source code linters are often used to find code that doesn't correspond to
2952 certain style guidelines: non-portable code, common or hard to find
2953 errors, code "smells", variables used before being set, unused functions,
2954 division by zero, constant conditions, etc. Linters inspect the code and
2955 issue warnings much like the compilers do. This is formally referred to as
2956 static code analysis.
2958 Some common linters are pre-configured for you in the Build menu (``pep8``
2959 for Python, ``cppcheck`` for C/C++, JSHint for JavaScript, ``xmllint`` for
2960 XML, ``hlint`` for Haskell, ``shellcheck`` for shell code, ...), but all
2961 these are standalone tools you need to obtain before using.
2963 Make
2964 ````
2966 This runs "make" in the same directory as the
2967 current file.
2969 Make custom target
2970 ``````````````````
2972 This is similar to running 'Make' but you will be prompted for
2973 the make target name to be passed to the Make tool. For example,
2974 typing 'clean' in the dialog prompt will run "make clean".
2977 Make object
2978 ```````````
2980 Make object will run "make current_file.o" in the same directory as
2981 the current file, using the filename for 'current_file'. It is useful
2982 for building just the current file without building the whole project.
2984 Next error
2985 ``````````
2987 The next error item will move to the next detected error in the file.
2989 Previous error
2990 ``````````````
2991 The previous error item will move to the previous detected error in the file.
2993 Execute
2994 ```````
2996 Execute will run the corresponding executable file, shell script or
2997 interpreted script in a terminal window. The command set in the
2998 `Set Build Commands dialog`_ is run in a script to ensure the terminal
2999 stays open after execution completes.  Note: see `Terminal emulators`_
3000 below for the command format.  Alternatively the built-in VTE can be used
3001 if it is available - see `Virtual terminal emulator widget (VTE)`_.
3003 After your program or script has finished executing, the run script will
3004 prompt you to press the return key. This allows you to review any text
3005 output from the program before the terminal window is closed.
3007 .. note::
3008     The execute command output is not parsed for errors.
3011 Stopping running processes
3012 ``````````````````````````
3014 When there is a running program, the Execute menu item in the menu and
3015 the Run button in the toolbar
3016 each become a stop button so you can stop the current running program (and
3017 any child processes). This works by sending the SIGQUIT signal to the process.
3019 Depending on the process you started it is possible that the process
3020 cannot be stopped. For example this can happen when the process creates
3021 more than one child process.
3024 Terminal emulators
3025 ******************
3027 The Terminal field of the tools preferences tab requires a command to
3028 execute the terminal program and to pass it the name of the Geany run
3029 script that it should execute in a Bourne compatible shell (eg /bin/sh).
3030 The marker "%c" is substituted with the name of the Geany run script,
3031 which is created in the temporary directory and which changes the working
3032 directory to the directory set in the `Set Build Commands dialog`_.
3034 As an example the default (Linux) command is::
3036     xterm -e "/bin/sh %c"
3039 Set build commands
3040 ``````````````````
3042 By default Compile, Build and Execute are fairly basic commands. You
3043 may wish to customise them using *Set Build Commands*.
3045 E.g. for C you can add any include paths and compile flags for the
3046 compiler, any library names and paths for the linker, and any
3047 arguments you want to use when running Execute.
3049 Build menu configuration
3050 ^^^^^^^^^^^^^^^^^^^^^^^^
3052 The build menu has considerable flexibility and configurability, allowing
3053 menu labels, the commands they execute and the directory they execute
3054 in to be configured. For example, if you change one of the default make 
3055 commands to run say 'waf' you can also change the label to match.
3056 These settings are saved automatically when Geany is shut down.
3058 The build menu is divided into four groups of items each with different
3059 behaviors:
3061 * Filetype build commands - are configurable and depend on the filetype of the
3062   current document; they capture output in the compiler tab and parse it for
3063   errors.
3064 * Independent build commands - are configurable and mostly don't depend on the
3065   filetype of the current document; they also capture output in the
3066   compiler tab and parse it for errors.
3067 * Execute commands - are configurable and intended for executing your
3068   program or other long running programs.  The output is not parsed for 
3069   errors and is directed to the terminal command selected in `Tools 
3070   preferences`_.
3071 * Fixed commands - these perform built-in actions:
3073   * Go to the next error.
3074   * Go to the previous error.
3075   * Show the build menu commands dialog.
3077 The maximum numbers of items in each of the configurable groups can be
3078 configured in `Various preferences`_. Even though the maximum number of
3079 items may have been increased, only those menu items that have commands
3080 configured are shown in the menu.
3082 The groups of menu items obtain their configuration from four potential
3083 sources.  The highest priority source that has the menu item defined will
3084 be used. The sources in decreasing priority are:
3086 * A project file if open
3087 * The user preferences
3088 * The system filetype definitions
3089 * The defaults
3091 The detailed relationships between sources and the configurable menu item groups
3092 is shown in the following table:
3094 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
3095 | Group        | Project File        | Preferences              | System Filetype   |  Defaults                     |
3096 +==============+=====================+==========================+===================+===============================+
3097 | Filetype     | Loads From: project | Loads From:              | Loads From:       | None                          |
3098 | Build        | file                | filetypes.xxx file in    | filetypes.xxx in  |                               |
3099 |              |                     | ~/.config/geany/filedefs | Geany install     |                               |
3100 |              | Saves To: project   |                          |                   |                               |
3101 |              | file                | Saves to: as above,      | Saves to: as user |                               |
3102 |              |                     | creating if needed.      | preferences left. |                               |
3103 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
3104 | Independent  | Loads From: project | Loads From:              | Loads From:       | 1:                            |
3105 | Build        | file                | geany.conf file in       | filetypes.xxx in  |   Label: _Make                |
3106 |              |                     | ~/.config/geany          | Geany install     |   Command: make               |
3107 |              | Saves To: project   |                          |                   |                               |
3108 |              | file                | Saves to: as above,      | Saves to: as user | 2:                            |
3109 |              |                     | creating if needed.      | preferences left. |    Label: Make Custom _Target |
3110 |              |                     |                          |                   |    Command: make              |
3111 |              |                     |                          |                   |                               |
3112 |              |                     |                          |                   | 3:                            |
3113 |              |                     |                          |                   |    Label: Make _Object        |
3114 |              |                     |                          |                   |    Command: make %e.o         |
3115 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
3116 | Execute      | Loads From: project | Loads From:              | Loads From:       | Label: _Execute               |
3117 |              | file or else        | geany.conf file in       | filetypes.xxx in  | Command: ./%e                 |
3118 |              | filetype defined in | ~/.config/geany or else  | Geany install     |                               |
3119 |              | project file        | filetypes.xxx file in    |                   |                               |
3120 |              |                     | ~/.config/geany/filedefs | Saves To: as user |                               |
3121 |              | Saves To:           |                          | preferences left. |                               |
3122 |              | project file        | Saves To:                |                   |                               |
3123 |              |                     | filetypes.xxx file in    |                   |                               |
3124 |              |                     | ~/.config/geany/filedefs |                   |                               |
3125 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
3127 The following notes on the table may reference cells by coordinate as *(group, source)*:
3129 * Filetype filenames - for filetypes.xxx substitute the appropriate extension for
3130   the filetype of the current document for xxx - see `filenames`_.
3132 * System Filetypes - Labels loaded from these sources are locale sensitive
3133   and can contain translations.
3135 * *(Filetype build, Project and Preferences)* - preferences use a full
3136   filetype file so that users can configure all other filetype preferences
3137   as well.  Projects can only configure menu items per filetype.  Saving
3138   in the project file means that there is only one file per project not
3139   a whole directory.
3141 * *(Filetype-Independent build, System Filetype)* - although conceptually strange, defining
3142   filetype-independent commands in a filetype file, this provides the ability to
3143   define filetype dependent default menu items.
3145 * *(Execute, Project and Preferences)* - the project independent
3146   execute and preferences independent execute commands can only be set by hand
3147   editing the appropriate file, see `Preferences file format`_ and `Project file
3148   format`_.
3150 Set Build Commands dialog
3151 ^^^^^^^^^^^^^^^^^^^^^^^^^
3153 Most of the configuration of the build menu is done through the `Set 
3154 Build Commands dialog`_. When no project is open, you can edit the 
3155 configuration sourced from user preferences using the *Build->Set Build 
3156 Commands* menu item. You can edit the configuration sourced from a 
3157 project in the *Build* tab of the `Project Properties`_ dialog. The 
3158 former menu item also shows the project dialog when a project is open. 
3159 Both use the same form shown below.
3161 .. image:: ./images/build_menu_commands_dialog.png
3163 The dialog is divided into three sections:
3165 * Filetype build commands (selected based on the current document's filetype).
3166 * Independent build commands (available regardless of filetype).
3167 * Filetype execute commands.
3169 The filetype and independent build sections also each contain a field for the regular
3170 expression used for parsing command output for error and warning messages.
3172 The columns in the first three sections allow setting of the label, command,
3173 and working directory to run the command in. An item with an empty 
3174 label will not be shown in the menu. An empty working directory will 
3175 default to the directory of the current document.
3177 If there is no current document then the command will not run.
3179 The dialog will always show the command selected by priority, not just the
3180 commands configured in this configuration source. This ensures that you always
3181 see what the menu item is going to do if activated.
3183 If the current source of the menu item is higher priority than the
3184 configuration source you are editing then the command will be shown
3185 in the dialog but will be insensitive (greyed out).  This can't happen
3186 with the project source but can with the preferences source dialog.
3188 The clear buttons remove the definition from the configuration source you are editing.
3189 When you do this the command from the next lower priority source will be shown.
3190 To hide lower priority menu items without having anything show in the menu,
3191 configure with nothing in the label but at least one character in the command.
3193 Substitutions in commands and working directories
3194 `````````````````````````````````````````````````
3196 Before the command is run, the first occurrence of each of the following 
3197 two character sequences in each of the command and working directory 
3198 fields is substituted by the items specified below:
3200 * %d - the absolute path to the directory of the current file.
3201 * %e - the name of the current file without the extension or path.
3202 * %f - the name of the current file without the path.
3203 * %p - if a project is open, the base path from the project.
3204 * %l - the line number at the current cursor position.
3206 .. note::
3207    If the base path set in `Project Properties`_ is not an absolute path, then it is
3208    taken as relative to the directory of the project file.  This allows a project file
3209    stored in the source tree to specify all commands and working directories relative
3210    to the tree itself, so that the whole tree including the project file, can be moved
3211    and even checked into and out of version control without having to re-configure the
3212    build menu.
3214 Build menu keyboard shortcuts
3215 `````````````````````````````
3217 Keyboard shortcuts can be defined for:
3219 * the first two filetype build menu items
3220 * the first three independent build menu items
3221 * the first execute menu item 
3222 * the fixed menu items (Next/Previous Error, Set Commands)
3224 In the keybindings configuration dialog (see `Keybinding preferences`_)
3225 these items are identified by the default labels shown in the `Build Menu`_ section above.
3227 It is currently not possible to bind keyboard shortcuts to more than these menu items.
3228 You can also use underlines in the labels to set mnemonic characters.
3230 Old settings
3231 ````````````
3232 The configurable Build Menu capability was introduced in Geany 0.19 and
3233 required a new section to be added to the configuration files (See
3234 `Preferences file format`_).  Geany will still load older format project,
3235 preferences and filetype file settings and will attempt to map them into the new
3236 configuration format.  There is not a simple clean mapping between the formats.
3237 The mapping used produces the most sensible results for the majority of cases.
3238 However, if they do not map the way you want, you may have to manually
3239 configure some settings using the `Set Build Commands dialog`_.
3241 Any setting configured in either of these dialogs will override settings mapped from
3242 older format configuration files.
3244 Printing support
3245 ----------------
3247 Since Geany 0.13 there has been printing support using GTK's printing API.
3248 The printed page(s) will look nearly the same as on your screen in Geany.
3249 Additionally, there are some options to modify the printed page(s).
3251 .. note::
3252     The background text color is set to white, except for text with
3253     a white foreground. This allows dark color schemes to save ink
3254     when printing.
3256 You can define whether to print line numbers, page numbers at the bottom of
3257 each page and whether to print a page header on each page. This header
3258 contains the filename of the printed document, the current page number and
3259 the date and time of printing. By default, the file name of the document
3260 with full path information is added to the header. If you prefer to add
3261 only the basename of the file(without any path information) you can set it
3262 in the preferences dialog. You can also adjust the format of the date and
3263 time added to the page header. The available conversion specifiers are the
3264 same as the ones which can be used with the ANSI C strftime function.
3266 All of these settings can also be changed in the print dialog just before
3267 actual printing is done.
3268 On Unix-like systems the provided print dialog offers a print preview. The
3269 preview file is opened with a PDF viewer and by default GTK uses ``evince``
3270 for print preview. If you have not installed evince or just want to use
3271 another PDF viewer, you can change the program to use in the file
3272 ``.gtkrc-2.0`` (usually found in your home directory). Simply add a line
3273 like::
3275     gtk-print-preview-command = "epdfview %f"
3277 at the end of the file. Of course, you can also use xpdf, kpdf or whatever
3278 as the print preview command.
3280 Geany also provides an alternative basic printing support using a custom
3281 print command. However, the printed document contains no syntax highlighting.
3282 You can adjust the command to which the filename is passed in the preferences
3283 dialog. The default command is::
3285     % lpr %f
3287 ``%f`` will be substituted by the filename of the current file. Geany
3288 will not show errors from the command itself, so you should make
3289 sure that it works before(e.g. by trying to execute it from the
3290 command line).
3292 A nicer example, which many prefer is::
3294     % a2ps -1 --medium=A4 -o - %f | xfprint4
3296 But this depends on a2ps and xfprint4. As a replacement for xfprint4,
3297 gtklp or similar programs can be used.
3301 Plugins
3302 -------
3304 Plugins are loaded at startup, if the *Enable plugin support*
3305 general preference is set. There is also a command-line option,
3306 ``-p``, which prevents plugins being loaded. Plugins are scanned in
3307 the following directories:
3309 * ``$prefix/lib/geany`` on Unix-like systems (see `Installation prefix`_)
3310 * The ``lib`` subfolder of the installation path on Windows.
3311 * The ``plugins`` subfolder of the user configuration directory - see
3312   `Configuration file paths`_.
3313 * The `Extra plugin path` preference (usually blank) - see `Paths`_.
3315 Most plugins add menu items to the *Tools* menu when they are loaded.
3317 See also `Plugin documentation`_ for information about single plugins
3318 which are included in Geany.
3320 Plugin manager
3321 ^^^^^^^^^^^^^^
3322 The Plugin Manager dialog lets you choose which plugins
3323 should be loaded at startup. You can also load and unload plugins on the
3324 fly using this dialog. Once you click the checkbox for a specific plugin
3325 in the dialog, it is loaded or unloaded according to its previous state.
3326 By default, no plugins are loaded at startup until you select some.
3327 You can also configure some plugin specific options if the plugin
3328 provides any.
3331 Keybindings
3332 -----------
3334 Geany supports the default keyboard shortcuts for the Scintilla
3335 editing widget. For a list of these commands, see `Scintilla
3336 keyboard commands`_. The Scintilla keyboard shortcuts will be overridden
3337 by any custom keybindings with the same keyboard shortcut.
3340 Switching documents
3341 ^^^^^^^^^^^^^^^^^^^
3343 There are some non-configurable bindings to switch between documents,
3344 listed below. These can also be overridden by custom keybindings.
3346 =============== ==================================
3347 Key             Action
3348 =============== ==================================
3349 Alt-[1-9]       Select left-most tab, from 1 to 9.
3350 Alt-0           Select right-most tab.
3351 =============== ==================================
3353 See also `Notebook tab keybindings`_.
3356 Configurable keybindings
3357 ^^^^^^^^^^^^^^^^^^^^^^^^
3359 For all actions listed below you can define your own keybindings. Open
3360 the Preferences dialog, select the desired action and click on
3361 change. In the resulting dialog you can press the key combination you
3362 want to assign to the action and it will be saved when you press OK.
3363 You can define only one key combination for each action and each key
3364 combination can only be defined for one action.
3366 The following tables list all customizable keyboard shortcuts, those
3367 which are common to many applications are marked with (C) after the
3368 shortcut.
3370 File keybindings
3371 ````````````````
3372 =============================== ========================= ==================================================
3373 Action                          Default shortcut          Description
3374 =============================== ========================= ==================================================
3375 New                             Ctrl-N  (C)               Creates a new file.
3377 Open                            Ctrl-O  (C)               Opens a file.
3379 Open selected file              Ctrl-Shift-O              Opens the selected filename.
3381 Re-open last closed tab                                   Re-opens the last closed document tab.
3383 Save                            Ctrl-S  (C)               Saves the current file.
3385 Save As                                                   Saves the current file under a new name.
3387 Save all                        Ctrl-Shift-S              Saves all open files.
3389 Close all                       Ctrl-Shift-W              Closes all open files.
3391 Close                           Ctrl-W  (C)               Closes the current file.
3393 Reload file                     Ctrl-R  (C)               Reloads the current file.
3395 Print                           Ctrl-P  (C)               Prints the current file.
3397 Quit                            Ctrl-Q  (C)               Quits Geany.
3398 =============================== ========================= ==================================================
3401 Editor keybindings
3402 ``````````````````
3403 =============================== ========================= ==================================================
3404 Action                          Default shortcut          Description
3405 =============================== ========================= ==================================================
3406 Undo                            Ctrl-Z  (C)               Un-does the last action.
3408 Redo                            Ctrl-Y                    Re-does the last action.
3410 Delete current line(s)          Ctrl-K                    Deletes the current line (and any lines with a
3411                                                           selection).
3413 Delete to line end              Ctrl-Shift-Delete         Deletes from the current caret position to the
3414                                                           end of the current line.
3416 Delete to line start            Ctrl-Shift-BackSpace      Deletes from the beginning of the line to the
3417                                                           current caret position.
3419 Duplicate line or selection     Ctrl-D                    Duplicates the current line or selection.
3421 Transpose current line                                    Transposes the current line with the previous one.
3423 Scroll to current line          Ctrl-Shift-L              Scrolls the current line into the centre of the
3424                                                           view. The cursor position and or an existing
3425                                                           selection will not be changed.
3427 Scroll up by one line           Alt-Up                    Scrolls the view.
3429 Scroll down by one line         Alt-Down                  Scrolls the view.
3431 Complete word                   Ctrl-Space                Shows the autocompletion list. If already showing
3432                                                           symbol completion, it shows document word completion
3433                                                           instead, even if it is not enabled for automatic
3434                                                           completion. Likewise if no symbol suggestions are
3435                                                           available, it shows document word completion.
3437 Show calltip                    Ctrl-Shift-Space          Shows a calltip for the current function or
3438                                                           method.
3440 Complete snippet                Tab                       If you type a construct like if or for and press
3441                                                           this key, it will be completed with a matching
3442                                                           template.
3444 Suppress snippet completion                               If you type a construct like if or for and press
3445                                                           this key, it will not be completed, and a space or
3446                                                           tab will be inserted, depending on what the
3447                                                           construct completion keybinding is set to. For
3448                                                           example, if you have set the construct completion
3449                                                           keybinding to space, then setting this to
3450                                                           Shift+space will prevent construct completion and
3451                                                           insert a space.
3453 Context Action                                            Executes a command and passes the current word
3454                                                           (near the cursor position) or selection as an
3455                                                           argument. See the section called `Context
3456                                                           actions`_.
3458 Move cursor in snippet                                    Jumps to the next defined cursor positions in a
3459                                                           completed snippets if multiple cursor positions
3460                                                           where defined.
3462 Word part completion            Tab                       When the autocompletion list is visible, complete
3463                                                           the currently selected item up to the next word
3464                                                           part.
3466 Move line(s) up                 Alt-PageUp                Move the current line or selected lines up by
3467                                                           one line.
3469 Move line(s) down               Alt-PageDown              Move the current line or selected lines down by
3470                                                           one line.
3471 =============================== ========================= ==================================================
3474 Clipboard keybindings
3475 `````````````````````
3476 =============================== ========================= ==================================================
3477 Action                          Default shortcut          Description
3478 =============================== ========================= ==================================================
3479 Cut                             Ctrl-X  (C)               Cut the current selection to the clipboard.
3481 Copy                            Ctrl-C  (C)               Copy the current selection to the clipboard.
3483 Paste                           Ctrl-V  (C)               Paste the clipboard text into the current document.
3485 Cut current line(s)             Ctrl-Shift-X              Cuts the current line (and any lines with a
3486                                                           selection) to the clipboard.
3488 Copy current line(s)            Ctrl-Shift-C              Copies the current line (and any lines with a
3489                                                           selection) to the clipboard.
3490 =============================== ========================= ==================================================
3493 Select keybindings
3494 ``````````````````
3495 =============================== ========================= ==================================================
3496 Action                          Default shortcut          Description
3497 =============================== ========================= ==================================================
3498 Select all                      Ctrl-A  (C)               Makes a selection of all text in the current
3499                                                           document.
3501 Select current word             Alt-Shift-W               Selects the current word under the cursor.
3503 Select current paragraph        Alt-Shift-P               Selects the current paragraph under the cursor
3504                                                           which is defined by two empty lines around it.
3506 Select current line(s)          Alt-Shift-L               Selects the current line under the cursor (and any
3507                                                           partially selected lines).
3509 Select to previous word part                              (Extend) selection to previous word part boundary.
3511 Select to next word part                                  (Extend) selection to next word part boundary.
3512 =============================== ========================= ==================================================
3515 Insert keybindings
3516 ``````````````````
3517 =============================== ========================= ==================================================
3518 Action                          Default shortcut          Description
3519 =============================== ========================= ==================================================
3520 Insert date                     Shift-Alt-D               Inserts a customisable date.
3522 Insert alternative whitespace                             Inserts a tab character when spaces should
3523                                                           be used for indentation and inserts space
3524                                                           characters of the amount of a tab width when
3525                                                           tabs should be used for indentation.
3527 Insert New Line Before Current                            Inserts a new line with indentation.
3529 Insert New Line After Current                             Inserts a new line with indentation.
3530 =============================== ========================= ==================================================
3533 Format keybindings
3534 ``````````````````
3535 =============================== ========================= ==================================================
3536 Action                          Default shortcut          Description
3537 =============================== ========================= ==================================================
3538 Toggle case of selection        Ctrl-Alt-U                Changes the case of the selection. A lowercase
3539                                                           selection will be changed into uppercase and vice
3540                                                           versa. If the selection contains lower- and
3541                                                           uppercase characters, all will be converted to
3542                                                           lowercase.
3544 Comment line                                              Comments current line or selection.
3546 Uncomment line                                            Uncomments current line or selection.
3548 Toggle line commentation        Ctrl-E                    Comments a line if it is not commented or removes
3549                                                           a comment if the line is commented.
3551 Increase indent                 Ctrl-I                    Indents the current line or selection by one tab
3552                                                           or with spaces in the amount of the tab width
3553                                                           setting.
3555 Decrease indent                 Ctrl-U                    Removes one tab or the amount of spaces of
3556                                                           the tab width setting from the indentation of the
3557                                                           current line or selection.
3559 Increase indent by one space                              Indents the current line or selection by one
3560                                                           space.
3562 Decrease indent by one space                              Deindents the current line or selection by one
3563                                                           space.
3565 Smart line indent                                         Indents the current line or all selected lines
3566                                                           with the same indentation as the previous line.
3568 Send to Custom Command 1 (2,3)  Ctrl-1 (2,3)              Passes the current selection to a configured
3569                                                           external command (available for the first
3570                                                           9 configured commands, see
3571                                                           `Sending text through custom commands`_ for
3572                                                           details).
3574 Send Selection to Terminal                                Sends the current selection or the current
3575                                                           line (if there is no selection) to the
3576                                                           embedded Terminal (VTE).
3578 Reflow lines/block                                        Reformat selected lines or current
3579                                                           (indented) text block,
3580                                                           breaking lines at the long line marker or the
3581                                                           line breaking column if line breaking is
3582                                                           enabled for the current document.
3583 =============================== ========================= ==================================================
3586 Settings keybindings
3587 ````````````````````
3588 =============================== ========================= ==================================================
3589 Action                          Default shortcut          Description
3590 =============================== ========================= ==================================================
3591 Preferences                     Ctrl-Alt-P                Opens preferences dialog.
3593 Plugin Preferences                                        Opens plugin preferences dialog.
3594 =============================== ========================= ==================================================
3597 Search keybindings
3598 ``````````````````
3599 =============================== ========================= ==================================================
3600 Action                          Default shortcut          Description
3601 =============================== ========================= ==================================================
3602 Find                            Ctrl-F  (C)               Opens the Find dialog.
3604 Find Next                       Ctrl-G                    Finds next result.
3606 Find Previous                   Ctrl-Shift-G              Finds previous result.
3608 Find Next Selection                                       Finds next occurrence of selected text.
3610 Find Previous Selection                                   Finds previous occurrence of selected text.
3612 Replace                         Ctrl-H  (C)               Opens the Replace dialog.
3614 Find in files                   Ctrl-Shift-F              Opens the Find in files dialog.
3616 Next message                                              Jumps to the line with the next message in
3617                                                           the Messages window.
3619 Previous message                                          Jumps to the line with the previous message
3620                                                           in the Messages window.
3622 Find Usage                      Ctrl-Shift-E              Finds all occurrences of the current word
3623                                                           or selection (see note below) in all open
3624                                                           documents and displays them in the messages
3625                                                           window.
3627 Find Document Usage             Ctrl-Shift-D              Finds all occurrences of the current word
3628                                                           or selection (see note below) in the current
3629                                                           document and displays them in the messages
3630                                                           window.
3632 Mark All                        Ctrl-Shift-M              Highlight all matches of the current
3633                                                           word/selection (see note below) in the current
3634                                                           document with a colored box. If there's nothing
3635                                                           to find, or the cursor is next to an existing
3636                                                           match, the highlighted matches will be cleared.
3637 =============================== ========================= ==================================================
3639 .. note::
3640     The keybindings marked "see note below" work like this: if no text is
3641     selected, the word under cursor is used, and *it has to match fully*
3642     (like when `Match only a whole word` is enabled in the Search dialog).
3643     However if some text is selected, then it is matched regardless of
3644     word boundaries.
3647 Go to keybindings
3648 `````````````````
3649 =============================== ========================= ==================================================
3650 Action                          Default shortcut          Description
3651 =============================== ========================= ==================================================
3652 Navigate forward a location     Alt-Right  (C)            Switches to the next location in the navigation
3653                                                           history. See the section called `Code Navigation
3654                                                           History`_.
3656 Navigate back a location        Alt-Left  (C)             Switches to the previous location in the
3657                                                           navigation history. See the section called
3658                                                           `Code navigation history`_.
3660 Go to line                      Ctrl-L                    Focuses the Go to Line entry (if visible) or
3661                                                           shows the Go to line dialog.
3663 Goto matching brace             Ctrl-B                    If the cursor is ahead or behind a brace, then it
3664                                                           is moved to the brace which belongs to the current
3665                                                           one. If this keyboard shortcut is pressed again,
3666                                                           the cursor is moved back to the first brace.
3668 Toggle marker                   Ctrl-M                    Set a marker on the current line, or clear the
3669                                                           marker if there already is one.
3671 Goto next marker                Ctrl-.                    Goto the next marker in the current document.
3673 Goto previous marker            Ctrl-,                    Goto the previous marker in the current document.
3675 Go to symbol definition         Ctrl-T                    Jump to the definition of the current word or
3676                                                           selection. See `Go to symbol definition`_.
3678 Go to symbol declaration        Ctrl-Shift-T              Jump to the declaration of the current word or
3679                                                           selection. See `Go to symbol declaration`_.
3681 Go to Start of Line             Home                      Move the caret to the start of the line.
3682                                                           Behaves differently if smart_home_key_ is set.
3684 Go to End of Line               End                       Move the caret to the end of the line.
3686 Go to Start of Display Line     Alt-Home                  Move the caret to the start of the display line.
3687                                                           This is useful when you use line wrapping and
3688                                                           want to jump to the start of the wrapped, virtual
3689                                                           line, not the real start of the whole line.
3690                                                           If the line is not wrapped, it behaves like
3691                                                           `Go to Start of Line`.
3693 Go to End of Display Line       Alt-End                   Move the caret to the end of the display line.
3694                                                           If the line is not wrapped, it behaves like
3695                                                           `Go to End of Line`.
3697 Go to Previous Word Part        Ctrl-/                    Goto the previous part of the current word.
3699 Go to Next Word Part            Ctrl-\\                   Goto the next part of the current word.
3700 =============================== ========================= ==================================================
3702 View keybindings
3703 ````````````````
3704 =============================== ========================= ==================================================
3705 Action                          Default shortcut          Description
3706 =============================== ========================= ==================================================
3707 Fullscreen                      F11  (C)                  Switches to fullscreen mode.
3709 Toggle Messages Window                                    Toggles the message window (status and compiler
3710                                                           messages) on and off.
3712 Toggle Sidebar                                            Shows or hides the sidebar.
3714 Toggle all additional widgets                             Hide and show all additional widgets like the
3715                                                           notebook tabs, the toolbar, the messages window
3716                                                           and the status bar.
3718 Zoom In                         Ctrl-+  (C)               Zooms in the text.
3720 Zoom Out                        Ctrl--  (C)               Zooms out the text.
3722 Zoom Reset                      Ctrl-0                    Reset any previous zoom on the text.
3723 =============================== ========================= ==================================================
3725 Focus keybindings
3726 `````````````````
3727 ================================ ========================= ==================================================
3728 Action                           Default shortcut          Description
3729 ================================ ========================= ==================================================
3730 Switch to Editor                 F2                        Switches to editor widget.
3731                                                            Also reshows the document statistics line
3732                                                            (after a short timeout).
3734 Switch to Search Bar             F7                        Switches to the search bar in the toolbar (if
3735                                                            visible).
3737 Switch to Message Window                                   Focus the Message Window's current tab.
3739 Switch to Compiler                                         Focus the Compiler message window tab.
3741 Switch to Messages                                         Focus the Messages message window tab.
3743 Switch to Scribble               F6                        Switches to scribble widget.
3745 Switch to VTE                    F4                        Switches to VTE widget.
3747 Switch to Sidebar                                          Focus the Sidebar.
3749 Switch to Sidebar Symbol List                              Focus the Symbol list tab in the Sidebar
3750                                                            (if visible).
3752 Switch to Sidebar Document List                            Focus the Document list tab in the Sidebar
3753                                                            (if visible).
3754 ================================ ========================= ==================================================
3757 Notebook tab keybindings
3758 ````````````````````````
3759 =============================== ========================= ==================================================
3760 Action                          Default shortcut          Description
3761 =============================== ========================= ==================================================
3762 Switch to left document         Ctrl-PageUp   (C)         Switches to the previous open document.
3764 Switch to right document        Ctrl-PageDown (C)         Switches to the next open document.
3766 Switch to last used document    Ctrl-Tab                  Switches to the previously shown document (if it's
3767                                                           still open).
3768                                                           Holding Ctrl (or another modifier if the keybinding
3769                                                           has been changed) will show a dialog, then repeated
3770                                                           presses of the keybinding will switch to the 2nd-last
3771                                                           used document, 3rd-last, etc. Also known as
3772                                                           Most-Recently-Used documents switching.
3774 Move document left              Ctrl-Shift-PageUp         Changes the current document with the left hand
3775                                                           one.
3777 Move document right             Ctrl-Shift-PageDown       Changes the current document with the right hand
3778                                                           one.
3780 Move document first                                       Moves the current document to the first position.
3782 Move document last                                        Moves the current document to the last position.
3783 =============================== ========================= ==================================================
3786 Document keybindings
3787 ````````````````````
3788 ==================================== ==================== ==================================================
3789 Action                               Default shortcut     Description
3790 ==================================== ==================== ==================================================
3791 Clone                                                     See `Cloning documents`_.
3793 Replace tabs with space                                   Replaces all tabs with the right amount of spaces
3794                                                           in the whole document, or the current selection.
3796 Replace spaces with tabs                                  Replaces leading spaces with tab characters in the
3797                                                           whole document, or the current selection.
3799 Toggle current fold                                       Toggles the folding state of the current code block.
3801 Fold all                                                  Folds all contractible code blocks.
3803 Unfold all                                                Unfolds all contracted code blocks.
3805 Reload symbol list                   Ctrl-Shift-R         Reloads the symbol list.
3807 Toggle Line wrapping                                      Enables or disables wrapping of long lines.
3809 Toggle Line breaking                                      Enables or disables automatic breaking of long
3810                                                           lines at a configurable column.
3812 Remove Markers                                            Remove any markers on lines or words which
3813                                                           were set by using 'Mark All' in the
3814                                                           search dialog or by manually marking lines.
3816 Remove Error Indicators                                   Remove any error indicators in the
3817                                                           current document.
3819 Remove Markers and Error Indicators                       Combines ``Remove Markers`` and
3820                                                           ``Remove Error Indicators``.
3821 ==================================== ==================== ==================================================
3824 Project keybindings
3825 ```````````````````
3826 =============================== ========================= ==================================================
3827 Action                          Default shortcut          Description
3828 =============================== ========================= ==================================================
3829 New                                                       Create a new project.
3830 Open                                                      Opens a project file.
3831 Properties                                                Shows project properties.
3832 Close                                                     Close the current project.
3833 =============================== ========================= ==================================================
3836 Build keybindings
3837 `````````````````
3838 =============================== ========================= ==================================================
3839 Action                          Default shortcut          Description
3840 =============================== ========================= ==================================================
3841 Compile                         F8                        Compiles the current file.
3843 Build                           F9                        Builds (compiles if necessary and links) the
3844                                                           current file.
3846 Make all                        Shift-F9                  Builds the current file with the Make tool.
3848 Make custom target              Ctrl-Shift-F9             Builds the current file with the Make tool and a
3849                                                           given target.
3851 Make object                     Shift-F8                  Compiles the current file with the Make tool.
3853 Next error                                                Jumps to the line with the next error from the
3854                                                           last build process.
3856 Previous error                                            Jumps to the line with the previous error from
3857                                                           the last build process.
3859 Run                             F5                        Executes the current file in a terminal emulation.
3861 Set Build Commands                                        Opens the build commands dialog.
3862 =============================== ========================= ==================================================
3865 Tools keybindings
3866 `````````````````
3867 =============================== ========================= ==================================================
3868 Action                          Default shortcut          Description
3869 =============================== ========================= ==================================================
3870 Show Color Chooser                                        Opens the Color Chooser dialog.
3871 =============================== ========================= ==================================================
3874 Help keybindings
3875 ````````````````
3876 =============================== ========================= ==================================================
3877 Action                          Default shortcut          Description
3878 =============================== ========================= ==================================================
3879 Help                            F1 (C)                       Opens the manual.
3880 =============================== ========================= ==================================================
3885 Configuration files
3886 ===================
3887 .. warning::
3888     You must use UTF-8 encoding *without BOM* for configuration files.
3891 Configuration file paths
3892 ------------------------
3893 Geany has default configuration files installed for the system and
3894 also per-user configuration files.
3896 The system files should not normally be edited because they will be
3897 overwritten when upgrading Geany.
3899 The user configuration directory can be overridden with the ``-c``
3900 switch, but this is not normally done. See `Command line options`_.
3902 .. note::
3903     Any missing subdirectories in the user configuration directory
3904     will be created when Geany starts.
3906 You can check the paths Geany is using with *Help->Debug Messages*.
3907 Near the top there should be 2 lines with something like::
3909     Geany-INFO: System data dir: /usr/share/geany
3910     Geany-INFO: User config dir: /home/username/.config/geany
3913 Paths on Unix-like systems
3914 ^^^^^^^^^^^^^^^^^^^^^^^^^^
3915 The system path is ``$prefix/share/geany``, where ``$prefix`` is the
3916 path where Geany is installed (see `Installation prefix`_).
3918 The user configuration directory is normally:
3919 ``/home/username/.config/geany``
3921 Paths on Windows
3922 ^^^^^^^^^^^^^^^^
3923 The system path is the ``data`` subfolder of the installation path
3924 on Windows.
3926 The user configuration directory might vary, but on Windows XP it's:
3927 ``C:\Documents and Settings\UserName\Application Data\geany``
3928 On Windows 7 and above you most likely will find it at:
3929 ``C:\users\UserName\Roaming\geany``
3932 Tools menu items
3933 ----------------
3934 There's a *Configuration files* submenu in the *Tools* menu that
3935 contains items for some of the available user configuration files.
3936 Clicking on one opens it in the editor for you to update. Geany will
3937 reload the file after you have saved it.
3939 .. note::
3940     Other configuration files not shown here will need to be opened
3941     manually, and will not be automatically reloaded when saved.
3942     (see *Reload Configuration* below).
3944 There's also a *Reload Configuration* item which can be used if you
3945 updated one of the other configuration files, or modified or added
3946 template files.
3948 *Reload Configuration* is also necessary to update syntax highlighting colors.
3950 .. note::
3951     Syntax highlighting colors aren't updated in open documents after
3952     saving filetypes.common as this may take a significant
3953     amount of time.
3956 Global configuration file
3957 -------------------------
3959 System administrators can add a global configuration file for Geany
3960 which will be used when starting Geany and a user configuration file
3961 does not exist.
3963 The global configuration file is read from ``geany.conf`` in the
3964 system configuration path - see `Configuration file paths`_. It can
3965 contain any settings which are found in the usual configuration file
3966 created by Geany, but does not have to contain all settings.
3968 .. note::
3969     This feature is mainly intended for package maintainers or system
3970     admins who want to set up Geany in a multi user environment and
3971     set some sane default values for this environment. Usually users won't
3972     need to do that.
3976 Filetype definition files
3977 -------------------------
3979 All color definitions and other filetype specific settings are
3980 stored in the filetype definition files. Those settings are colors
3981 for syntax highlighting, general settings like comment characters or
3982 word delimiter characters as well as compiler and linker settings.
3984 See also `Configuration file paths`_.
3986 Filenames
3987 ^^^^^^^^^
3988 Each filetype has a corresponding filetype definition file. The format
3989 for built-in filetype `Foo` is::
3991     filetypes.foo
3993 The extension is normally just the filetype name in lower case.
3995 However there are some exceptions:
3997 =============== =========
3998 Filetype        Extension
3999 =============== =========
4000 C++             cpp
4001 C#              cs
4002 Make            makefile
4003 Matlab/Octave   matlab
4004 =============== =========
4006 There is also the `special file filetypes.common`_.
4008 For `custom filetypes`_, the filename for `Foo` is different::
4010     filetypes.Foo.conf
4012 See the link for details.
4014 System files
4015 ^^^^^^^^^^^^
4016 The system-wide filetype configuration files can be found in the
4017 system configuration path and are called ``filetypes.$ext``,
4018 where $ext is the name of the filetype. For every
4019 filetype there is a corresponding definition file. There is one
4020 exception: ``filetypes.common`` -- this file is for general settings,
4021 which are not specific to a certain filetype.
4023 .. warning::
4024     It is not recommended that users edit the system-wide files,
4025     because they will be overridden when Geany is updated.
4027 User files
4028 ^^^^^^^^^^
4029 To change the settings, copy a file from the system configuration
4030 path to the subdirectory ``filedefs`` in your user configuration
4031 directory. Then you can edit the file and the changes will still be
4032 available after an update of Geany.
4034 Alternatively, you can create the file yourself and add only the
4035 settings you want to change. All missing settings will be read from
4036 the corresponding system configuration file.
4038 Custom filetypes
4039 ^^^^^^^^^^^^^^^^
4040 At startup Geany looks for ``filetypes.*.conf`` files in the system and
4041 user filetype paths, adding any filetypes found with the name matching
4042 the '``*``' wildcard - e.g. ``filetypes.Bar.conf``.
4044 Custom filetypes are not as powerful as built-in filetypes, but
4045 support for the following has been implemented:
4047 * Recognizing and setting the filetype (after the user has manually updated
4048   the `filetype extensions`_ file).
4049 * `Filetype group membership`_.
4050 * Reading filetype settings in the ``[settings]`` section, including:
4051     * Using an existing syntax highlighting lexer (`lexer_filetype`_ key).
4052     * Using an existing tags parser (`tag_parser`_ key).
4053 * Build commands (``[build-menu]`` section).
4054 * Loading global tags files (sharing the ``tag_parser`` filetype's namespace).
4056 See `Filetype configuration`_ for details on each setting.
4058 Creating a custom filetype from an existing filetype
4059 ````````````````````````````````````````````````````
4060 Because most filetype settings will relate to the syntax
4061 highlighting (e.g. styling, keywords, ``lexer_properties``
4062 sections), it is best to copy an existing filetype file that uses
4063 the lexer you wish to use as the basis of a custom filetype, using
4064 the correct filename extension format shown above, e.g.::
4066     cp filetypes.foo filetypes.Bar.conf
4068 Then add the ``lexer_filetype=Foo`` setting (if not already present)
4069 and add/adjust other settings.
4071 .. warning::
4072     The ``[styling]`` and ``[keywords]`` sections have key names
4073     specific to each filetype/lexer. You must follow the same
4074     names - in particular, some lexers only support one keyword
4075     list, or none.
4078 Filetype configuration
4079 ^^^^^^^^^^^^^^^^^^^^^^
4081 As well as the sections listed below, each filetype file can contain
4082 a [build-menu] section as described in `[build-menu] section`_.
4084 [styling] section
4085 `````````````````
4087 In this section the colors for syntax highlighting are defined. The
4088 manual format is:
4090 * ``key=foreground_color;background_color;bold_flag;italic_flag``
4092 Colors have to be specified as RGB hex values prefixed by
4093 0x or # similar to HTML/CSS hex triplets. For example, all of the following
4094 are valid values for pure red; 0xff0000, 0xf00, #ff0000, or #f00.  The
4095 values are case-insensitive but it is a good idea to use lower-case.
4096 Note that you can also use *named colors* as well by substituting the
4097 color value with the name of a color as defined in the ``[named_colors]``
4098 section, see the `[named_colors] Section`_ for more information.
4100 Bold and italic are flags and should only be "true" or "false". If their
4101 value is something other than "true" or "false", "false" is assumed.
4103 You can omit fields to use the values from the style named ``"default"``.
4105 E.g. ``key=0xff0000;;true``
4107 This makes the key style have red foreground text, default background
4108 color text and bold emphasis.
4110 Using a named style
4111 *******************
4112 The second format uses a *named style* name to reference a style
4113 defined in filetypes.common.
4115 * ``key=named_style``
4116 * ``key2=named_style2,bold,italic``
4118 The bold and italic parts are optional, and if present are used to
4119 toggle the bold or italic flags to the opposite of the named style's
4120 flags. In contrast to style definition booleans, they are a literal
4121 ",bold,italic" and commas are used instead of semi-colons.
4123 E.g. ``key=comment,italic``
4125 This makes the key style match the ``"comment"`` named style, but with
4126 italic emphasis.
4128 To define named styles, see the filetypes.common `[named_styles]
4129 Section`_.
4131 Reading styles from another filetype
4132 ************************************
4133 You can automatically copy all of the styles from another filetype
4134 definition file by using the following syntax for the ``[styling]``
4135 group::
4137         [styling=Foo]
4139 Where Foo is a filetype name. The corresponding ``[styling]``
4140 section from ``filetypes.foo`` will be read.
4142 This is useful when the same lexer is being used for multiple
4143 filetypes (e.g. C/C++/C#/Java/etc).  For example, to make the C++
4144 styling the same as the C styling, you would put the following in
4145 ``filetypes.cpp``::
4147         [styling=C]
4150 [keywords] section
4151 ``````````````````
4153 This section contains keys for different keyword lists specific to
4154 the filetype. Some filetypes do not support keywords, so adding a
4155 new key will not work. You can only add or remove keywords to/from
4156 an existing list.
4158 .. important::
4159     The keywords list must be in one line without line ending characters.
4162 [lexer_properties] section
4163 ``````````````````````````
4164 Here any special properties for the Scintilla lexer can be set in the
4165 format ``key.name.field=some.value``.
4167 Properties Geany uses are listed in the system filetype files. To find
4168 other properties you need Geany's source code::
4170     egrep -o 'GetProperty\w*\("([^"]+)"[^)]+\)' scintilla/Lex*.cxx
4173 [settings] section
4174 ``````````````````
4176 extension
4177     This is the default file extension used when saving files, not
4178     including the period character (``.``). The extension used should
4179     match one of the patterns associated with that filetype (see
4180     `Filetype extensions`_).
4182     *Example:* ``extension=cxx``
4184 wordchars
4185     These characters define word boundaries when making selections
4186     and searching using word matching options.
4188     *Example:* (look at system filetypes.\* files)
4190     .. note::
4191         This overrides the *wordchars* filetypes.common setting, and
4192         has precedence over the *whitespace_chars* setting.
4194 comment_single
4195     A character or string which is used to comment code. If you want to use
4196     multiline comments only, don't set this but rather comment_open and
4197     comment_close.
4199     Single-line comments are used in priority over multiline comments to
4200     comment a line, e.g. with the `Comment/Uncomment line` command.
4202     *Example:* ``comment_single=//``
4204 comment_open
4205     A character or string which is used to comment code. You need to also
4206     set comment_close to really use multiline comments. If you want to use
4207     single-line comments, prefer setting comment_single.
4209     Multiline comments are used in priority over single-line comments to
4210     comment a block, e.g. template comments.
4212     *Example:* ``comment_open=/*``
4214 comment_close
4215     If multiline comments are used, this is the character or string to
4216     close the comment.
4218     *Example:* ``comment_close=*/``
4220 comment_use_indent
4221     Set this to false if a comment character or string should start at
4222     column 0 of a line. If set to true it uses any indentation of the
4223     line.
4225     Note: Comment indentation
4227     ``comment_use_indent=true`` would generate this if a line is
4228     commented (e.g. with Ctrl-D)::
4230         #command_example();
4232     ``comment_use_indent=false`` would generate this if a line is
4233     commented (e.g. with Ctrl-D)::
4235         #   command_example();
4238     Note: This setting only works for single line comments (like '//',
4239     '#' or ';').
4241     *Example:* ``comment_use_indent=true``
4243 context_action_cmd
4244     A command which can be executed on the current word or the current
4245     selection.
4247     Example usage: Open the API documentation for the
4248     current function call at the cursor position.
4250     The command can
4251     be set for every filetype or if not set, a global command will
4252     be used. The command itself can be specified without the full
4253     path, then it is searched in $PATH. But for security reasons,
4254     it is recommended to specify the full path to the command. The
4255     wildcard %s will be replaced by the current word at the cursor
4256     position or by the current selection.
4258     Hint: for PHP files the following could be quite useful:
4259     context_action_cmd=firefox "http://www.php.net/%s"
4261     *Example:* ``context_action_cmd=devhelp -s "%s"``
4263 .. _tag_parser:
4265 tag_parser
4266     The TagManager language name, e.g. "C". Usually the same as the
4267     filetype name.
4269 .. _lexer_filetype:
4271 lexer_filetype
4272     A filetype name to setup syntax highlighting from another filetype.
4273     This must not be recursive, i.e. it should be a filetype name that
4274     doesn't use the *lexer_filetype* key itself, e.g.::
4276         lexer_filetype=C
4277         #lexer_filetype=C++
4279     The second line is wrong, because ``filetypes.cpp`` itself uses
4280     ``lexer_filetype=C``, which would be recursive.
4282 symbol_list_sort_mode
4283     What the default symbol list sort order should be.
4285     =====   ========================================
4286     Value   Meaning
4287     =====   ========================================
4288     0       Sort symbols by name
4289     1       Sort symbols by appearance (line number)
4290     =====   ========================================
4292 .. _xml_indent_tags:
4294 xml_indent_tags
4295     If this setting is set to *true*, a new line after a line ending with an
4296     unclosed XML/HTML tag will be automatically indented. This only applies
4297     to filetypes for which the HTML or XML lexer is used. Such filetypes have
4298     this setting in their system configuration files.
4300 mime_type
4301     The MIME type for this file type, e.g. "text/x-csrc".  This is used
4302     for example to chose the icon to display for this file type.
4305 [indentation] section
4306 `````````````````````
4308 This section allows definition of default indentation settings specific to
4309 the file type, overriding the ones configured in the preferences.  This can
4310 be useful for file types requiring specific indentation settings (e.g. tabs
4311 only for Makefile).  These settings don't override auto-detection if activated.
4313 width
4314     The forced indentation width.
4316 type
4317     The forced indentation type.
4319     =====   =======================
4320     Value   Indentation type
4321     =====   =======================
4322     0       Spaces only
4323     1       Tabs only
4324     2       Mixed (tabs and spaces)
4325     =====   =======================
4328 [build-menu] filetype section
4329 `````````````````````````````
4330 This supports the same keys as the ``geany.conf`` `[build-menu] section`_.
4332 Example::
4334     FT_00_LB=_Compile
4335     FT_00_CM=gcc -c "%f"
4336     FT_00_WD=
4337     FT_01_LB=_Build
4338     FT_01_CM=gcc -o "%e" "%f"
4339     FT_01_WD=
4340     EX_00_LB=_Execute
4341     EX_00_CM="./%e"
4342     EX_00_WD=
4343     error_regex=^([^:]+):([0-9]+):
4345 [build_settings] section
4346 ````````````````````````
4347 As of Geany 0.19 this section is for legacy support.
4348 Values that are set in the [build-menu] section will override those in this section.
4350 If any build menu item settings have been configured in the
4351 `Set Build Commands dialog`_ (or the *Build* tab of the 
4352 `Project Properties`_ dialog), then these settings are stored in the 
4353 [build-menu] section and will override the settings in this section for 
4354 that item.
4356 error_regex
4357     See the [build-menu] section for details.
4359 **Build commands**
4361 compiler
4362     This item specifies the command to compile source code files. But
4363     it is also possible to use it with interpreted languages like Perl
4364     or Python. With these filetypes you can use this option as a kind of
4365     syntax parser, which sends output to the compiler message window.
4367     You should quote the filename to also support filenames with
4368     spaces. The following wildcards for filenames are available:
4370     * %f -- complete filename without path
4371     * %e -- filename without path and without extension
4373     *Example:* ``compiler=gcc -Wall -c "%f"``
4375 linker
4376     This item specifies the command to link the file. If the file is not
4377     already compiled, it will be compiled while linking. The -o option
4378     is automatically added by Geany. This item works well with GNU gcc,
4379     but may be problematic with other compilers (esp. with the linker).
4381     *Example:* ``linker=gcc -Wall "%f"``
4383 run_cmd
4384     Use this item to execute your file. It has to have been built
4385     already. Use the %e wildcard to have only the name of the executable
4386     (i.e. without extension) or use the %f wildcard if you need the
4387     complete filename, e.g. for shell scripts.
4389     *Example:* ``run_cmd="./%e"``
4392 Special file filetypes.common
4393 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4395 There is a special filetype definition file called
4396 filetypes.common. This file defines some general non-filetype-specific
4397 settings.
4399 You can open the user filetypes.common with the
4400 *Tools->Configuration Files->filetypes.common* menu item. This adds
4401 the default settings to the user file if the file doesn't exist.
4402 Alternatively the file can be created manually, adding only the
4403 settings you want to change. All missing settings will be read from
4404 the system file.
4406 .. note::
4407     See the `Filetype configuration`_ section for how to define styles.
4410 [named_styles] section
4411 ``````````````````````
4412 Named styles declared here can be used in the [styling] section of any
4413 filetypes.* file.
4415 For example:
4417 *In filetypes.common*::
4419     [named_styles]
4420     foo=0xc00000;0xffffff;false;true
4421     bar=foo
4423 *In filetypes.c*::
4425     [styling]
4426     comment=foo
4428 This saves copying and pasting the whole style definition into several
4429 different files.
4431 .. note::
4432     You can define aliases for named styles, as shown with the ``bar``
4433     entry in the above example, but they must be declared after the
4434     original style.
4437 [named_colors] section
4438 ``````````````````````
4439 Named colors declared here can be used in the ``[styling]`` or
4440 ``[named_styles]`` section of any filetypes.* file or color scheme.
4442 For example::
4444     [named_colors]
4445     my_red_color=#FF0000
4446     my_blue_color=#0000FF
4448     [named_styles]
4449     foo=my_red_color;my_blue_color;false;true
4451 This allows to define a color palette by name so that to change a color
4452 scheme-wide only involves changing the hex value in a single location.
4454 [styling] section
4455 `````````````````
4456 default
4457     This is the default style. It is used for styling files without a
4458     filetype set.
4460     *Example:* ``default=0x000000;0xffffff;false;false``
4462 selection
4463     The style for coloring selected text. The format is:
4465     * Foreground color
4466     * Background color
4467     * Use foreground color
4468     * Use background color
4470     The colors are only set if the 3rd or 4th argument is true. When
4471     the colors are not overridden, the default is a dark grey
4472     background with syntax highlighted foreground text.
4474     *Example:* ``selection=0xc0c0c0;0x00007F;true;true``
4476 brace_good
4477     The style for brace highlighting when a matching brace was found.
4479     *Example:* ``brace_good=0xff0000;0xFFFFFF;true;false``
4481 brace_bad
4482     The style for brace highlighting when no matching brace was found.
4484     *Example:* ``brace_bad=0x0000ff;0xFFFFFF;true;false``
4486 caret
4487     The style for coloring the caret(the blinking cursor). Only first
4488     and third argument is interpreted.
4489     Set the third argument to true to change the caret into a block caret.
4491     *Example:* ``caret=0x000000;0x0;false;false``
4493 caret_width
4494     The width for the caret(the blinking cursor). Only the first
4495     argument is interpreted. The width is specified in pixels with
4496     a maximum of three pixel. Use the width 0 to make the caret
4497     invisible.
4499     *Example:* ``caret_width=3``
4501 current_line
4502     The style for coloring the background of the current line. Only
4503     the second and third arguments are interpreted. The second argument
4504     is the background color. Use the third argument to enable or
4505     disable background highlighting for the current line (has to be
4506     true/false).
4508     *Example:* ``current_line=0x0;0xe5e5e5;true;false``
4510 indent_guide
4511     The style for coloring the indentation guides. Only the first and
4512     second arguments are interpreted.
4514     *Example:* ``indent_guide=0xc0c0c0;0xffffff;false;false``
4516 white_space
4517     The style for coloring the white space if it is shown. The first
4518     both arguments define the foreground and background colors, the
4519     third argument sets whether to use the defined foreground color
4520     or to use the color defined by each filetype for the white space.
4521     The fourth argument defines whether to use the background color.
4523     *Example:* ``white_space=0xc0c0c0;0xffffff;true;true``
4525 margin_linenumber
4526     Line number margin foreground and background colors.
4528 .. _Folding Settings:
4530 margin_folding
4531     Fold margin foreground and background colors.
4533 fold_symbol_highlight
4534     Highlight color of folding symbols.
4536 folding_style
4537     The style of folding icons. Only first and second arguments are
4538     used.
4540     Valid values for the first argument are:
4542     * 1 -- for boxes
4543     * 2 -- for circles
4544     * 3 -- for arrows
4545     * 4 -- for +/-
4547     Valid values for the second argument are:
4549     * 0 -- for no lines
4550     * 1 -- for straight lines
4551     * 2 -- for curved lines
4553     *Default:* ``folding_style=1;1;``
4555     *Arrows:* ``folding_style=3;0;``
4557 folding_horiz_line
4558     Draw a thin horizontal line at the line where text is folded. Only
4559     first argument is used.
4561     Valid values for the first argument are:
4563     * 0 -- disable, do not draw a line
4564     * 1 -- draw the line above folded text
4565     * 2 -- draw the line below folded text
4567     *Example:* ``folding_horiz_line=0;0;false;false``
4569 line_wrap_visuals
4570     First argument: drawing of visual flags to indicate a line is wrapped.
4571     This is a bitmask of the values:
4573     * 0 -- No visual flags
4574     * 1 -- Visual flag at end of subline of a wrapped line
4575     * 2 -- Visual flag at begin of subline of a wrapped line. Subline is
4576       indented by at least 1 to make room for the flag.
4578     Second argument: wether the visual flags to indicate a line is wrapped
4579     are drawn near the border or near the text. This is a bitmask of the values:
4581     * 0 -- Visual flags drawn near border
4582     * 1 -- Visual flag at end of subline drawn near text
4583     * 2 -- Visual flag at begin of subline drawn near text
4585     Only first and second arguments are interpreted.
4587     *Example:* ``line_wrap_visuals=3;0;false;false``
4589 line_wrap_indent
4590     First argument: sets the size of indentation of sublines for wrapped lines
4591     in terms of the width of a space, only used when the second argument is ``0``.
4593     Second argument: wrapped sublines can be indented to the position of their
4594     first subline or one more indent level. Possible values:
4596     * 0 - Wrapped sublines aligned to left of window plus amount set by the first argument
4597     * 1 - Wrapped sublines are aligned to first subline indent (use the same indentation)
4598     * 2 - Wrapped sublines are aligned to first subline indent plus one more level of indentation
4600     Only first and second arguments are interpreted.
4602     *Example:* ``line_wrap_indent=0;1;false;false``
4604 translucency
4605     Translucency for the current line (first argument) and the selection
4606     (second argument). Values between 0 and 256 are accepted.
4608     Note for Windows 95, 98 and ME users:
4609     keep this value at 256 to disable translucency otherwise Geany might crash.
4611     Only the first and second arguments are interpreted.
4613     *Example:* ``translucency=256;256;false;false``
4615 marker_line
4616     The style for a highlighted line (e.g when using Goto line or goto symbol).
4617     The foreground color (first argument) is only used when the Markers margin
4618     is enabled (see View menu).
4620     Only the first and second arguments are interpreted.
4622     *Example:* ``marker_line=0x000000;0xffff00;false;false``
4624 marker_search
4625     The style for a marked search results (when using "Mark" in Search dialogs).
4626     The second argument sets the background color for the drawn rectangle.
4628     Only the second argument is interpreted.
4630     *Example:* ``marker_search=0x000000;0xb8f4b8;false;false``
4632 marker_mark
4633     The style for a marked line (e.g when using the "Toggle Marker" keybinding
4634     (Ctrl-M)). The foreground color (first argument) is only used
4635     when the Markers margin is enabled (see View menu).
4637     Only the first and second arguments are interpreted.
4639     *Example:* ``marker_mark=0x000000;0xb8f4b8;false;false``
4641 marker_translucency
4642     Translucency for the line marker (first argument) and the search marker
4643     (second argument). Values between 0 and 256 are accepted.
4645     Note for Windows 95, 98 and ME users:
4646     keep this value at 256 to disable translucency otherwise Geany might crash.
4648     Only the first and second arguments are interpreted.
4650     *Example:* ``marker_translucency=256;256;false;false``
4652 line_height
4653     Amount of space to be drawn above and below the line's baseline.
4654     The first argument defines the amount of space to be drawn above the line, the second
4655     argument defines the amount of space to be drawn below.
4657     Only the first and second arguments are interpreted.
4659     *Example:* ``line_height=0;0;false;false``
4661 calltips
4662     The style for coloring the calltips. The first two arguments
4663     define the foreground and background colors, the third and fourth
4664     arguments set whether to use the defined colors.
4666     *Example:* ``calltips=0xc0c0c0;0xffffff;false;false``
4668 indicator_error
4669     The color of the error indicator.
4671     Only the first argument (foreground color) is used.
4673     *Example:* ``indicator_error=0xff0000``
4676 [settings] section
4677 ``````````````````
4678 whitespace_chars
4679     Characters to treat as whitespace. These characters are ignored
4680     when moving, selecting and deleting across word boundaries
4681     (see `Scintilla keyboard commands`_).
4683     This should include space (\\s) and tab (\\t).
4685     *Example:* ``whitespace_chars=\s\t!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~``
4687 wordchars
4688     These characters define word boundaries when making selections
4689     and searching using word matching options.
4691     *Example:* ``wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789``
4693     .. note::
4694         This has precedence over the *whitespace_chars* setting.
4698 Filetype extensions
4699 -------------------
4701 .. note::
4702     To change the default filetype extension used when saving a new file,
4703     see `Filetype definition files`_.
4705 You can override the list of file extensions that Geany uses to detect
4706 filetypes using the user ``filetype_extensions.conf`` file. Use the
4707 *Tools->Configuration Files->filetype_extensions.conf* menu item. See
4708 also `Configuration file paths`_.
4710 You should only list lines for filetype extensions that you want to
4711 override in the user configuration file and remove or comment out
4712 others. The patterns are listed after the ``=`` sign, using a
4713 semi-colon separated list of patterns which should be matched for
4714 that filetype.
4716 For example, to override the filetype extensions for Make, the file
4717 should look like::
4719     [Extensions]
4720     Make=Makefile*;*.mk;Buildfile;
4722 Filetype group membership
4723 ^^^^^^^^^^^^^^^^^^^^^^^^^
4724 Filetype groups are used in the `Document->Set Filetype` menu.
4726 Group membership is also stored in ``filetype_extensions.conf``. This
4727 file is used to store information Geany needs at startup, whereas the
4728 separate filetype definition files hold information only needed when
4729 a document with their filetype is used.
4731 The format looks like::
4733     [Groups]
4734     Programming=C;C++;
4735     Script=Perl;Python;
4736     Markup=HTML;XML;
4737     Misc=Diff;Conf;
4738     None=None;
4740 The key names cannot be configured.
4742 .. note::
4743     Group membership is only read at startup.
4745 .. tip::
4746     You can make commonly used filetypes appear in the top-level of the
4747     filetype menu by adding them to the `None` group, e.g.
4748     `None=C;Python`.
4750 Preferences file format
4751 -----------------------
4753 The user preferences file ``geany.conf`` holds settings for all the items configured
4754 in the preferences dialog. This file should not be edited while Geany is running
4755 as the file will be overwritten when the preferences in Geany are changed or Geany
4756 is quit.
4759 [build-menu] section
4760 ^^^^^^^^^^^^^^^^^^^^
4762 The [build-menu] section contains the configuration of the build menu.
4763 This section can occur in filetype, preferences and project files and
4764 always has the format described here.  Different menu items are loaded
4765 from different files, see the table in the `Build Menu Configuration`_
4766 section for details.  All the settings can be configured from the dialogs
4767 except the execute command in filetype files and filetype definitions in
4768 the project file, so these are the only ones which need hand editing.
4770 Menu commands
4771 `````````````
4772 The build-menu section stores one entry for each setting for each menu item that
4773 is configured.  The keys for these settings have the format:
4775   ``GG_NN_FF``
4777 where:
4779 * GG - is the menu item group,
4781   - FT for filetype build
4782   - NF for independent (non-filetype) build
4783   - EX for execute
4785 * NN - is a two decimal digit number of the item within the group,
4786   starting at 00
4787 * FF - is the field,
4789   - LB for label
4790   - CM for command
4791   - WD for working directory
4793 See `[build-menu] filetype section`_ for an example.
4795 Error regular expression
4796 ````````````````````````
4797 error_regex
4798     This is a Perl-compatible regular expression (PCRE) to parse a filename
4799     (absolute or relative) and line number from the build output.
4800     If undefined, Geany will fall back to its default error message parsing.
4802     Only the first two match groups will be read by Geany. These groups can
4803     occur in any order: the match group consisting of only digits will be used
4804     as the line number, and the other group as the filename.  In no group
4805     consists of only digits, the match will fail.
4807     *Example:* ``error_regex=^(.+):([0-9]+):[0-9]+``
4809     This will parse a message such as:
4810     ``test.py:7:24: E202 whitespace before ']'``
4813 Project file format
4814 -------------------
4816 The project file contains project related settings and possibly a
4817 record of the current session files.
4820 [build-menu] additions
4821 ^^^^^^^^^^^^^^^^^^^^^^
4823 The project file also can have extra fields in the [build-menu] section
4824 in addition to those listed in `[build-menu] section`_ above.
4826 When filetype menu items are configured for the project they are stored
4827 in the project file.
4829 The ``filetypes`` entry is a list of the filetypes which exist in the
4830 project file.
4832 For each filetype the entries for that filetype have the format defined in
4833 `[build-menu] section`_ but the key is prefixed by the name of the filetype
4834 as it appears in the ``filetypes`` entry, eg the entry for the label of
4835 filetype menu item 0 for the C filetype would be
4837   ``CFT_00_LB=Label``
4840 Templates
4841 ---------
4843 Geany supports the following templates:
4845 * ChangeLog entry
4846 * File header
4847 * Function description
4848 * Short GPL notice
4849 * Short BSD notice
4850 * File templates
4852 To use these templates, just open the Edit menu or open the popup menu
4853 by right-clicking in the editor widget, and choose "Insert Comments"
4854 and insert templates as you want.
4856 Some templates (like File header or ChangeLog entry) will always be
4857 inserted at the top of the file.
4859 To insert a function description, the cursor must be inside
4860 of the function, so that the function name can be determined
4861 automatically. The description will be positioned correctly one line
4862 above the function, just check it out. If the cursor is not inside
4863 of a function or the function name cannot be determined, the inserted
4864 function description won't contain the correct function name but "unknown"
4865 instead.
4867 .. note::
4868     Geany automatically reloads template information when it notices you
4869     save a file in the user's template configuration directory. You can
4870     also force this by selecting *Tools->Reload Configuration*.
4873 Template meta data
4874 ^^^^^^^^^^^^^^^^^^
4876 Meta data can be used with all templates, but by default user set
4877 meta data is only used for the ChangeLog and File header templates.
4879 In the configuration dialog you can find a tab "Templates" (see
4880 `Template preferences`_). You can define the default values
4881 which will be inserted in the templates.
4884 File templates
4885 ^^^^^^^^^^^^^^
4887 File templates are templates used as the basis of a new file. To
4888 use them, choose the *New (with Template)* menu item from the *File*
4889 menu.
4891 By default, file templates are installed for some filetypes. Custom
4892 file templates can be added by creating the appropriate template file. You can
4893 also edit the default file templates.
4895 The file's contents are just the text to place in the document, with
4896 optional template wildcards like ``{fileheader}``. The fileheader
4897 wildcard can be placed anywhere, but it's usually put on the first
4898 line of the file, followed by a blank line.
4900 Adding file templates
4901 `````````````````````
4903 File templates are read from ``templates/files`` under the
4904 `Configuration file paths`_.
4906 The filetype to use is detected from the template file's extension, if
4907 any. For example, creating a file ``module.c`` would add a menu item
4908 which created a new document with the filetype set to 'C'.
4910 The template file is read from disk when the corresponding menu item is
4911 clicked.
4914 Customizing templates
4915 ^^^^^^^^^^^^^^^^^^^^^
4917 Each template can be customized to your needs. The templates are
4918 stored in the ``~/.config/geany/templates/`` directory (see the section called
4919 `Command line options`_ for further information about the configuration
4920 directory). Just open the desired template with an editor (ideally,
4921 Geany ;-) ) and edit the template to your needs. There are some
4922 wildcards which will be automatically replaced by Geany at startup.
4925 Template wildcards
4926 ``````````````````
4928 All wildcards must be enclosed by "{" and "}", e.g. {date}.
4930 **Wildcards for character escaping**
4932 ============== ============================================= =======================================
4933 Wildcard       Description                                   Available in
4934 ============== ============================================= =======================================
4935 ob             { Opening Brace (used to prevent other        file templates, file header, snippets.
4936                wildcards being expanded).
4937 cb             } Closing Brace.                              file templates, file header, snippets.
4938 pc             \% Percent (used to escape e.g. %block% in
4939                snippets).                                    snippets.
4940 ============== ============================================= =======================================
4942 **Global wildcards**
4944 These are configurable, see `Template preferences`_.
4946 ============== ============================================= =======================================
4947 Wildcard       Description                                   Available in
4948 ============== ============================================= =======================================
4949 developer      The name of the developer.                    file templates, file header,
4950                                                              function description, ChangeLog entry,
4951                                                              bsd, gpl, snippets.
4953 initial        The developer's initials, e.g. "ET" for       file templates, file header,
4954                Enrico Tröger or "JFD" for John Foobar Doe.   function description, ChangeLog entry,
4955                                                              bsd, gpl, snippets.
4957 mail           The email address of the developer.           file templates, file header,
4958                                                              function description, ChangeLog entry,
4959                                                              bsd, gpl, snippets.
4961 company        The company the developer is working for.     file templates, file header,
4962                                                              function description, ChangeLog entry,
4963                                                              bsd, gpl, snippets.
4965 version        The initial version of a new file.            file templates, file header,
4966                                                              function description, ChangeLog entry,
4967                                                              bsd, gpl, snippets.
4968 ============== ============================================= =======================================
4970 **Date & time wildcards**
4972 The format for these wildcards can be changed in the preferences
4973 dialog, see `Template preferences`_. You can use any conversion
4974 specifiers which can be used with the ANSI C strftime function.
4975 For details please see http://man.cx/strftime.
4977 ============== ============================================= =======================================
4978 Wildcard       Description                                   Available in
4979 ============== ============================================= =======================================
4980 year           The current year. Default format is: YYYY.    file templates, file header,
4981                                                              function description, ChangeLog entry,
4982                                                              bsd, gpl, snippets.
4984 date           The current date. Default format:             file templates, file header,
4985                YYYY-MM-DD.                                   function description, ChangeLog entry,
4986                                                              bsd, gpl, snippets.
4988 datetime       The current date and time. Default format:    file templates, file header,
4989                DD.MM.YYYY HH:mm:ss ZZZZ.                     function description, ChangeLog entry,
4990                                                              bsd, gpl, snippets.
4991 ============== ============================================= =======================================
4993 **Dynamic wildcards**
4995 ============== ============================================= =======================================
4996 Wildcard       Description                                   Available in
4997 ============== ============================================= =======================================
4998 untitled       The string "untitled" (this will be           file templates, file header,
4999                translated to your locale), used in           function description, ChangeLog entry,
5000                file templates.                               bsd, gpl, snippets.
5002 geanyversion   The actual Geany version, e.g.                file templates, file header,
5003                "Geany |(version)|".                          function description, ChangeLog entry,
5004                                                              bsd, gpl, snippets.
5006 filename       The filename of the current file.             file header, snippets, file
5007                For new files, it's only replaced when        templates.
5008                first saving if found on the first 4 lines
5009                of the file.
5011 project        The current project's name, if any.           file header, snippets, file templates.
5013 description    The current project's description, if any.    file header, snippets, file templates.
5015 functionname   The function name of the function at the      function description.
5016                cursor position. This wildcard will only be
5017                replaced in the function description
5018                template.
5020 command:path   Executes the specified command and replace    file templates, file header,
5021                the wildcard with the command's standard      function description, ChangeLog entry,
5022                output. See `Special {command:} wildcard`_    bsd, gpl, snippets.
5023                for details.
5024 ============== ============================================= =======================================
5026 **Template insertion wildcards**
5028 ============== ============================================= =======================================
5029 Wildcard       Description                                   Available in
5030 ============== ============================================= =======================================
5031 gpl            This wildcard inserts a short GPL notice.     file header.
5033 bsd            This wildcard inserts a BSD licence notice.   file header.
5035 fileheader     The file header template. This wildcard       snippets, file templates.
5036                will only be replaced in file templates.
5037 ============== ============================================= =======================================
5040 Special {command:} wildcard
5041 ***************************
5043 The {command:} wildcard is a special one because it can execute
5044 a specified command and put the command's output (stdout) into
5045 the template.
5047 Example::
5049     {command:uname -a}
5051 will result in::
5053     Linux localhost 2.6.9-023stab046.2-smp #1 SMP Mon Dec 10 15:04:55 MSK 2007 x86_64 GNU/Linux
5055 Using this wildcard you can insert nearly any arbitrary text into the
5056 template.
5058 In the environment of the executed command the variables
5059 ``GEANY_FILENAME``, ``GEANY_FILETYPE`` and ``GEANY_FUNCNAME`` are set.
5060 The value of these variables is filled in only if Geany knows about it.
5061 For example, ``GEANY_FUNCNAME`` is only filled within the function
5062 description template. However, these variables are ``always`` set,
5063 just maybe with an empty value.
5064 You can easily access them e.g. within an executed shell script using::
5066     $GEANY_FILENAME
5069 .. note::
5070     If the specified command could not be found or not executed, the wildcard is substituted
5071     by an empty string. In such cases, you can find the occurred error message on Geany's
5072     standard error and in the Help->Debug Messages dialog.
5075 Customizing the toolbar
5076 -----------------------
5078 You can add, remove and reorder the elements in the toolbar by using
5079 the toolbar editor, or by manually editing the configuration file
5080 ``ui_toolbar.xml``.
5082 The toolbar editor can be opened from the preferences editor on the Toolbar tab or
5083 by right-clicking on the toolbar itself and choosing it from the menu.
5085 Manually editing the toolbar layout
5086 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5088 To override the system-wide configuration file, copy it to your user
5089 configuration directory (see `Configuration file paths`_).
5091 For example::
5093     % cp /usr/local/share/geany/ui_toolbar.xml /home/username/.config/geany/
5095 Then edit it and add any of the available elements listed in the file or remove
5096 any of the existing elements. Of course, you can also reorder the elements as
5097 you wish and add or remove additional separators.
5098 This file must be valid XML, otherwise the global toolbar UI definition
5099 will be used instead.
5101 Your changes are applied once you save the file.
5103 .. note::
5104     (1) You cannot add new actions which are not listed below.
5105     (2) Everything you add or change must be inside the /ui/toolbar/ path.
5108 Available toolbar elements
5109 ^^^^^^^^^^^^^^^^^^^^^^^^^^
5111 ================== ==============================================================================
5112 Element name       Description
5113 ================== ==============================================================================
5114 New                Create a new file
5115 Open               Open an existing file
5116 Save               Save the current file
5117 SaveAll            Save all open files
5118 Reload             Reload the current file from disk
5119 Close              Close the current file
5120 CloseAll           Close all open files
5121 Print              Print the current file
5122 Cut                Cut the current selection
5123 Copy               Copy the current selection
5124 Paste              Paste the contents of the clipboard
5125 Delete             Delete the current selection
5126 Undo               Undo the last modification
5127 Redo               Redo the last modification
5128 NavBack            Navigate back a location
5129 NavFor             Navigate forward a location
5130 Compile            Compile the current file
5131 Build              Build the current file, includes a submenu for Make commands. Geany
5132                    remembers the last chosen action from the submenu and uses this as default
5133                    action when the button itself is clicked.
5134 Run                Run or view the current file
5135 Color              Open a color chooser dialog, to interactively pick colors from a palette
5136 ZoomIn             Zoom in the text
5137 ZoomOut            Zoom out the text
5138 UnIndent           Decrease indentation
5139 Indent             Increase indentation
5140 Replace            Replace text in the current document
5141 SearchEntry        The search field belonging to the 'Search' element (can be used alone)
5142 Search             Find the entered text in the current file (only useful if you also
5143                    use 'SearchEntry')
5144 GotoEntry          The goto field belonging to the 'Goto' element (can be used alone)
5145 Goto               Jump to the entered line number (only useful if you also use 'GotoEntry')
5146 Preferences        Show the preferences dialog
5147 Quit               Quit Geany
5148 ================== ==============================================================================
5152 Plugin documentation
5153 ====================
5155 HTML Characters
5156 ---------------
5158 The HTML Characters plugin helps when working with special
5159 characters in XML/HTML, e.g. German Umlauts ü and ä.
5162 Insert entity dialog
5163 ^^^^^^^^^^^^^^^^^^^^
5165 When the plugin is enabled, you can insert special character
5166 entities using *Tools->Insert Special HTML Characters*.
5168 This opens up a dialog where you can find a huge amount of special
5169 characters sorted by category that you might like to use inside your
5170 document. You can expand and collapse the categories by clicking on
5171 the little arrow on the left hand side. Once you have found the
5172 desired character click on it and choose "Insert". This will insert
5173 the entity for the character at the current cursor position. You
5174 might also like to double click the chosen entity instead.
5177 Replace special chars by its entity
5178 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5180 To help make a XML/HTML document valid the plugin supports
5181 replacement of special chars known by the plugin. Both bulk
5182 replacement and immediate replacement during typing are supported.
5184 A few characters will not be replaced. These are
5185         * "
5186         * &
5187         * <
5188         * >
5189         *   (`&nbsp;`)
5192 At typing time
5193 ``````````````
5195 You can activate/deactivate this feature using the *Tools->HTML
5196 Replacement->Auto-replace Special Characters* menu item. If it's
5197 activated, all special characters (beside the given exceptions from
5198 above) known by the plugin will be replaced by their entities.
5200 You could also set a keybinding for the plugin to toggle the status
5201 of this feature.
5204 Bulk replacement
5205 ````````````````
5207 After inserting a huge amount of text, e.g. by using copy & paste, the
5208 plugin allows bulk replacement of all known characters (beside the
5209 mentioned exceptions). You can find the function under the same
5210 menu at *Tools->HTML Replacement->Replace Characters in Selection*, or
5211 configure a keybinding for the plugin.
5214 Save Actions
5215 ------------
5217 Auto Save
5218 ^^^^^^^^^
5220 This plugin provides an option to automatically save documents.
5221 You can choose to save the current document, or all of your documents, at
5222 a given delay.
5225 Save on focus out
5226 ^^^^^^^^^^^^^^^^^
5228 You can save the current document when the editor's focus goes out.
5229 Every pop-up, menu dialogs, or anything else that can make the editor lose the focus,
5230 will make the current document to be saved.
5233 Instant Save
5234 ^^^^^^^^^^^^
5235 This plugin sets on every new file (*File->New* or *File->New (with template)*)
5236 a randomly chosen filename and set its filetype appropriate to the used template
5237 or when no template was used, to a configurable default filetype.
5238 This enables you to quickly compile, build and/or run the new file without the
5239 need to give it an explicit filename using the Save As dialog. This might be
5240 useful when you often create new files just for testing some code or something
5241 similar.
5244 Backup Copy
5245 ^^^^^^^^^^^
5247 This plugin creates a backup copy of the current file in Geany when it is
5248 saved. You can specify the directory where the backup copy is saved and
5249 you can configure the automatically added extension in the configure dialog
5250 in Geany's plugin manager.
5252 After the plugin was loaded in Geany's plugin manager, every file is
5253 copied into the configured backup directory *after* the file has been saved
5254 in Geany.
5256 The created backup copy file permissions are set to read-write only for
5257 the user. This should help to not create world-readable files on possibly
5258 unsecure destination directories like /tmp (especially useful
5259 on multi-user systems).
5260 This applies only to non-Windows systems. On Windows, no explicit file
5261 permissions are set.
5264 Additionally, you can define how many levels of the original file's
5265 directory structure should be replicated in the backup copy path.
5266 For example, setting the option
5267 *Directory levels to include in the backup destination* to *2*
5268 cause the plugin to create the last two components of the original
5269 file's path in the backup copy path and place the new file there.
5272 Contributing to this document
5273 =============================
5275 This document (``geany.txt``) is written in `reStructuredText`__
5276 (or "reST"). The source file for it is located in Geany's ``doc``
5277 subdirectory.  If you intend on making changes, you should grab the
5278 source right from Git to make sure you've got the newest version.
5279 First, you need to configure the build system to generate the HTML
5280 documentation passing the *--enable-html-docs* option to the *configure*
5281 script. Then after editing the file, run ``make`` (from the root build
5282 directory or from the *doc* subdirectory) to build the HTML documentation
5283 and see how your changes look. This regenerates the ``geany.html`` file
5284 inside the *doc* subdirectory. To generate a PDF file, configure with
5285 *--enable-pdf-docs* and run ``make`` as for the HTML version. The generated
5286 PDF file is named geany-|(version)|.pdf and is located inside the *doc*
5287 subdirectory.
5289 __ http://docutils.sourceforge.net/rst.html
5291 After you are happy with your changes, create a patch e.g. by using::
5293     % git diff geany.txt > foo.patch
5295 or even better, by creating a Git-formatted patch which will keep authoring
5296 and description data, by first committing your changes (doing so in a fresh
5297 new branch is recommended for `master` not to diverge from upstream) and then
5298 using git format-patch::
5300     % git checkout -b my-documentation-changes # create a fresh branch
5301     % git commit geany.txt
5302     Write a good commit message...
5303     % git format-patch HEAD^
5304     % git checkout master # go back to master
5306 and then submit that file to the mailing list for review.
5308 Also you can clone the Geany repository at GitHub and send a pull request.
5310 Note, you will need the Python docutils software package installed
5311 to build the docs. The package is named ``python-docutils`` on Debian
5312 and Fedora systems.
5317 Scintilla keyboard commands
5318 ===========================
5320 Copyright © 1998, 2006 Neil Hodgson <neilh(at)scintilla(dot)org>
5322 This appendix is distributed under the terms of the License for
5323 Scintilla and SciTE. A copy of this license can be found in the file
5324 ``scintilla/License.txt`` included with the source code of this
5325 program and in the appendix of this document. See `License for
5326 Scintilla and SciTE`_.
5328 20 June 2006
5332 Keyboard commands
5333 -----------------
5335 Keyboard commands for Scintilla mostly follow common Windows and GTK+
5336 conventions. All move keys (arrows, page up/down, home and end)
5337 allows to extend or reduce the stream selection when holding the
5338 Shift key, and the rectangular selection when holding the
5339 appropriate keys (see `Column mode editing (rectangular selections)`_).
5341 Some keys may not be available with some national keyboards
5342 or because they are taken by the system such as by a window manager
5343 or GTK. Keyboard equivalents of menu commands are listed in the
5344 menus. Some less common commands with no menu equivalent are:
5346 =============================================   ======================
5347 Action                                          Shortcut key
5348 =============================================   ======================
5349 Magnify text size.                              Ctrl-Keypad+
5350 Reduce text size.                               Ctrl-Keypad-
5351 Restore text size to normal.                    Ctrl-Keypad/
5352 Indent block.                                   Tab
5353 Dedent block.                                   Shift-Tab
5354 Delete to start of word.                        Ctrl-BackSpace
5355 Delete to end of word.                          Ctrl-Delete
5356 Delete to start of line.                        Ctrl-Shift-BackSpace
5357 Go to start of document.                        Ctrl-Home
5358 Extend selection to start of document.          Ctrl-Shift-Home
5359 Go to start of display line.                    Alt-Home
5360 Extend selection to start of display line.      Alt-Shift-Home
5361 Go to end of document.                          Ctrl-End
5362 Extend selection to end of document.            Ctrl-Shift-End
5363 Extend selection to end of display line.        Alt-Shift-End
5364 Previous paragraph. Shift extends selection.    Ctrl-Up
5365 Next paragraph. Shift extends selection.        Ctrl-Down
5366 Previous word. Shift extends selection.         Ctrl-Left
5367 Next word. Shift extends selection.             Ctrl-Right
5368 =============================================   ======================
5373 Tips and tricks
5374 ===============
5376 Document notebook
5377 -----------------
5379 * Double-click on empty space in the notebook tab bar to open a
5380   new document.
5381 * Middle-click on a document's notebook tab to close the document.
5382 * Hold `Ctrl` and click on any notebook tab to switch to the last used
5383   document.
5384 * Double-click on a document's notebook tab to toggle all additional
5385   widgets (to show them again use the View menu or the keyboard
5386   shortcut). The interface pref must be enabled for this to work.
5388 Editor
5389 ------
5391 * Alt-scroll wheel moves up/down a page.
5392 * Ctrl-scroll wheel zooms in/out.
5393 * Shift-scroll wheel scrolls 8 characters right/left.
5394 * Ctrl-click on a word in a document to perform *Go to Symbol Definition*.
5395 * Ctrl-click on a bracket/brace to perform *Go to Matching Brace*.
5397 Interface
5398 ---------
5400 * Double-click on a symbol-list group to expand or compact it.
5402 GTK-related
5403 -----------
5405 * Scrolling the mouse wheel over a notebook tab bar will switch
5406   notebook pages.
5408 The following are derived from X-Windows features (but GTK still supports
5409 them on Windows):
5411 * Middle-click pastes the last selected text.
5412 * Middle-click on a scrollbar moves the scrollbar to that
5413   position without having to drag it.
5417 Compile-time options
5418 ====================
5420 There are some options which can only be changed at compile time,
5421 and some options which are used as the default for configurable
5422 options. To change these options, edit the appropriate source file
5423 in the ``src`` subdirectory. Look for a block of lines starting with
5424 ``#define GEANY_*``. Any definitions which are not listed here should
5425 not be changed.
5427 .. note::
5428     Most users should not need to change these options.
5430 src/geany.h
5431 -----------
5433 ==============================  ============================================  ==================
5434 Option                          Description                                   Default
5435 ==============================  ============================================  ==================
5436 GEANY_STRING_UNTITLED           A string used as the default name for new     untitled
5437                                 files. Be aware that the string can be
5438                                 translated, so change it only if you know
5439                                 what you are doing.
5440 GEANY_WINDOW_MINIMAL_WIDTH      The minimal width of the main window.         620
5441 GEANY_WINDOW_MINIMAL_HEIGHT     The minimal height of the main window.        440
5442 GEANY_WINDOW_DEFAULT_WIDTH      The default width of the main window at the   900
5443                                 first start.
5444 GEANY_WINDOW_DEFAULT_HEIGHT     The default height of the main window at the  600
5445                                 first start.
5446  **Windows specific**
5447 GEANY_USE_WIN32_DIALOG          Set this to 1 if you want to use the default  0
5448                                 Windows file open and save dialogs instead
5449                                 GTK's file open and save dialogs. The
5450                                 default Windows file dialogs are missing
5451                                 some nice features like choosing a filetype
5452                                 or an encoding. *Do not touch this setting
5453                                 when building on a non-Win32 system.*
5454 ==============================  ============================================  ==================
5456 project.h
5457 ---------
5459 ==============================  ============================================  ==================
5460 Option                          Description                                   Default
5461 ==============================  ============================================  ==================
5462 GEANY_PROJECT_EXT               The default filename extension for Geany      geany
5463                                 project files. It is used when creating new
5464                                 projects and as filter mask for the project
5465                                 open dialog.
5466 ==============================  ============================================  ==================
5468 filetypes.c
5469 -----------
5471 ==============================  ============================================  ==================
5472 Option                          Description                                   Default
5473 ==============================  ============================================  ==================
5474 GEANY_FILETYPE_SEARCH_LINES     The number of lines to search for the         2
5475                                 filetype with the extract filetype regex.
5476 ==============================  ============================================  ==================
5478 editor.h
5479 --------
5481 ==============================  ============================================  ==================
5482 Option                          Description                                   Default
5483 ==============================  ============================================  ==================
5484 GEANY_WORDCHARS                 These characters define word boundaries when  a string with:
5485                                 making selections and searching using word    a-z, A-Z, 0-9 and
5486                                 matching options.                             underscore.
5487 ==============================  ============================================  ==================
5489 keyfile.c
5490 ---------
5492 These are default settings that can be overridden in the `Preferences`_ dialog.
5494 ==============================  ============================================  ==================
5495 Option                          Description                                   Default
5496 ==============================  ============================================  ==================
5497 GEANY_MIN_SYMBOLLIST_CHARS      How many characters you need to type to       4
5498                                 trigger the autocompletion list.
5499 GEANY_DISK_CHECK_TIMEOUT        Time in seconds between checking a file for   30
5500                                 external changes.
5501 GEANY_DEFAULT_TOOLS_MAKE        The make tool. This can also include a path.  "make"
5502 GEANY_DEFAULT_TOOLS_TERMINAL    A terminal emulator command, see              See below.
5503                                 `Terminal emulators`_.
5504 GEANY_DEFAULT_TOOLS_BROWSER     A web browser. This can also include a path.  "firefox"
5505 GEANY_DEFAULT_TOOLS_PRINTCMD    A printing tool. It should be able to accept  "lpr"
5506                                 and process plain text files. This can also
5507                                 include a path.
5508 GEANY_DEFAULT_TOOLS_GREP        A grep tool. It should be compatible with     "grep"
5509                                 GNU grep. This can also include a path.
5510 GEANY_DEFAULT_MRU_LENGTH        The length of the "Recent files" list.        10
5511 GEANY_DEFAULT_FONT_SYMBOL_LIST  The font used in sidebar to show symbols and  "Sans 9"
5512                                 open files.
5513 GEANY_DEFAULT_FONT_MSG_WINDOW   The font used in the messages window.         "Sans 9"
5514 GEANY_DEFAULT_FONT_EDITOR       The font used in the editor window.           "Monospace 10"
5515 GEANY_TOGGLE_MARK               A string which is used to mark a toggled      "~ "
5516                                 comment.
5517 GEANY_MAX_AUTOCOMPLETE_WORDS    How many autocompletion suggestions should    30
5518                                 Geany provide.
5519 GEANY_DEFAULT_FILETYPE_REGEX    The default regex to extract filetypes from   See below.
5520                                 files.
5521 ==============================  ============================================  ==================
5523 .. _ft_regex:
5525 The GEANY_DEFAULT_FILETYPE_REGEX default value is  -\\*-\\s*([^\\s]+)\\s*-\\*- which finds Emacs filetypes.
5527 The GEANY_DEFAULT_TOOLS_TERMINAL default value on Windows is::
5529     cmd.exe /Q /C %c
5531 and on any non-Windows system is::
5533     xterm -e "/bin/sh %c"
5536 build.c
5537 -------
5539 ==============================  ============================================  ==================
5540 Option                          Description                                   Default
5541 ==============================  ============================================  ==================
5542 GEANY_BUILD_ERR_HIGHLIGHT_MAX   Amount of build error indicators to           50
5543                                 be shown in the editor window.
5544                                 This affects the special coloring
5545                                 when Geany detects a compiler output line as
5546                                 an error message and then highlights the
5547                                 corresponding line in the source code.
5548                                 Usually only the first few messages are
5549                                 interesting because following errors are
5550                                 just after-effects.
5551                                 All errors in the Compiler window are parsed
5552                                 and unaffected by this value.
5553 PRINTBUILDCMDS                  Every time a build menu item priority         FALSE
5554                                 calculation is run, print the state of the
5555                                 menu item table in the form of the table
5556                                 in `Build Menu Configuration`_.  May be
5557                                 useful to debug configuration file
5558                                 overloading.  Warning produces a lot of
5559                                 output.  Can also be enabled/disabled by the
5560                                 debugger by setting printbuildcmds to 1/0
5561                                 overriding the compile setting.
5562 ==============================  ============================================  ==================
5566 GNU General Public License
5567 ==========================
5571                 GNU GENERAL PUBLIC LICENSE
5572                    Version 2, June 1991
5574      Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5575         51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
5576      Everyone is permitted to copy and distribute verbatim copies
5577      of this license document, but changing it is not allowed.
5579                     Preamble
5581       The licenses for most software are designed to take away your
5582     freedom to share and change it.  By contrast, the GNU General Public
5583     License is intended to guarantee your freedom to share and change free
5584     software--to make sure the software is free for all its users.  This
5585     General Public License applies to most of the Free Software
5586     Foundation's software and to any other program whose authors commit to
5587     using it.  (Some other Free Software Foundation software is covered by
5588     the GNU Library General Public License instead.)  You can apply it to
5589     your programs, too.
5591       When we speak of free software, we are referring to freedom, not
5592     price.  Our General Public Licenses are designed to make sure that you
5593     have the freedom to distribute copies of free software (and charge for
5594     this service if you wish), that you receive source code or can get it
5595     if you want it, that you can change the software or use pieces of it
5596     in new free programs; and that you know you can do these things.
5598       To protect your rights, we need to make restrictions that forbid
5599     anyone to deny you these rights or to ask you to surrender the rights.
5600     These restrictions translate to certain responsibilities for you if you
5601     distribute copies of the software, or if you modify it.
5603       For example, if you distribute copies of such a program, whether
5604     gratis or for a fee, you must give the recipients all the rights that
5605     you have.  You must make sure that they, too, receive or can get the
5606     source code.  And you must show them these terms so they know their
5607     rights.
5609       We protect your rights with two steps: (1) copyright the software, and
5610     (2) offer you this license which gives you legal permission to copy,
5611     distribute and/or modify the software.
5613       Also, for each author's protection and ours, we want to make certain
5614     that everyone understands that there is no warranty for this free
5615     software.  If the software is modified by someone else and passed on, we
5616     want its recipients to know that what they have is not the original, so
5617     that any problems introduced by others will not reflect on the original
5618     authors' reputations.
5620       Finally, any free program is threatened constantly by software
5621     patents.  We wish to avoid the danger that redistributors of a free
5622     program will individually obtain patent licenses, in effect making the
5623     program proprietary.  To prevent this, we have made it clear that any
5624     patent must be licensed for everyone's free use or not licensed at all.
5626       The precise terms and conditions for copying, distribution and
5627     modification follow.
5629                 GNU GENERAL PUBLIC LICENSE
5630        TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
5632       0. This License applies to any program or other work which contains
5633     a notice placed by the copyright holder saying it may be distributed
5634     under the terms of this General Public License.  The "Program", below,
5635     refers to any such program or work, and a "work based on the Program"
5636     means either the Program or any derivative work under copyright law:
5637     that is to say, a work containing the Program or a portion of it,
5638     either verbatim or with modifications and/or translated into another
5639     language.  (Hereinafter, translation is included without limitation in
5640     the term "modification".)  Each licensee is addressed as "you".
5642     Activities other than copying, distribution and modification are not
5643     covered by this License; they are outside its scope.  The act of
5644     running the Program is not restricted, and the output from the Program
5645     is covered only if its contents constitute a work based on the
5646     Program (independent of having been made by running the Program).
5647     Whether that is true depends on what the Program does.
5649       1. You may copy and distribute verbatim copies of the Program's
5650     source code as you receive it, in any medium, provided that you
5651     conspicuously and appropriately publish on each copy an appropriate
5652     copyright notice and disclaimer of warranty; keep intact all the
5653     notices that refer to this License and to the absence of any warranty;
5654     and give any other recipients of the Program a copy of this License
5655     along with the Program.
5657     You may charge a fee for the physical act of transferring a copy, and
5658     you may at your option offer warranty protection in exchange for a fee.
5660       2. You may modify your copy or copies of the Program or any portion
5661     of it, thus forming a work based on the Program, and copy and
5662     distribute such modifications or work under the terms of Section 1
5663     above, provided that you also meet all of these conditions:
5665         a) You must cause the modified files to carry prominent notices
5666         stating that you changed the files and the date of any change.
5668         b) You must cause any work that you distribute or publish, that in
5669         whole or in part contains or is derived from the Program or any
5670         part thereof, to be licensed as a whole at no charge to all third
5671         parties under the terms of this License.
5673         c) If the modified program normally reads commands interactively
5674         when run, you must cause it, when started running for such
5675         interactive use in the most ordinary way, to print or display an
5676         announcement including an appropriate copyright notice and a
5677         notice that there is no warranty (or else, saying that you provide
5678         a warranty) and that users may redistribute the program under
5679         these conditions, and telling the user how to view a copy of this
5680         License.  (Exception: if the Program itself is interactive but
5681         does not normally print such an announcement, your work based on
5682         the Program is not required to print an announcement.)
5684     These requirements apply to the modified work as a whole.  If
5685     identifiable sections of that work are not derived from the Program,
5686     and can be reasonably considered independent and separate works in
5687     themselves, then this License, and its terms, do not apply to those
5688     sections when you distribute them as separate works.  But when you
5689     distribute the same sections as part of a whole which is a work based
5690     on the Program, the distribution of the whole must be on the terms of
5691     this License, whose permissions for other licensees extend to the
5692     entire whole, and thus to each and every part regardless of who wrote it.
5694     Thus, it is not the intent of this section to claim rights or contest
5695     your rights to work written entirely by you; rather, the intent is to
5696     exercise the right to control the distribution of derivative or
5697     collective works based on the Program.
5699     In addition, mere aggregation of another work not based on the Program
5700     with the Program (or with a work based on the Program) on a volume of
5701     a storage or distribution medium does not bring the other work under
5702     the scope of this License.
5704       3. You may copy and distribute the Program (or a work based on it,
5705     under Section 2) in object code or executable form under the terms of
5706     Sections 1 and 2 above provided that you also do one of the following:
5708         a) Accompany it with the complete corresponding machine-readable
5709         source code, which must be distributed under the terms of Sections
5710         1 and 2 above on a medium customarily used for software interchange; or,
5712         b) Accompany it with a written offer, valid for at least three
5713         years, to give any third party, for a charge no more than your
5714         cost of physically performing source distribution, a complete
5715         machine-readable copy of the corresponding source code, to be
5716         distributed under the terms of Sections 1 and 2 above on a medium
5717         customarily used for software interchange; or,
5719         c) Accompany it with the information you received as to the offer
5720         to distribute corresponding source code.  (This alternative is
5721         allowed only for noncommercial distribution and only if you
5722         received the program in object code or executable form with such
5723         an offer, in accord with Subsection b above.)
5725     The source code for a work means the preferred form of the work for
5726     making modifications to it.  For an executable work, complete source
5727     code means all the source code for all modules it contains, plus any
5728     associated interface definition files, plus the scripts used to
5729     control compilation and installation of the executable.  However, as a
5730     special exception, the source code distributed need not include
5731     anything that is normally distributed (in either source or binary
5732     form) with the major components (compiler, kernel, and so on) of the
5733     operating system on which the executable runs, unless that component
5734     itself accompanies the executable.
5736     If distribution of executable or object code is made by offering
5737     access to copy from a designated place, then offering equivalent
5738     access to copy the source code from the same place counts as
5739     distribution of the source code, even though third parties are not
5740     compelled to copy the source along with the object code.
5742       4. You may not copy, modify, sublicense, or distribute the Program
5743     except as expressly provided under this License.  Any attempt
5744     otherwise to copy, modify, sublicense or distribute the Program is
5745     void, and will automatically terminate your rights under this License.
5746     However, parties who have received copies, or rights, from you under
5747     this License will not have their licenses terminated so long as such
5748     parties remain in full compliance.
5750       5. You are not required to accept this License, since you have not
5751     signed it.  However, nothing else grants you permission to modify or
5752     distribute the Program or its derivative works.  These actions are
5753     prohibited by law if you do not accept this License.  Therefore, by
5754     modifying or distributing the Program (or any work based on the
5755     Program), you indicate your acceptance of this License to do so, and
5756     all its terms and conditions for copying, distributing or modifying
5757     the Program or works based on it.
5759       6. Each time you redistribute the Program (or any work based on the
5760     Program), the recipient automatically receives a license from the
5761     original licensor to copy, distribute or modify the Program subject to
5762     these terms and conditions.  You may not impose any further
5763     restrictions on the recipients' exercise of the rights granted herein.
5764     You are not responsible for enforcing compliance by third parties to
5765     this License.
5767       7. If, as a consequence of a court judgment or allegation of patent
5768     infringement or for any other reason (not limited to patent issues),
5769     conditions are imposed on you (whether by court order, agreement or
5770     otherwise) that contradict the conditions of this License, they do not
5771     excuse you from the conditions of this License.  If you cannot
5772     distribute so as to satisfy simultaneously your obligations under this
5773     License and any other pertinent obligations, then as a consequence you
5774     may not distribute the Program at all.  For example, if a patent
5775     license would not permit royalty-free redistribution of the Program by
5776     all those who receive copies directly or indirectly through you, then
5777     the only way you could satisfy both it and this License would be to
5778     refrain entirely from distribution of the Program.
5780     If any portion of this section is held invalid or unenforceable under
5781     any particular circumstance, the balance of the section is intended to
5782     apply and the section as a whole is intended to apply in other
5783     circumstances.
5785     It is not the purpose of this section to induce you to infringe any
5786     patents or other property right claims or to contest validity of any
5787     such claims; this section has the sole purpose of protecting the
5788     integrity of the free software distribution system, which is
5789     implemented by public license practices.  Many people have made
5790     generous contributions to the wide range of software distributed
5791     through that system in reliance on consistent application of that
5792     system; it is up to the author/donor to decide if he or she is willing
5793     to distribute software through any other system and a licensee cannot
5794     impose that choice.
5796     This section is intended to make thoroughly clear what is believed to
5797     be a consequence of the rest of this License.
5799       8. If the distribution and/or use of the Program is restricted in
5800     certain countries either by patents or by copyrighted interfaces, the
5801     original copyright holder who places the Program under this License
5802     may add an explicit geographical distribution limitation excluding
5803     those countries, so that distribution is permitted only in or among
5804     countries not thus excluded.  In such case, this License incorporates
5805     the limitation as if written in the body of this License.
5807       9. The Free Software Foundation may publish revised and/or new versions
5808     of the General Public License from time to time.  Such new versions will
5809     be similar in spirit to the present version, but may differ in detail to
5810     address new problems or concerns.
5812     Each version is given a distinguishing version number.  If the Program
5813     specifies a version number of this License which applies to it and "any
5814     later version", you have the option of following the terms and conditions
5815     either of that version or of any later version published by the Free
5816     Software Foundation.  If the Program does not specify a version number of
5817     this License, you may choose any version ever published by the Free Software
5818     Foundation.
5820       10. If you wish to incorporate parts of the Program into other free
5821     programs whose distribution conditions are different, write to the author
5822     to ask for permission.  For software which is copyrighted by the Free
5823     Software Foundation, write to the Free Software Foundation; we sometimes
5824     make exceptions for this.  Our decision will be guided by the two goals
5825     of preserving the free status of all derivatives of our free software and
5826     of promoting the sharing and reuse of software generally.
5828                     NO WARRANTY
5830       11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
5831     FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
5832     OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
5833     PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
5834     OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
5835     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
5836     TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
5837     PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
5838     REPAIR OR CORRECTION.
5840       12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
5841     WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
5842     REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
5843     INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
5844     OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
5845     TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
5846     YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
5847     PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
5848     POSSIBILITY OF SUCH DAMAGES.
5850                  END OF TERMS AND CONDITIONS
5852             How to Apply These Terms to Your New Programs
5854       If you develop a new program, and you want it to be of the greatest
5855     possible use to the public, the best way to achieve this is to make it
5856     free software which everyone can redistribute and change under these terms.
5858       To do so, attach the following notices to the program.  It is safest
5859     to attach them to the start of each source file to most effectively
5860     convey the exclusion of warranty; and each file should have at least
5861     the "copyright" line and a pointer to where the full notice is found.
5863         <one line to give the program's name and a brief idea of what it does.>
5864         Copyright (C) <year>  <name of author>
5866         This program is free software; you can redistribute it and/or modify
5867         it under the terms of the GNU General Public License as published by
5868         the Free Software Foundation; either version 2 of the License, or
5869         (at your option) any later version.
5871         This program is distributed in the hope that it will be useful,
5872         but WITHOUT ANY WARRANTY; without even the implied warranty of
5873         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5874         GNU General Public License for more details.
5876         You should have received a copy of the GNU General Public License along
5877         with this program; if not, write to the Free Software Foundation, Inc.,
5878         51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
5881     Also add information on how to contact you by electronic and paper mail.
5883     If the program is interactive, make it output a short notice like this
5884     when it starts in an interactive mode:
5886         Gnomovision version 69, Copyright (C) year  name of author
5887         Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
5888         This is free software, and you are welcome to redistribute it
5889         under certain conditions; type `show c' for details.
5891     The hypothetical commands `show w' and `show c' should show the appropriate
5892     parts of the General Public License.  Of course, the commands you use may
5893     be called something other than `show w' and `show c'; they could even be
5894     mouse-clicks or menu items--whatever suits your program.
5896     You should also get your employer (if you work as a programmer) or your
5897     school, if any, to sign a "copyright disclaimer" for the program, if
5898     necessary.  Here is a sample; alter the names:
5900       Yoyodyne, Inc., hereby disclaims all copyright interest in the program
5901       `Gnomovision' (which makes passes at compilers) written by James Hacker.
5903       <signature of Ty Coon>, 1 April 1989
5904       Ty Coon, President of Vice
5906     This General Public License does not permit incorporating your program into
5907     proprietary programs.  If your program is a subroutine library, you may
5908     consider it more useful to permit linking proprietary applications with the
5909     library.  If this is what you want to do, use the GNU Library General
5910     Public License instead of this License.
5915 License for Scintilla and SciTE
5916 ===============================
5918 Copyright 1998-2003 by Neil Hodgson <neilh(at)scintilla(dot)org>
5920 All Rights Reserved
5922 Permission to use, copy, modify, and distribute this software and
5923 its documentation for any purpose and without fee is hereby granted,
5924 provided that the above copyright notice appear in all copies and
5925 that both that copyright notice and this permission notice appear in
5926 supporting documentation.
5928 NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
5929 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
5930 NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
5931 CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
5932 OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
5933 OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
5934 USE OR PERFORMANCE OF THIS SOFTWARE.