Update Ignore Tags section with example and menu item.
[geany-mirror.git] / doc / geany.txt
blob4c89aa153150a7b2b0267887306c04f8d684798d
1 .. |(version)| replace:: 0.20
3 =======
4  Geany
5 =======
7 -------------------------
8  A fast, light, GTK+ IDE
9 -------------------------
11 :Authors: Enrico Tröger,
12           Nick Treleaven,
13           Frank Lanitz
14 :Date: $Date$
15 :Version: |(version)|
17 Copyright © 2005-2010
19 This document is distributed under the terms of the GNU General Public
20 License as published by the Free Software Foundation; either version 2
21 of the License, or (at your option) any later version. A copy of this
22 license can be found in the file COPYING included with the source code
23 of this program, and also in the chapter `GNU General Public License`_.
26 .. contents::
30 Introduction
31 ============
34 About Geany
35 -----------
37 Geany is a small and lightweight Integrated Development Environment. It
38 was developed to provide a small and fast IDE, which has only a few
39 dependencies on other packages. Another goal was to be as independent
40 as possible from a particular Desktop Environment like KDE or GNOME -
41 Geany only requires the GTK2 runtime libraries.
43 Some basic features of Geany:
45 * Syntax highlighting
46 * Code folding
47 * Autocompletion of symbols/words
48 * Construct completion/snippets
49 * Auto-closing of XML and HTML tags
50 * Calltips
51 * Many supported filetypes including C, Java, PHP, HTML, Python, Perl,
52   Pascal, and others
53 * Symbol lists
54 * Code navigation
55 * Build system to compile and execute your code
56 * Simple project management
57 * Plugin interface
61 Where to get it
62 ---------------
64 You can obtain Geany from http://www.geany.org/ or perhaps also from
65 your distribution. For a list of available packages, please see
66 http://www.geany.org/Download/ThirdPartyPackages.
70 License
71 -------
73 Geany is distributed under the terms of the GNU General Public License
74 as published by the Free Software Foundation; either version 2 of
75 the License, or (at your option) any later version. A copy of this
76 license can be found in the file COPYING included with the source
77 code of this program and in the chapter, `GNU General Public License`_.
79 The included Scintilla library (found in the subdirectory
80 ``scintilla/``) has its own license, which can be found in the chapter,
81 `License for Scintilla and SciTE`_.
85 About this document
86 -------------------
88 This documentation is available in HTML and text formats.
89 The latest version can always be found at http://www.geany.org/.
91 If you want to contribute to it, see `Contributing to this document`_.
96 Installation
97 ============
100 Requirements
101 ------------
103 You will need the GTK (>= 2.8.0) libraries and their dependencies
104 (Pango, GLib and ATK). Your distro should provide packages for these,
105 usually installed by default. For Windows, you can download an installer
106 from the website which bundles these libraries.
109 Binary packages
110 ---------------
112 There are many binary packages available. For an up-to-date but maybe
113 incomplete list see http://www.geany.org/Download/ThirdPartyPackages.
116 Source compilation
117 ------------------
119 Compiling Geany is quite easy.
120 To do so, you need the GTK (>= 2.8.0) libraries and header files.
121 You also need the Pango, GLib and ATK libraries and header files.
122 All these files are available at http://www.gtk.org, but very often
123 your distro will provide development packages to save the trouble of
124 building these yourself.
126 Furthermore you need, of course, a C and C++ compiler. The GNU versions
127 of these tools are recommended.
129 Autotools based build system
130 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
132 The Autotools based build system is very mature and has been well tested.
133 To use it, you just need the Make tool, preferably GNU Make.
135 Then run the following commands::
137     $ ./configure
138     $ make
140 Then as root::
142     % make install
144 Waf based build system
145 ^^^^^^^^^^^^^^^^^^^^^^
147 The Waf build system is still quite young and under heavy development but already in a
148 usable state. In contrast to the Autotools system, Waf needs Python. So before using Waf, you need
149 to install Python on your system.
150 The advantage of the Waf build system over the Autotools based build system is that the whole
151 build process might be a bit faster. Especially when you use the Waf
152 cache feature for repetitive builds (e.g. when changing only a few source files
153 to test something) will become much faster since Waf will cache and re-use the
154 unchanged built files and only compile the changed code again. See `Waf Cache`_ for details.
155 To build Geany with Waf as run::
157     $ ./waf configure
158     $ ./waf build
160 Then as root::
162     % ./waf install
164 Waf Cache
165 `````````
167 The Waf build system has a nice and interesting feature which can help  to avoid
168 a lot of unnecessary rebuilding of unchanged code. This often happens when developing new features
169 or trying to debug something in Geany.
170 Waf is able to store and retrieve the object files from a cache. This cache is declared
171 using the environment variable ``WAFCACHE``.
172 A possible location of the cache directory could be ``~/.cache/waf``. In order to make use of
173 this, you first need to create this directory::
175         $ mkdir -p ~/.cache/waf
177 then add the environment variable to your shell configuration (the following example is for
178 Bash and should be adjusted to your used shell)::
180         export WAFCACHE=/home/username/.cache/waf
182 Remember to replace ``username`` with your actual username.
184 More information about the Waf cache feature are available at
185 http://code.google.com/p/waf/wiki/CacheObjectFiles.
187 Cleaning the Cache
188 ******************
189 You should be careful about the size of the cache directory as it may
190 grow rapidly over time.
191 Waf doesn't do any cleaning or other house-keeping of the cache yet, so you need to keep it
192 clean by yourself.
193 An easy way to keep it clean is to run the following command regularly to remove old
194 cached files::
196     $ find /home/username/.cache/waf -mtime +14 -exec rm {} \;
198 This will delete all files in the cache directory which are older than 14 days.
200 For details about the ``find`` command and its options, check its manual page.
203 Custom installation
204 ^^^^^^^^^^^^^^^^^^^
205 The configure script supports several common options, for a detailed
206 list, type::
208     $ ./configure --help
210 or::
211         $ ./waf --help
213 (depending on which build system you use).
215 You may also want to read the INSTALL file for advanced installation
216 options.
218 * See also `Compile-time options`_.
220 Dynamic linking loader support and VTE
221 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
222 In the case that your system lacks dynamic linking loader support, you
223 probably want to pass the option ``--disable-vte`` to the ``configure``
224 script. This prevents compiling Geany with dynamic linking loader
225 support for automatically loading ``libvte.so.4`` if available.
227 Build problems
228 ^^^^^^^^^^^^^^
229 If there are any errors during compilation, check your build
230 environment and try to find the error, otherwise contact the mailing
231 list or one the authors. Sometimes you might need to ask for specific
232 help from your distribution.
235 Installation prefix
236 -------------------
237 If you want to find Geany's system files after installation you may
238 want to know the installation prefix.
240 Pass the ``--print-prefix`` option to Geany to check this - see
241 `Command line options`_. The first path is the prefix.
243 On Unix-like systems this is commonly ``/usr`` if you installed from
244 a binary package, or ``/usr/local`` if you build from source.
246 .. note::
247     Editing system files is not necessary as you can use the
248     per-user configuration files instead, which don't need root
249     permissions. See `Configuration files`_.
252 Usage
253 =====
256 Getting started
257 ---------------
259 You can start Geany in the following ways:
261 * From the Desktop Environment menu:
263   Choose in your application menu of your used Desktop Environment:
264   Development --> Geany.
266 * From the command line:
268   To start Geany from a command line, type the following and press
269   Return::
271       % geany
273 The Geany workspace
274 -------------------
276 The Geany window is shown in the following figure:
278 .. image:: ./images/main_window.png
280 The workspace has the following parts:
282 * The menu.
283 * An optional toolbar.
284 * An optional sidebar that can show the following tabs:
286   * Documents - A document list, and
287   * Symbols - A list of symbols in your code.
289 * The main editor window.
290 * An optional message window which can show the following tabs:
292   * Status - A list of status messages.
293   * Compiler - The output of compiling or building programs.
294   * Messages - Results of 'Find Usage', 'Find Usage' 'Find in Files' and other actions
295   * Scribble - A text scratchpad for any use.
296   * Terminal - An optional terminal window.
298 * A status bar
300 Additional tabs may be added to the sidebar and message window by plugins.
302 The position of the tabs can be selected in the interface preferences.
304 The sizes of the sidebar and message window can be adjusted by
305 dragging the dividers.
307 Command line options
308 --------------------
310 ============  =======================  =================================================
311 Short option  Long option              Function
312 ============  =======================  =================================================
313 *none*        +number                  Set initial line number for the first opened file
314                                        (same as --line, do not put a space between the + sign
315                                        and the number). E.g. "geany +7 foo.bar" will open the
316                                        file foo.bar and place the cursor in line 7.
318 *none*        --column                 Set initial column number for the first opened file.
320 -c dir_name   --config=directory_name  Use an alternate configuration directory. The default
321                                        configuration directory is ``~/.config/geany/`` and that
322                                        is where ``geany.conf`` and other configuration files
323                                        reside.
325 *none*        --ft-names               Print a list of Geany's internal filetype names (useful
326                                        for snippets configuration).
328 -g            --generate-tags          Generate a global tags file (see
329                                        `Generating a global tags file`_).
331 -P            --no-preprocessing       Don't preprocess C/C++ files when generating tags.
333 -i            --new-instance           Do not open files in a running instance, force opening
334                                        a new instance. Only available if Geany was compiled
335                                        with support for Sockets.
337 -l            --line                   Set initial line number for the first opened file.
339 *none*        --list-documents         Return a list of open documents in a running Geany
340                                        instance.
341                                        This can be used to read the currently opened documents in
342                                        Geany from an external script or tool. The returned list
343                                        is separated by newlines (LF) and consists of the full,
344                                        UTF-8 encoded filenames of the documents.
345                                        Only available if Geany was compiled with support for
346                                        Sockets.
348 -m            --no-msgwin              Do not show the message window. Use this option if you
349                                        do not need compiler messages or VTE support.
351 -n            --no-ctags               Do not load symbol completion and call tip data. Use this
352                                        option if you do not want to use them.
354 -p            --no-plugins             Do not load plugins or plugin support.
356 *none*        --print-prefix           Print installation prefix, the data directory, the lib
357                                        directory and the locale directory (in that order) to
358                                        stdout, one line each. This is mainly intended for plugin
359                                        authors to detect installation paths.
361 -s            --no-session             Do not load the previous session's files.
363 -t            --no-terminal            Do not load terminal support. Use this option if you do
364                                        not want to load the virtual terminal emulator widget
365                                        at startup. If you do not have ``libvte.so.4`` installed,
366                                        then terminal-support is automatically disabled. Only
367                                        available if Geany was compiled with support for VTE.
369 *none*        --socket-file            Use this socket filename for communication with a
370                                        running Geany instance. This can be used with the following
371                                        command to execute Geany on the current workspace::
373                                          geany --socket-file=/tmp/geany-sock-$(xprop -root _NET_CURRENT_DESKTOP | awk '{print $3}')
375 *none*        --vte-lib                Specify explicitly the path including filename or only
376                                        the filename to the VTE library, e.g.
377                                        ``/usr/lib/libvte.so`` or ``libvte.so``. This option is
378                                        only needed when the auto-detection does not work. Only
379                                        available if Geany was compiled with support for VTE.
381 -v            --verbose                Be verbose (print useful status messages).
383 -V            --version                Show version information and exit.
385 -?            --help                   Show help information and exit.
387 *none*        [files ...]              Open all given files at startup. This option causes
388                                        Geany to ignore loading stored files from the last
389                                        session (if enabled).
390                                        Geany also recognizes line and column information when
391                                        appended to the filename with colons, e.g.
392                                        "geany foo.bar:10:5" will open the file foo.bar and
393                                        place the cursor in line 10 at column 5.
395                                        Projects can also be opened but a project file (\*.geany)
396                                        must be the first non-option argument. All additionally
397                                        given files are ignored.
398 ============  =======================  =================================================
400 You can also pass line number and column number information, e.g.::
402     geany some_file.foo:55:4
404 Geany supports all generic GTK options, a list is available on the
405 help screen.
409 General
410 -------
413 Startup
414 ^^^^^^^
416 At startup, Geany loads all files from the last time Geany was
417 launched. You can disable this feature in the preferences dialog
418 (see `General Startup preferences`_). If you specify some
419 files on the command line, only these files will be opened, but you
420 can find the files from the last session in the file menu under the
421 "Recent files" item. By default this contains the last 10 recently
422 opened files. You can change the number of recently opened files in
423 the preferences dialog.
425 You can start several instances of Geany, but only the first will
426 load files from the last session. To run a second instance of Geany,
427 do not specify any filenames on the command-line, or disable opening
428 files in a running instance using the appropriate command line option.
431 Opening files from the command-line in a running instance
432 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
434 Geany detects if there is an an instance of itself already running and opens files
435 from the command-line in that instance. So, Geany can
436 be used to view and edit files by opening them from other programs
437 such as a file manager.
439 You can also pass line number and column number information, e.g.::
441     geany some_file.foo:55:4
443 This would open the file ``some_file.foo`` with the cursor on line 55,
444 column 4.
446 If you do not like this for some reason, you can disable using the first
447 instance by using the appropriate command line option -- see the section
448 called `Command line options`_.
451 Virtual terminal emulator widget (VTE)
452 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
454 If you have installed ``libvte.so`` on your system, it is loaded
455 automatically by Geany, and you will have a terminal widget in the
456 notebook at the bottom.
458 If Geany cannot find any ``libvte.so`` at startup, the terminal widget
459 will not be loaded. So there is no need to install the package containing
460 this file in order to run Geany. Additionally, you can disable the use
461 of the terminal widget by command line option, for more information
462 see the section called `Command line options`_.
464 You can use this terminal (from now on called VTE) much as you would
465 a terminal program like xterm. There is basic clipboard support. You
466 can paste the contents of the clipboard by pressing the right mouse
467 button to open the popup menu, and choosing Paste. To copy text from
468 the VTE, just select the desired text and then press the right mouse
469 button and choose Copy from the popup menu. On systems running the
470 X Window System you can paste the last selected text by pressing the
471 middle mouse button in the VTE (on 2-button mice, the middle button
472 can often be simulated by pressing both mouse buttons together).
474 In the preferences dialog you can specify a shell which should be
475 started in the VTE. To make the specified shell a login shell just
476 use the appropriate command line options for the shell. These options
477 should be found in the manual page of the shell. For zsh and bash
478 you can use the argument ``--login``.
480 .. note::
481     Geany tries to load ``libvte.so``. If this fails, it tries to load
482     some other filenames. If this fails too, you should check whether you
483     installed libvte correctly. Again note, Geany will run without this
484     library.
486 It could be, that the library is called something else than
487 ``libvte.so`` (e.g. on FreeBSD 6.0 it is called ``libvte.so.8``). If so
488 please set a link to the correct file (as root)::
490     # ln -s /usr/lib/libvte.so.X /usr/lib/libvte.so
492 Obviously, you have to adjust the paths and set X to the number of your
493 ``libvte.so``.
495 You can also specify the filename of the VTE library to use on the command
496 line (see the section called `Command line options`_) or at compile time
497 by specifying the command line option ``--with-vte-module-path`` to
498 ./configure.
501 Defining own widget styles using .gtkrc-2.0
502 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
504 You can define your widget style for many of Geany's GUI parts. To
505 do this, just edit your ``.gtkrc-2.0`` (usually found in your home
506 directory on UNIX-like systems and in the etc subdirectory of your
507 Geany installation on Windows).
509 To have a defined style used by Geany you must assign it to
510 at least one of Geany's widgets. For example use the following line::
512     widget "Geany*" style "geanyStyle"
514 This would assign your style "geany_style" to all Geany
515 widgets. You can also assign styles only to specific widgets. At the
516 moment you can use the following widgets:
518 * GeanyMainWindow
519 * GeanyEditMenu
520 * GeanyToolbarMenu
521 * GeanyDialog
522 * GeanyDialogPrefs
523 * GeanyDialogProject
524 * GeanyDialogSearch
525 * GeanyMenubar
526 * GeanyToolbar
528 An example of a simple ``.gtkrc-2.0``::
530     style "geanyStyle"
531     {
532         font_name="Sans 12"
533     }
534     widget "GeanyMainWindow" style "geanyStyle"
536     style "geanyStyle"
537     {
538         font_name="Sans 10"
539     }
540     widget "GeanyPrefsDialog" style "geanyStyle"
543 Documents
544 ---------
546 Switching between documents
547 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
549 The documents list and the editor tabs are two different ways
550 to switch between documents using the mouse. When you hit the key
551 combination to move between tabs, the order is determined by the tab
552 order. Its is not alphabetical as shown in the documents list
553 (regardless of whether or not editor tabs are visible).
555 The tabs can be positioned at the top, bottom, left, or right of the
556 main editing window, by a selection in the interface preferences.
558 See the `Notebook tab keybindings`_ section for useful
559 shortcuts including for Most-Recently-Used document switching.
562 Character sets and Unicode Byte-Order-Mark (BOM)
563 ------------------------------------------------
566 Using character sets
567 ^^^^^^^^^^^^^^^^^^^^
569 Geany provides support for detecting and converting character sets. So
570 you can open and save files in different character sets, and even
571 convert a file from one character set to another. To do this,
572 Geany uses the character conversion capabilities of the GLib library.
574 Only text files are supported, i.e. opening files which contain
575 NULL-bytes may fail. Geany will try to open the file anyway but it is
576 likely that the file will be truncated because it can only be read up
577 to the first occurrence of a NULL-byte. All characters after this
578 position are lost and are not written when you save the file.
580 Geany tries to detect the encoding of a file while opening it, but
581 auto-detecting the encoding of a file is not easy and sometimes an
582 encoding might not be detected correctly. In this case you have to
583 set the encoding of the file manually in order to display it
584 correctly. You can this in the file open dialog by selecting an
585 encoding in the drop down box or by reloading the file with the
586 file menu item "Reload as". The auto-detection works well for most
587 encodings but there are also some encodings where it is known that
588 auto-detection has problems.
590 There are different ways to set different encodings in Geany:
592 * Using the file open dialog
594   This opens the file with the encoding specified in the encoding drop
595   down box. If the encoding is set to "Detect from file" auto-detection
596   will be used. If the encoding is set to "Without encoding (None)" the
597   file will be opened without any character conversion and Geany will
598   not try to auto-detect the encoding (see below for more information).
600 * Using the "Reload as" menu item
602   This item reloads the current file with the specified encoding. It can
603   help if you opened a file and found out that the wrong encoding was used.
605 * Using the "Set encoding" menu item
607   Contrary to the above two options, this will not change or reload
608   the current file unless you save it. It is useful when you want to
609   change the encoding of the file.
611 * Specifying the encoding in the file itself
613   As mentioned above, auto-detecting the encoding of a file may fail on
614   some encodings. If you know that Geany doesn't open a certain file,
615   you can add the specification line, described in the next section,
616   to the beginning of the file to force Geany to use a specific
617   encoding when opening the file.
620 In-file encoding specification
621 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
623 Geany detects meta tags of HTML files which contain charset information
624 like::
626     <meta http-equiv="content-type" content="text/html; charset=ISO-8859-15" />
628 and the specified charset is used when opening the file. This is useful if the
629 encoding of the file cannot be detected properly.
630 For non-HTML files you can also define a line like::
632     /* geany_encoding=ISO-8859-15 */
634 or::
636     # geany_encoding=ISO-8859-15 #
638 to force an encoding to be used. The #, /\* and \*/ are examples
639 of filetype-specific comment characters. It doesn't matter which
640 characters are around the string " geany_encoding=ISO-8859-15 " as long
641 as there is at least one whitespace character before and after this
642 string. Whitespace characters are in this case a space or tab character.
643 An example to use this could be you have a file with ISO-8859-15
644 encoding but Geany constantly detects the file encoding as ISO-8859-1.
645 Then you simply add such a line to the file and Geany will open it
646 correctly the next time.
648 Since Geany 0.15 you can also use lines which match the
649 regular expression used to find the encoding string:
650 ``coding[\t ]*[:=][\t ]*([a-z0-9-]+)[\t ]*``
652 .. note::
653     These specifications must be in the first 512 bytes of the file.
654     Anything after the first 512 bytes will not be recognized.
656 Some examples are::
658     # encoding = ISO-8859-15
660 or::
662     # coding: ISO-8859-15
664 Special encoding "None"
665 ^^^^^^^^^^^^^^^^^^^^^^^
667 There is a special encoding "None" which uses no
668 encoding. It is useful when you know that Geany cannot auto-detect
669 the encoding of a file and it is not displayed correctly. Especially
670 when the file contains NULL-bytes this can be useful to skip auto
671 detection and open the file properly at least until the occurrence
672 of the first NULL-byte. Using this encoding opens the file as it is
673 without any character conversion.
676 Unicode Byte-Order-Mark (BOM)
677 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
679 Furthermore, Geany detects a Unicode Byte Order Mark (see
680 http://en.wikipedia.org/wiki/Byte_Order_Mark for details). Of course,
681 this feature is only available if the opened file is in a Unicode
682 encoding. The Byte Order Mark helps to detect the encoding of a file,
683 e.g. whether it is UTF-16LE or UTF-16BE and so on. On Unix-like systems
684 using a Byte Order Mark could cause some problems for programs not
685 expecting it, e.g. the compiler gcc stops
686 with stray errors, PHP does not parse a script containing a BOM and
687 script files starting with a she-bang maybe cannot be started. In the
688 status bar you can easily see whether the file starts with a BOM or
689 not.
691 If you want to set a BOM for a file or if you want to remove it
692 from a file, just use the document menu and toggle the checkbox.
694 .. note::
695     If you are unsure what a BOM is or if you do not understand where
696     to use it, then it is probably not important for you and you can
697     safely ignore it.
701 Editing
702 -------
705 Folding
706 ^^^^^^^
708 Geany provides basic code folding support. Folding means the ability to
709 show and hide parts of the text in the current file. You can hide
710 unimportant code sections and concentrate on the parts you are working on
711 and later you can show hidden sections again. In the editor window there is
712 a small grey margin on the left side with [+] and [-] symbols which
713 show hidden parts and hide parts of the file respectively. By
714 clicking on these icons you can simply show and hide sections which are
715 marked by vertical lines within this margin. For many filetypes nested
716 folding is supported, so there may be several fold points within other
717 fold points.
719 .. note::
720     You can customize the folding icon and line styles - see the
721     filetypes.common `Folding Settings`_.
723 If you don't like it or don't need it at all, you can simply disable
724 folding support completely in the preferences dialog.
726 The folding behaviour can be changed with the "Fold/Unfold all children of
727 a fold point" option in the preference dialog. If activated, Geany will
728 unfold all nested fold points below the current one if they are already
729 folded (when clicking on a [+] symbol).
730 When clicking on a [-] symbol, Geany will fold all nested fold points
731 below the current one if they are unfolded.
733 This option can be inverted by pressing the Shift
734 key while clicking on a fold symbol. That means, if the "Fold/Unfold all
735 children of a fold point" option is enabled, pressing Shift will disable
736 it for this click and vice versa.
739 Column mode editing (rectangular selections)
740 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
742 There is basic support for column mode editing. To use it, create a
743 rectangular selection by holding down the Control and Shift keys
744 (or Control and Alt if it doesn't work) while
745 selecting some text. It is also possible to create a zero-column selection.
746 Once a rectangular selection exists you can start editing the text within
747 this selection and the modifications will be done for every line in the
748 selection.
751 Drag and drop of text
752 ^^^^^^^^^^^^^^^^^^^^^
754 If you drag selected text in the editor widget of Geany the text is
755 moved to the position where the mouse pointer is when releasing the
756 mouse button. Holding Control when releasing the mouse button will
757 copy the text instead. This behaviour was changed in Geany 0.11 -
758 before the selected text was copied to the new position.
761 Indentation
762 ^^^^^^^^^^^
764 Geany allows each document to indent either with a tab character,
765 multiple spaces or a combination of both. The default indent
766 settings are set in `Editor Indentation preferences`_ (see the link
767 for more information).
769 The default settings can be overridden per-document using the
770 Document menu. They can also be overridden by projects - see
771 `Project Management`_.
773 The indent mode for the current document is shown on the status bar
774 as follows:
777     Indent with Tab characters.
779     Indent with spaces.
781     Indent with tabs and spaces, depending on how much indentation is
782     on a line.
784 Applying new indentation settings
785 `````````````````````````````````
786 After changing the default settings you may wish to apply the new
787 settings to every document in the current session. To do this use the
788 *Project->Apply Default Indentation* menu item.
790 Detecting indent type
791 `````````````````````
792 The *Detect from file* indentation preference can be used to
793 scan each file as it's opened and set the indent type based on
794 how many lines start with a tab vs. 2 or more spaces.
797 Auto-indentation
798 ^^^^^^^^^^^^^^^^
800 When enabled, auto-indentation happens when pressing *Enter* in the
801 Editor. It adds a certain amount of indentation to the new line so the
802 user doesn't always have to indent each line manually.
804 Geany has four types of auto-indentation:
806 None
807     Disables auto-indentation completely.
808 Basic
809     Adds the same amount of whitespace on a new line as on the last line.
810 Current chars
811     Does the same as *Basic* but also indents a new line after an opening
812     brace '{', and de-indents when typing a closing brace '}'. For Python,
813     a new line will be indented after typing ':' at the end of the
814     previous line.
815 Match braces
816     Similar to *Current chars* but the closing brace will be aligned to
817     match the indentation of the line with the opening brace.
819 There is also XML-tag auto-indentation. This is enabled when the
820 mode is more than just Basic, and is also controlled by a filetype
821 setting - see `xml_indent_tags`_.
824 Bookmarks
825 ^^^^^^^^^
827 Geany provides a handy bookmarking feature that lets you mark one
828 or more lines in a document, and return the cursor to them using a
829 key combination.
831 To place a mark on a line, either left-mouse-click in the left margin
832 of the editor window, or else use Ctrl-m. This will
833 produce a small green plus symbol in the margin. You can have as many
834 marks in a document as you like. Click again (or use Ctrl-m again)
835 to remove the bookmark. To remove all the marks in a given document,
836 use "Remove Markers" in the Document menu.
838 To navigate down your document, jumping from one mark to the next,
839 use Ctrl-. (control period). To go in the opposite direction on
840 the page, use Ctrl-, (control comma). Using the bookmarking feature
841 together with the commands to switch from one editor tab to another
842 (Ctrl-PgUp/PgDn and Ctrl-Tab) provides a particularly fast way to
843 navigate around multiple files.
846 Code navigation history
847 ^^^^^^^^^^^^^^^^^^^^^^^
849 To ease navigation in source files and especially between
850 different files, Geany lets you jump between different navigation
851 points. Currently, this works for the following:
853 * `Go to tag declaration`_
854 * `Go to tag definition`_
855 * Symbol list items
856 * Build errors
857 * Message items
859 When using one of these actions, Geany remembers your current position
860 and jumps to the new one. If you decide to go back to your previous
861 position in the file, just use "Navigate back a location". To
862 get back to the new position again, just use "Navigate forward a
863 location". This makes it easier to navigate in e.g.  foreign code
864 and between different files.
867 Sending text through custom commands
868 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
870 You can define several custom commands in Geany and send the current
871 selection to one of these commands using the *Edit->Format->Send
872 Selection to* menu or keybindings. The output of the command will be
873 used to replace the current selection. This makes it possible to use
874 text formatting tools with Geany in a general way.
876 The selected text will be sent to the standard input of the executed
877 command, so the command should be able to read from it and it should
878 print all results to its standard output which will be read by
879 Geany. To help finding errors in executing the command, the output
880 of the program's standard error will be printed on Geany's standard
881 output.
883 To add a custom command, use the *Send Selection to->Set Custom
884 Commands* menu item. Click on *Add* to get a new text entry and type
885 the command. You can also specify some command line options. To
886 delete a command, just clear the text entry and press OK. It will be
887 deleted automatically.
889 Normal shell quoting is supported, so you can do things like:
891 * ``sed 's/\./(dot)/g'``
893 The above example would normally be done with the `Replace all`_
894 function, but it can be handy to have common commands already set up.
897 Context actions
898 ^^^^^^^^^^^^^^^
900 You can execute the context action command on the current word at the
901 cursor position or the available selection.  This word or selection
902 can be used as an argument to the command.
903 The context action is invoked by a menu entry in the popup menu of the
904 editor and also a keyboard shortcut (see the section called
905 `Keybindings`_).
907 The command can be specified in the preferences dialog and also for
908 each filetype (see "context_action_cmd" in the section called
909 `Filetype configuration`_). When the context action is invoked, the filetype
910 specific command is used if available, otherwise the command
911 specified in the preferences dialog is executed.
913 The current word or selection can be referred with the wildcard "%s"
914 in the command, it will be replaced by the current word or
915 selection before the command is executed.
917 For example a context action can be used to open API documentation
918 in a browser window, the command to open the PHP API documentation
919 would be::
921     firefox "http://www.php.net/%s"
923 when executing the command, the %s is substituted by the word near
924 the cursor position or by the current selection. If the cursor is at
925 the word "echo", a browser window will open(assumed your browser is
926 called firefox) and it will open the address: http://www.php.net/echo.
929 Autocompletion
930 ^^^^^^^^^^^^^^
932 Geany can offer a list of possible completions for symbols defined in the
933 tags and for all words in a document.
935 The autocompletion list for symbols is presented when the first few
936 characters of the symbol are typed (configurable, see `Editor Completions
937 preferences`_, default 4) or when the *Complete word*
938 keybinding is pressed (configurable, see `Editor keybindings`_,
939 default Ctrl-Space).
941 When the defined keybinding is typed and the *Autocomplete all words in
942 document* preference (in `Editor Completions preferences`_)
943 is selected then the autocompletion list will show all matching words
944 in the document, if there are no matching symbols.
946 If you don't want to use autocompletion it can be dismissed until
947 the next symbol by pressing Escape. The autocompletion list is updated
948 as more characters are typed so that it only shows completions that start
949 with the characters typed so far. If no symbols begin with the sequence,
950 the autocompletion window is closed.
952 The up and down arrows will move the selected item. The highlighted
953 item on the autocompletion list can be chosen from the list by pressing
954 Enter/Return. You can also double-click to select an item. The sequence
955 will be completed to match the chosen item, and if the *Drop rest of
956 word on completion* preference is set (in `Editor Completions
957 preferences`_) then any characters after the cursor that match
958 a symbol or word are deleted.
960 Word part completion
961 ````````````````````
962 By default, pressing Tab will complete the selected item by word part;
963 useful e.g. for adding the prefix ``gtk_combo_box_entry_`` without typing it
964 manually:
966 * gtk_com<TAB>
967 * gtk_combo_<TAB>
968 * gtk_combo_box_<e><TAB>
969 * gtk_combo_box_entry_<s><ENTER>
970 * gtk_combo_box_entry_set_text_column
972 The key combination can be changed from Tab - See `Editor keybindings`_.
973 If you clear/change the key combination for word part completion, Tab
974 will complete the whole word instead, like Enter.
976 Scope autocompletion
977 ````````````````````
978 E.g.::
980     struct
981     {
982         int i;
983         char c;
984     } foo;
986 When you type ``foo.`` it will show an autocompletion list with 'i' and
987 'c' symbols.
989 It only works for languages that set parent scope names for e.g. struct
990 members. Currently this means C-like languages. The C tag parser only
991 parses global scopes, so this won't work for structs or objects declared
992 in local scope.
995 User-definable snippets
996 ^^^^^^^^^^^^^^^^^^^^^^^
998 Snippets are small strings or code constructs which can be replaced or
999 completed to a more complex string. So you can save a lot of time when
1000 typing common strings and letting Geany do the work for you.
1001 To know what to complete or replace Geany reads a configuration file
1002 called ``snippets.conf`` at startup.
1004 Maybe you need to often type your name, so define a snippet like this::
1006     [Default]
1007     myname=Enrico Tröger
1009 Every time you write ``myname`` <TAB> in Geany, it will replace "myname"
1010 with "Enrico Tröger". The key to start autocompletion can be changed
1011 in the preferences dialog, by default it is TAB. The corresponding keybinding
1012 is called `Complete snippet`.
1014 **Paths**
1016 You can override the default snippets using the user
1017 ``snippets.conf`` file. Use the *Tools->Configuration
1018 Files->snippets.conf* menu item. See also `Configuration file paths`_.
1020 This adds the default settings to the user file if the file doesn't
1021 exist. Alternatively the file can be created manually, adding only
1022 the settings you want to change. All missing settings will be read
1023 from the system snippets file.
1025 **Snippet groups**
1027 The file ``snippets.conf`` contains sections defining snippets that
1028 are available for particular filetypes and in general.
1030 The two sections "Default" and "Special" apply to all filetypes.
1031 "Default" contains all snippets which are available for every
1032 filetype and "Special" contains snippets which can only be used in
1033 other snippets. So you can define often used parts of snippets and
1034 just use the special snippet as a placeholder (see the
1035 ``snippets.conf`` for details).
1037 You can define sections with the name of a filetype eg "C++".  The
1038 snippets in that section are only available for use in files with that
1039 filetype.  Snippets in filetype sections will hide snippets with the
1040 same name in the "Default" section when used in a file of that
1041 filetype.
1043 **Substitution sequences for snippets**
1045 To define snippets you can use several special character sequences which
1046 will be replaced when using the snippet:
1048 ================  =========================================================
1049 \\n or %newline%  Insert a new line (it will be replaced by the used EOL
1050                   char(s): LF, CR/LF, or CR).
1052 \\t or %ws%       Insert an indentation step, it will be replaced according
1053                   to the current document's indent mode.
1055 \\s               \\s to force whitespace at beginning or end of a value
1056                   ('key= value' won't work, use 'key=\\svalue')
1058 %cursor%          Place the cursor at this position after completion has
1059                   been done. You can define multiple %cursor% wildcards
1060                   and use the keybinding `Move cursor in snippet` to jump
1061                   to the next defined cursor position in the completed
1062                   snippet.
1064 %...%             "..." means the name of a key in the "Special" section.
1065                   If you have defined a key "brace_open" in the "Special"
1066                   section you can use %brace_open% in any other snippet.
1067 ================  =========================================================
1069 Snippet names must not contain spaces otherwise they won't
1070 work correctly. But beside that you can define almost any
1071 string as a snippet and use it later in Geany. It is not limited
1072 to existing contructs of certain programming languages(like ``if``,
1073 ``for``, ``switch``). Define whatever you need.
1075 **Template wildcards**
1077 Since Geany 0.15 you can also use most of the available templates wildcards
1078 listed in `Template wildcards`_. All wildcards which are listed as
1079 `available in snippets` can be used. For instance to improve the above example::
1081     [Default]
1082     myname=My name is {developer}
1083     mysystem=My system: {command:uname -a}
1085 this will replace ``myname`` with "My name is " and the value of the template
1086 preference ``developer``.
1088 **Word characters**
1090 You can change the way Geany recognizes the word to complete,
1091 that is how the start and end of a word is recognised when the
1092 snippet completion is requested. The section "Special" may
1093 contain a key "wordchars" which lists all characters a string may contain
1094 to be recognized as a word for completion. Leave it commented to use
1095 default characters or define it to add or remove characters to fit your
1096 needs.
1098 Snippet keybindings
1099 ```````````````````
1101 Normally you would type the snippet name and press Tab. However, you
1102 can define keybindings for snippets under the *Keybindings* group in
1103 ``snippets.conf``::
1105     [Keybindings]
1106     for=<Ctrl>7
1107     block_cursor=<Ctrl>8
1109 .. note::
1110     Snippet keybindings may be overridden by Geany's configurable
1111     keybindings.
1114 Inserting Unicode characters
1115 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1117 With GTK 2.10 and above, you can insert Unicode code points by hitting
1118 Ctrl-Shift-u, then still holding Ctrl-Shift, type some hex digits representing
1119 the code point for the character you want and hit Enter or Return (still
1120 holding Ctrl-Shift). If you release Ctrl-Shift before hitting Enter or Return
1121 (or any other character), the code insertion is completed, but the typed
1122 character is also entered.  In the case of Enter/Return, it is a newline, as
1123 you might expect.
1126 In some earlier versions of Geany, you might need to first unbind Ctrl-Shift-u
1127 in the `keybinding preferences`_, then select *Tools->Reload Configuration*
1128 or restart Geany. Note that it works slightly differently from other GTK
1129 applications, in that you'll need to continue to hold down the Ctrl and Shift
1130 keys while typing the code point hex digits (and the Enter or Return to finish the code point).
1132 For GTK < 2.10, it is also possible, but typing the first Ctrl-Shift-u
1133 is not necessary. One problem is that you may find the alphabetic
1134 keys conflict with other Geany keybindings.
1138 Search, replace and go to
1139 -------------------------
1141 This section describes search-related commands from the Search menu
1142 and the editor window's popup menu:
1144 * Find
1145 * Find selection
1146 * Find usage
1147 * Find in files
1148 * Replace
1149 * Go to tag definition
1150 * Go to tag declaration
1151 * Go to line
1153 Toolbar entries
1154 ^^^^^^^^^^^^^^^
1155 There are also two toolbar entries:
1157 * Search bar
1158 * Go to line entry
1160 There are keybindings to focus each of these - see `Focus
1161 keybindings`_. Pressing Escape will then focus the editor.
1163 Search bar
1164 ``````````
1165 The quickest way to find some text is to use the search bar entry in
1166 the toolbar. This performs a case-insensitive search in the current
1167 document whilst you type. Pressing Enter will search again.
1169 Find
1170 ^^^^
1172 The Find dialog is used for finding text in one or more open documents.
1174 .. image:: ./images/find_dialog.png
1177 Matching options
1178 ````````````````
1180 The syntax for the *Use regular expressions* option is shown in
1181 `Regular expressions`_.
1183 .. note::
1184     *Use escape sequences* is implied for regular expressions.
1186 The *Use escape sequences* option will transform any escaped characters
1187 into their UTF-8 equivalent. For example, \\t will be transformed into
1188 a tab character. Other recognized symbols are: \\\\, \\n, \\r, \\uXXXX
1189 (Unicode characters).
1192 Find all
1193 ````````
1195 To find all matches, click on the Find All expander. This will reveal
1196 several options:
1198 * In Document
1199 * In Session
1200 * Mark
1202 Find All In Document will show a list of matching lines in the
1203 current document in the Messages tab of the Message Window. *Find All
1204 In Session* does the same for all open documents.
1206 Mark will highlight all matches in the current document with a
1207 colored box. These markers can be removed by selecting the
1208 Remove Markers command from the Document menu.
1211 Change font in search dialog text fields
1212 ````````````````````````````````````````
1214 All search related dialogs use a Monospace for the text input fields to
1215 increase the readability of input text. This is useful when you are
1216 typing input such as regular expressions with spaces, periods and commas which
1217 might it hard to read with a proportional font.
1219 If you want to change the font, you can do this easily
1220 by inserting the following style into your ``.gtkrc-2.0``
1221 (usually found in your home directory on UNIX-like systems and in the
1222 etc subdirectory of your Geany installation on Windows)::
1224     style "search_style"
1225     {
1226         font_name="Monospace 8"
1227     }
1228     widget "GeanyDialogSearch.*.GtkEntry" style:highest "search_style"
1230 Please note the addition of ":highest" in the last line which sets the priority
1231 of this style to the highest available. Otherwise, the style is ignored
1232 for the search dialogs.
1235 Find selection
1236 ^^^^^^^^^^^^^^
1237 The *Find Next/Previous Selection* commands perform a search for the
1238 current selected text. If nothing is selected, by default the current
1239 word is used instead. This can be customized by the
1240 *find_selection_type* hidden pref - see `Hidden preferences`_.
1242 =====   =============================================
1243 Value   *find_selection_type* behaviour
1244 =====   =============================================
1245 0       Use the current word (default).
1246 1       Try the X selection first, then current word.
1247 2       Repeat last search.
1248 =====   =============================================
1251 Find usage
1252 ^^^^^^^^^^
1254 Find usage searches all open files. It is similar to the Find All In
1255 Session option in the Find dialog.
1257 If there is a selection, then it is used as the search text; otherwise
1258 the current word is used. The current word is either taken from the
1259 word nearest the edit cursor, or the word underneath the popup menu
1260 click position when the popup menu is used. The search results are
1261 shown in the Messages tab of the Message Window.
1264 Find in files
1265 ^^^^^^^^^^^^^
1267 Find in files is a more powerful version of Find usage that searches
1268 all files in a certain directory using the Grep tool. The Grep tool
1269 must be correctly set in Preferences to the path of the system's Grep
1270 utility. GNU Grep is recommended (see note below).
1272 .. image:: ./images/find_in_files_dialog.png
1274 The *Files* field optionally searches only files matching the
1275 patterns listed. Patterns are basic and shell-like, separated by a
1276 space. To search all ``.c`` and ``.h`` files, use: ``*.c *.h``.
1278 The *Encoding* field can be used to define the encoding of the files
1279 to be searched. The entered search text is converted to the chosen encoding
1280 and the search results are converted back to UTF-8.
1282 The *Extra options* field is used to pass any additional arguments to
1283 the grep tool.
1285 .. note::
1286     The *Files* setting uses ``--include=``, *Recurse in subfolders*
1287     uses ``-r``; both are GNU Grep options and may not work with other
1288     Grep implementations.
1291 Filtering out version control files
1292 ```````````````````````````````````
1294 When using the *Recurse in subfolders* option with a directory that's
1295 under version control, you can set the *Extra options* field to filter
1296 out version control files.
1298 If you have GNU Grep >= 2.5.2 you can use the ``--exclude-dir``
1299 argument to filter out CVS and hidden directories like ``.svn``.
1301 Example: ``--exclude-dir=.svn --exclude-dir=CVS``
1303 If you have an older Grep, you can try using the ``--exclude`` flag
1304 to filter out filenames.
1306 SVN Example: ``--exclude=*.svn-base``
1308 The --exclude argument only matches the file name part, not the path.
1311 Replace
1312 ^^^^^^^
1314 The Replace dialog is used for replacing text in one or more open
1315 documents.
1317 .. image:: ./images/replace_dialog.png
1319 The Replace dialog has the same options for matching text as the Find
1320 dialog. See the section `Matching options`_.
1322 The *Use regular expressions* option allows regular expressions to
1323 be used in the search string and back references in the replacement
1324 text -- see the entry for '\\n' in `Regular expressions`_.
1326 Replace all
1327 ```````````
1329 To replace several matches, click on the *Replace All* expander. This
1330 will reveal several options:
1332 * In Document
1333 * In Session
1334 * In Selection
1336 *Replace All In Document* will replace all matching text in the
1337 current document. *Replace All In Session* does the same for all open
1338 documents. *Replace All In Selection* will replace all matching text
1339 in the current selection of the current document.
1342 Go to tag definition
1343 ^^^^^^^^^^^^^^^^^^^^
1345 If the current word is the name of a tag definition (like a function
1346 body) and the file containing the tag definition is open, this command
1347 will switch to that file and go to the corresponding line number. The
1348 current word is either the word nearest the edit cursor,
1349 or the word underneath the popup menu click position when the popup
1350 menu is used.
1352 .. note::
1353     If the current word's tag is on the current line, Geany will try
1354     to look for a tag declaration instead, as this is more useful.
1355     Likewise 'Go to tag declaration' will search for a tag definition
1356     in this case also.
1359 Go to tag declaration
1360 ^^^^^^^^^^^^^^^^^^^^^
1362 Like Go to tag definition, but for a forward declaration such as a
1363 C function prototype or ``extern`` declaration instead of a function
1364 body.
1367 Go to line
1368 ^^^^^^^^^^
1370 Go to a particular line number in the current file.
1373 Regular expressions
1374 ^^^^^^^^^^^^^^^^^^^
1376 You can use regular expressions in the Find and Replace dialogs
1377 by selecting the *Use regular expressions* check box (see `Matching
1378 options`_). The syntax is POSIX compatible, as described in the table
1379 below.
1381 .. note::
1382     1. The *Use escape sequences* dialog option always applies for regular
1383        expressions.
1384     2. Searching backwards with regular expressions is not supported.
1385     3. \\b, \\d, \\s, \\w are GNU extensions and may not be available
1386        on non-GNU POSIX systems unless you built Geany with the
1387        ``--enable-gnu-regex`` option (this is always used on Windows).
1389 **In a regular expression, the following characters are interpreted:**
1391 ======= ============================================================
1392 .       Matches any character.
1394 (       This marks the start of a region for tagging a match.
1396 )       This marks the end of a tagged region.
1398 \\n     Where n is 1 through 9 refers to the first through ninth tagged
1399         region when searching or replacing.
1401         Searching for (Wiki)\\1 matches WikiWiki.
1403         If the search string was Fred([1-9])XXX and the
1404         replace string was Sam\\1YYY, when applied to Fred2XXX this
1405         would generate Sam2YYY.
1407 \\0     When replacing, the whole matching text.
1409 \\b     This matches a word boundary.
1411 \\c     A backslash followed by d, D, s, S, w or W, becomes a
1412         character class (both inside and outside sets []).
1414         * d: decimal digits
1415         * D: any char except decimal digits
1416         * s: whitespace (space, \\t \\n \\r \\f \\v)
1417         * S: any char except whitespace (see above)
1418         * w: alphanumeric & underscore
1419         * W: any char except alphanumeric & underscore
1421 \\x     This allows you to use a character x that would otherwise have
1422         a special meaning. For example, \\[ would be interpreted as [
1423         and not as the start of a character set. Use \\\\ for a literal
1424         backslash.
1426 [...]   Matches one of the characters in the set. If the first
1427         character in the set is ^, it matches the characters NOT in
1428         the set, i.e. complements the set. A shorthand S-E (start
1429         dash end) is used to specify a set of characters S up to E,
1430         inclusive.
1432         The special characters ] and - have no special
1433         meaning if they appear first in the set. - can also be last
1434         in the set. To include both, put ] first: []A-Z-].
1436         Examples::
1438         []|-]    matches these 3 chars
1439         []-|]    matches from ] to | chars
1440         [a-z]    any lowercase alpha
1441         [^]-]    any char except - and ]
1442         [^A-Z]   any char except uppercase alpha
1443         [a-zA-Z] any alpha
1445 ^       This matches the start of a line (unless used inside a set, see
1446         above).
1448 $       This matches the end of a line.
1450 \*      This matches 0 or more times. For example, Sa*m matches Sm, Sam,
1451         Saam, Saaam and so on.
1453 \+      This matches 1 or more times. For example, Sa+m matches Sam,
1454         Saam, Saaam and so on.
1456 \?      This matches 0 or 1 time(s). For example, Joh?n matches John, Jon.
1457 ======= ============================================================
1459 .. note::
1460     This table is adapted from Scintilla and SciTE documentation,
1461     distributed under the `License for Scintilla and SciTE`_.
1465 Tags
1466 ----
1468 Tags are information that relates symbols in a program with the
1469 source file location of the declaration and definition.
1471 Geany has built-in functionality for generating tag information (aka
1472 "workspace tags") for supported filetypes when you open a file.  You
1473 can also have Geany automatically load external tag files (aka "global
1474 tags files") upon startup, or manually using *Tools --> Load Tags*.
1476 Geany uses its own tag file format, similar to what ``ctags`` uses
1477 (but is incompatible with ctags). You use Geany to generate global
1478 tags files, as described below.
1481 Workspace tags
1482 ^^^^^^^^^^^^^^
1484 Tags for each document are parsed whenever a file is loaded or
1485 saved. These are shown in the Symbol list in the Sidebar. These tags
1486 are also used for autocompletion of symbols and calltips for all documents
1487 open in the current session that have the same filetype.
1489 The *Go to Tag* commands can be used with all workspace tags. See
1490 `Go to tag definition`_.
1493 Global tags
1494 ^^^^^^^^^^^
1496 Global tags are used to provide autocompletion of symbols and calltips
1497 without having to open the corresponding source files. This is intended
1498 for library APIs, as the tags file only has to be updated when you upgrade
1499 the library.
1501 You can load a custom global tags file in two ways:
1503 * Using the *Load Tags* command in the Tools menu.
1504 * By moving or symlinking tags files to the ``tags`` subdirectory of
1505   one of the `configuration file paths`_ before starting Geany.
1507 You can either download these files or generate your own. They have
1508 the format::
1510     name.lang_ext.tags
1512 *lang_ext* is one of the extensions set for the filetype associated
1513 with the tags. See the section called `Filetype extensions`_ for
1514 more information.
1517 Default global tags files
1518 `````````````````````````
1520 For some languages, a list of global tags is loaded when the
1521 corresponding filetype is first used. Currently these are for:
1523 * C -- GTK+ and GLib
1524 * Pascal
1525 * PHP
1526 * HTML -- &symbol; completion, e.g. for ampersand, copyright, etc.
1527 * LaTeX
1528 * Python
1531 Global tags file format
1532 ```````````````````````
1534 Global tags files can have two different formats:
1536 * Tagmanager format
1537 * Pipe-separated format
1539 The first line of global tags files should be a comment, introduced
1540 by ``#`` followed by a space and a string like ``format=pipe``
1541 or ``format=tagmanager`` respectively, these are case-sensitive.
1542 This helps Geany to read the file properly. If this line
1543 is missing, Geany tries to auto-detect the used format but this
1544 might fail.
1547 The Tagmanager format is a bit more complex and is used for files
1548 created by the ``geany -g`` command. There is one tag per line.
1549 Different tag attributes like the return value or the argument list
1550 are separated with different characters indicating the type of the
1551 following argument.
1553 The Pipe-separated format is easier to read and write.
1554 There is one tag per line and different tag attributes are separated
1555 by the pipe character (``|``). A line looks like::
1557     basename|string|(string path [, string suffix])|
1559 | The first field is the tag name (usually a function name).
1560 | The second field is the type of the return value.
1561 | The third field is the argument list for this tag.
1562 | The fourth field is the description for this tag but
1563   currently unused and should be left empty.
1565 Except for the first field (tag name), all other field can be left
1566 empty but the pipe separator must appear for them.
1568 You can easily write your own global tag files using this format.
1569 Just save them in your tags directory, as described earlier in the
1570 section `Global tags`_.
1573 Generating a global tags file
1574 `````````````````````````````
1576 You can generate your own global tags files by parsing a list of
1577 source files. The command is::
1579     geany -g [-P] <Tag File> <File list>
1581 * Tag File filename should be in the format described earlier --
1582   see the section called `Global tags`_.
1583 * File list is a list of filenames, each with a full path (unless
1584   you are generating C/C++ tags and have set the CFLAGS environment
1585   variable appropriately).
1586 * ``-P`` or ``--no-preprocessing`` disables using the C pre-processor
1587   to process ``#include`` directives for C/C++ source files. Use this
1588   option if you want to specify each source file on the command-line
1589   instead of using a 'master' header file. Also can be useful if you
1590   don't want to specify the CFLAGS environment variable.
1592 Example for the wxD library for the D programming language::
1594     geany -g wxd.d.tags /home/username/wxd/wx/*.d
1597 *Generating C/C++ tag files:*
1599 For C/C++ tag files, gcc and grep are required, so that header files
1600 can be preprocessed to include any other headers they depend upon.
1602 For C/C++ files, the environment variable CFLAGS should be set with
1603 appropriate ``-I/path`` include paths. The following example works with
1604 the bash shell, generating tags for the GnomeUI library::
1606     CFLAGS=`pkg-config --cflags libgnomeui-2.0` geany -g gnomeui.c.tags \
1607     /usr/include/libgnomeui-2.0/gnome.h
1609 You can adapt this command to use CFLAGS and header files appropriate
1610 for whichever libraries you want.
1613 *Replacing the default C/C++ tags file:*
1615 Geany currently uses a default global tags file c99.tags for
1616 C and C++, commonly installed in /usr/share/geany. This file can
1617 be replaced with one containing tags parsed from a different set
1618 of header files. When Geany is next started, your custom tags file
1619 will be loaded instead of the default c99.tags. You should keep a
1620 copy of the generated tags file because it will get overwritten when
1621 upgrading Geany.
1624 C Ignore tags
1625 ^^^^^^^^^^^^^
1627 You can ignore certain tags for C-based languages if they would lead
1628 to wrong parsing of the code. Use the *Tools->Configuration
1629 Files->ignore.tags* menu item to open the user ``ignore.tags`` file.
1630 See also `Configuration file paths`_.
1632 List all tag names you want to ignore in this file, separated by spaces
1633 and/or newlines.
1635 Example::
1637     G_GNUC_NULL_TERMINATED
1638     G_GNUC_PRINTF
1639     G_GNUC_WARN_UNUSED_RESULT
1641 This will parse code like:
1643 ``gchar **utils_strv_new(const gchar *first, ...)
1644 G_GNUC_NULL_TERMINATED;``
1646 More detailed information about ignore tags usage from the Exuberant Ctags
1647 manual page:
1649     Specifies a list of identifiers which are to be specially handled
1650     while  parsing C and C++ source files. This option is specifically
1651     provided to handle special cases arising through the use of
1652     pre-processor macros. When the identifiers listed are simple identifiers,
1653     these identifiers will be ignored during parsing of the source files.
1654     If an identifier is suffixed with a '+' character, ctags will also
1655     ignore any parenthesis-enclosed argument list which may immediately
1656     follow the identifier in the source files.
1657     If two identifiers are separated with the '=' character, the first
1658     identifiers is replaced by the second identifiers for parsing purposes.
1660 For even more detailed information please read the manual page of
1661 Exuberant Ctags.
1664 Preferences
1665 -----------
1667 You may adjust Geany's settings using the Edit --> Preferences
1668 dialog. Any changes you make there can be applied by hitting either
1669 the Apply or the OK button. These settings will persist between Geany
1670 sessions. Note that most settings here have descriptive popup bubble
1671 help -- just hover the mouse over the item in question to get help
1672 on it.
1674 You may also adjust some View settings (under the View menu) that
1675 persist between Geany sessions. The settings under the Document menu,
1676 however, are only for the current document and revert to defaults
1677 when restarting Geany.
1679 There are also some rarer `Hidden preferences`_.
1681 .. note::
1682     In the paragraphs that follow, the text describing a dialog tab
1683     comes after the screenshot of that tab.
1686 General Startup preferences
1687 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
1689 .. image:: ./images/pref_dialog_gen_startup.png
1691 Startup
1692 ```````
1694 Load files from the last session
1695     On startup, load the same files you had open the last time you
1696     used Geany.
1698 Load virtual terminal support
1699     Load the library for running a terminal in the message window area.
1701 Enable plugin support
1702     Allow plugins to be used in Geany.
1704 Shutdown
1705 ````````
1706 Save window position and geometry
1707     Save the current position and size of the main window so next time
1708     you open Geany it's in the same location.
1710 Confirm Exit
1711     Have a dialog pop up to confirm that you really want to quit Geany.
1713 Paths
1714 `````
1716 Startup path
1717     Path to start in when opening or saving files.
1718     It must be an absolute path.
1719     Leave it blank to use the current working directory.
1721 Project files
1722     Path to start in when opening project files.
1724 Extra plugin path
1725         By default Geany looks in the global installation path and in the
1726         configuration directory. In addition the path entered here will be searched
1727         for plugins. Usually you do not need to set an additional path to search for
1728         plugins. It might be useful when Geany is installed on a multi-user machine
1729         and additional plugins are available in a common location for all users.
1730         Leave blank to not set an additional lookup path.
1733 General Miscellaneous preferences
1734 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1736 .. image:: ./images/pref_dialog_gen_misc.png
1738 Miscellaneous
1739 `````````````
1741 Beep on errors when compilation has finished
1742     Have the computer make a beeping sound when compilation of your program
1743     has completed or any errors occurred.
1745 Switch status message list at new message
1746     Switch to the status message tab (in the notebook window at the bottom)
1747     once a new status message arrives.
1749 Suppress status messages in the status bar
1750     Remove all messages from the status bar. The messages are still displayed
1751     in the status messages window.
1753     .. tip::
1754         Another option is to use the *Switch to Editor* keybinding - it
1755         reshows the document statistics on the status bar. See `Focus
1756         keybindings`_.
1758 Use Windows File Open/Save dialogs
1759     Defines whether to use the native Windows File Open/Save dialogs or
1760     whether to use the GTK default dialogs.
1762 Auto-focus widgets (focus follows mouse)
1763     Give the focus automatically to widgets below the mouse cursor.
1764     This works for the main editor widget, the scribble, the toolbar search field
1765     goto line fields and the VTE.
1767 Search
1768 ``````
1770 Always wrap search and hide the Find dialog
1771     Always wrap search around the document and hide the Find dialog after clicking
1772     Find Next/Previous.
1774 Use the current word under the cursor for Find dialogs
1775     Use current word under the cursor when opening the Find, Find in Files or Replace dialog and
1776     there is no selection. When this option is disabled, the search term last used in the
1777     appropriate Find dialog is used.
1779 Use the current file's directory for Find in Files
1780     When opening the Find in Files dialog, set the directory to search to the directory of the current
1781     active file. When this option is disabled, the directory of the last use of the Find in Files
1782     dialog is used.
1784 Projects
1785 ````````
1787 Use project-based session files
1788     Save your current session when closing projects. You will be able to
1789     resume different project sessions, automatically opening the files
1790     you had open previously.
1792 Store project file inside the project base directory
1793     When creating new projects, the default path for the project file contains
1794     the project base path. Without this option enabled, the default project file
1795     path is one level above the project base path.
1796     In either case, you can easily set the final project file path in the
1797     *New Project* dialog. This option provides the more common
1798     defaults automatically for convenience.
1801 Interface preferences
1802 ^^^^^^^^^^^^^^^^^^^^^
1804 .. image:: ./images/pref_dialog_interface.png
1806 Sidebar
1807 ```````
1809 Show sidebar
1810     Whether to show the sidebar at all.
1812 Show symbol list
1813     Show the list of functions, variables, and other information in the
1814     current document you are editing.
1816 Show documents list
1817     Show all the documents you have open currently. This can be used to
1818     change between documents (see `Switching between documents`_) and
1819     to perform some common operations such as saving, closing and reloading.
1821 Position
1822     Whether to place the sidebar on the left or right of the editor window.
1824 Fonts
1825 `````
1827 Editor
1828     Change the font used to display documents.
1830 Symbol list
1831     Change the font used for the Symbols sidebar tab.
1833 Message window
1834     Change the font used for the message window area.
1836 Editor tabs
1837 ```````````
1839 Show editor tabs
1840     Show a notebook tab for all documents so you can switch between them
1841     using the mouse (instead of using the Documents window).
1843 Show close buttons
1844     Make each tab show a close button so you can easily close open
1845     documents.
1847 Placement of new file tabs
1848     Whether to create a document with its notebook tab to the left or
1849     right of all existing tabs.
1851 Next to current
1852     Whether to place file tabs next to the current tab
1853     rather than at the edges of the notebook.
1855 Double-clicking hides all additional widgets
1856     Whether to call the View->Toggle All Additional Widgets command
1857     when double-clicking on a notebook tab.
1859 Tab positions
1860 `````````````
1862 Editor
1863     Set the positioning of the editor's notebook tabs to the right,
1864     left, top, or bottom of the editing window.
1866 Sidebar
1867     Set the positioning of the sidebar's notebook tabs to the right,
1868     left, top, or bottom of the sidebar window.
1870 Message window
1871     Set the positioning of the message window's notebook tabs to the
1872     right, left, top, or bottom of the message window.
1874 Miscellaneous
1875 `````````````
1877 Show status bar
1878     Show the status bar at the bottom of the main window. It gives information about
1879     the file you are editing like the line and column you are on, whether any
1880     modifications were done, the file encoding, the filetype and other information.
1883 Toolbar preferences
1884 ^^^^^^^^^^^^^^^^^^^
1886 Affects the main toolbar underneath the menu bar.
1888 .. image:: ./images/pref_dialog_toolbar.png
1890 Toolbar
1891 ```````
1893 Show Toolbar
1894     Whether to show the toolbar.
1896 Append Toolbar to the Menu
1897     Allows to append the toolbar to the main menu bar instead of placing it below.
1898     This is useful to save vertical space.
1900 Customize Toolbar
1901     See `Customizing the toolbar`_.
1903 Appearance
1904 ``````````
1906 Icon Style
1907     Select the toolbar icon style to use - either icons and text, just
1908     icons or just text.
1909     The choice System default uses whatever icon style is set by GTK.
1911 Icon size
1912     Select the size of the icons you see (large, small or very small).
1913     The choice System default uses whatever icon size is set by GTK.
1916 Editor Features preferences
1917 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
1919 .. image:: ./images/pref_dialog_edit_features.png
1921 Features
1922 ````````
1924 Line wrapping
1925     Show long lines wrapped around to new display lines.
1927 "Smart" home key
1928     Whether to move the cursor to the first non-whitespace character
1929     on the line when you hit the home key on your keyboard. Pressing it
1930     again will go to the very start of the line.
1932 Disable Drag and Drop
1933     Do not allow the dragging and dropping of selected text in documents.
1935 Code folding
1936     Allow groups of lines in a document to be collapsed for easier
1937     navigation/editing.
1939 Fold/Unfold all children of a fold point
1940     Whether to fold/unfold all child fold points when a parent line
1941     is folded.
1943 Use indicators to show compile errors
1944     Underline lines with compile errors using red squiggles to indicate
1945     them in the editor area.
1947 Newline strip trailing spaces
1948     Remove any white space at the end of the line when you hit the
1949     Enter/Return key.
1951 Line breaking column
1952     The editor column number to insert a newline at when Line Breaking
1953     is enabled for the current document.
1955 Comment toggle marker
1956     A string which is added when toggling a line comment in a source file.
1957     It is used to mark the comment as toggled.
1960 Editor Indentation preferences
1961 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1963 .. image:: ./images/pref_dialog_edit_indentation.png
1965 Indentation group
1966 `````````````````
1968 See `Indentation`_ for more information.
1970 Type
1971     When Geany inserts indentation, whether to use:
1973     * Just Tabs
1974     * Just Spaces
1975     * Tabs and Spaces, depending on how much indentation is on a line
1977     The *Tabs and Spaces* indent type is also known as *Soft tab
1978     support* in some other editors.
1980 Width
1981     The width of a single indent size in spaces. By default the indent
1982     size is equivalent to 4 spaces.
1984 Detect from file
1985     Try to detect and set the indent type based on file content, when
1986     a file is opened.
1988 Auto-indent mode
1989     The type of auto-indentation you wish to use after pressing Enter,
1990     if any.
1992     Basic
1993         Just add the indentation of the previous line.
1994     Current chars
1995         Add indentation based on the current filetype and any characters at
1996         the end of the line such as ``{``, ``}`` for C, ``:`` for Python.
1997     Match braces
1998         Like *Current chars* but for C-like languages, make a closing
1999         ``}`` brace line up with the matching opening brace.
2001 Tab key indents
2002     If set, pressing tab will indent the current line or selection, and
2003     unindent when pressing Shift-tab. Otherwise, the tab key will
2004     insert a tab character into the document (which can be different
2005     from indentation, depending on the indent type).
2007     .. note::
2008         There are also separate configurable keybindings for indent &
2009         unindent, but this preference allows the tab key to have different
2010         meanings in different contexts - e.g. for snippet completion.
2012 Editor Completions preferences
2013 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2015 .. image:: ./images/pref_dialog_edit_completions.png
2017 Completions
2018 ```````````
2020 Snippet Completion
2021     Whether to replace special keywords after typing Tab into a
2022     pre-defined text snippet.
2023     See `User-definable snippets`_.
2025 XML/HTML tag auto-closing
2026     When you open an XML/HTML tag automatically generate its
2027     completion tag.
2029 Automatic continuation multi-line comments
2030     Continue automatically multi-line comments in languages like C, C++
2031     and Java when a new line is entered inside such a comment.
2032     With this option enabled, Geany will insert a ``*`` on every new line
2033     inside a multi-line comment, for example when you press return in the
2034     following C code::
2036      /*
2037       * This is a C multi-line comment, press <Return>
2039     then Geany would insert::
2041       *
2043     on the next line with the correct indentation based on the previous line,
2044     as long as the multi-line is not closed by ``*/``.
2046 Autocomplete symbols
2047     When you start to type a symbol name, look for the full string to
2048     allow it to be completed for you.
2050 Autocomplete all words in document
2051     When you start to type a word, Geany will search the whole document for
2052     words starting with the typed part to complete it, assuming there
2053     are no tag names to show.
2055 Drop rest of word on completion
2056     Remove any word part to the right of the cursor when choosing a
2057     completion list item.
2059 Characters to type for autocompletion
2060     Number of characters of a word to type before autocompletion is
2061     displayed.
2063 Completion list height
2064     The number of rows to display for the autocompletion window.
2066 Max. symbol name suggestions
2067     The maximum number of items in the autocompletion list.
2070 Auto-close quotes and brackets
2071 ``````````````````````````````
2073 Geany can automatically insert a closing bracket and quote characters when
2074 you open them. For instance, you type a ``(`` and Geany will automatically
2075 insert ``)``. With the following options, you can define for which
2076 characters this should work.
2078 Parenthesis ( )
2079     Auto-close parenthesis when typing an opening one
2081 Curly brackets { }
2082     Auto-close curly brackets (braces) when typing an opening one
2084 Square brackets [ ]
2085     Auto-close square brackets when typing an opening one
2087 Single quotes ' '
2088     Auto-close single quotes when typing an opening one
2090 Double quotes " "
2091     Auto-close double quotes when typing an opening one
2094 Editor Display preferences
2095 ^^^^^^^^^^^^^^^^^^^^^^^^^^
2097 This is for visual elements displayed in the editor window.
2099 .. image:: ./images/pref_dialog_edit_display.png
2101 Display
2102 ```````
2104 Invert syntax highlighting colors
2105     Invert all colors, by default this makes white text on a black
2106     background.
2108 Show indendation guides
2109     Show vertical lines to help show how much leading indentation there
2110     is on each line.
2112 Show whitespaces
2113     Mark all tabs with an arrow "-->" symbol and spaces with dots to
2114     show which kinds of whitespace are used.
2116 Show line endings
2117     Display a symbol everywhere that a carriage return or line feed
2118     is present.
2120 Show line numbers
2121     Show or hide the Line Number margin.
2123 Show markers margin
2124     Show or hide the small margin right of the line numbers, which is used
2125     to mark lines.
2127 Stop scrolling at last line
2128     When enabled Geany stops scrolling when at the last line of the document.
2129     Otherwise you can scroll one more page even if there are no real lines.
2132 Long line marker
2133 ````````````````
2135 The long line marker helps to indicate overly-long lines, or as a hint
2136 to the user for when to break the line.
2138 Type
2139     Line
2140         Show a thin vertical line in the editor window at the given column
2141         position.
2142     Background
2143         Change the background color of characters after the given column
2144         position to the color set below. (This is recommended over the
2145         *Line* setting if you use proportional fonts).
2146     Disabled
2147         Don't mark long lines at all.
2149 Long line marker
2150     Set this value to a value greater than zero to specify the column
2151     where it should appear.
2153 Long line marker color
2154     Set the color of the long line marker.
2157 Virtual spaces
2158 ``````````````
2160 Virtual space is space beyond the end of each line.
2161 The cursor may be moved into virtual space but no real space will be
2162 added to the document until there is some text typed or some other
2163 text insertion command is used.
2165 Disabled
2166     Do not show virtual spaces
2168 Only for rectangular selections
2169     Only show virtual spaces beyond the end of lines when drawing a rectangular selection
2171 Always
2172     Always show virtual spaces beyond the end of lines
2175 Files preferences
2176 ^^^^^^^^^^^^^^^^^
2178 .. image:: ./images/pref_dialog_files.png
2180 New files
2181 `````````
2183 Open new documents from the command-line
2184     Whether to create new documents when passing filenames that don't
2185     exist from the command-line.
2187 Default encoding (new files)
2188     The type of file encoding you wish to use when creating files.
2190 Used fixed encoding when opening files
2191     Assume all files you are opening are using the type of encoding specified below.
2193 Default encoding (existing files)
2194     Opens all files with the specified encoding instead of auto-detecting it.
2195     Use this option when it's not possible for Geany to detect the exact encoding.
2197 Default end of line characters
2198     The end of line characters to which should be used for new files.
2199     On Windows systems, you generally want to use CR/LF which are the common
2200     characters to mark line breaks.
2201     On Unix-like systems, LF is default and CR is used on MAC systems.
2203 Saving files
2204 ````````````
2205 Perform formatting operations when a document is saved. These
2206 can each be undone with the Undo command.
2208 Ensure newline at file end
2209     Add a newline at the end of the document if one is missing.
2211 Ensure consistent line endings
2212     Ensures that newline characters always get converted before
2213     saving, avoiding mixed line endings in the same file.
2215 Strip trailing spaces
2216     Remove the trailing spaces on each line of the document.
2218 Replace tabs by space
2219     Replace all tabs in the document with the equivalent number of spaces.
2221     .. note::
2222         It is better to use spaces to indent than use this preference - see
2223         `Indentation`_.
2225 Miscellaneous
2226 `````````````
2228 Recent files list length
2229     The number of files to remember in the recently used files list.
2231 Disk check timeout
2232     The number of seconds to periodically check the current document's
2233     file on disk in case it has changed. Setting it to 0 will disable
2234     this feature.
2236     .. note::
2237         These checks are only performed on local files. Remote files are
2238         not checked for changes due to performance issues
2239         (remote files are files in ``~/.gvfs/``).
2242 Tools preferences
2243 ^^^^^^^^^^^^^^^^^
2245 .. image:: ./images/pref_dialog_tools.png
2247 Tool paths
2248 ``````````
2250 Terminal
2251     The location of your terminal executable.
2253 Browser
2254     The location of your web browser executable.
2256 Grep
2257     The location of the grep executable.
2259 .. note::
2260     For Windows users: at the time of writing it is recommended to use
2261     the grep.exe from the UnxUtils project
2262     (http://sourceforge.net/projects/unxutils). The grep.exe from the
2263     Mingw project for instance might not work with Geany at the moment.
2265 Commands
2266 ````````
2268 Context action
2269     Set this to a command to execute on the current word.
2270     You can use the "%s" wildcard to pass the current word below the cursor
2271     to the specified command.
2274 Template preferences
2275 ^^^^^^^^^^^^^^^^^^^^
2277 This data is used as meta data for various template text to insert into
2278 a document, such as the file header. You only need to set fields that
2279 you want to use in your template files.
2281 .. note::
2282     For changes made here to take effect, you must either select
2283     *Tools->Reload Configuration* or restart Geany.
2285 .. image:: ./images/pref_dialog_templ.png
2287 Template data
2288 `````````````
2290 Developer
2291     The name of the developer who will be creating files.
2293 Initials
2294     The initials of the developer.
2296 Mail address
2297     The email address of the developer.
2299     .. note::
2300         You may wish to add anti-spam markup, e.g. ``name<at>site<dot>ext``.
2302 Company
2303     The company the developer is working for.
2305 Initial version
2306     The initial version of files you will be creating.
2308 Year
2309     Specify a format for the the {year} wildcard. You can use any conversion specifiers
2310     which can be used with the ANSI C strftime function.  For details please see
2311     http://man.cx/strftime.
2313 Date
2314     Specify a format for the the {date} wildcard. You can use any conversion specifiers
2315     which can be used with the ANSI C strftime function.  For details please see
2316     http://man.cx/strftime.
2318 Date & Time
2319     Specify a format for the the {datetime} wildcard. You can use any conversion specifiers
2320     which can be used with the ANSI C strftime function.  For details please see
2321     http://man.cx/strftime.
2324 Keybinding preferences
2325 ^^^^^^^^^^^^^^^^^^^^^^
2327 .. image:: ./images/pref_dialog_keys.png
2329 There are some commands listed in the keybinding dialog that are not, by default,
2330 bound to a key combination, and may not be available as a menu item.
2332 .. note::
2333     For more information see the section `Keybindings`_.
2336 Printing preferences
2337 ^^^^^^^^^^^^^^^^^^^^
2339 .. image:: ./images/pref_dialog_printing.png
2341 Use external command for printing
2342     Use a system command to print your file out.
2344 Use native GTK printing
2345     Let the GTK GUI toolkit handle your print request.
2347 Print line numbers
2348     Print the line numbers on the left of your paper.
2350 Print page number
2351     Print the page number on the bottom right of your paper.
2353 Print page header
2354     Print a header on every page that is sent to the printer.
2356 Use base name of the printed file
2357     Don't use the entire path for the header, only the filename.
2359 Date format
2360     How the date should be printed. You can use the same format
2361     specifiers as in the ANSI C function strftime(). For details please
2362     see http://man.cx/strftime.
2365 Terminal (VTE) preferences
2366 ^^^^^^^^^^^^^^^^^^^^^^^^^^
2368 See also: `Virtual terminal emulator widget (VTE)`_.
2370 .. image:: ./images/pref_dialog_vte.png
2372 Terminal widget
2373 ```````````````
2375 Terminal font
2376     Select the font that will be used in the terminal emulation control.
2378 Foreground color
2379     Select the font color.
2381 Background color
2382     Select the background color of the terminal.
2384 Scrollback lines
2385     The number of lines buffered so that you can scroll though the history.
2387 Shell
2388     The location of the shell on your system.
2390 Scroll on keystroke
2391     Scroll the terminal to the prompt line when pressing a key.
2393 Scroll on output
2394     Scroll the output down.
2396 Cursor blinks
2397     Let the terminal cursor blink.
2399 Override Geany keybindings
2400     Allow the VTE to receive keyboard shortcuts (apart from focus commands).
2402 Disable menu shortcut key (F10 by default)
2403     Disable the menu shortcut when you are in the virtual terminal.
2405 Follow path of the current file
2406     Make the path of the terminal change according to the path of the
2407     current file.
2409 Execute programs in VTE
2410     Execute programs in the virtual terminal instead of using the external
2411     terminal tool.  Note that if you run multiple execute commands at once
2412     the output may become mixed together in the VTE.
2414 Don't use run script
2415     Don't use the simple run script which is usually used to display
2416     the exit status of the executed program.
2417     This can be useful if you already have a program running in the VTE
2418     like a Python console (e.g. ipython). Use this with care.
2421 Project Management
2422 ------------------
2424 Project Management is optional in Geany. Currently it can be used for:
2426 * Storing and opening session files on a project basis.
2427 * Overriding default settings with project equivalents.
2428 * Configuring the Build menu on a project basis.
2430 A list of session files can be stored and opened with the project
2431 when the *Use project-based session files* preference is enabled,
2432 in the *Project* group of the `Preferences`_ dialog.
2434 As long as a project is open, the Build menu will use
2435 the items defined in project's settings, instead of the defaults.
2436 See `Build Menu Configuration`_ for information on configuring the menu.
2438 The current project's settings are saved when it is closed, or when
2439 Geany is shutdown. When restarting Geany, the previously opened project
2440 file that was in use at the end of the last session will be reopened.
2442 The project menu items are detailed below.
2445 New Project
2446 ^^^^^^^^^^^
2448 To create a new project, fill in the *Name* field. By default this
2449 will setup a new project file ``~/projects/name.geany``. Usually it's
2450 best to store all your project files in the same directory (they are
2451 independent of any source directory trees).
2453 The Base path text field is setup to use ``~/projects/name``. This
2454 can safely be set to any existing path -- it will not touch the file
2455 structure contained in it.
2458 Project Properties
2459 ^^^^^^^^^^^^^^^^^^
2461 You can set an optional description for the project. Currently it's
2462 only used for a template wildcard - see `Template wildcards`_.
2464 The *Base path* field is used as the directory to run the Build menu commands.
2465 The specified path can be an absolute path or it is considered to be
2466 relative to the project's file name.
2468 The *Indentation* tab allows you to override the default
2469 `Indentation`_ settings.
2472 Open Project
2473 ^^^^^^^^^^^^
2475 The Open command displays a standard file chooser, starting in
2476 ``~/projects``. Choose a project file named with the ``.geany``
2477 extension.
2479 When project session support is enabled, Geany will close the currently
2480 open files and open the session files associated with the project.
2483 Close Project
2484 ^^^^^^^^^^^^^
2486 Project file settings are saved when the project is closed.
2488 When project session support is enabled, Geany will close the project
2489 session files and open any previously closed default session files.
2492 Build Menu
2493 ----------
2494 After editing code with Geany, the next step is to compile, link, build,
2495 interpret, run etc.  As Geany supports many languages each with a different
2496 approach to such operations, and as there are also many language independent
2497 software building systems, Geany does not have a built-in build system, nor
2498 does it limit which system you can use.  Instead the build menu provides
2499 a configurable and flexible means of running any external commands to
2500 execute your preferred build system.
2502 This section provides a description of the default configuration of the
2503 build menu and then covers how to configure it, and where the defaults fit in.
2505 Running the commands from within Geany has two benefits:
2507 * The current file is automatically saved before the command is run.
2508 * The output is captured in the Compiler notebook tab and parsed for
2509   warnings or errors.
2511 Warnings and errors that can be parsed for line numbers will be shown in
2512 red in the Compiler tab and you can click on them to switch to the relevant
2513 source file (or open it) and mark the line number.  Also lines with
2514 warnings or errors are marked in the source, see `Indicators`_ below.
2516 .. tip::
2517     If Geany's default error message parsing does not parse errors for
2518     the tool you're using, you can set a custom regex in the Build Commands
2519     Dialog, see `Build Menu Configuration`_.
2521 Indicators
2522 ^^^^^^^^^^
2524 Indicators are red squiggly underlines which are used to highlight
2525 errors which occurred while compiling the current file. So you can
2526 easily see where your code failed to compile. You can remove them by
2527 selecting *Remove Error Indicators* in the Document menu.
2529 If you do not like this feature, you can disable it - see `Editor Features
2530 preferences`_.
2533 Default Build Menu Items
2534 ^^^^^^^^^^^^^^^^^^^^^^^^
2535 Depending on the current file's filetype, the default Build menu will contain
2536 the following items:
2538 * Compile
2539 * Build
2540 * Make All
2541 * Make Custom Target
2542 * Make Object
2543 * Next Error
2544 * Previous Error
2545 * Execute
2546 * Set Build Menu Commands
2549 Compile
2550 ```````
2552 The Compile command has different uses for different kinds of files.
2554 For compilable languages such as C and C++, the Compile command is
2555 set up to compile the current source file into a binary object file.
2557 Java source files will be compiled to class file bytecode.
2559 Interpreted languages such as Perl, Python, Ruby will compile to
2560 bytecode if the language supports it, or will run a syntax check,
2561 or if that is not available will run the file in its language interpreter.
2563 Build
2564 `````
2566 For compilable languages such as C and C++, the Build command will link
2567 the current source file's equivalent object file into an executable. If
2568 the object file does not exist, the source will be compiled and linked
2569 in one step, producing just the executable binary.
2571 Interpreted languages do not use the Build command.
2573 .. note::
2574     If you need complex settings for your build system, or several
2575     different settings, then writing a Makefile and using the Make
2576     commands is recommended; this will also make it easier for users to
2577     build your software.
2580 Make
2581 ````
2583 This runs "make" in the same directory as the
2584 current file.
2586 Make custom target
2587 ``````````````````
2589 This is similar to running 'Make' but you will be prompted for
2590 the make target name to be passed to the Make tool. For example,
2591 typing 'clean' in the dialog prompt will run "make clean".
2594 Make object
2595 ```````````
2597 Make object will run "make current_file.o" in the same directory as
2598 the current file, using the filename for 'current_file'. It is useful
2599 for building just the current file without building the whole project.
2601 Next Error
2602 ``````````
2604 The next error item will move to the next detected error in the file.
2606 Previous Error
2607 ``````````````
2608 The previous error item will move to the previous detected error in the file.
2610 Execute
2611 ```````
2613 Execute will run the corresponding executable file, shell script or
2614 interpreted script in a terminal window. Note that the Terminal tool
2615 path must be correctly set in the Tools tab of the Preferences dialog -
2616 you can use any terminal program that runs a Bourne compatible shell
2617 and accept the "-e" command line argument to start a command or can be
2618 selected to use the built-in VTE if it is available - see
2619 `Virtual terminal emulator widget (VTE)`_.
2621 After your program or script has finished executing, you will be
2622 prompted to press the return key. This allows you to review any text
2623 output from the program before the terminal window is closed.
2625 .. note::
2626     The execute command output is not parsed for errors.
2629 Stopping running processes
2630 ``````````````````````````
2632 When there is a running program, the Execute menu item in the menu and
2633 the Run button in the toolbar
2634 each become a stop button so you can stop the current running program (and
2635 any child processes). This works by sending the SIGQUIT signal to the process.
2637 Depending on the process you started it is possible that the process
2638 cannot be stopped. For example this can happen when the process creates
2639 more than one child process.
2642 Terminal emulators
2643 ******************
2645 Xterm is known to work properly. If you are using "Terminal"
2646 (the terminal program of Xfce), you should add the command line
2647 option ``--disable-server`` otherwise the started process cannot be
2648 stopped. Just add this option in the preferences dialog on the Tools
2649 tab in the terminal field.
2652 Set Build Commands
2653 ``````````````````
2655 By default Compile, Build and Execute are fairly basic commands. You
2656 may wish to customise them using *Set Build Commands*.
2658 E.g. for C you can add any include paths and compile flags for the
2659 compiler, any library names and paths for the linker, and any
2660 arguments you want to use when running Execute.
2662 Build Menu Configuration
2663 ^^^^^^^^^^^^^^^^^^^^^^^^
2665 The build menu has considerable flexibility and configurability, allowing
2666 both menu labels the commands they execute and the directory they execute
2667 in to be configured.
2669 For example, if you change one of the default make commands to run say 'waf'
2670 you can also change the label to match.
2672 These settings are saved automatically when Geany is shut down.
2674 The build menu is divided into four groups of items each with different
2675 behaviors:
2677 * Filetype build commands - are configurable and depend on the filetype of the
2678   current document; they capture output in the compiler tab and parse it for
2679   errors.
2680 * Independent build commands - are configurable and mostly don't depend on the
2681   filetype of the current document; they also capture output in the
2682   compiler tab and parse it for errors.
2683 * Execute commands - are configurable and intended for executing your
2684   program or other long running programs.  The output is not parsed for errors
2685   and is directed to the terminal selected in preferences.
2686 * Fixed commands - these perform built-in actions:
2688   * Go to the next error.
2689   * Go to the previous error.
2690   * Show the build menu commands dialog.
2692 The maximum numbers of items in each of the configurable groups can be
2693 configured when Geany starts using hidden settings (see `Preferences File Format`_).
2694 Even though the maximum number of items may have been increased, only
2695 those menu items that have values configured are shown in the menu.
2697 The groups of menu items obtain their configuration from four potential
2698 sources.  The highest priority source that has the menu item defined will
2699 be used. The sources in decreasing priority are:
2701 * A project file if open
2702 * The user preferences
2703 * The system filetype definitions
2704 * The defaults
2706 The detailed relationships between sources and the configurable menu item groups
2707 is shown in the following table.
2709 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
2710 | Group        | Project File        | Preferences              | System Filetype   |  Defaults                     |
2711 +==============+=====================+==========================+===================+===============================+
2712 | Filetype     | Loads From: project | Loads From:              | Loads From:       | None                          |
2713 |              | file                | filetype.xxx file in     | filetype.xxx in   |                               |
2714 |              |                     | ~/.config/geany/filedefs | Geany install     |                               |
2715 |              | Saves To: project   |                          |                   |                               |
2716 |              | file                | Saves to: as above,      | Saves to: as user |                               |
2717 |              |                     | creating if needed.      | preferences left. |                               |
2718 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
2719 | Filetype     | Loads From: project | Loads From:              | Loads From:       | 1:                            |
2720 | Independent  | file                | geany.conf file in       | filetype.xxx in   |   Label: _Make                |
2721 |              |                     | ~/.config/geany          | Geany install     |   Command: make               |
2722 |              | Saves To: project   |                          |                   |                               |
2723 |              | file                | Saves to: as above,      | Saves to: as user | 2:                            |
2724 |              |                     | creating if needed.      | preferences left. |    Label: Make Custom _Target |
2725 |              |                     |                          |                   |    Command: make              |
2726 |              |                     |                          |                   |                               |
2727 |              |                     |                          |                   | 3:                            |
2728 |              |                     |                          |                   |    Label: Make _Object        |
2729 |              |                     |                          |                   |    Command: make %e.o         |
2730 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
2731 | Execute      | Loads From: project | Loads From:              | Loads From:       | Label: _Execute               |
2732 |              | file or else        | geany.conf file in       | filetype.xxx in   | Command: ./%e                 |
2733 |              | filetype defined in | ~/.config/geany or else  | Geany install     |                               |
2734 |              | project file        | filetype.xxx file in     |                   |                               |
2735 |              |                     | ~/.config/geany/filedefs | Saves To: as user |                               |
2736 |              | Saves To:           |                          | preferences left. |                               |
2737 |              | project file        | Saves To:                |                   |                               |
2738 |              |                     | filetype.xxx file in     |                   |                               |
2739 |              |                     | ~/.config/geany/filedefs |                   |                               |
2740 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
2742 The following notes on the table reference cells by coordinate as (group,source):
2744 * General - for filetype.xxx substitute the filetype name of the
2745   current document for xxx.
2747 * System Filetypes - Labels loaded from these sources are locale sensitive
2748   and can contain translations.
2750 * (Filetype, Project File) and (Filetype, Preferences) - preferences use a full
2751   filetype file so that users can configure all other filetype preferences
2752   as well.  Projects can only configure menu items per filetype.  Saving
2753   in the project file means that there is only one file per project not
2754   a whole directory.
2756 * (Filetype-Independent, System Filetype) - although conceptually strange, defining
2757   filetype-independent commands in a filetype file, this provides the ability to
2758   define filetype dependent default menu items.
2760 * (Execute, Project File) and (Execute, Preferences) - the project independent
2761   execute and preferences independent execute commands can only be set by hand
2762   editing the appropriate file, see `Preferences File Format`_ and `Project File
2763   Format`_.
2765 Build Menu Commands Dialog
2766 ^^^^^^^^^^^^^^^^^^^^^^^^^^
2768 Most of the configuration of the build menu is done through the Build Menu
2769 Commands Dialog.  You edit the configuration sourced from preferences in the
2770 dialog opened from the Build->Build Menu Commands item and you edit the
2771 configuration from the project in the build tab of the project preferences
2772 dialog.  Both use the same form shown below.
2774 .. image:: ./images/build_menu_commands_dialog.png
2776 The dialog is divided into three sections:
2778 * Filetype build commands (selected based on the current document's filetype).
2779 * Independent build commands (available regardless of filetype).
2780 * Filetype execute commands.
2782 The filetype and independent sections also each contain a field for the regular
2783 expression used for parsing command output for error and warning messages.
2785 The columns in the first three sections allow setting of the label, command,
2786 and working directory to run the command in.
2788 An item with an empty label will not be shown in the menu.
2790 An empty working directory will default to the directory of the current document.
2791 If there is no current document then the command will not run.
2793 The dialog will always show the command selected by priority, not just the
2794 commands configured in this configuration source. This ensures that you always
2795 see what the menu item is going to do if activated.
2797 If the current source of the menu item is higher priority than the
2798 configuration source you are editing then the command will be shown
2799 in the dialog but will be insensitive (greyed out).  This can't happen
2800 with the project source but can with the preferences source dialog.
2802 The clear buttons remove the definition from the configuration source you are editing.
2803 When you do this the command from the next lower priority source will be shown.
2804 To hide lower priority menu items without having anything show in the menu
2805 configure with a nothing in the label but at least one character in the command.
2807 Substitutions in Commands and Working Directories
2808 `````````````````````````````````````````````````
2810 The first occurence of each of the following character sequences in each of the
2811 command and working directory fields is substituted by the items specified below
2812 before the command is run.
2814 * %d - substituted by the absolute path to the directory of the current file.
2815 * %e - substituted by the name of the current file without the extension or path.
2816 * %f - substituted by the name of the current file without the path.
2817 * %p - if a project is open, substituted by the base path from the project.
2819 .. note::
2820    If the basepath set in the project preferences is not an absolute path , then it is
2821    taken as relative to the directory of the project file.  This allows a project file
2822    stored in the source tree to specify all commands and working directories relative
2823    to the tree itself, so that the whole tree including the project file, can be moved
2824    and even checked into and out of version control without having to re-configure the
2825    build menu.
2827 Build Menu Keyboard Shortcuts
2828 `````````````````````````````
2830 Keyboard shortcuts can be defined for the first two filetype menu items, the first three
2831 independent menu items, the first two execute menu items and the fixed menu items.
2832 In the keybindings configuration dialog (see `Keybinding preferences`_)
2833 these items are identified by the default labels shown in the `Build Menu`_ section above.
2835 It is currently not possible to bind keyboard shortcuts to more than these menu items.
2837 You can also use underlines in the labels to set mnemonic characters.
2839 Old settings
2840 ````````````
2842 The configurable Build Menu capability was introduced in Geany 0.19 and
2843 required a new section to be added to the configuration files (See
2844 `Preferences File Format`_).  Geany will still load older format project,
2845 preferences and filetype file settings and will attempt to map them into the new
2846 configuration format.  There is not a simple clean mapping between the formats.
2847 The mapping used produces the most sensible results for the majority of cases.
2848 However, if they do not map the way you want, you may have to manually
2849 configure some settings using the Build Commands
2850 Dialog or the Build tab of the project preferences dialog.
2852 Any setting configured in either of these dialogs will override settings mapped from
2853 older format configuration files.
2855 Printing support
2856 ----------------
2858 Since Geany 0.13 there has been printing support using GTK's printing API.
2859 The printed page(s) will look nearly the same as on your screen in Geany.
2860 Additionally, there are some options to modify the printed page(s).
2862 .. note::
2863     The background text color is set to white, except for text with
2864     a white foreground. This allows dark color schemes to save ink
2865     when printing.
2867 You can define whether to print line numbers, page numbers at the bottom of
2868 each page and whether to print a page header on each page. This header
2869 contains the filename of the printed document, the current page number and
2870 the date and time of printing. By default, the file name of the document
2871 with full path information is added to the header. If you prefer to add
2872 only the basename of the file(without any path information) you can set it
2873 in the preferences dialog. You can also adjust the format of the date and
2874 time added to the page header. The available conversion specifiers are the
2875 same as the ones which can be used with the ANSI C strftime function.
2877 All of these settings can also be changed in the print dialog just before
2878 actual printing is done.
2879 On Unix-like systems the provided print dialog offers a print preview. The
2880 preview file is opened with a PDF viewer and by default GTK uses ``evince``
2881 for print preview. If you have not installed evince or just want to use
2882 another PDF viewer, you can change the program to use in the file
2883 ``.gtkrc-2.0`` (usually found in your home directory). Simply add a line
2884 like::
2886     gtk-print-preview-command = "epdfview %f"
2888 at the end of the file. Of course, you can also use xpdf, kpdf or whatever
2889 as the print preview command.
2891 Unfortunately, native GTK printing support is only available if Geany was
2892 built against GTK 2.10 (or above) **and** is running with GTK 2.10 (or above).
2893 If not, Geany provides basic printing support. This means you can print a
2894 file by passing the filename of the current file to a command which
2895 actually prints the file. However, the printed document contains no syntax
2896 highlighting. You can adjust the command to which the filename is
2897 passed in the preferences dialog. The default command is::
2899     % lpr %f
2901 ``%f`` will be substituted by the filename of the current file. Geany
2902 will not show errors from the command itself, so you should make
2903 sure that it works before(e.g. by trying to execute it from the
2904 command line).
2906 A nicer example, which many prefer is::
2908     % a2ps -1 --medium=A4 -o - %f | xfprint4
2910 But this depends on a2ps and xfprint4. As a replacement for xfprint4,
2911 gtklp or similar programs can be used.
2915 Plugins
2916 -------
2918 Plugins are loaded at startup, if the *Enable plugin support*
2919 general preference is set. There is also a command-line option,
2920 ``-p``, which prevents plugins being loaded. Plugins are scanned in
2921 the following directories:
2923 * ``$prefix/lib/geany`` (see `Installation prefix`_)
2924 * The ``plugins`` subfolder of the user configuration directory - see
2925   `Configuration file paths`_.
2926 * The `Extra plugin path` preference (usually blank) - see `Paths`_.
2928 Most plugins add menu items to the *Tools* menu when they are loaded.
2930 See also `Plugin documentation`_ for information about single plugins
2931 which are included in Geany.
2933 Plugin Manager
2934 ^^^^^^^^^^^^^^
2935 The Plugin Manager dialog lets you choose which plugins
2936 should be loaded at startup. You can also load and unload plugins on the
2937 fly using this dialog. Once you click the checkbox for a specific plugin
2938 in the dialog, it is loaded or unloaded according to its previous state.
2939 By default, no plugins are loaded at startup until you select some.
2940 You can also configure some plugin specific options if the plugin
2941 provides any.
2944 Keybindings
2945 -----------
2947 Geany supports the default keyboard shortcuts for the Scintilla
2948 editing widget. For a list of these commands, see `Scintilla
2949 keyboard commands`_. The Scintilla keyboard shortcuts will be overridden
2950 by any custom keybindings with the same keyboard shortcut.
2953 Switching documents
2954 ^^^^^^^^^^^^^^^^^^^
2956 There are a few non-configurable bindings to switch between documents,
2957 listed below. These can also be overridden by custom keybindings.
2959 =============== ==================================
2960 Key             Action
2961 =============== ==================================
2962 Alt-[1-9]       Select left-most tab, from 1 to 9.
2963 Alt-0           Select right-most tab.
2964 Ctrl-Shift-PgUp Select left-most tab.
2965 Ctrl-Shift-PgDn Select right-most tab.
2966 =============== ==================================
2969 Configurable keybindings
2970 ^^^^^^^^^^^^^^^^^^^^^^^^
2972 For all actions listed below you can define your own keybindings. Open
2973 the Preferences dialog, select the desired action and click on
2974 change. In the resulting dialog you can press the key combination you
2975 want to assign to the action and it will be saved when you press OK.
2976 You can define only one key combination for each action and each key
2977 combination can only be defined for one action.
2979 Some of the default key combinations are common across many
2980 applications, for example *Ctrl-N* for New and *Ctrl-O* for Open.
2981 Because they are so common it is not advisable to change these, but
2982 you can add other key combinations for these actions. For example
2983 *Ctrl-O* is set to execute menu_open by default, but you can also
2984 define *Alt-O*, so that the file open dialog is shown by pressing
2985 either *Ctrl-O* or *Alt-O*.
2987 The following tables list all customizable keyboard shortcuts, those
2988 which are common to many applications are marked with (C) after the
2989 shortcut.
2991 File keybindings
2992 ````````````````
2993 =============================== ========================= ==================================================
2994 Action                          Default shortcut          Description
2995 =============================== ========================= ==================================================
2996 New                             Ctrl-N  (C)               Creates a new file.
2998 Open                            Ctrl-O  (C)               Opens a file.
3000 Open selected file              Ctrl-Shift-O              Opens the selected filename.
3002 Re-open last closed tab                                   Re-opens the last closed document tab.
3004 Save                            Ctrl-S  (C)               Saves the current file.
3006 Save As                                                   Saves the current file under a new name.
3008 Save all                        Ctrl-Shift-S              Saves all open files.
3010 Close all                       Ctrl-Shift-W              Closes all open files.
3012 Close                           Ctrl-W  (C)               Closes the current file.
3014 Reload file                     Ctrl-R  (C)               Reloads the current file. All unsaved changes
3015                                                           will be lost.
3017 Print                           Ctrl-P  (C)               Prints the current file.
3018 =============================== ========================= ==================================================
3021 Editor keybindings
3022 ``````````````````
3023 =============================== ========================= ==================================================
3024 Action                          Default shortcut          Description
3025 =============================== ========================= ==================================================
3026 Undo                            Ctrl-Z  (C)               Un-does the last action.
3028 Redo                            Ctrl-Y                    Re-does the last action.
3030 Delete current line(s)          Ctrl-K                    Deletes the current line (and any lines with a
3031                                                           selection).
3033 Delete to line end              Ctrl-Shift-Delete         Deletes from the current caret position to the
3034                                                           end of the current line.
3036 Duplicate line or selection     Ctrl-D                    Duplicates the current line or selection.
3038 Transpose current line          Ctrl-T                    Transposes the current line with the previous one.
3040 Scroll to current line          Ctrl-Shift-L              Scrolls the current line into the centre of the
3041                                                           view. The cursor position and or an existing
3042                                                           selection will not be changed.
3044 Scroll up by one line           Alt-Up                    Scrolls the view.
3046 Scroll down by one line         Alt-Down                  Scrolls the view.
3048 Complete word                   Ctrl-Space                Shows the autocompletion list. If already showing
3049                                                           tag completion, it shows document word completion
3050                                                           instead, even if it is not enabled for automatic
3051                                                           completion. Likewise if no tag suggestions are
3052                                                           available, it shows document word completion.
3054 Show calltip                    Ctrl-Shift-Space          Shows a calltip for the current function or
3055                                                           method.
3057 Show macro list                 Ctrl-Return               Shows a list of available macros and variables in
3058                                                           the workspace.
3060 Complete snippet                Tab                       If you type a construct like if or for and press
3061                                                           this key, it will be completed with a matching
3062                                                           template.
3064 Suppress snippet completion                               If you type a construct like if or for and press
3065                                                           this key, it will not be completed, and a space or
3066                                                           tab will be inserted, depending on what the
3067                                                           construct completion keybinding is set to. For
3068                                                           example, if you have set the construct completion
3069                                                           keybinding to space, then setting this to
3070                                                           Shift+space will prevent construct completion and
3071                                                           insert a space.
3073 Context Action                                            Executes a command and passes the current word
3074                                                           (near the cursor position) or selection as an
3075                                                           argument. See the section called `Context
3076                                                           actions`_.
3078 Move cursor in snippet                                    Jumps to the next defined cursor positions in a
3079                                                           completed snippets if multiple cursor positions
3080                                                           where defined.
3082 Word part completion            Tab                       When the autocompletion list is visible, complete
3083                                                           the currently selected item up to the next word
3084                                                           part.
3086 Move line(s) up                                           Move the current line or selected lines up by
3087                                                           one line.
3089 Move line(s) down                                         Move the current line or selected lines down by
3090                                                           one line.
3091 =============================== ========================= ==================================================
3094 Clipboard keybindings
3095 `````````````````````
3096 =============================== ========================= ==================================================
3097 Action                          Default shortcut          Description
3098 =============================== ========================= ==================================================
3099 Cut                             Ctrl-X  (C)               Cut the current selection to the clipboard.
3101 Copy                            Ctrl-C  (C)               Copy the current selection to the clipboard.
3103 Paste                           Ctrl-V  (C)               Paste the clipboard text into the current document.
3105 Cut current line(s)             Ctrl-Shift-X              Cuts the current line (and any lines with a
3106                                                           selection) to the clipboard.
3108 Copy current line(s)            Ctrl-Shift-C              Copies the current line (and any lines with a
3109                                                           selection) to the clipboard.
3110 =============================== ========================= ==================================================
3113 Select keybindings
3114 ``````````````````
3115 =============================== ========================= ==================================================
3116 Action                          Default shortcut          Description
3117 =============================== ========================= ==================================================
3118 Select all                      Ctrl-A  (C)               Makes a selection of all text in the current
3119                                                           document.
3121 Select current word             Alt-Shift-W               Selects the current word under the cursor.
3123 Select current paragraph        Alt-Shift-P               Selects the current paragraph under the cursor
3124                                                           which is defined by two empty lines around it.
3126 Select current line(s)          Alt-Shift-L               Selects the current line under the cursor (and any
3127                                                           partially selected lines).
3129 Select to previous word part                              (Extend) selection to previous word part boundary.
3131 Select to next word part                                  (Extend) selection to next word part boundary.
3132 =============================== ========================= ==================================================
3135 Insert keybindings
3136 ``````````````````
3137 =============================== ========================= ==================================================
3138 Action                          Default shortcut          Description
3139 =============================== ========================= ==================================================
3140 Insert date                     Shift-Alt-D               Inserts a customisable date.
3142 Insert alternative whitespace                             Inserts a tab character when spaces should
3143                                                           be used for indentation and inserts space
3144                                                           characters of the amount of a tab width when
3145                                                           tabs should be used for indentation.
3147 Insert New Line Before Current                            Inserts a new line with indentation.
3149 Insert New Line After Current                             Inserts a new line with indentation.
3150 =============================== ========================= ==================================================
3153 Format keybindings
3154 ``````````````````
3155 =============================== ========================= ==================================================
3156 Action                          Default shortcut          Description
3157 =============================== ========================= ==================================================
3158 Toggle case of selection        Ctrl-Alt-U                Changes the case of the selection. A lowercase
3159                                                           selection will be changed into uppercase and vice
3160                                                           versa. If the selection contains lower- and
3161                                                           uppercase characters, all will be converted to
3162                                                           lowercase.
3164 Comment line                                              Comments current line or selection.
3166 Uncomment line                                            Uncomments current line or selection.
3168 Toggle line commentation        Ctrl-E                    Comments a line if it is not commented or removes
3169                                                           a comment if the line is commented.
3171 Increase indent                 Ctrl-I                    Indents the current line or selection by one tab
3172                                                           or by spaces in the amount of the tab width
3173                                                           setting.
3175 Decrease indent                 Ctrl-U                    Removes one tab or the amount of spaces of
3176                                                           the tab width setting from the indentation of the
3177                                                           current line or selection.
3179 Increase indent by one space                              Indents the current line or selection by one
3180                                                           space.
3182 Decrease indent by one space                              Deindents the current line or selection by one
3183                                                           space.
3185 Smart line indent                                         Indents the current line or all selected lines
3186                                                           with the same indentation as the previous line.
3188 Send to Custom Command 1 (2,3)  Ctrl-1 (2,3)              Passes the current selection to a configured
3189                                                           external command (available for the first
3190                                                           three configured commands, see
3191                                                           `Sending text through custom commands`_ for
3192                                                           details).
3194 Send Selection to Terminal                                Sends the current selection or the current
3195                                                           line (if there is no selection) to the
3196                                                           embedded Terminal (VTE).
3198 Reflow lines/block                                        Reformat selected lines or current
3199                                                           (indented) text block,
3200                                                           breaking lines at the long line marker or the
3201                                                           line breaking column if line breaking is
3202                                                           enabled for the current document.
3203 =============================== ========================= ==================================================
3206 Settings keybindings
3207 ````````````````````
3208 =============================== ========================= ==================================================
3209 Action                          Default shortcut          Description
3210 =============================== ========================= ==================================================
3211 Preferences                     Ctrl-Alt-P                Opens preferences dialog.
3213 Plugin Preferences                                        Opens plugin preferences dialog.
3214 =============================== ========================= ==================================================
3217 Search keybindings
3218 ``````````````````
3219 =============================== ========================= ==================================================
3220 Action                          Default shortcut          Description
3221 =============================== ========================= ==================================================
3222 Find                            Ctrl-F  (C)               Opens the Find dialog.
3224 Find Next                       Ctrl-G                    Finds next result.
3226 Find Previous                   Ctrl-Shift-G              Finds previous result.
3228 Find Next Selection                                       Finds next occurence of selected text.
3230 Find Previous Selection                                   Finds previous occurence of selected text.
3232 Replace                         Ctrl-H  (C)               Opens the Replace dialog.
3234 Find in files                   Ctrl-Shift-F              Opens the Find in files dialog.
3236 Next message                                              Jumps to the line with the next message in
3237                                                           the Messages window.
3239 Previous message                                          Jumps to the line with the previous message
3240                                                           in the Messages window.
3242 Find Usage                                                Finds all occurrences of the current word (near
3243                                                           the keyboard cursor) or selection in all open
3244                                                           documents and displays them in the messages
3245                                                           window.
3247 Find Document Usage                                       Finds all occurrences of the current word (near
3248                                                           the keyboard cursor) or selection in the current
3249                                                           document and displays them in the messages
3250                                                           window.
3252 Mark All                        Ctrl-Shift-M              Highlight all matches of the current
3253                                                           word/selection in the current document
3254                                                           with a colored box. If there's nothing to
3255                                                           find, highlighted matches will be cleared.
3256 =============================== ========================= ==================================================
3259 Go to keybindings
3260 `````````````````
3261 =============================== ========================= ==================================================
3262 Action                          Default shortcut          Description
3263 =============================== ========================= ==================================================
3264 Navigate forward a location                               Switches to the next location in the navigation
3265                                                           history. See the section called `Code Navigation
3266                                                           History`_.
3268 Navigate back a location                                  Switches to the previous location in the
3269                                                           navigation history. See the section called
3270                                                           `Code navigation history`_.
3272 Go to line                      Ctrl-L                    Focuses the Go to Line entry (if visible) or
3273                                                           shows the Go to line dialog.
3275 Goto matching brace             Ctrl-B                    If the cursor is ahead or behind a brace, then it
3276                                                           is moved to the brace which belongs to the current
3277                                                           one. If this keyboard shortcut is pressed again,
3278                                                           the cursor is moved back to the first brace.
3280 Toggle marker                   Ctrl-M                    Set a marker on the current line, or clear the
3281                                                           marker if there already is one.
3283 Goto next marker                Ctrl-.                    Goto the next marker in the current document.
3285 Goto previous marker            Ctrl-,                    Goto the previous marker in the current document.
3287 Go to tag definition                                      Jump to the definition of the current word (near
3288                                                           the keyboard cursor). If the definition cannot be
3289                                                           found (e.g. the relevant file is not open) Geany
3290                                                           will beep and do nothing. See the section called
3291                                                           `Go to tag definition`_.
3293 Go to tag declaration                                     Jump to the declaration of the current word (near
3294                                                           the keyboard cursor). If the declaration cannot be
3295                                                           found (e.g. the relevant file is not open) Geany
3296                                                           will beep and do nothing. See the section called
3297                                                           `Go to tag declaration`_.
3299 Go to Start of Line             Home                      Move the caret to the end of the line indentation
3300                                                           unless it is already there, in which case it moves
3301                                                           it to the start of the line.
3303 Go to End of Line               End                       Move the caret to the end of the line.
3305 Go to End of Display Line       Alt-End                   Move the caret to the end of the display line.
3306                                                           This is useful when you use line wrapping and
3307                                                           want to jump to the end of the wrapped, virtual
3308                                                           line, not the real end of the whole line.
3309                                                           If the line is not wrapped, it behaves like
3310                                                           `Go to End of Line`, see above.
3312 Go to Previous Word Part        Ctrl-/                    Goto the previous part of the current word.
3314 Go to Next Word Part            Ctrl-\                    Goto the next part of the current word.
3315 =============================== ========================= ==================================================
3317 View keybindings
3318 ````````````````
3319 =============================== ========================= ==================================================
3320 Action                          Default shortcut          Description
3321 =============================== ========================= ==================================================
3322 Fullscreen                      F11  (C)                  Switches to fullscreen mode.
3324 Toggle Messages Window                                    Toggles the message window (status and compiler
3325                                                           messages) on and off.
3327 Toggle Sidebar                                            Shows or hides the sidebar.
3329 Toggle all additional widgets                             Hide and show all additional widgets like the
3330                                                           notebook tabs, the toolbar, the messages window
3331                                                           and the status bar.
3333 Zoom In                         Ctrl-+  (C)               Zooms in the text.
3335 Zoom Out                        Ctrl--  (C)               Zooms out the text.
3337 Zoom Reset                      Ctrl-0                    Reset any previous zoom on the text.
3338 =============================== ========================= ==================================================
3340 Focus keybindings
3341 `````````````````
3342 ================================ ========================= ==================================================
3343 Action                           Default shortcut          Description
3344 ================================ ========================= ==================================================
3345 Switch to Editor                 F2                        Switches to editor widget.
3346                                                            Also reshows the document statistics line
3347                                                            (after a short timeout).
3349 Switch to Search Bar             F7                        Switches to the search bar in the toolbar (if
3350                                                            visible).
3352 Switch to Message Window                                   Focus the Message Window's current tab.
3354 Switch to Compiler                                         Focus the Compiler message window tab.
3356 Switch to Messages                                         Focus the Messages message window tab.
3358 Switch to Scribble               F6                        Switches to scribble widget.
3360 Switch to VTE                    F4                        Switches to VTE widget.
3362 Switch to Sidebar                                          Focus the Sidebar.
3364 Switch to Sidebar Symbol List                              Focus the Symbol list tab in the Sidebar
3365                                                            (if visible).
3367 Switch to Sidebar Document List                            Focus the Document list tab in the Sidebar
3368                                                            (if visible).
3369 ================================ ========================= ==================================================
3372 Notebook tab keybindings
3373 ````````````````````````
3374 =============================== ========================= ==================================================
3375 Action                          Default shortcut          Description
3376 =============================== ========================= ==================================================
3377 Switch to left document         Ctrl-PageUp   (C)         Switches to the previous open document.
3379 Switch to right document        Ctrl-PageDown (C)         Switches to the next open document.
3381 Switch to last used document    Ctrl-Tab                  Switches to the previously shown document (if it's
3382                                                           still open).
3383                                                           Holding Ctrl (or another modifier if the keybinding
3384                                                           has been changed) will show a dialog, then repeated
3385                                                           presses of the keybinding will switch to the 2nd-last
3386                                                           used document, 3rd-last, etc. Also known as
3387                                                           Most-Recently-Used documents switching.
3389 Move document left              Alt-PageUp                Changes the current document with the left hand
3390                                                           one.
3392 Move document right             Alt-PageDown              Changes the current document with the right hand
3393                                                           one.
3395 Move document first                                       Moves the current document to the first position.
3397 Move document last                                        Moves the current document to the last position.
3398 =============================== ========================= ==================================================
3401 Document keybindings
3402 ````````````````````
3403 =============================== ========================= ==================================================
3404 Action                          Default shortcut          Description
3405 =============================== ========================= ==================================================
3406 Replace tabs by space                                     Replaces all tabs with the right amount of spaces.
3408 Replace spaces by tabs                                    Replaces all spaces with tab characters.
3410 Toggle current fold                                       Toggles the folding state of the current code block.
3412 Fold all                                                  Folds all contractible code blocks.
3414 Unfold all                                                Unfolds all contracted code blocks.
3416 Reload symbol list              Ctrl-Shift-R              Reloads the tag/symbol list.
3418 Toggle Line wrapping                                      Enables or disables wrapping of long lines.
3420 Toggle Line breaking                                      Enables or disables automatic breaking of long
3421                                                           lines at a configurable column.
3423 Remove Markers                                            Remove any markers on lines or words which
3424                                                           were set by using 'Mark All' in the
3425                                                           search dialog or by manually marking lines.
3427 Remove Error Indicators                                   Remove any error indicators in the
3428                                                           current document.
3429 =============================== ========================= ==================================================
3432 Build keybindings
3433 `````````````````
3434 =============================== ========================= ==================================================
3435 Action                          Default shortcut          Description
3436 =============================== ========================= ==================================================
3437 Compile                         F8                        Compiles the current file.
3439 Build                           F9                        Builds (compiles if necessary and links) the
3440                                                           current file.
3442 Make all                        Shift-F9                  Builds the current file with the Make tool.
3444 Make custom target              Ctrl-Shift-F9             Builds the current file with the Make tool and a
3445                                                           given target.
3447 Make object                                               Compiles the current file with the Make tool.
3449 Next error                                                Jumps to the line with the next error from the
3450                                                           last build process.
3452 Previous error                                            Jumps to the line with the previous error from
3453                                                           the last build process.
3455 Run                             F5                        Executes the current file in a terminal emulation.
3457 Set Build Commands                                        Opens the build commands dialog.
3458 =============================== ========================= ==================================================
3461 Tools keybindings
3462 `````````````````
3463 =============================== ========================= ==================================================
3464 Action                          Default shortcut          Description
3465 =============================== ========================= ==================================================
3466 Show Color Chooser                                        Opens the Color Chooser dialog.
3467 =============================== ========================= ==================================================
3470 Help keybindings
3471 ````````````````
3472 =============================== ========================= ==================================================
3473 Action                          Default shortcut          Description
3474 =============================== ========================= ==================================================
3475 Help                            F1 (C)                       Opens the manual.
3476 =============================== ========================= ==================================================
3481 Configuration files
3482 ===================
3483 .. warning::
3484     You must use UTF-8 encoding *without BOM* for configuration files.
3487 Configuration file paths
3488 ------------------------
3489 Geany has default configuration files installed for the system and
3490 also per-user configuration files.
3492 The system files should not normally be edited because they will be
3493 overwritten when upgrading Geany.
3495 The user configuration directory can be overridden with the ``-c``
3496 switch, but this is not normally done. See `Command line options`_.
3498 .. note::
3499     Any missing subdirectories in the user configuration directory
3500     will be created when Geany starts.
3502 You can check the paths Geany is using with *Help->Debug Messages*.
3503 Near the top there should be 2 lines with something like::
3505     Geany-INFO: System data dir: /usr/share/geany
3506     Geany-INFO: User config dir: /home/username/.config/geany
3509 Paths on Unix-like systems
3510 ^^^^^^^^^^^^^^^^^^^^^^^^^^
3511 The system path is ``$prefix/share/geany``, where ``$prefix`` is the
3512 path where Geany is installed (see `Installation prefix`_).
3514 The user configuration directory is normally
3515 ``/home/username/.config/geany/``.
3518 Tools menu items
3519 ----------------
3520 There's a *Configuration files* submenu in the *Tools* menu that
3521 contains items for some of the available user configuration files.
3522 Clicking on one opens it in the editor for you to update. Geany will
3523 reload the file after you have saved it.
3525 .. note::
3526     Other configuration files not shown here will need to be opened
3527     manually, and will not be automatically reloaded when saved.
3528     (see *Reload Configuration* below).
3530 There's also a *Reload Configuration* item which can be used if you
3531 updated one of the other configuration files, or modified or added
3532 template files.
3534 *Reload Configuration* is also necessary to update syntax highlighting colors.
3536 .. note::
3537     Syntax highlighting colors aren't updated in open documents after
3538     saving filetypes.common as this may take a significant
3539     amount of time.
3542 Global configuration file
3543 -------------------------
3545 System administrators can add a global configuration file for Geany
3546 which will be used when starting Geany and a user configuration file
3547 does not exist.
3549 The global configuration file is read from ``geany.conf`` in the
3550 system configuration path - see `Configuration file paths`_. It can
3551 contain any settings which are found in the usual configuration file
3552 created by Geany, but does not have to contain all settings.
3554 .. note::
3555     This feature is mainly intended for package maintainers or system
3556     admins who want to set up Geany in a multi user environment and
3557     set some sane default values for this environment. Usually users won't
3558     need to do that.
3562 Filetype definition files
3563 -------------------------
3565 All color definitions and other filetype specific settings are
3566 stored in the filetype definition files. Those settings are colors
3567 for syntax highlighting, general settings like comment characters or
3568 word delimiter characters as well as compiler and linker settings.
3570 See also `Configuration file paths`_.
3572 Custom filetypes
3573 ^^^^^^^^^^^^^^^^
3574 At startup Geany looks for ``filetypes.*.conf`` files in the system and
3575 user filetype paths, adding any filetypes found with the name matching
3576 the '``*``' wildcard.
3578 Custom filetypes are not as powerful as built-in filetypes, but the following
3579 have been implemented:
3581 * Recognizing and setting the filetype (after the user has manually edited
3582   ``filetype_extensions.conf``).
3583 * Filetype settings in the [settings] section (see `Filetype configuration`_).
3584     * Using existing tag parsing (``tag_parser`` key).
3585     * Using existing syntax highlighting (``lexer_filetype`` key).
3586 * Build commands.
3587 * Loading global tags files (namespace will be shared with tag_parser
3588   type).
3590 System files
3591 ^^^^^^^^^^^^
3592 The system-wide filetype configuration files can be found in the
3593 system configuration path and are called ``filetypes.$ext``,
3594 where $ext is the name of the filetype. For every
3595 filetype there is a corresponding definition file. There is one
3596 exception: ``filetypes.common`` -- this file is for general settings,
3597 which are not specific to a certain filetype.
3599 .. warning::
3600     It is not recommended that users edit the system-wide files,
3601     because they will be overridden when Geany is updated.
3603 User files
3604 ^^^^^^^^^^
3605 To change the settings, copy a file from the system configuration
3606 path to the subdirectory ``filedefs`` in your user configuration
3607 directory. Then you can edit the file and the changes will still be
3608 available after an update of Geany.
3610 Alternatively, you can create the file yourself and add only the
3611 settings you want to change. All missing settings will be read from
3612 the corresponding system configuration file.
3615 Filetype configuration
3616 ^^^^^^^^^^^^^^^^^^^^^^
3618 As well as the sections listed below, each filetype file can contain
3619 a [build-menu] section as described in `[build-menu] Section`_.
3621 [styling] Section
3622 `````````````````
3624 In this section the colors for syntax highlighting are defined. The
3625 manual format is:
3627 * ``key=foreground_color;background_color;bold_flag;italic_flag``
3629 Colors have to be specified as RGB hex values prefixed by
3630 0x. For example red is 0xff0000, blue is 0x0000ff. The values are
3631 case-insensitive, but it is a good idea to use small letters. Bold
3632 and italic are flags and should only be "true" or "false". If their
3633 value is something other than "true" or "false", "false" is assumed.
3635 You can omit fields to use the values from the style named ``"default"``.
3637 E.g. ``key=0xff0000;;true``
3639 This makes the key style have red foreground text, default background
3640 color text and bold emphasis.
3642 Using a named style
3643 *******************
3644 The second format uses a *named style* name to reference a style
3645 defined in filetypes.common.
3647 * ``key=named_style``
3648 * ``key2=named_style2,bold,italic``
3650 The bold and italic parts are optional, and if present are used to
3651 toggle the bold or italic flags to the opposite of the named style's
3652 flags. In contrast to style definition booleans, they are a literal
3653 ",bold,italic" and commas are used instead of semi-colons.
3655 E.g. ``key=comment,italic``
3657 This makes the key style match the ``"comment"`` named style, but with
3658 italic emphasis.
3660 To define named styles, see the filetypes.common `[named_styles]
3661 Section`_.
3664 [keywords] Section
3665 ``````````````````
3667 This section contains keys for different keyword lists specific to
3668 the filetype. Some filetypes do not support keywords, so adding a
3669 new key will not work. You can only add or remove keywords to/from
3670 an existing list.
3672 .. important::
3673     The keywords list must be in one line without line ending characters.
3676 [lexer_properties] Section
3677 ``````````````````````````
3678 Here any special properties for the Scintilla lexer can be set in the
3679 format ``key.name.field=some.value``.
3681 Properties Geany uses are listed in the system filetype files. To find
3682 other properties you need Geany's source code::
3684     egrep -o 'GetProperty\w*\("([^"]+)"[^)]+\)' scintilla/Lex*.cxx
3687 [settings] Section
3688 ``````````````````
3690 extension
3691     This is the default file extension used when saving files, not
3692     including the period character (``.``). The extension used should
3693     match one of the patterns associated with that filetype (see
3694     `Filetype extensions`_).
3696     *Example:* ``extension=cxx``
3698 wordchars
3699     These characters define word boundaries when making selections
3700     and searching using word matching options.
3702     *Example:* (look at system filetypes.\* files)
3704     .. note::
3705         This can be overridden by the *whitespace_chars*
3706         filetypes.common setting.
3708 comment_open
3709     A character or string which is used to comment code. If you want to
3710     use multiline comments, also set comment_close, otherwise leave it
3711     empty.
3713     *Example:* ``comment_open=/*``
3715 comment_close
3716     If multiline comments are used, this is the character or string to
3717     close the comment.
3719     *Example:* ``comment_close=*/``
3721 comment_use_indent
3722     Set this to false if a comment character or string should start at
3723     column 0 of a line. If set to true it uses any indentation of the
3724     line.
3726     Note: Comment indentation
3728     ``comment_use_indent=true`` would generate this if a line is
3729     commented (e.g. with Ctrl-D)::
3731         #command_example();
3733     ``comment_use_indent=false`` would generate this if a line is
3734     commented (e.g. with Ctrl-D)::
3736         #   command_example();
3739     Note: This setting only works for single line comments (like '//',
3740     '#' or ';').
3742     *Example:* ``comment_use_indent=true``
3744 context_action_cmd
3745     A command which can be executed on the current word or the current
3746     selection.
3748     Example usage: Open the API documentation for the
3749     current function call at the cursor position.
3751     The command can
3752     be set for every filetype or if not set, a global command will
3753     be used. The command itself can be specified without the full
3754     path, then it is searched in $PATH. But for security reasons,
3755     it is recommended to specify the full path to the command. The
3756     wildcard %s will be replaced by the current word at the cursor
3757     position or by the current selection.
3759     Hint: for PHP files the following could be quite useful:
3760     context_action_cmd=firefox "http://www.php.net/%s"
3762     *Example:* ``context_action_cmd=devhelp -s "%s"``
3764 tag_parser
3765     The TagManager language name, e.g. "C".
3767 lexer_filetype
3768     A filetype name to setup syntax highlighting from another filetype.
3769     This must not be recursive, i.e. it should be a filetype name that
3770     doesn't use the lexer_filetype key itself.
3772 symbol_list_sort_mode
3773     What the default symbol list sort order should be.
3775     =====   =====================================
3776     Value   Meaning
3777     =====   =====================================
3778     0       Sort tags by name
3779     1       Sort tags by appearance (line number)
3780     =====   =====================================
3782 .. _xml_indent_tags:
3784 xml_indent_tags
3785     If this setting is set to *true*, a new line after a line ending with an
3786     unclosed XML/HTML tag will be automatically indented. This only applies
3787     to filetypes for which the HTML or XML lexer is used. Such filetypes have
3788     this setting in their system configuration files.
3791 [build_settings] Section
3792 ````````````````````````
3794 As of Geany 0.19 this section is supplemented by the `[build-menu] Section`_.
3795 Values that are set in the [build-menu] section will override those in this section.
3797 error_regex
3798     This is a GNU-style extended regular expression to parse a filename
3799     and line number from build output. If undefined, Geany will fall
3800     back to its default error message parsing.
3802     Only the first two matches will be read by Geany. Geany will look for
3803     a match that is purely digits, and use this for the line number. The
3804     remaining match will be used as the filename.
3806     *Example:* ``error_regex=(.+):([0-9]+):[0-9]+``
3808     This will parse a message such as:
3809     ``test.py:7:24: E202 whitespace before ']'``
3811 **Build commands**
3813 If any build menu item settings have been configured in the Build Menu Commands
3814 dialog or the Build tab of the project preferences dialog then these
3815 settings are stored in the [build-menu] section and override the settings in
3816 this section for that item.
3818 compiler
3819     This item specifies the command to compile source code files. But
3820     it is also possible to use it with interpreted languages like Perl
3821     or Python. With these filetypes you can use this option as a kind of
3822     syntax parser, which sends output to the compiler message window.
3824     You should quote the filename to also support filenames with
3825     spaces. The following wildcards for filenames are available:
3827     * %f -- complete filename without path
3828     * %e -- filename without path and without extension
3830     *Example:* ``compiler=gcc -Wall -c "%f"``
3832 linker
3833     This item specifies the command to link the file. If the file is not
3834     already compiled, it will be compiled while linking. The -o option
3835     is automatically added by Geany. This item works well with GNU gcc,
3836     but may be problematic with other compilers (esp. with the linker).
3838     *Example:* ``linker=gcc -Wall "%f"``
3840 run_cmd
3841     Use this item to execute your file. It has to have been built
3842     already. Use the %e wildcard to have only the name of the executable
3843     (i.e. without extension) or use the %f wildcard if you need the
3844     complete filename, e.g. for shell scripts.
3846     *Example:* ``run_cmd="./%e"``
3849 Special file filetypes.common
3850 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3852 There is a special filetype definition file called
3853 filetypes.common. This file defines some general non-filetype-specific
3854 settings.
3856 .. note::
3857     See the `Filetype configuration`_ section for how to define styles.
3860 [named_styles] Section
3861 ``````````````````````
3862 Named styles declared here can be used in the [styling] section of any
3863 filetypes.* file.
3865 For example:
3867 *In filetypes.common*::
3869     [named_styles]
3870     foo=0xc00000;0xffffff;false;true
3871     bar=foo
3873 *In filetypes.c*::
3875     [styling]
3876     comment=foo
3878 This saves copying and pasting the whole style definition into several
3879 different files.
3881 .. note::
3882     You can define aliases for named styles, as shown with the ``bar``
3883     entry in the above example, but they must be declared after the
3884     original style.
3887 [styling] Section
3888 `````````````````
3889 default
3890     This is the default style. It is used for styling files without a
3891     filetype set.
3893     *Example:* ``default=0x000000;0xffffff;false;false``
3895 selection
3896     The style for coloring selected text. The format is:
3898     * Foreground color
3899     * Background color
3900     * Use foreground color
3901     * Use background color
3903     The colors are only set if the 3rd or 4th argument is true. When
3904     the colors are not overridden, the default is a dark grey
3905     background with syntax highlighted foreground text.
3907     *Example:* ``selection=0xc0c0c0;0x00007F;true;true``
3909 brace_good
3910     The style for brace highlighting when a matching brace was found.
3912     *Example:* ``brace_good=0xff0000;0xFFFFFF;true;false``
3914 brace_bad
3915     The style for brace highlighting when no matching brace was found.
3917     *Example:* ``brace_bad=0x0000ff;0xFFFFFF;true;false``
3919 caret
3920     The style for coloring the caret(the blinking cursor). Only first
3921     and third argument is interpreted.
3922     Set the third argument to true to change the caret into a block caret.
3924     *Example:* ``caret=0x000000;0x0;false;false``
3926 caret_width
3927     The width for the caret(the blinking cursor). Only the first
3928     argument is interpreted. The width is specified in pixels with
3929     a maximum of three pixel. Use the width 0 to make the caret
3930     invisible.
3932     *Example:* ``caret=1;0;false;false``
3934 current_line
3935     The style for coloring the background of the current line. Only
3936     the second and third arguments are interpreted. The second argument
3937     is the background color. Use the third argument to enable or
3938     disable background highlighting for the current line (has to be
3939     true/false).
3941     *Example:* ``current_line=0x0;0xe5e5e5;true;false``
3943 indent_guide
3944     The style for coloring the indentation guides. Only the first and
3945     second arguments are interpreted.
3947     *Example:* ``indent_guide=0xc0c0c0;0xffffff;false;false``
3949 white_space
3950     The style for coloring the white space if it is shown. The first
3951     both arguments define the foreground and background colors, the
3952     third argument sets whether to use the defined foreground color
3953     or to use the color defined by each filetype for the white space.
3954     The fourth argument defines whether to use the background color.
3956     *Example:* ``white_space=0xc0c0c0;0xffffff;true;true``
3958 margin_linenumber
3959     Line number margin foreground and background colors.
3961 .. _Folding Settings:
3963 margin_folding
3964     Fold margin foreground and background colors.
3966 fold_symbol_highlight
3967     Highlight color of folding symbols.
3969 folding_style
3970     The style of folding icons. Only first and second arguments are
3971     used.
3973     Valid values for the first argument are:
3975     * 1 -- for boxes
3976     * 2 -- for circles
3977     * 3 -- for arrows
3978     * 4 -- for +/-
3980     Valid values for the second argument are:
3982     * 0 -- for no lines
3983     * 1 -- for straight lines
3984     * 2 -- for curved lines
3986     *Default:* ``folding_style=1;1;``
3988     *Arrows:* ``folding_style=3;0;``
3990 folding_horiz_line
3991     Draw a thin horizontal line at the line where text is folded. Only
3992     first argument is used.
3994     Valid values for the first argument are:
3996     * 0 -- disable, do not draw a line
3997     * 1 -- draw the line above folded text
3998     * 2 -- draw the line below folded text
4000     *Example:* ``folding_horiz_line=0;0;false;false``
4002 line_wrap_visuals
4003     First argument: drawing of visual flags to indicate a line is wrapped.
4004     This is a bitmask of the values:
4006     * 0 -- No visual flags
4007     * 1 -- Visual flag at end of subline of a wrapped line
4008     * 2 -- Visual flag at begin of subline of a wrapped line. Subline is
4009       indented by at least 1 to make room for the flag.
4011     Second argument: wether the visual flags to indicate a line is wrapped
4012     are drawn near the border or near the text. This is a bitmask of the values:
4014     * 0 -- Visual flags drawn near border
4015     * 1 -- Visual flag at end of subline drawn near text
4016     * 2 -- Visual flag at begin of subline drawn near text
4018     Only first and second argument is interpreted.
4020     *Example:* ``line_wrap_visuals=3;0;false;false``
4022 line_wrap_indent
4023     First argument: sets the size of indentation of sublines for wrapped lines
4024     in terms of the width of a space, only used when the second argument is ``0``.
4026     Second argument: wrapped sublines can be indented to the position of their
4027     first subline or one more indent level. Possible values:
4029     * 0 - Wrapped sublines aligned to left of window plus amount set by the first argument
4030     * 1 - Wrapped sublines are aligned to first subline indent (use the same indentation)
4031     * 2 - Wrapped sublines are aligned to first subline indent plus one more level of indentation
4033     Only first and second argument is interpreted.
4035     *Example:* ``line_wrap_indent=0;1;false;false``
4037 translucency
4038     Translucency for the current line (first argument) and the selection
4039     (second argument). Values between 0 and 256 are accepted.
4041     Note for Windows 95, 98 and ME users:
4042     keep this value at 256 to disable translucency otherwise Geany might crash.
4044     Only the first and second argument is interpreted.
4046     *Example:* ``translucency=256;256;false;false``
4048 marker_line
4049     The style for a highlighted line (e.g when using Goto line or goto tag).
4050     The foreground color (first argument) is only used when the Markers margin
4051     is enabled (see View menu).
4053     Only the first and second argument is interpreted.
4055     *Example:* ``marker_line=0x000000;0xffff00;false;false``
4057 marker_search
4058     The style for a marked search results (when using "Mark" in Search dialogs).
4059     The second argument sets the background colour for the drawn rectangle.
4061     Only the second argument is interpreted.
4063     *Example:* ``marker_search=0x000000;0xb8f4b8;false;false``
4065 marker_mark
4066     The style for a marked line (e.g when using the "Toggle Marker" keybinding
4067     (Ctrl-M)). The foreground color (first argument) is only used
4068     when the Markers margin is enabled (see View menu).
4070     Only the first and second argument is interpreted.
4072     *Example:* ``marker_mark=0x000000;0xb8f4b8;false;false``
4074 marker_translucency
4075     Translucency for the line marker (first argument) and the search marker
4076     (second argument). Values between 0 and 256 are accepted.
4078     Note for Windows 95, 98 and ME users:
4079     keep this value at 256 to disable translucency otherwise Geany might crash.
4081     Only the first and second argument is interpreted.
4083     *Example:* ``marker_translucency=256;256;false;false``
4085 line_height
4086     Amount of space to be drawn above and below the line's baseline.
4087     The first argument defines the amount of space to be drawn above the line, the second
4088     argument defines the amount of space to be drawn below.
4090     Only the first and second argument is interpreted.
4092     *Example:* ``line_height=0;0;false;false``
4094 calltips
4095     The style for coloring the calltips. The first two arguments
4096     define the foreground and background colors, the third and fourth
4097     arguments set whether to use the defined colors.
4099     *Example:* ``calltips=0xc0c0c0;0xffffff;false;false``
4102 [settings] Section
4103 ``````````````````
4104 whitespace_chars
4105     Characters to treat as whitespace. These characters are ignored
4106     when moving, selecting and deleting across word boundaries
4107     (see `Scintilla keyboard commands`_).
4109     This should include space (\\s) and tab (\\t).
4111     *Example:* ``whitespace_chars=\s\t!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~``
4115 Filetype extensions
4116 -------------------
4118 To change the default filetype extension used when saving a new file,
4119 see `Filetype definition files`_.
4121 You can override the list of file extensions that Geany uses to detect
4122 filetypes using the user ``filetype_extensions.conf`` file. Use the
4123 *Tools->Configuration Files->filetype_extensions.conf* menu item. See
4124 also `Configuration file paths`_.
4126 You should only list lines for filetype extensions that you want to
4127 override in the user configuration file and remove or comment out
4128 others. The patterns are listed after the ``=`` sign, using a
4129 semi-colon separated list of patterns which should be matched for
4130 that filetype.
4132 For example, to override the filetype extensions for Make, the file
4133 should look like::
4135     [Extensions]
4136     Make=Makefile*;*.mk;Buildfile;
4138 Preferences File Format
4139 -----------------------
4141 The user preferences file ``geany.conf`` holds settings for all the items configured
4142 in the preferences dialog. This file should not be edited while Geany is running
4143 as the file will be overwritten when the preferences in Geany are changed or Geany
4144 is quit.
4147 Hidden preferences
4148 ^^^^^^^^^^^^^^^^^^
4150 There are some rarely used preferences that are not shown in the Preferences
4151 dialog. These can be set by editing the preferences file, then
4152 restarting Geany. Search for the key name, then edit the value. Example:
4154     ``brace_match_ltgt=true``
4156 .. note::
4157     If you just installed or updated Geany, you should restart it
4158     first so Geany can write/update the config file and you can find
4159     the key lines.
4161 The table below show the key names of hidden preferences in the
4162 configuration file.
4164 ================================  ===========================================  ==================
4165 Key                               Description                                  Default
4166 ================================  ===========================================  ==================
4167 **Editor related**
4168 brace_match_ltgt                  Whether to highlight <, > angle brackets.    false
4169 use_gtk_word_boundaries           Whether to look for the end of a word when   true
4170                                   using word-boundary related Scintilla
4171                                   commands (see `Scintilla keyboard
4172                                   commands`_).
4173 complete_snippets_whilst_editing  Whether to allow completion of snippets      false
4174                                   when editing an existing line (i.e. there
4175                                   is some text after the current cursor
4176                                   position on the line). Only used when the
4177                                   keybinding `Complete snippet` is set to
4178                                   ``Space``.
4179 show_editor_scrollbars            Whether to display scrollbars. If set to     true
4180                                   false, the horizontal and vertical
4181                                   scrollbars are hidden completely.
4182 **Interface related**
4183 show_symbol_list_expanders        Whether to show or hide the small expander   true
4184                                   icons on the symbol list treeview (only
4185                                   available with GTK 2.12 or above).
4186 allow_always_save                 Whether files can be saved always, even if   false
4187                                   they don't have any changes. By default,
4188                                   the Save buttons and menu items are
4189                                   disabled when a file is unchanged. When
4190                                   setting this option to true, the Save
4191                                   buttons and menu items are always active
4192                                   and files can be saved.
4193 compiler_tab_autoscroll           Whether to automatically scroll to the       true
4194                                   last line of the output in the Compiler
4195                                   tab.
4196 statusbar_template                The status bar statistics line format.       See below.
4197                                   (Search in src/ui_utils.c for details).
4198 new_document_after_close          Whether to open a new document after all     false
4199                                   documents have been closed.
4200 msgwin_status_visible             Whether to show the Status tab in the        true
4201                                   Messages Window
4202 msgwin_compiler_visible           Whether to show the Compiler tab in the      true
4203                                   Messages Window
4204 msgwin_messages_visible           Whether to show the Messages tab in the      true
4205                                   Messages Window
4206 msgwin_scribble_visible           Whether to show the Scribble tab in the      true
4207                                   Messages Window
4208 ================================  ===========================================  ==================
4210 By default, statusbar_template is empty. This tells Geany to use its
4211 internal default, which is currently:
4213 ``line: %l / %L\t col: %c\t sel: %s\t %w      %t      %mmode: %M      encoding: %e      filetype: %f      scope: %S``
4215 Note that ``\t`` = tab.
4217 ================================  ===========================================  ==================
4218 Key                               Description                                  Default
4219 ================================  ===========================================  ==================
4220 **VTE related**
4221 emulation                         Terminal emulation mode. Only change this    xterm
4222                                   if you have VTE termcap files other than
4223                                   ``vte/termcap/xterm``.
4224 send_selection_unsafe             By default, Geany strips any trailing        false
4225                                   newline characters from the current
4226                                   selection before sending it to the terminal
4227                                   to not execute arbitrary code. This is
4228                                   mainly a security feature.
4229                                   If, for whatever reasons, you really want
4230                                   it to be executed directly, set this option
4231                                   to true.
4232 **File related**
4233 use_safe_file_saving              Defines the mode how Geany saves files to    false
4234                                   disk. If disabled, Geany directly writes
4235                                   the content of the document to disk. This
4236                                   might cause in loss of data when there is
4237                                   no more free space on disk to save the
4238                                   file. When set to true, Geany first saves
4239                                   the contents into a temporary file and if
4240                                   this succeeded, the temporary file is
4241                                   moved to the real file to save.
4242                                   This gives better error checking in case of
4243                                   no more free disk space. But it also
4244                                   destroys hard links of the original file
4245                                   and its permissions (e.g. executable flags
4246                                   are reset). Use this with care as it can
4247                                   break things seriously.
4248                                   The better approach would be to ensure your
4249                                   disk won't run out of free space.
4250 gio_unsafe_save_backup            Make a backup when using GIO unsafe file     false
4251                                   saving. Backup is named `filename~`.
4252 **Search related**
4253 find_selection_type               See `Find selection`_.                       0
4254 **Build Menu related**
4255 number_ft_menu_items              The maximum number of menu items in the      2
4256                                   filetype section of the Build menu.
4257 number_non_ft_menu_items          The maximum number of menu items in the      3
4258                                   independent section of the Build menu.
4259 number_exec_menu_items            The maximum number of menu items in the      2
4260                                   execute section of the Build menu.
4261 ================================  ===========================================  ==================
4263 [build-menu] Section
4264 ^^^^^^^^^^^^^^^^^^^^
4266 The [build-menu] section contains the configuration of the build menu.
4267 This section can occur in filetype, preferences and project files and
4268 always has the format described here.  Different menu items are loaded
4269 from different files, see the table in the `Build Menu Configuration`_
4270 section for details.  All the settings can be configured from the dialogs
4271 except the execute command in filetype files and filetype definitions in
4272 the project file, so these are the only ones which need hand editing.
4274 The build-menu section stores one entry for each setting for each menu item that
4275 is configured.  The keys for these settings have the format:
4277   ``GG_NN_FF``
4279 where:
4281 * GG - is the menu item group,
4283   - FT for filetype
4284   - NF for independent (non-filetype)
4285   - EX for execute
4287 * NN - is a two decimal digit number of the item within the group,
4288   starting at 00
4289 * FF - is the field,
4291   - LB for label
4292   - CM for command
4293   - WD for working directory
4296 Project File Format
4297 -------------------
4299 The project file contains project related settings and possibly a
4300 record of the current session files.
4303 [build-menu] Additions
4304 ^^^^^^^^^^^^^^^^^^^^^^
4306 The project file also can have extra fields in the [build-menu] section
4307 in addition to those listed in `[build-menu] Section`_ above.
4309 When filetype menu items are configured for the project they are stored
4310 in the project file.
4312 The ``filetypes`` entry is a list of the filetypes which exist in the
4313 project file.
4315 For each filetype the entries for that filetype have the format defined in
4316 `[build-menu] Section`_ but the key is prefixed by the name of the filetype
4317 as it appears in the ``filetypes`` entry, eg the entry for the label of
4318 filetype menu item 0 for the C filetype would be
4320   ``CFT_00_LB=Label``
4323 Templates
4324 ---------
4326 Geany supports the following templates:
4328 * ChangeLog entry
4329 * File header
4330 * Function description
4331 * Short GPL notice
4332 * Short BSD notice
4333 * File templates
4335 To use these templates, just open the Edit menu or open the popup menu
4336 by right-clicking in the editor widget, and choose "Insert Comments"
4337 and insert templates as you want.
4339 Some templates (like File header or ChangeLog entry) will always be
4340 inserted at the top of the file.
4342 To insert a function description, the cursor must be inside
4343 of the function, so that the function name can be determined
4344 automatically. The description will be positioned correctly one line
4345 above the function, just check it out. If the cursor is not inside
4346 of a function or the function name cannot be determined, the inserted
4347 function description won't contain the correct function name but "unknown"
4348 instead.
4350 .. note::
4351     Geany automatically reloads template information when it notices you
4352     save a file in the user's template configuration directory. You can
4353     also force this by selecting *Tools->Reload Configuration*.
4356 Template meta data
4357 ^^^^^^^^^^^^^^^^^^
4359 Meta data can be used with all templates, but by default user set
4360 meta data is only used for the ChangeLog and File header templates.
4362 In the configuration dialog you can find a tab "Templates" (see
4363 `Template preferences`_). You can define the default values
4364 which will be inserted in the templates. You should select
4365 *Tools->Reload Configuration* or restart Geany after making changes.
4368 File templates
4369 ^^^^^^^^^^^^^^
4371 File templates are templates used as the basis of a new file. To
4372 use them, choose the *New (with Template)* menu item from the *File*
4373 menu.
4375 By default, file templates are installed for some filetypes. Custom
4376 file templates can be added by creating the appropriate template file. You can
4377 also edit the default file templates.
4379 The file's contents are just the text to place in the document, with
4380 optional template wildcards like ``{fileheader}``. The fileheader
4381 wildcard can be placed anywhere, but it's usually put on the first
4382 line of the file, followed by a blank line.
4384 Custom file templates
4385 `````````````````````
4387 These are read from ``templates/files`` under the `Configuration file
4388 paths`_.
4390 The filetype to use is detected from the template file's extension, if
4391 any. For example, creating a file ``module.c`` would add a menu item
4392 which created a new document with the filetype set to 'C'.
4394 The template file is read from disk when the corresponding menu item is
4395 clicked.
4397 Filetype templates
4398 ``````````````````
4400 .. note::
4401     It's recommended to use custom file templates instead.
4403 Filetype template files are read from the ``~/.config/geany/templates``
4404 directory, and are named "filetype." followed by the filetype
4405 name, e.g. "filetype.python", "filetype.sh", etc. If you are
4406 unsure about the filetype name extensions, they are the same as
4407 the filetype configuration file extensions, commonly installed in
4408 ``/usr/share/geany``, with the prefix "filetypes.".
4410 There is also a template file ``filetype.none`` which is used when
4411 the New command is used without a filetype. This is empty by default.
4414 Customizing templates
4415 ^^^^^^^^^^^^^^^^^^^^^
4417 Each template can be customized to your needs. The templates are
4418 stored in the ``~/.config/geany/templates/`` directory (see the section called
4419 `Command line options`_ for further information about the configuration
4420 directory). Just open the desired template with an editor (ideally,
4421 Geany ;-) ) and edit the template to your needs. There are some
4422 wildcards which will be automatically replaced by Geany at startup.
4425 Template wildcards
4426 ``````````````````
4428 All wildcards must be enclosed by "{" and "}", e.g. {date}.
4430 **Wildcards for character escaping**
4432 ============== ============================================= =======================================
4433 Wildcard       Description                                   Available in
4434 ============== ============================================= =======================================
4435 ob             { Opening Brace (used to prevent other        file templates, file header, snippets.
4436                wildcards being expanded).
4437 cb             } Closing Brace.                              file templates, file header, snippets.
4438 pc             \% Percent (used to escape e.g. %block% in
4439                snippets).                                    snippets.
4440 ============== ============================================= =======================================
4442 **Global wildcards**
4444 These are configurable, see `Template preferences`_.
4446 ============== ============================================= =======================================
4447 Wildcard       Description                                   Available in
4448 ============== ============================================= =======================================
4449 developer      The name of the developer.                    file templates, file header,
4450                                                              function description, ChangeLog entry,
4451                                                              bsd, gpl, snippets.
4453 initial        The developer's initials, e.g. "ET" for       file templates, file header,
4454                Enrico Tröger or "JFD" for John Foobar Doe.   function description, ChangeLog entry,
4455                                                              bsd, gpl, snippets.
4457 mail           The email address of the developer.           file templates, file header,
4458                                                              function description, ChangeLog entry,
4459                                                              bsd, gpl, snippets.
4461 company        The company the developer is working for.     file templates, file header,
4462                                                              function description, ChangeLog entry,
4463                                                              bsd, gpl, snippets.
4465 version        The initial version of a new file.            file templates, file header,
4466                                                              function description, ChangeLog entry,
4467                                                              bsd, gpl, snippets.
4468 ============== ============================================= =======================================
4470 **Date & time wildcards**
4472 The format for these wildcards can be changed in the preferences
4473 dialog, see `Template preferences`_. You can use any conversion
4474 specifiers which can be used with the ANSI C strftime function.
4475 For details please see http://man.cx/strftime.
4477 ============== ============================================= =======================================
4478 Wildcard       Description                                   Available in
4479 ============== ============================================= =======================================
4480 year           The current year. Default format is: YYYY.    file templates, file header,
4481                                                              function description, ChangeLog entry,
4482                                                              bsd, gpl, snippets.
4484 date           The current date. Default format:             file templates, file header,
4485                YYYY-MM-DD.                                   function description, ChangeLog entry,
4486                                                              bsd, gpl, snippets.
4488 datetime       The current date and time. Default format:    file templates, file header,
4489                DD.MM.YYYY HH:mm:ss ZZZZ.                     function description, ChangeLog entry,
4490                                                              bsd, gpl, snippets.
4491 ============== ============================================= =======================================
4493 **Dynamic wildcards**
4495 ============== ============================================= =======================================
4496 Wildcard       Description                                   Available in
4497 ============== ============================================= =======================================
4498 untitled       The string "untitled" (this will be           file templates, file header,
4499                translated to your locale), used in           function description, ChangeLog entry,
4500                file templates.                               bsd, gpl, snippets.
4502 geanyversion   The actual Geany version, e.g.                file templates, file header,
4503                "Geany |(version)|".                          function description, ChangeLog entry,
4504                                                              bsd, gpl, snippets.
4506 filename       The filename of the current file.             file header, snippets, file
4507                For new files, it's only replaced when        templates.
4508                first saving if found on the first 3 lines
4509                of the file.
4511 project        The current project's name, if any.           file header, snippets, file templates.
4513 description    The current project's description, if any.    file header, snippets, file templates.
4515 functionname   The function name of the function at the      function description.
4516                cursor position. This wildcard will only be
4517                replaced in the function description
4518                template.
4520 command:path   Executes the specified command and replace    file templates, file header,
4521                the wildcard with the command's standard      function description, ChangeLog entry,
4522                output. See `Special {command:} wildcard`_    bsd, gpl, snippets.
4523                for details.
4524 ============== ============================================= =======================================
4526 **Template insertion wildcards**
4528 ============== ============================================= =======================================
4529 Wildcard       Description                                   Available in
4530 ============== ============================================= =======================================
4531 gpl            This wildcard inserts a short GPL notice.     file header.
4533 bsd            This wildcard inserts a BSD licence notice.   file header.
4535 fileheader     The file header template. This wildcard       snippets, file templates.
4536                will only be replaced in filetype
4537                templates.
4538 ============== ============================================= =======================================
4541 Special {command:} wildcard
4542 ***************************
4544 The {command:} wildcard is a special one because it can execute
4545 a specified command and put the command's output (stdout) into
4546 the template.
4548 Example::
4550     {command:uname -a}
4552 will result in::
4554     Linux localhost 2.6.9-023stab046.2-smp #1 SMP Mon Dec 10 15:04:55 MSK 2007 x86_64 GNU/Linux
4556 Using this wildcard you can insert nearly any arbitrary text into the
4557 template.
4559 In the environment of the executed command the variables
4560 ``GEANY_FILENAME``, ``GEANY_FILETYPE`` and ``GEANY_FUNCNAME`` are set.
4561 The value of these variables is filled in only if Geany knows about it.
4562 For example, ``GEANY_FUNCNAME`` is only filled within the function
4563 description template. However, these variables are ``always`` set,
4564 just maybe with an empty value.
4565 You can easily access them e.g. within an executed shell script using::
4567     $GEANY_FILENAME
4570 .. note::
4571     If the specified command could not be found or not executed, the wildcard is substituted
4572     by an empty string. In such cases, you can find the occurred error message on Geany's
4573     standard error and in the Help->Debug Messages dialog.
4576 Customizing the toolbar
4577 -----------------------
4579 You can add, remove and reorder the elements in the toolbar by using
4580 the toolbar editor, or by manually editing the configuration file
4581 ``ui_toolbar.xml``.
4583 The toolbar editor can be opened from the preferences editor on the Toolbar tab or
4584 by right-clicking on the toolbar itself and choosing it from the menu.
4586 Manually editing the toolbar layout
4587 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4589 To override the system-wide configuration file, copy it to your user
4590 configuration directory (see `Configuration file paths`_).
4592 For example::
4594     % cp /usr/local/share/geany/ui_toolbar.xml /home/username/.config/geany/
4596 Then edit it and add any of the available elements listed in the file or remove
4597 any of the existing elements. Of course, you can also reorder the elements as
4598 you wish and add or remove additional separators.
4599 This file must be valid XML, otherwise the global toolbar UI definition
4600 will be used instead.
4602 Your changes are applied once you save the file.
4604 .. note::
4605     (1) You cannot add new actions which are not listed below.
4606     (2) Everything you add or change must be inside the /ui/toolbar/ path.
4609 Available toolbar elements
4610 ^^^^^^^^^^^^^^^^^^^^^^^^^^
4612 ================== ==============================================================================
4613 Element name       Description
4614 ================== ==============================================================================
4615 New                Create a new file
4616 Open               Open an existing file
4617 Save               Save the current file
4618 SaveAll            Save all open files
4619 Reload             Reload the current file from disk
4620 Close              Close the current file
4621 CloseAll           Close all open files
4622 Print              Print the current file
4623 Cut                Cut the current selection
4624 Copy               Copy the current selection
4625 Paste              Paste the contents of the clipboard
4626 Delete             Delete the current selection
4627 Undo               Undo the last modification
4628 Redo               Redo the last modification
4629 NavBack            Navigate back a location
4630 NavFor             Navigate forward a location
4631 Compile            Compile the current file
4632 Build              Build the current file, includes a submenu for Make commands. Geany
4633                    remembers the last chosen action from the submenu and uses this as default
4634                    action when the button itself is clicked.
4635 Run                Run or view the current file
4636 Color              Open a color chooser dialog, to interactively pick colors from a palette
4637 ZoomIn             Zoom in the text
4638 ZoomOut            Zoom out the text
4639 UnIndent           Decrease indentation
4640 Indent             Increase indentation
4641 Replace            Replace text in the current document
4642 SearchEntry        The search field belonging to the 'Search' element (can be used alone)
4643 Search             Find the entered text in the current file (only useful if you also
4644                    use 'SearchEntry')
4645 GotoEntry          The goto field belonging to the 'Goto' element (can be used alone)
4646 Goto               Jump to the entered line number (only useful if you also use 'GotoEntry')
4647 Preferences        Show the preferences dialog
4648 Quit               Quit Geany
4649 ================== ==============================================================================
4653 Plugin documentation
4654 ====================
4656 HTMLChars
4657 ---------
4659 The HTMLChars plugin helps when working with special characters in
4660 XML/HTML, e.g. German Umlauts ü and ä.
4663 Insert entity dialog
4664 ^^^^^^^^^^^^^^^^^^^^
4666 When the plugin is enabled, you can insert special character
4667 entities using *Tools->Insert Special HTML Characters*.
4669 This opens up a dialog where you can find a huge amount of special
4670 characters sorted by category that you might like to use inside your
4671 document. You can expand and collapse the categories by clicking on
4672 the little arrow on the left hand side. Once you have found the
4673 desired character click on it and choose "Insert". This will insert
4674 the entity for the character at the current cursor position. You
4675 might also like to double click the chosen entity instead.
4678 Replace special chars by its entity
4679 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4681 To help make a XML/HTML document valid the plugin supports
4682 replacement of special chars known by the plugin. Both bulk
4683 replacement and immediate replacement during typing are supported.
4685 A few characters will not be replaced. These are
4686         * "
4687         * &
4688         * <
4689         * >
4690         *   (`&nbsp;`)
4693 At typing time
4694 ``````````````
4696 You can activate/deactivate this feature using the *Tools->HTML
4697 Replacement->Auto-replace Special Characters* menu item. If it's
4698 activated, all special characters (beside the given exceptions from
4699 above) known by the plugin will be replaced by their entities.
4701 You could also set a keybinding for the plugin to toggle the status
4702 of this feature.
4705 Bulk replacement
4706 ````````````````
4708 After inserting a huge amount of text, e.g. by using copy & paste, the
4709 plugin allows bulk replacement of all known characters (beside the
4710 mentioned exceptions). You can find the function under the same
4711 menu at *Tools->HTML Replacement->Replace Characters in Selection*, or
4712 configure a keybinding for the plugin.
4715 Save Actions
4716 ------------
4718 Instant Save
4719 ^^^^^^^^^^^^
4720 This plugin sets on every new file (*File->New* or *File->New (with template)*)
4721 a randomly chosen filename and set its filetype appropriate to the used template
4722 or when no template was used, to a configurable default filetype.
4723 This enables you to quickly compile, build and/or run the new file without the
4724 need to give it an explicit filename using the Save As dialog. This might be
4725 useful when you often create new files just for testing some code or something
4726 similar.
4729 Backup Copy
4730 ^^^^^^^^^^^
4732 This plugin creates a backup copy of the current file in Geany when it is
4733 saved. You can specify the directory where the backup copy is saved and
4734 you can configure the automatically added extension in the configure dialog
4735 in Geany's plugin manager.
4737 After the plugin was loaded in Geany's plugin manager, every file is
4738 copied into the configured backup directory when the file is saved in Geany.
4742 Contributing to this document
4743 =============================
4745 This document (``geany.txt``) is written in `reStructuredText`__
4746 (or "reST"). The source file for it is located in Geany's ``doc``
4747 subdirectory.  If you intend on making changes, you should grab the
4748 source right from SVN to make sure you've got the newest version. After
4749 editing the file, to build the HTML document to see how your changes
4750 look, run "``make doc``" in the subdirectory ``doc`` of Geany's source
4751 directory. This regenerates the ``geany.html`` file. To generate a PDF
4752 file, use the command "``make pdf``" which should generate a file called
4753 geany-|(version)|.pdf.
4755 __ http://docutils.sourceforge.net/rst.html
4757 After you are happy with your changes, create a patch::
4759     % svn diff geany.txt > foo.patch
4761 and then submit that file to the mailing list for review.
4763 Note, you will need the Python docutils software package installed
4764 to build the docs. The package is named ``python-docutils`` on Debian
4765 and Fedora systems.
4770 Scintilla keyboard commands
4771 ===========================
4773 Copyright © 1998, 2006 Neil Hodgson <neilh(at)scintilla(dot)org>
4775 This appendix is distributed under the terms of the License for
4776 Scintilla and SciTE. A copy of this license can be found in the file
4777 ``scintilla/License.txt`` included with the source code of this
4778 program and in the appendix of this document. See `License for
4779 Scintilla and SciTE`_.
4781 20 June 2006
4785 Keyboard commands
4786 -----------------
4788 Keyboard commands for Scintilla mostly follow common Windows and GTK+
4789 conventions. All move keys (arrows, page up/down, home and end)
4790 allows to extend or reduce the stream selection when holding the
4791 Shift key, and the rectangular selection when holding the Shift and
4792 Ctrl keys. Some keys may not be available with some national keyboards
4793 or because they are taken by the system such as by a window manager
4794 or GTK. Keyboard equivalents of menu commands are listed in the
4795 menus. Some less common commands with no menu equivalent are:
4797 =============================================   ======================
4798 Action                                          Shortcut key
4799 =============================================   ======================
4800 Magnify text size.                              Ctrl+Keypad+
4801 Reduce text size.                               Ctrl+Keypad-
4802 Restore text size to normal.                    Ctrl+Keypad/
4803 Indent block.                                   Tab
4804 Dedent block.                                   Shift+Tab
4805 Delete to start of word.                        Ctrl+BackSpace
4806 Delete to end of word.                          Ctrl+Delete
4807 Delete to start of line.                        Ctrl+Shift+BackSpace
4808 Go to start of document.                        Ctrl+Home
4809 Extend selection to start of document.          Ctrl+Shift+Home
4810 Go to start of display line.                    Alt+Home
4811 Extend selection to start of display line.      Alt+Shift+Home
4812 Go to end of document.                          Ctrl+End
4813 Extend selection to end of document.            Ctrl+Shift+End
4814 Extend selection to end of display line.        Alt+Shift+End
4815 Previous paragraph. Shift extends selection.    Ctrl+Up
4816 Next paragraph. Shift extends selection.        Ctrl+Down
4817 Previous word. Shift extends selection.         Ctrl+Left
4818 Next word. Shift extends selection.             Ctrl+Right
4819 =============================================   ======================
4824 Tips and tricks
4825 ===============
4827 Document notebook
4828 -----------------
4830 * Double-click on empty space in the notebook tab bar to open a
4831   new document.
4832 * Middle-click on a document's notebook tab to close the document.
4833 * Hold `Ctrl` and click on any notebook tab to switch to the last used
4834   document.
4835 * Double-click on a document's notebook tab to toggle all additional
4836   widgets (to show them again use the View menu or the keyboard
4837   shortcut). The interface pref must be enabled for this to work.
4839 Editor
4840 ------
4842 * Alt-scroll wheel moves up/down a page.
4843 * Ctrl-scroll wheel zooms in/out.
4844 * Shift-scroll wheel scrolls 8 characters right/left.
4845 * Ctrl-click on a word in a document to perform *Go to Tag Definition*.
4846 * Ctrl-click on a bracket/brace to perform *Go to Matching Brace*.
4848 Interface
4849 ---------
4851 * Double-click on a symbol-list group to expand or compact it.
4853 GTK-related
4854 -----------
4856 * Scrolling the mouse wheel over a notebook tab bar will switch
4857   notebook pages.
4859 The following are derived from X-Windows features (but GTK still supports
4860 them on Windows):
4862 * Middle-click pastes the last selected text.
4863 * Middle-click on a scrollbar moves the scrollbar to that
4864   position without having to drag it.
4868 Compile-time options
4869 ====================
4871 There are some options which can only be changed at compile time,
4872 and some options which are used as the default for configurable
4873 options. To change these options, edit the appropriate source file
4874 in the ``src`` subdirectory. Look for a block of lines starting with
4875 ``#define GEANY_*``. Any definitions which are not listed here should
4876 not be changed.
4878 .. note::
4879     Most users should not need to change these options.
4881 src/geany.h
4882 -----------
4884 ==============================  ============================================  ==================
4885 Option                          Description                                   Default
4886 ==============================  ============================================  ==================
4887 GEANY_STRING_UNTITLED           A string used as the default name for new     untitled
4888                                 files. Be aware that the string can be
4889                                 translated, so change it only if you know
4890                                 what you are doing.
4891 GEANY_WINDOW_MINIMAL_WIDTH      The minimal width of the main window.         620
4892 GEANY_WINDOW_MINIMAL_HEIGHT     The minimal height of the main window.        440
4893 GEANY_WINDOW_DEFAULT_WIDTH      The default width of the main window at the   900
4894                                 first start.
4895 GEANY_WINDOW_DEFAULT_HEIGHT     The default height of the main window at the  600
4896                                 first start.
4897  **Windows specific**
4898 GEANY_USE_WIN32_DIALOG          Set this to 1 if you want to use the default  0
4899                                 Windows file open and save dialogs instead
4900                                 GTK's file open and save dialogs. The
4901                                 default Windows file dialogs are missing
4902                                 some nice features like choosing a filetype
4903                                 or an encoding. *Do not touch this setting
4904                                 when building on a non-Win32 system.*
4905 ==============================  ============================================  ==================
4907 project.h
4908 ---------
4910 ==============================  ============================================  ==================
4911 Option                          Description                                   Default
4912 ==============================  ============================================  ==================
4913 GEANY_PROJECT_EXT               The default filename extension for Geany      geany
4914                                 project files. It is used when creating new
4915                                 projects and as filter mask for the project
4916                                 open dialog.
4917 ==============================  ============================================  ==================
4919 editor.h
4920 --------
4922 ==============================  ============================================  ==================
4923 Option                          Description                                   Default
4924 ==============================  ============================================  ==================
4925 GEANY_WORDCHARS                 These characters define word boundaries when  a string with:
4926                                 making selections and searching using word    a-z, A-Z, 0-9 and
4927                                 matching options.                             underscore.
4928 ==============================  ============================================  ==================
4930 keyfile.c
4931 ---------
4933 These are default settings that can be overridden in the `Preferences`_ dialog.
4935 ==============================  ============================================  ==================
4936 Option                          Description                                   Default
4937 ==============================  ============================================  ==================
4938 GEANY_MIN_SYMBOLLIST_CHARS      How many characters you need to type to       4
4939                                 trigger the autocompletion list.
4940 GEANY_DISK_CHECK_TIMEOUT        Time in seconds between checking a file for   30
4941                                 external changes.
4942 GEANY_DEFAULT_TOOLS_MAKE        The make tool. This can also include a path.  "make"
4943 GEANY_DEFAULT_TOOLS_TERMINAL    A terminal emulator. It has to accept the     "xterm"
4944                                 command line option "-e". This can also
4945                                 include a path.
4946 GEANY_DEFAULT_TOOLS_BROWSER     A web browser. This can also include a path.  "firefox"
4947 GEANY_DEFAULT_TOOLS_PRINTCMD    A printing tool. It should be able to accept  "lpr"
4948                                 and process plain text files. This can also
4949                                 include a path.
4950 GEANY_DEFAULT_TOOLS_GREP        A grep tool. It should be compatible with     "grep"
4951                                 GNU grep. This can also include a path.
4952 GEANY_DEFAULT_MRU_LENGTH        The length of the "Recent files" list.        10
4953 GEANY_DEFAULT_FONT_SYMBOL_LIST  The font used in sidebar to show symbols and  "Sans 9"
4954                                 open files.
4955 GEANY_DEFAULT_FONT_MSG_WINDOW   The font used in the messages window.         "Sans 9"
4956 GEANY_DEFAULT_FONT_EDITOR       The font used in the editor window.           "Monospace 10"
4957 GEANY_TOGGLE_MARK               A string which is used to mark a toggled      "~ "
4958                                 comment.
4959 GEANY_MAX_AUTOCOMPLETE_WORDS    How many autocompletion suggestions should    30
4960                                 Geany provide.
4961 ==============================  ============================================  ==================
4963 build.c
4964 -------
4966 ==============================  ============================================  ==================
4967 Option                          Description                                   Default
4968 ==============================  ============================================  ==================
4969 GEANY_BUILD_ERR_HIGHLIGHT_MAX   Amount of build error indicators to           50
4970                                 be shown in the editor window.
4971                                 This affects the special coloring
4972                                 when Geany detects a compiler output line as
4973                                 an error message and then highlights the
4974                                 corresponding line in the source code.
4975                                 Usually only the first few messages are
4976                                 interesting because following errors are
4977                                 just after-effects.
4978                                 All errors in the Compiler window are parsed
4979                                 and unaffected by this value.
4980 PRINTBUILDCMDS                  Every time a build menu item priority         FALSE
4981                                 calculation is run, print the state of the
4982                                 menu item table in the form of the table
4983                                 in `Build Menu Configuration`_.  May be
4984                                 useful to debug configuration file
4985                                 overloading.  Warning produces a lot of
4986                                 output.  Can also be enabled/disabled by the
4987                                 debugger by setting printbuildcmds to 1/0
4988                                 overriding the compile setting.
4989 ==============================  ============================================  ==================
4993 GNU General Public License
4994 ==========================
4998                 GNU GENERAL PUBLIC LICENSE
4999                    Version 2, June 1991
5001      Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5002         51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
5003      Everyone is permitted to copy and distribute verbatim copies
5004      of this license document, but changing it is not allowed.
5006                     Preamble
5008       The licenses for most software are designed to take away your
5009     freedom to share and change it.  By contrast, the GNU General Public
5010     License is intended to guarantee your freedom to share and change free
5011     software--to make sure the software is free for all its users.  This
5012     General Public License applies to most of the Free Software
5013     Foundation's software and to any other program whose authors commit to
5014     using it.  (Some other Free Software Foundation software is covered by
5015     the GNU Library General Public License instead.)  You can apply it to
5016     your programs, too.
5018       When we speak of free software, we are referring to freedom, not
5019     price.  Our General Public Licenses are designed to make sure that you
5020     have the freedom to distribute copies of free software (and charge for
5021     this service if you wish), that you receive source code or can get it
5022     if you want it, that you can change the software or use pieces of it
5023     in new free programs; and that you know you can do these things.
5025       To protect your rights, we need to make restrictions that forbid
5026     anyone to deny you these rights or to ask you to surrender the rights.
5027     These restrictions translate to certain responsibilities for you if you
5028     distribute copies of the software, or if you modify it.
5030       For example, if you distribute copies of such a program, whether
5031     gratis or for a fee, you must give the recipients all the rights that
5032     you have.  You must make sure that they, too, receive or can get the
5033     source code.  And you must show them these terms so they know their
5034     rights.
5036       We protect your rights with two steps: (1) copyright the software, and
5037     (2) offer you this license which gives you legal permission to copy,
5038     distribute and/or modify the software.
5040       Also, for each author's protection and ours, we want to make certain
5041     that everyone understands that there is no warranty for this free
5042     software.  If the software is modified by someone else and passed on, we
5043     want its recipients to know that what they have is not the original, so
5044     that any problems introduced by others will not reflect on the original
5045     authors' reputations.
5047       Finally, any free program is threatened constantly by software
5048     patents.  We wish to avoid the danger that redistributors of a free
5049     program will individually obtain patent licenses, in effect making the
5050     program proprietary.  To prevent this, we have made it clear that any
5051     patent must be licensed for everyone's free use or not licensed at all.
5053       The precise terms and conditions for copying, distribution and
5054     modification follow.
5056                 GNU GENERAL PUBLIC LICENSE
5057        TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
5059       0. This License applies to any program or other work which contains
5060     a notice placed by the copyright holder saying it may be distributed
5061     under the terms of this General Public License.  The "Program", below,
5062     refers to any such program or work, and a "work based on the Program"
5063     means either the Program or any derivative work under copyright law:
5064     that is to say, a work containing the Program or a portion of it,
5065     either verbatim or with modifications and/or translated into another
5066     language.  (Hereinafter, translation is included without limitation in
5067     the term "modification".)  Each licensee is addressed as "you".
5069     Activities other than copying, distribution and modification are not
5070     covered by this License; they are outside its scope.  The act of
5071     running the Program is not restricted, and the output from the Program
5072     is covered only if its contents constitute a work based on the
5073     Program (independent of having been made by running the Program).
5074     Whether that is true depends on what the Program does.
5076       1. You may copy and distribute verbatim copies of the Program's
5077     source code as you receive it, in any medium, provided that you
5078     conspicuously and appropriately publish on each copy an appropriate
5079     copyright notice and disclaimer of warranty; keep intact all the
5080     notices that refer to this License and to the absence of any warranty;
5081     and give any other recipients of the Program a copy of this License
5082     along with the Program.
5084     You may charge a fee for the physical act of transferring a copy, and
5085     you may at your option offer warranty protection in exchange for a fee.
5087       2. You may modify your copy or copies of the Program or any portion
5088     of it, thus forming a work based on the Program, and copy and
5089     distribute such modifications or work under the terms of Section 1
5090     above, provided that you also meet all of these conditions:
5092         a) You must cause the modified files to carry prominent notices
5093         stating that you changed the files and the date of any change.
5095         b) You must cause any work that you distribute or publish, that in
5096         whole or in part contains or is derived from the Program or any
5097         part thereof, to be licensed as a whole at no charge to all third
5098         parties under the terms of this License.
5100         c) If the modified program normally reads commands interactively
5101         when run, you must cause it, when started running for such
5102         interactive use in the most ordinary way, to print or display an
5103         announcement including an appropriate copyright notice and a
5104         notice that there is no warranty (or else, saying that you provide
5105         a warranty) and that users may redistribute the program under
5106         these conditions, and telling the user how to view a copy of this
5107         License.  (Exception: if the Program itself is interactive but
5108         does not normally print such an announcement, your work based on
5109         the Program is not required to print an announcement.)
5111     These requirements apply to the modified work as a whole.  If
5112     identifiable sections of that work are not derived from the Program,
5113     and can be reasonably considered independent and separate works in
5114     themselves, then this License, and its terms, do not apply to those
5115     sections when you distribute them as separate works.  But when you
5116     distribute the same sections as part of a whole which is a work based
5117     on the Program, the distribution of the whole must be on the terms of
5118     this License, whose permissions for other licensees extend to the
5119     entire whole, and thus to each and every part regardless of who wrote it.
5121     Thus, it is not the intent of this section to claim rights or contest
5122     your rights to work written entirely by you; rather, the intent is to
5123     exercise the right to control the distribution of derivative or
5124     collective works based on the Program.
5126     In addition, mere aggregation of another work not based on the Program
5127     with the Program (or with a work based on the Program) on a volume of
5128     a storage or distribution medium does not bring the other work under
5129     the scope of this License.
5131       3. You may copy and distribute the Program (or a work based on it,
5132     under Section 2) in object code or executable form under the terms of
5133     Sections 1 and 2 above provided that you also do one of the following:
5135         a) Accompany it with the complete corresponding machine-readable
5136         source code, which must be distributed under the terms of Sections
5137         1 and 2 above on a medium customarily used for software interchange; or,
5139         b) Accompany it with a written offer, valid for at least three
5140         years, to give any third party, for a charge no more than your
5141         cost of physically performing source distribution, a complete
5142         machine-readable copy of the corresponding source code, to be
5143         distributed under the terms of Sections 1 and 2 above on a medium
5144         customarily used for software interchange; or,
5146         c) Accompany it with the information you received as to the offer
5147         to distribute corresponding source code.  (This alternative is
5148         allowed only for noncommercial distribution and only if you
5149         received the program in object code or executable form with such
5150         an offer, in accord with Subsection b above.)
5152     The source code for a work means the preferred form of the work for
5153     making modifications to it.  For an executable work, complete source
5154     code means all the source code for all modules it contains, plus any
5155     associated interface definition files, plus the scripts used to
5156     control compilation and installation of the executable.  However, as a
5157     special exception, the source code distributed need not include
5158     anything that is normally distributed (in either source or binary
5159     form) with the major components (compiler, kernel, and so on) of the
5160     operating system on which the executable runs, unless that component
5161     itself accompanies the executable.
5163     If distribution of executable or object code is made by offering
5164     access to copy from a designated place, then offering equivalent
5165     access to copy the source code from the same place counts as
5166     distribution of the source code, even though third parties are not
5167     compelled to copy the source along with the object code.
5169       4. You may not copy, modify, sublicense, or distribute the Program
5170     except as expressly provided under this License.  Any attempt
5171     otherwise to copy, modify, sublicense or distribute the Program is
5172     void, and will automatically terminate your rights under this License.
5173     However, parties who have received copies, or rights, from you under
5174     this License will not have their licenses terminated so long as such
5175     parties remain in full compliance.
5177       5. You are not required to accept this License, since you have not
5178     signed it.  However, nothing else grants you permission to modify or
5179     distribute the Program or its derivative works.  These actions are
5180     prohibited by law if you do not accept this License.  Therefore, by
5181     modifying or distributing the Program (or any work based on the
5182     Program), you indicate your acceptance of this License to do so, and
5183     all its terms and conditions for copying, distributing or modifying
5184     the Program or works based on it.
5186       6. Each time you redistribute the Program (or any work based on the
5187     Program), the recipient automatically receives a license from the
5188     original licensor to copy, distribute or modify the Program subject to
5189     these terms and conditions.  You may not impose any further
5190     restrictions on the recipients' exercise of the rights granted herein.
5191     You are not responsible for enforcing compliance by third parties to
5192     this License.
5194       7. If, as a consequence of a court judgment or allegation of patent
5195     infringement or for any other reason (not limited to patent issues),
5196     conditions are imposed on you (whether by court order, agreement or
5197     otherwise) that contradict the conditions of this License, they do not
5198     excuse you from the conditions of this License.  If you cannot
5199     distribute so as to satisfy simultaneously your obligations under this
5200     License and any other pertinent obligations, then as a consequence you
5201     may not distribute the Program at all.  For example, if a patent
5202     license would not permit royalty-free redistribution of the Program by
5203     all those who receive copies directly or indirectly through you, then
5204     the only way you could satisfy both it and this License would be to
5205     refrain entirely from distribution of the Program.
5207     If any portion of this section is held invalid or unenforceable under
5208     any particular circumstance, the balance of the section is intended to
5209     apply and the section as a whole is intended to apply in other
5210     circumstances.
5212     It is not the purpose of this section to induce you to infringe any
5213     patents or other property right claims or to contest validity of any
5214     such claims; this section has the sole purpose of protecting the
5215     integrity of the free software distribution system, which is
5216     implemented by public license practices.  Many people have made
5217     generous contributions to the wide range of software distributed
5218     through that system in reliance on consistent application of that
5219     system; it is up to the author/donor to decide if he or she is willing
5220     to distribute software through any other system and a licensee cannot
5221     impose that choice.
5223     This section is intended to make thoroughly clear what is believed to
5224     be a consequence of the rest of this License.
5226       8. If the distribution and/or use of the Program is restricted in
5227     certain countries either by patents or by copyrighted interfaces, the
5228     original copyright holder who places the Program under this License
5229     may add an explicit geographical distribution limitation excluding
5230     those countries, so that distribution is permitted only in or among
5231     countries not thus excluded.  In such case, this License incorporates
5232     the limitation as if written in the body of this License.
5234       9. The Free Software Foundation may publish revised and/or new versions
5235     of the General Public License from time to time.  Such new versions will
5236     be similar in spirit to the present version, but may differ in detail to
5237     address new problems or concerns.
5239     Each version is given a distinguishing version number.  If the Program
5240     specifies a version number of this License which applies to it and "any
5241     later version", you have the option of following the terms and conditions
5242     either of that version or of any later version published by the Free
5243     Software Foundation.  If the Program does not specify a version number of
5244     this License, you may choose any version ever published by the Free Software
5245     Foundation.
5247       10. If you wish to incorporate parts of the Program into other free
5248     programs whose distribution conditions are different, write to the author
5249     to ask for permission.  For software which is copyrighted by the Free
5250     Software Foundation, write to the Free Software Foundation; we sometimes
5251     make exceptions for this.  Our decision will be guided by the two goals
5252     of preserving the free status of all derivatives of our free software and
5253     of promoting the sharing and reuse of software generally.
5255                     NO WARRANTY
5257       11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
5258     FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
5259     OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
5260     PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
5261     OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
5262     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
5263     TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
5264     PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
5265     REPAIR OR CORRECTION.
5267       12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
5268     WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
5269     REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
5270     INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
5271     OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
5272     TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
5273     YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
5274     PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
5275     POSSIBILITY OF SUCH DAMAGES.
5277                  END OF TERMS AND CONDITIONS
5279             How to Apply These Terms to Your New Programs
5281       If you develop a new program, and you want it to be of the greatest
5282     possible use to the public, the best way to achieve this is to make it
5283     free software which everyone can redistribute and change under these terms.
5285       To do so, attach the following notices to the program.  It is safest
5286     to attach them to the start of each source file to most effectively
5287     convey the exclusion of warranty; and each file should have at least
5288     the "copyright" line and a pointer to where the full notice is found.
5290         <one line to give the program's name and a brief idea of what it does.>
5291         Copyright (C) <year>  <name of author>
5293         This program is free software; you can redistribute it and/or modify
5294         it under the terms of the GNU General Public License as published by
5295         the Free Software Foundation; either version 2 of the License, or
5296         (at your option) any later version.
5298         This program is distributed in the hope that it will be useful,
5299         but WITHOUT ANY WARRANTY; without even the implied warranty of
5300         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5301         GNU General Public License for more details.
5303         You should have received a copy of the GNU General Public License
5304         along with this program; if not, write to the Free Software
5305         Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
5308     Also add information on how to contact you by electronic and paper mail.
5310     If the program is interactive, make it output a short notice like this
5311     when it starts in an interactive mode:
5313         Gnomovision version 69, Copyright (C) year  name of author
5314         Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
5315         This is free software, and you are welcome to redistribute it
5316         under certain conditions; type `show c' for details.
5318     The hypothetical commands `show w' and `show c' should show the appropriate
5319     parts of the General Public License.  Of course, the commands you use may
5320     be called something other than `show w' and `show c'; they could even be
5321     mouse-clicks or menu items--whatever suits your program.
5323     You should also get your employer (if you work as a programmer) or your
5324     school, if any, to sign a "copyright disclaimer" for the program, if
5325     necessary.  Here is a sample; alter the names:
5327       Yoyodyne, Inc., hereby disclaims all copyright interest in the program
5328       `Gnomovision' (which makes passes at compilers) written by James Hacker.
5330       <signature of Ty Coon>, 1 April 1989
5331       Ty Coon, President of Vice
5333     This General Public License does not permit incorporating your program into
5334     proprietary programs.  If your program is a subroutine library, you may
5335     consider it more useful to permit linking proprietary applications with the
5336     library.  If this is what you want to do, use the GNU Library General
5337     Public License instead of this License.
5342 License for Scintilla and SciTE
5343 ===============================
5345 Copyright 1998-2003 by Neil Hodgson <neilh(at)scintilla(dot)org>
5347 All Rights Reserved
5349 Permission to use, copy, modify, and distribute this software and
5350 its documentation for any purpose and without fee is hereby granted,
5351 provided that the above copyright notice appear in all copies and
5352 that both that copyright notice and this permission notice appear in
5353 supporting documentation.
5355 NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
5356 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
5357 NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
5358 CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
5359 OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
5360 OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
5361 USE OR PERFORMANCE OF THIS SOFTWARE.