Change donate link to our own redirection
[geany-mirror.git] / doc / geany.txt
blobc29372e2c1b8f7b3bcbb3555ce620304f771d9da
1 .. |(version)| replace:: 1.25
2 .. -*- reStructuredText -*-
4 =======
5  Geany
6 =======
8 -------------------------
9  A fast, light, GTK+ IDE
10 -------------------------
12 :Authors: Enrico Tröger,
13           Nick Treleaven,
14           Frank Lanitz,
15           Colomban Wendling,
16           Matthew Brush
17 :Date: 2014-04-16
18 :Version: |(version)|
20 Copyright © 2005-2014
22 This document is distributed under the terms of the GNU General Public
23 License as published by the Free Software Foundation; either version 2
24 of the License, or (at your option) any later version. A copy of this
25 license can be found in the file COPYING included with the source code
26 of this program, and also in the chapter `GNU General Public License`_.
29 .. contents::
33 Introduction
34 ============
37 About Geany
38 -----------
40 Geany is a small and lightweight Integrated Development Environment. It
41 was developed to provide a small and fast IDE, which has only a few
42 dependencies on other packages. Another goal was to be as independent
43 as possible from a particular Desktop Environment like KDE or GNOME -
44 Geany only requires the GTK2 runtime libraries.
46 Some basic features of Geany:
48 * Syntax highlighting
49 * Code folding
50 * Autocompletion of symbols/words
51 * Construct completion/snippets
52 * Auto-closing of XML and HTML tags
53 * Calltips
54 * Many supported filetypes including C, Java, PHP, HTML, Python, Perl,
55   Pascal, and others
56 * Symbol lists
57 * Code navigation
58 * Build system to compile and execute your code
59 * Simple project management
60 * Plugin interface
64 Where to get it
65 ---------------
67 You can obtain Geany from http://www.geany.org/ or perhaps also from
68 your distribution. For a list of available packages, please see
69 http://www.geany.org/Download/ThirdPartyPackages.
73 License
74 -------
76 Geany is distributed under the terms of the GNU General Public License
77 as published by the Free Software Foundation; either version 2 of
78 the License, or (at your option) any later version. A copy of this
79 license can be found in the file COPYING included with the source
80 code of this program and in the chapter, `GNU General Public License`_.
82 The included Scintilla library (found in the subdirectory
83 ``scintilla/``) has its own license, which can be found in the chapter,
84 `License for Scintilla and SciTE`_.
88 About this document
89 -------------------
91 This documentation is available in HTML and text formats.
92 The latest version can always be found at http://www.geany.org/.
94 If you want to contribute to it, see `Contributing to this document`_.
99 Installation
100 ============
103 Requirements
104 ------------
106 You will need the GTK (>= 2.16.0) libraries and their dependencies
107 (Pango, GLib and ATK). Your distro should provide packages for these,
108 usually installed by default. For Windows, you can download an installer
109 from the website which bundles these libraries.
112 Binary packages
113 ---------------
115 There are many binary packages available. For an up-to-date but maybe
116 incomplete list see http://www.geany.org/Download/ThirdPartyPackages.
119 Source compilation
120 ------------------
122 Compiling Geany is quite easy.
123 To do so, you need the GTK (>= 2.16.0) libraries and header files.
124 You also need the Pango, GLib and ATK libraries and header files.
125 All these files are available at http://www.gtk.org, but very often
126 your distro will provide development packages to save the trouble of
127 building these yourself.
129 Furthermore you need, of course, a C and C++ compiler. The GNU versions
130 of these tools are recommended.
132 Autotools based build system
133 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
135 The Autotools based build system is very mature and has been well tested.
136 To use it, you just need the Make tool, preferably GNU Make.
138 Then run the following commands::
140     $ ./configure
141     $ make
143 Then as root::
145     % make install
147 Or via sudo::
149     % sudo make install
151 Waf based build system
152 ^^^^^^^^^^^^^^^^^^^^^^
154 The Waf build system is still quite young and under heavy development but already in a
155 usable state. In contrast to the Autotools system, Waf needs Python. So before using Waf, you need
156 to install Python on your system.
157 The advantage of the Waf build system over the Autotools based build system is that the whole
158 build process might be a bit faster. Especially when you use the Waf
159 cache feature for repetitive builds (e.g. when changing only a few source files
160 to test something) will become much faster since Waf will cache and re-use the
161 unchanged built files and only compile the changed code again. See `Waf Cache`_ for details.
162 To build Geany with Waf as run::
164     $ ./waf configure
165     $ ./waf build
167 Then as root::
169     % ./waf install
171 Waf cache
172 `````````
174 The Waf build system has a nice and interesting feature which can help  to avoid
175 a lot of unnecessary rebuilding of unchanged code. This often happens when developing new features
176 or trying to debug something in Geany.
177 Waf is able to store and retrieve the object files from a cache. This cache is declared
178 using the environment variable ``WAFCACHE``.
179 A possible location of the cache directory could be ``~/.cache/waf``. In order to make use of
180 this, you first need to create this directory::
182     $ mkdir -p ~/.cache/waf
184 then add the environment variable to your shell configuration (the following example is for
185 Bash and should be adjusted to your used shell)::
187     export WAFCACHE=/home/username/.cache/waf
189 Remember to replace ``username`` with your actual username.
191 More information about the Waf cache feature are available at
192 http://code.google.com/p/waf/wiki/CacheObjectFiles.
194 Cleaning the cache
195 ******************
196 You should be careful about the size of the cache directory as it may
197 grow rapidly over time.
198 Waf doesn't do any cleaning or other house-keeping of the cache yet, so you need to keep it
199 clean by yourself.
200 An easy way to keep it clean is to run the following command regularly to remove old
201 cached files::
203     $ find /home/username/.cache/waf -mtime +14 -exec rm {} \;
205 This will delete all files in the cache directory which are older than 14 days.
207 For details about the ``find`` command and its options, check its manual page.
210 Custom installation
211 ^^^^^^^^^^^^^^^^^^^
212 The configure script supports several common options, for a detailed
213 list, type::
215     $ ./configure --help
217 or::
219     $ ./waf --help
221 (depending on which build system you use).
223 You may also want to read the INSTALL file for advanced installation
224 options.
226 * See also `Compile-time options`_.
228 Dynamic linking loader support and VTE
229 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
230 In the case that your system lacks dynamic linking loader support, you
231 probably want to pass the option ``--disable-vte`` to the ``configure``
232 script. This prevents compiling Geany with dynamic linking loader
233 support for automatically loading ``libvte.so.4`` if available.
235 Build problems
236 ^^^^^^^^^^^^^^
237 If there are any errors during compilation, check your build
238 environment and try to find the error, otherwise contact the mailing
239 list or one the authors. Sometimes you might need to ask for specific
240 help from your distribution.
243 Installation prefix
244 -------------------
245 If you want to find Geany's system files after installation you may
246 want to know the installation prefix.
248 Pass the ``--print-prefix`` option to Geany to check this - see
249 `Command line options`_. The first path is the prefix.
251 On Unix-like systems this is commonly ``/usr`` if you installed from
252 a binary package, or ``/usr/local`` if you build from source.
254 .. note::
255     Editing system files is not necessary as you should use the
256     per-user configuration files instead, which don't need root
257     permissions. See `Configuration files`_.
260 Usage
261 =====
264 Getting started
265 ---------------
267 You can start Geany in the following ways:
269 * From the Desktop Environment menu:
271   Choose in your application menu of your used Desktop Environment:
272   Development --> Geany.
274   At Windows-systems you will find Geany after installation inside
275   the application menu within its special folder.
277 * From the command line:
279   To start Geany from a command line, type the following and press
280   Return::
282       % geany
284 The Geany workspace
285 -------------------
287 The Geany window is shown in the following figure:
289 .. image:: ./images/main_window.png
291 The workspace has the following parts:
293 * The menu.
294 * An optional toolbar.
295 * An optional sidebar that can show the following tabs:
297   * Documents - A document list, and
298   * Symbols - A list of symbols in your code.
300 * The main editor window.
301 * An optional message window which can show the following tabs:
303   * Status - A list of status messages.
304   * Compiler - The output of compiling or building programs.
305   * Messages - Results of 'Find Usage', 'Find in Files' and other actions
306   * Scribble - A text scratchpad for any use.
307   * Terminal - An optional terminal window.
309 * A status bar
311 Most of these can be configured in the `Interface preferences`_, the
312 `View menu`_, or the popup menu for the relevant area.
314 Additional tabs may be added to the sidebar and message window by plugins.
316 The position of the tabs can be selected in the interface preferences.
318 The sizes of the sidebar and message window can be adjusted by
319 dragging the dividers.
321 Command line options
322 --------------------
324 ============  =======================  =================================================
325 Short option  Long option              Function
326 ============  =======================  =================================================
327 *none*        +number                  Set initial line number for the first opened file
328                                        (same as --line, do not put a space between the + sign
329                                        and the number). E.g. "geany +7 foo.bar" will open the
330                                        file foo.bar and place the cursor in line 7.
332 *none*        --column                 Set initial column number for the first opened file.
334 -c dir_name   --config=directory_name  Use an alternate configuration directory. The default
335                                        configuration directory is ``~/.config/geany/`` and that
336                                        is where ``geany.conf`` and other configuration files
337                                        reside.
339 *none*        --ft-names               Print a list of Geany's internal filetype names (useful
340                                        for snippets configuration).
342 -g            --generate-tags          Generate a global tags file (see
343                                        `Generating a global tags file`_).
345 -P            --no-preprocessing       Don't preprocess C/C++ files when generating tags.
347 -i            --new-instance           Do not open files in a running instance, force opening
348                                        a new instance. Only available if Geany was compiled
349                                        with support for Sockets.
351 -l            --line                   Set initial line number for the first opened file.
353 *none*        --list-documents         Return a list of open documents in a running Geany
354                                        instance.
355                                        This can be used to read the currently opened documents in
356                                        Geany from an external script or tool. The returned list
357                                        is separated by newlines (LF) and consists of the full,
358                                        UTF-8 encoded filenames of the documents.
359                                        Only available if Geany was compiled with support for
360                                        Sockets.
362 -m            --no-msgwin              Do not show the message window. Use this option if you
363                                        do not need compiler messages or VTE support.
365 -n            --no-ctags               Do not load symbol completion and call tip data. Use this
366                                        option if you do not want to use them.
368 -p            --no-plugins             Do not load plugins or plugin support.
370 *none*        --print-prefix           Print installation prefix, the data directory, the lib
371                                        directory and the locale directory (in that order) to
372                                        stdout, one line each. This is mainly intended for plugin
373                                        authors to detect installation paths.
375 -r            --read-only              Open all files given on the command line in read-only mode.
376                                        This only applies to files opened explicitly from the command
377                                        line, so files from previous sessions or project files are
378                                        unaffected.
380 -s            --no-session             Do not load the previous session's files.
382 -t            --no-terminal            Do not load terminal support. Use this option if you do
383                                        not want to load the virtual terminal emulator widget
384                                        at startup. If you do not have ``libvte.so.4`` installed,
385                                        then terminal-support is automatically disabled. Only
386                                        available if Geany was compiled with support for VTE.
388 *none*        --socket-file            Use this socket filename for communication with a
389                                        running Geany instance. This can be used with the following
390                                        command to execute Geany on the current workspace::
392                                          geany --socket-file=/tmp/geany-sock-$(xprop -root _NET_CURRENT_DESKTOP | awk '{print $3}')
394 *none*        --vte-lib                Specify explicitly the path including filename or only
395                                        the filename to the VTE library, e.g.
396                                        ``/usr/lib/libvte.so`` or ``libvte.so``. This option is
397                                        only needed when the auto-detection does not work. Only
398                                        available if Geany was compiled with support for VTE.
400 -v            --verbose                Be verbose (print useful status messages).
402 -V            --version                Show version information and exit.
404 -?            --help                   Show help information and exit.
406 *none*        [files ...]              Open all given files at startup. This option causes
407                                        Geany to ignore loading stored files from the last
408                                        session (if enabled).
409                                        Geany also recognizes line and column information when
410                                        appended to the filename with colons, e.g.
411                                        "geany foo.bar:10:5" will open the file foo.bar and
412                                        place the cursor in line 10 at column 5.
414                                        Projects can also be opened but a project file (\*.geany)
415                                        must be the first non-option argument. All additionally
416                                        given files are ignored.
417 ============  =======================  =================================================
419 You can also pass line number and column number information, e.g.::
421     geany some_file.foo:55:4
423 Geany supports all generic GTK options, a list is available on the
424 help screen.
428 General
429 -------
432 Startup
433 ^^^^^^^
435 At startup, Geany loads all files from the last time Geany was
436 launched. You can disable this feature in the preferences dialog
437 (see `General Startup preferences`_).
439 You can start several instances of Geany, but only the first will
440 load files from the last session. In the subsequent instances, you
441 can find these files in the file menu under the "Recent files" item.
442 By default this contains the last 10 recently opened files. You can
443 change the number of recently opened files in the preferences dialog.
445 To run a second instance of Geany, do not specify any filenames on
446 the command-line, or disable opening files in a running instance
447 using the appropriate command line option.
450 Opening files from the command-line in a running instance
451 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
453 Geany detects if there is an instance of itself already running and opens files
454 from the command-line in that instance. So, Geany can
455 be used to view and edit files by opening them from other programs
456 such as a file manager.
458 You can also pass line number and column number information, e.g.::
460     geany some_file.foo:55:4
462 This would open the file ``some_file.foo`` with the cursor on line 55,
463 column 4.
465 If you do not like this for some reason, you can disable using the first
466 instance by using the appropriate command line option -- see the section
467 called `Command line options`_.
470 Virtual terminal emulator widget (VTE)
471 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
473 If you have installed ``libvte.so`` on your system, it is loaded
474 automatically by Geany, and you will have a terminal widget in the
475 notebook at the bottom.
477 If Geany cannot find any ``libvte.so`` at startup, the terminal widget
478 will not be loaded. So there is no need to install the package containing
479 this file in order to run Geany. Additionally, you can disable the use
480 of the terminal widget by command line option, for more information
481 see the section called `Command line options`_.
483 You can use this terminal (from now on called VTE) much as you would
484 a terminal program like xterm. There is basic clipboard support. You
485 can paste the contents of the clipboard by pressing the right mouse
486 button to open the popup menu, and choosing Paste. To copy text from
487 the VTE, just select the desired text and then press the right mouse
488 button and choose Copy from the popup menu. On systems running the
489 X Window System you can paste the last selected text by pressing the
490 middle mouse button in the VTE (on 2-button mice, the middle button
491 can often be simulated by pressing both mouse buttons together).
493 In the preferences dialog you can specify a shell which should be
494 started in the VTE. To make the specified shell a login shell just
495 use the appropriate command line options for the shell. These options
496 should be found in the manual page of the shell. For zsh and bash
497 you can use the argument ``--login``.
499 .. note::
500     Geany tries to load ``libvte.so``. If this fails, it tries to load
501     some other filenames. If this fails too, you should check whether you
502     installed libvte correctly. Again note, Geany will run without this
503     library.
505 It could be, that the library is called something else than
506 ``libvte.so`` (e.g. on FreeBSD 6.0 it is called ``libvte.so.8``). If so
507 please set a link to the correct file (as root)::
509     # ln -s /usr/lib/libvte.so.X /usr/lib/libvte.so
511 Obviously, you have to adjust the paths and set X to the number of your
512 ``libvte.so``.
514 You can also specify the filename of the VTE library to use on the command
515 line (see the section called `Command line options`_) or at compile time
516 by specifying the command line option ``--with-vte-module-path`` to
517 ./configure.
520 Defining own widget styles using .gtkrc-2.0
521 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
523 You can define your widget style for many of Geany's GUI parts. To
524 do this, just edit your ``.gtkrc-2.0`` (usually found in your home
525 directory on UNIX-like systems and in the etc subdirectory of your
526 Geany installation on Windows).
528 To have a defined style used by Geany you must assign it to
529 at least one of Geany's widgets. For example use the following line::
531     widget "Geany*" style "geanyStyle"
533 This would assign your style "geany_style" to all Geany
534 widgets. You can also assign styles only to specific widgets. At the
535 moment you can use the following widgets:
537 * GeanyMainWindow
538 * GeanyEditMenu
539 * GeanyToolbarMenu
540 * GeanyDialog
541 * GeanyDialogPrefs
542 * GeanyDialogProject
543 * GeanyDialogSearch
544 * GeanyMenubar
545 * GeanyToolbar
547 An example of a simple ``.gtkrc-2.0``::
549     style "geanyStyle"
550     {
551         font_name="Sans 12"
552     }
553     widget "GeanyMainWindow" style "geanyStyle"
555     style "geanyStyle"
556     {
557         font_name="Sans 10"
558     }
559     widget "GeanyPrefsDialog" style "geanyStyle"
562 Documents
563 ---------
565 Switching between documents
566 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
568 The documents list and the editor tabs are two different ways
569 to switch between documents using the mouse. When you hit the key
570 combination to move between tabs, the order is determined by the tab
571 order. It is not alphabetical as shown in the documents list
572 (regardless of whether or not editor tabs are visible).
574 See the `Notebook tab keybindings`_ section for useful
575 shortcuts including for Most-Recently-Used document switching.
577 Cloning documents
578 ^^^^^^^^^^^^^^^^^
579 The `Document->Clone` menu item copies the current document's text,
580 cursor position and properties into a new untitled document. If
581 there is a selection, only the selected text is copied. This can be
582 useful when making temporary copies of text or for creating
583 documents with similar or identical contents.
586 Character sets and Unicode Byte-Order-Mark (BOM)
587 ------------------------------------------------
590 Using character sets
591 ^^^^^^^^^^^^^^^^^^^^
593 Geany provides support for detecting and converting character sets. So
594 you can open and save files in different character sets, and even
595 convert a file from one character set to another. To do this,
596 Geany uses the character conversion capabilities of the GLib library.
598 Only text files are supported, i.e. opening files which contain
599 NULL-bytes may fail. Geany will try to open the file anyway but it is
600 likely that the file will be truncated because it can only be read up
601 to the first occurrence of a NULL-byte. All characters after this
602 position are lost and are not written when you save the file.
604 Geany tries to detect the encoding of a file while opening it, but
605 auto-detecting the encoding of a file is not easy and sometimes an
606 encoding might not be detected correctly. In this case you have to
607 set the encoding of the file manually in order to display it
608 correctly. You can this in the file open dialog by selecting an
609 encoding in the drop down box or by reloading the file with the
610 file menu item "Reload as". The auto-detection works well for most
611 encodings but there are also some encodings where it is known that
612 auto-detection has problems.
614 There are different ways to set different encodings in Geany:
616 * Using the file open dialog
618   This opens the file with the encoding specified in the encoding drop
619   down box. If the encoding is set to "Detect from file" auto-detection
620   will be used. If the encoding is set to "Without encoding (None)" the
621   file will be opened without any character conversion and Geany will
622   not try to auto-detect the encoding (see below for more information).
624 * Using the "Reload as" menu item
626   This item reloads the current file with the specified encoding. It can
627   help if you opened a file and found out that the wrong encoding was used.
629 * Using the "Set encoding" menu item
631   Contrary to the above two options, this will not change or reload
632   the current file unless you save it. It is useful when you want to
633   change the encoding of the file.
635 * Specifying the encoding in the file itself
637   As mentioned above, auto-detecting the encoding of a file may fail on
638   some encodings. If you know that Geany doesn't open a certain file,
639   you can add the specification line, described in the next section,
640   to the beginning of the file to force Geany to use a specific
641   encoding when opening the file.
644 In-file encoding specification
645 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
647 Geany detects meta tags of HTML files which contain charset information
648 like::
650     <meta http-equiv="content-type" content="text/html; charset=ISO-8859-15" />
652 and the specified charset is used when opening the file. This is useful if the
653 encoding of the file cannot be detected properly.
654 For non-HTML files you can also define a line like::
656     /* geany_encoding=ISO-8859-15 */
658 or::
660     # geany_encoding=ISO-8859-15 #
662 to force an encoding to be used. The #, /\* and \*/ are examples
663 of filetype-specific comment characters. It doesn't matter which
664 characters are around the string " geany_encoding=ISO-8859-15 " as long
665 as there is at least one whitespace character before and after this
666 string. Whitespace characters are in this case a space or tab character.
667 An example to use this could be you have a file with ISO-8859-15
668 encoding but Geany constantly detects the file encoding as ISO-8859-1.
669 Then you simply add such a line to the file and Geany will open it
670 correctly the next time.
672 Since Geany 0.15 you can also use lines which match the
673 regular expression used to find the encoding string:
674 ``coding[\t ]*[:=][\t ]*([a-z0-9-]+)[\t ]*``
676 .. note::
677     These specifications must be in the first 512 bytes of the file.
678     Anything after the first 512 bytes will not be recognized.
680 Some examples are::
682     # encoding = ISO-8859-15
684 or::
686     # coding: ISO-8859-15
688 Special encoding "None"
689 ^^^^^^^^^^^^^^^^^^^^^^^
691 There is a special encoding "None" which uses no
692 encoding. It is useful when you know that Geany cannot auto-detect
693 the encoding of a file and it is not displayed correctly. Especially
694 when the file contains NULL-bytes this can be useful to skip auto
695 detection and open the file properly at least until the occurrence
696 of the first NULL-byte. Using this encoding opens the file as it is
697 without any character conversion.
700 Unicode Byte-Order-Mark (BOM)
701 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
703 Furthermore, Geany detects a Unicode Byte Order Mark (see
704 http://en.wikipedia.org/wiki/Byte_Order_Mark for details). Of course,
705 this feature is only available if the opened file is in a Unicode
706 encoding. The Byte Order Mark helps to detect the encoding of a file,
707 e.g. whether it is UTF-16LE or UTF-16BE and so on. On Unix-like systems
708 using a Byte Order Mark could cause some problems for programs not
709 expecting it, e.g. the compiler gcc stops
710 with stray errors, PHP does not parse a script containing a BOM and
711 script files starting with a she-bang maybe cannot be started. In the
712 status bar you can easily see whether the file starts with a BOM or
713 not.
715 If you want to set a BOM for a file or if you want to remove it
716 from a file, just use the document menu and toggle the checkbox.
718 .. note::
719     If you are unsure what a BOM is or if you do not understand where
720     to use it, then it is probably not important for you and you can
721     safely ignore it.
725 Editing
726 -------
729 Folding
730 ^^^^^^^
732 Geany provides basic code folding support. Folding means the ability to
733 show and hide parts of the text in the current file. You can hide
734 unimportant code sections and concentrate on the parts you are working on
735 and later you can show hidden sections again. In the editor window there is
736 a small grey margin on the left side with [+] and [-] symbols which
737 show hidden parts and hide parts of the file respectively. By
738 clicking on these icons you can simply show and hide sections which are
739 marked by vertical lines within this margin. For many filetypes nested
740 folding is supported, so there may be several fold points within other
741 fold points.
743 .. note::
744     You can customize the folding icon and line styles - see the
745     filetypes.common `Folding Settings`_.
747 If you don't like it or don't need it at all, you can simply disable
748 folding support completely in the preferences dialog.
750 The folding behaviour can be changed with the "Fold/Unfold all children of
751 a fold point" option in the preference dialog. If activated, Geany will
752 unfold all nested fold points below the current one if they are already
753 folded (when clicking on a [+] symbol).
754 When clicking on a [-] symbol, Geany will fold all nested fold points
755 below the current one if they are unfolded.
757 This option can be inverted by pressing the Shift
758 key while clicking on a fold symbol. That means, if the "Fold/Unfold all
759 children of a fold point" option is enabled, pressing Shift will disable
760 it for this click and vice versa.
763 Column mode editing (rectangular selections)
764 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
766 There is basic support for column mode editing. To use it, create a
767 rectangular selection by holding down the Control and Shift keys
768 (or Alt and Shift on Windows) while selecting some text.
769 Once a rectangular selection exists you can start editing the text within
770 this selection and the modifications will be done for every line in the
771 selection.
773 It is also possible to create a zero-column selection - this is
774 useful to insert text on multiple lines.
776 Drag and drop of text
777 ^^^^^^^^^^^^^^^^^^^^^
779 If you drag selected text in the editor widget of Geany the text is
780 moved to the position where the mouse pointer is when releasing the
781 mouse button. Holding Control when releasing the mouse button will
782 copy the text instead. This behaviour was changed in Geany 0.11 -
783 before the selected text was copied to the new position.
786 Indentation
787 ^^^^^^^^^^^
789 Geany allows each document to indent either with a tab character,
790 multiple spaces or a combination of both.
792 The *Tabs* setting indents with one tab character per indent level, and
793 displays tabs as the indent width.
795 The *Spaces* setting indents with the number of spaces set in the indent
796 width for each level.
798 The *Tabs and Spaces* setting indents with spaces as above, then converts
799 as many spaces as it can to tab characters at the rate of one tab for
800 each multiple of the `Various preference` setting
801 *indent_hard_tab_width* (default 8) and displays tabs as the
802 *indent_hard_tab_width* value.
804 The default indent settings are set in `Editor Indentation
805 preferences`_ (see the link for more information).
807 The default settings can be overridden per-document using the
808 Document menu. They can also be overridden by projects - see
809 `Project management`_.
811 The indent mode for the current document is shown on the status bar
812 as follows:
815     Indent with Tab characters.
817     Indent with spaces.
819     Indent with tabs and spaces, depending on how much indentation is
820     on a line.
822 Applying new indentation settings
823 `````````````````````````````````
824 After changing the default settings you may wish to apply the new
825 settings to every document in the current session. To do this use the
826 *Project->Apply Default Indentation* menu item.
828 Detecting indent type
829 `````````````````````
830 The *Detect from file* indentation preference can be used to
831 scan each file as it's opened and set the indent type based on
832 how many lines start with a tab vs. 2 or more spaces.
835 Auto-indentation
836 ^^^^^^^^^^^^^^^^
838 When enabled, auto-indentation happens when pressing *Enter* in the
839 Editor. It adds a certain amount of indentation to the new line so the
840 user doesn't always have to indent each line manually.
842 Geany has four types of auto-indentation:
844 None
845     Disables auto-indentation completely.
846 Basic
847     Adds the same amount of whitespace on a new line as on the previous line.
848     For the *Tabs* and the *Spaces* indent types the indentation will use the
849     same combination of characters as the previous line.  The
850     *Tabs and Spaces* indentation type converts as explained above.
851 Current chars
852     Does the same as *Basic* but also indents a new line after an opening
853     brace '{', and de-indents when typing a closing brace '}'. For Python,
854     a new line will be indented after typing ':' at the end of the
855     previous line.
856 Match braces
857     Similar to *Current chars* but the closing brace will be aligned to
858     match the indentation of the line with the opening brace.  This
859     requires the filetype to be one where Geany knows that the Scintilla
860     lexer understands matching braces (C, C++, D, HTML, Pascal, Bash,
861     Perl, TCL).
863 There is also XML-tag auto-indentation. This is enabled when the
864 mode is more than just Basic, and is also controlled by a filetype
865 setting - see `xml_indent_tags`_.
868 Bookmarks
869 ^^^^^^^^^
871 Geany provides a handy bookmarking feature that lets you mark one
872 or more lines in a document, and return the cursor to them using a
873 key combination.
875 To place a mark on a line, either left-mouse-click in the left margin
876 of the editor window, or else use Ctrl-m. This will
877 produce a small green plus symbol in the margin. You can have as many
878 marks in a document as you like. Click again (or use Ctrl-m again)
879 to remove the bookmark. To remove all the marks in a given document,
880 use "Remove Markers" in the Document menu.
882 To navigate down your document, jumping from one mark to the next,
883 use Ctrl-. (control period). To go in the opposite direction on
884 the page, use Ctrl-, (control comma). Using the bookmarking feature
885 together with the commands to switch from one editor tab to another
886 (Ctrl-PgUp/PgDn and Ctrl-Tab) provides a particularly fast way to
887 navigate around multiple files.
890 Code navigation history
891 ^^^^^^^^^^^^^^^^^^^^^^^
893 To ease navigation in source files and especially between
894 different files, Geany lets you jump between different navigation
895 points. Currently, this works for the following:
897 * `Go to tag declaration`_
898 * `Go to tag definition`_
899 * Symbol list items
900 * Build errors
901 * Message items
903 When using one of these actions, Geany remembers your current position
904 and jumps to the new one. If you decide to go back to your previous
905 position in the file, just use "Navigate back a location". To
906 get back to the new position again, just use "Navigate forward a
907 location". This makes it easier to navigate in e.g.  foreign code
908 and between different files.
911 Sending text through custom commands
912 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
914 You can define several custom commands in Geany and send the current
915 selection to one of these commands using the *Edit->Format->Send
916 Selection to* menu or keybindings. The output of the command will be
917 used to replace the current selection. This makes it possible to use
918 text formatting tools with Geany in a general way.
920 The selected text will be sent to the standard input of the executed
921 command, so the command should be able to read from it and it should
922 print all results to its standard output which will be read by
923 Geany. To help finding errors in executing the command, the output
924 of the program's standard error will be printed on Geany's standard
925 output.
927 If there is no selection, the whole current line is used instead.
929 To add a custom command, use the *Send Selection to->Set Custom
930 Commands* menu item. Click on *Add* to get a new item and type the
931 command. You can also specify some command line options. Empty
932 commands are not saved.
934 Normal shell quoting is supported, so you can do things like:
936 * ``sed 's/\./(dot)/g'``
938 The above example would normally be done with the `Replace all`_
939 function, but it can be handy to have common commands already set up.
941 Note that the command is not run in a shell, so if you want to use
942 shell features like pipes and command chains, you need to explicitly
943 launch the shell and pass it your command:
945 * ``sh -c 'sort | uniq'``
948 Context actions
949 ^^^^^^^^^^^^^^^
951 You can execute the context action command on the current word at the
952 cursor position or the available selection.  This word or selection
953 can be used as an argument to the command.
954 The context action is invoked by a menu entry in the popup menu of the
955 editor and also a keyboard shortcut (see the section called
956 `Keybindings`_).
958 The command can be specified in the preferences dialog and also for
959 each filetype (see "context_action_cmd" in the section called
960 `Filetype configuration`_). When the context action is invoked, the filetype
961 specific command is used if available, otherwise the command
962 specified in the preferences dialog is executed.
964 The current word or selection can be referred with the wildcard "%s"
965 in the command, it will be replaced by the current word or
966 selection before the command is executed.
968 For example a context action can be used to open API documentation
969 in a browser window, the command to open the PHP API documentation
970 would be::
972     firefox "http://www.php.net/%s"
974 when executing the command, the %s is substituted by the word near
975 the cursor position or by the current selection. If the cursor is at
976 the word "echo", a browser window will open(assumed your browser is
977 called firefox) and it will open the address: http://www.php.net/echo.
980 Autocompletion
981 ^^^^^^^^^^^^^^
983 Geany can offer a list of possible completions for symbols defined in the
984 tags and for all words in a document.
986 The autocompletion list for symbols is presented when the first few
987 characters of the symbol are typed (configurable, see `Editor Completions
988 preferences`_, default 4) or when the *Complete word*
989 keybinding is pressed (configurable, see `Editor keybindings`_,
990 default Ctrl-Space).
992 When the defined keybinding is typed and the *Autocomplete all words in
993 document* preference (in `Editor Completions preferences`_)
994 is selected then the autocompletion list will show all matching words
995 in the document, if there are no matching symbols.
997 If you don't want to use autocompletion it can be dismissed until
998 the next symbol by pressing Escape. The autocompletion list is updated
999 as more characters are typed so that it only shows completions that start
1000 with the characters typed so far. If no symbols begin with the sequence,
1001 the autocompletion window is closed.
1003 The up and down arrows will move the selected item. The highlighted
1004 item on the autocompletion list can be chosen from the list by pressing
1005 Enter/Return. You can also double-click to select an item. The sequence
1006 will be completed to match the chosen item, and if the *Drop rest of
1007 word on completion* preference is set (in `Editor Completions
1008 preferences`_) then any characters after the cursor that match
1009 a symbol or word are deleted.
1011 Word part completion
1012 ````````````````````
1013 By default, pressing Tab will complete the selected item by word part;
1014 useful e.g. for adding the prefix ``gtk_combo_box_entry_`` without typing it
1015 manually:
1017 * gtk_com<TAB>
1018 * gtk_combo_<TAB>
1019 * gtk_combo_box_<e><TAB>
1020 * gtk_combo_box_entry_<s><ENTER>
1021 * gtk_combo_box_entry_set_text_column
1023 The key combination can be changed from Tab - See `Editor keybindings`_.
1024 If you clear/change the key combination for word part completion, Tab
1025 will complete the whole word instead, like Enter.
1027 Scope autocompletion
1028 ````````````````````
1029 E.g.::
1031     struct
1032     {
1033         int i;
1034         char c;
1035     } foo;
1037 When you type ``foo.`` it will show an autocompletion list with 'i' and
1038 'c' symbols.
1040 It only works for languages that set parent scope names for e.g. struct
1041 members. Currently this means C-like languages. The C tag parser only
1042 parses global scopes, so this won't work for structs or objects declared
1043 in local scope.
1046 User-definable snippets
1047 ^^^^^^^^^^^^^^^^^^^^^^^
1049 Snippets are small strings or code constructs which can be replaced or
1050 completed to a more complex string. So you can save a lot of time when
1051 typing common strings and letting Geany do the work for you.
1052 To know what to complete or replace Geany reads a configuration file
1053 called ``snippets.conf`` at startup.
1055 Maybe you need to often type your name, so define a snippet like this::
1057     [Default]
1058     myname=Enrico Tröger
1060 Every time you write ``myname`` <TAB> in Geany, it will replace "myname"
1061 with "Enrico Tröger". The key to start autocompletion can be changed
1062 in the preferences dialog, by default it is TAB. The corresponding keybinding
1063 is called `Complete snippet`.
1065 **Paths**
1067 You can override the default snippets using the user
1068 ``snippets.conf`` file. Use the *Tools->Configuration
1069 Files->snippets.conf* menu item. See also `Configuration file paths`_.
1071 This adds the default settings to the user file if the file doesn't
1072 exist. Alternatively the file can be created manually, adding only
1073 the settings you want to change. All missing settings will be read
1074 from the system snippets file.
1076 **Snippet groups**
1078 The file ``snippets.conf`` contains sections defining snippets that
1079 are available for particular filetypes and in general.
1081 The two sections "Default" and "Special" apply to all filetypes.
1082 "Default" contains all snippets which are available for every
1083 filetype and "Special" contains snippets which can only be used in
1084 other snippets. So you can define often used parts of snippets and
1085 just use the special snippet as a placeholder (see the
1086 ``snippets.conf`` for details).
1088 You can define sections with the name of a filetype eg "C++".  The
1089 snippets in that section are only available for use in files with that
1090 filetype.  Snippets in filetype sections will hide snippets with the
1091 same name in the "Default" section when used in a file of that
1092 filetype.
1094 **Substitution sequences for snippets**
1096 To define snippets you can use several special character sequences which
1097 will be replaced when using the snippet:
1099 ================  =========================================================
1100 \\n or %newline%  Insert a new line (it will be replaced by the used EOL
1101                   char(s): LF, CR/LF, or CR).
1103 \\t or %ws%       Insert an indentation step, it will be replaced according
1104                   to the current document's indent mode.
1106 \\s               \\s to force whitespace at beginning or end of a value
1107                   ('key= value' won't work, use 'key=\\svalue')
1109 %cursor%          Place the cursor at this position after completion has
1110                   been done. You can define multiple %cursor% wildcards
1111                   and use the keybinding `Move cursor in snippet` to jump
1112                   to the next defined cursor position in the completed
1113                   snippet.
1115 %...%             "..." means the name of a key in the "Special" section.
1116                   If you have defined a key "brace_open" in the "Special"
1117                   section you can use %brace_open% in any other snippet.
1118 ================  =========================================================
1120 Snippet names must not contain spaces otherwise they won't
1121 work correctly. But beside that you can define almost any
1122 string as a snippet and use it later in Geany. It is not limited
1123 to existing contructs of certain programming languages(like ``if``,
1124 ``for``, ``switch``). Define whatever you need.
1126 **Template wildcards**
1128 Since Geany 0.15 you can also use most of the available templates wildcards
1129 listed in `Template wildcards`_. All wildcards which are listed as
1130 `available in snippets` can be used. For instance to improve the above example::
1132     [Default]
1133     myname=My name is {developer}
1134     mysystem=My system: {command:uname -a}
1136 this will replace ``myname`` with "My name is " and the value of the template
1137 preference ``developer``.
1139 **Word characters**
1141 You can change the way Geany recognizes the word to complete,
1142 that is how the start and end of a word is recognised when the
1143 snippet completion is requested. The section "Special" may
1144 contain a key "wordchars" which lists all characters a string may contain
1145 to be recognized as a word for completion. Leave it commented to use
1146 default characters or define it to add or remove characters to fit your
1147 needs.
1149 Snippet keybindings
1150 ```````````````````
1152 Normally you would type the snippet name and press Tab. However, you
1153 can define keybindings for snippets under the *Keybindings* group in
1154 ``snippets.conf``::
1156     [Keybindings]
1157     for=<Ctrl>7
1158     block_cursor=<Ctrl>8
1160 .. note::
1161     Snippet keybindings may be overridden by Geany's configurable
1162     keybindings.
1165 Inserting Unicode characters
1166 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1168 You can insert Unicode code points by hitting Ctrl-Shift-u, then still holding
1169 Ctrl-Shift, type some hex digits representing the code point for the character
1170 you want and hit Enter or Return (still holding Ctrl-Shift). If you release
1171 Ctrl-Shift before hitting Enter or Return (or any other character), the code
1172 insertion is completed, but the typed character is also entered.  In the case
1173 of Enter/Return, it is a newline, as you might expect.
1176 In some earlier versions of Geany, you might need to first unbind Ctrl-Shift-u
1177 in the `keybinding preferences`_, then select *Tools->Reload Configuration*
1178 or restart Geany. Note that it works slightly differently from other GTK
1179 applications, in that you'll need to continue to hold down the Ctrl and Shift
1180 keys while typing the code point hex digits (and the Enter or Return to finish the code point).
1183 Search, replace and go to
1184 -------------------------
1186 This section describes search-related commands from the Search menu
1187 and the editor window's popup menu:
1189 * Find
1190 * Find selection
1191 * Find usage
1192 * Find in files
1193 * Replace
1194 * Go to tag definition
1195 * Go to tag declaration
1196 * Go to line
1198 See also `Search`_ preferences.
1200 Toolbar entries
1201 ^^^^^^^^^^^^^^^
1202 There are also two toolbar entries:
1204 * Search bar
1205 * Go to line entry
1207 There are keybindings to focus each of these - see `Focus
1208 keybindings`_. Pressing Escape will then focus the editor.
1210 Search bar
1211 ``````````
1212 The quickest way to find some text is to use the search bar entry in
1213 the toolbar. This performs a case-insensitive search in the current
1214 document whilst you type. Pressing Enter will search again, and pressing
1215 Shift-Enter will search backwards.
1217 Find
1218 ^^^^
1220 The Find dialog is used for finding text in one or more open documents.
1222 .. image:: ./images/find_dialog.png
1225 Matching options
1226 ````````````````
1228 The syntax for the *Use regular expressions* option is shown in
1229 `Regular expressions`_.
1231 .. note::
1232     *Use escape sequences* is implied for regular expressions.
1234 The *Use multi-line matching* option enables multi-line regular
1235 expressions instead of single-line ones.  See `Regular expressions`_ for
1236 more details on the differences between the two modes.
1238 The *Use escape sequences* option will transform any escaped characters
1239 into their UTF-8 equivalent. For example, \\t will be transformed into
1240 a tab character. Other recognized symbols are: \\\\, \\n, \\r, \\uXXXX
1241 (Unicode characters).
1244 Find all
1245 ````````
1247 To find all matches, click on the Find All expander. This will reveal
1248 several options:
1250 * In Document
1251 * In Session
1252 * Mark
1254 Find All In Document will show a list of matching lines in the
1255 current document in the Messages tab of the Message Window. *Find All
1256 In Session* does the same for all open documents.
1258 Mark will highlight all matches in the current document with a
1259 colored box. These markers can be removed by selecting the
1260 Remove Markers command from the Document menu.
1263 Change font in search dialog text fields
1264 ````````````````````````````````````````
1266 All search related dialogs use a Monospace for the text input fields to
1267 increase the readability of input text. This is useful when you are
1268 typing input such as regular expressions with spaces, periods and commas which
1269 might it hard to read with a proportional font.
1271 If you want to change the font, you can do this easily
1272 by inserting the following style into your ``.gtkrc-2.0``
1273 (usually found in your home directory on UNIX-like systems and in the
1274 etc subdirectory of your Geany installation on Windows)::
1276     style "search_style"
1277     {
1278         font_name="Monospace 8"
1279     }
1280     widget "GeanyDialogSearch.*.GtkEntry" style:highest "search_style"
1282 Please note the addition of ":highest" in the last line which sets the priority
1283 of this style to the highest available. Otherwise, the style is ignored
1284 for the search dialogs.
1287 Find selection
1288 ^^^^^^^^^^^^^^
1289 The *Find Next/Previous Selection* commands perform a search for the
1290 current selected text. If nothing is selected, by default the current
1291 word is used instead. This can be customized by the
1292 *find_selection_type* preference - see `Various preferences`_.
1294 =====   =============================================
1295 Value   *find_selection_type* behaviour
1296 =====   =============================================
1297 0       Use the current word (default).
1298 1       Try the X selection first, then current word.
1299 2       Repeat last search.
1300 =====   =============================================
1303 Find usage
1304 ^^^^^^^^^^
1306 *Find Usage* searches all open files. It is similar to the *Find All In
1307 Session* option in the Find dialog.
1309 If there is a selection, then it is used as the search text; otherwise
1310 the current word is used. The current word is either taken from the
1311 word nearest the edit cursor, or the word underneath the popup menu
1312 click position when the popup menu is used. The search results are
1313 shown in the Messages tab of the Message Window.
1315 .. note::
1316     You can also use Find Usage for symbol list items from the popup
1317     menu.
1320 Find in files
1321 ^^^^^^^^^^^^^
1323 *Find in Files* is a more powerful version of *Find Usage* that searches
1324 all files in a certain directory using the Grep tool. The Grep tool
1325 must be correctly set in Preferences to the path of the system's Grep
1326 utility. GNU Grep is recommended (see note below).
1328 .. image:: ./images/find_in_files_dialog.png
1330 The *Search* field is initially set to the current word in the editor
1331 (depending on `Search`_ preferences).
1333 The *Files* setting allows to choose which files are included in the
1334 search, depending on the mode:
1337     Search in all files;
1338 Project
1339     Use the current project's patterns, see `Project properties`_;
1340 Custom
1341     Use custom patterns.
1343 Both project and custom patterns use a glob-style syntax, each
1344 pattern separated by a space. To search all ``.c`` and ``.h`` files,
1345 use: ``*.c *.h``.
1346 Note that an empty pattern list searches in all files rather
1347 than none.
1349 The *Directory* field is initially set to the current document's directory,
1350 unless this field has already been edited and the current document has
1351 not changed. Otherwise, the current document's directory is prepended to
1352 the drop-down history. This can be disabled - see `Search`_ preferences.
1354 The *Encoding* field can be used to define the encoding of the files
1355 to be searched. The entered search text is converted to the chosen encoding
1356 and the search results are converted back to UTF-8.
1358 The *Extra options* field is used to pass any additional arguments to
1359 the grep tool.
1361 .. note::
1362     The *Files* setting uses ``--include=`` when searching recursively,
1363     *Recurse in subfolders* uses ``-r``; both are GNU Grep options and may
1364     not work with other Grep implementations.
1367 Filtering out version control files
1368 ```````````````````````````````````
1370 When using the *Recurse in subfolders* option with a directory that's
1371 under version control, you can set the *Extra options* field to filter
1372 out version control files.
1374 If you have GNU Grep >= 2.5.2 you can use the ``--exclude-dir``
1375 argument to filter out CVS and hidden directories like ``.svn``.
1377 Example: ``--exclude-dir=.svn --exclude-dir=CVS``
1379 If you have an older Grep, you can try using the ``--exclude`` flag
1380 to filter out filenames.
1382 SVN Example: ``--exclude=*.svn-base``
1384 The --exclude argument only matches the file name part, not the path.
1387 Replace
1388 ^^^^^^^
1390 The Replace dialog is used for replacing text in one or more open
1391 documents.
1393 .. image:: ./images/replace_dialog.png
1395 The Replace dialog has the same options for matching text as the Find
1396 dialog. See the section `Matching options`_.
1398 The *Use regular expressions* option allows regular expressions to
1399 be used in the search string and back references in the replacement
1400 text -- see the entry for '\\n' in `Regular expressions`_.
1402 Replace all
1403 ```````````
1405 To replace several matches, click on the *Replace All* expander. This
1406 will reveal several options:
1408 * In Document
1409 * In Session
1410 * In Selection
1412 *Replace All In Document* will replace all matching text in the
1413 current document. *Replace All In Session* does the same for all open
1414 documents. *Replace All In Selection* will replace all matching text
1415 in the current selection of the current document.
1418 Go to tag definition
1419 ^^^^^^^^^^^^^^^^^^^^
1421 If the current word or selection is the name of a tag definition
1422 (e.g. a function name) and the file containing the tag definition is
1423 open, this command will switch to that file and go to the
1424 corresponding line number. The current word is either the word
1425 nearest the edit cursor, or the word underneath the popup menu click
1426 position when the popup menu is used.
1428 .. note::
1429     If the corresponding tag is on the current line, Geany will first
1430     look for a tag declaration instead, as this is more useful.
1431     Likewise *Go to tag declaration* will search for a tag definition
1432     first in this case also.
1435 Go to tag declaration
1436 ^^^^^^^^^^^^^^^^^^^^^
1438 Like *Go to tag definition*, but for a forward declaration such as a
1439 C function prototype or ``extern`` declaration instead of a function
1440 body.
1443 Go to line
1444 ^^^^^^^^^^
1446 Go to a particular line number in the current file.
1449 Regular expressions
1450 ^^^^^^^^^^^^^^^^^^^
1452 You can use regular expressions in the Find and Replace dialogs
1453 by selecting the *Use regular expressions* check box (see `Matching
1454 options`_). The syntax is Perl compatible. Basic syntax is described
1455 in the table below. For full details, see
1456 http://www.geany.org/manual/gtk/glib/glib-regex-syntax.html.
1458 By default regular expressions are matched on a line-by-line basis.
1459 If you are interested in multi-line regular expressions, matched against
1460 the whole buffer at once, see the section `Multi-line regular expressions`_
1461 below.
1463 .. note::
1464     1. The *Use escape sequences* dialog option always applies for regular
1465        expressions.
1466     2. Searching backwards with regular expressions is not supported.
1467     3. The *Use multi-line matching* dialog option to select single or
1468        multi-line matching.
1470 **In a regular expression, the following characters are interpreted:**
1472 ======= ============================================================
1473 .       Matches any character.
1475 (       This marks the start of a region for tagging a match.
1477 )       This marks the end of a tagged region.
1479 \\n     Where n is 1 through 9 refers to the first through ninth tagged
1480         region when searching or replacing.
1482         Searching for (Wiki)\\1 matches WikiWiki.
1484         If the search string was Fred([1-9])XXX and the
1485         replace string was Sam\\1YYY, when applied to Fred2XXX this
1486         would generate Sam2YYY.
1488 \\0     When replacing, the whole matching text.
1490 \\b     This matches a word boundary.
1492 \\c     A backslash followed by d, D, s, S, w or W, becomes a
1493         character class (both inside and outside sets []).
1495         * d: decimal digits
1496         * D: any char except decimal digits
1497         * s: whitespace (space, \\t \\n \\r \\f \\v)
1498         * S: any char except whitespace (see above)
1499         * w: alphanumeric & underscore
1500         * W: any char except alphanumeric & underscore
1502 \\x     This allows you to use a character x that would otherwise have
1503         a special meaning. For example, \\[ would be interpreted as [
1504         and not as the start of a character set. Use \\\\ for a literal
1505         backslash.
1507 [...]   Matches one of the characters in the set. If the first
1508         character in the set is ^, it matches the characters NOT in
1509         the set, i.e. complements the set. A shorthand S-E (start
1510         dash end) is used to specify a set of characters S up to E,
1511         inclusive.
1513         The special characters ] and - have no special
1514         meaning if they appear first in the set. - can also be last
1515         in the set. To include both, put ] first: []A-Z-].
1517         Examples::
1519         []|-]    matches these 3 chars
1520         []-|]    matches from ] to | chars
1521         [a-z]    any lowercase alpha
1522         [^]-]    any char except - and ]
1523         [^A-Z]   any char except uppercase alpha
1524         [a-zA-Z] any alpha
1526 ^       This matches the start of a line (unless used inside a set, see
1527         above).
1529 $       This matches the end of a line.
1531 \*      This matches 0 or more times. For example, Sa*m matches Sm, Sam,
1532         Saam, Saaam and so on.
1534 \+      This matches 1 or more times. For example, Sa+m matches Sam,
1535         Saam, Saaam and so on.
1537 \?      This matches 0 or 1 time(s). For example, Joh?n matches John, Jon.
1538 ======= ============================================================
1540 .. note::
1541     This table is adapted from Scintilla and SciTE documentation,
1542     distributed under the `License for Scintilla and SciTE`_.
1545 Multi-line regular expressions
1546 ``````````````````````````````
1548 .. note::
1549     The *Use multi-line matching* dialog option enables multi-line
1550     regular expressions.
1552 Multi-line regular expressions work just like single-line ones but a
1553 match can span several lines.
1555 While the syntax is the same, a few practical differences applies:
1557 ======= ============================================================
1558 .       Matches any character but newlines.  This behavior can be changed
1559         to also match newlines using the (?s) option, see
1560         http://www.geany.org/manual/gtk/glib/glib-regex-syntax.html#idp5671632
1562 [^...]  A negative range (see above) *will* match newlines if they are
1563         not explicitly listed in that negative range.  For example, range
1564         [^a-z] will match newlines, while range [^a-z\\r\\n] won't.
1565         While this is the expected behavior, it can lead to tricky
1566         problems if one doesn't think about it when writing an expression.
1567 ======= ============================================================
1570 View menu
1571 ---------
1572 The View menu allows various elements of the main window to be shown
1573 or hidden, and also provides various display-related editor options.
1575 Color schemes menu
1576 ^^^^^^^^^^^^^^^^^^
1577 The Color schemes menu is available under the *View->Editor* submenu.
1578 It lists various color schemes for editor highlighting styles,
1579 including the default scheme first. Other items are available based
1580 on what color scheme files Geany found at startup.
1582 Color scheme files are read from the `Configuration file paths`_ under
1583 the ``colorschemes`` subdirectory. They should have the extension
1584 ``.conf``. The default color scheme
1585 is read from ``filetypes.common``.
1587 The `[named_styles] section`_  and `[named_colors] section`_ are the
1588 same as for ``filetypes.common``.
1590 The ``[theme_info]`` section can contain information about the
1591 theme. The ``name`` and ``description`` keys are read to set the
1592 menu item text and tooltip, respectively. These keys can have
1593 translations, e.g.::
1595     key=Hello
1596     key[de]=Hallo
1597     key[fr_FR]=Bonjour
1599 Tags
1600 ----
1602 Tags are information that relates symbols in a program with the
1603 source file location of the declaration and definition.
1605 Geany has built-in functionality for generating tag information (aka
1606 "workspace tags") for supported filetypes when you open a file.  You
1607 can also have Geany automatically load external tag files (aka "global
1608 tags files") upon startup, or manually using *Tools --> Load Tags*.
1610 Geany uses its own tag file format, similar to what ``ctags`` uses
1611 (but is incompatible with ctags). You use Geany to generate global
1612 tags files, as described below.
1615 Workspace tags
1616 ^^^^^^^^^^^^^^
1618 Tags for each document are parsed whenever a file is loaded, saved or
1619 modified (see *Symbol list update frequency* preference in the `Editor
1620 Completions preferences`_). These are shown in the Symbol list in the
1621 Sidebar. These tags are also used for autocompletion of symbols and calltips
1622 for all documents open in the current session that have the same filetype.
1624 The *Go to Tag* commands can be used with all workspace tags. See
1625 `Go to tag definition`_.
1628 Global tags
1629 ^^^^^^^^^^^
1631 Global tags are used to provide autocompletion of symbols and calltips
1632 without having to open the corresponding source files. This is intended
1633 for library APIs, as the tags file only has to be updated when you upgrade
1634 the library.
1636 You can load a custom global tags file in two ways:
1638 * Using the *Load Tags* command in the Tools menu.
1639 * By moving or symlinking tags files to the ``tags`` subdirectory of
1640   one of the `configuration file paths`_ before starting Geany.
1642 You can either download these files or generate your own. They have
1643 the format::
1645     name.lang_ext.tags
1647 *lang_ext* is one of the extensions set for the filetype associated
1648 with the tags. See the section called `Filetype extensions`_ for
1649 more information.
1652 Default global tags files
1653 `````````````````````````
1655 For some languages, a list of global tags is loaded when the
1656 corresponding filetype is first used. Currently these are for:
1658 * C
1659 * Pascal
1660 * PHP
1661 * HTML -- &symbol; completion, e.g. for ampersand, copyright, etc.
1662 * LaTeX
1663 * Python
1666 Global tags file format
1667 ```````````````````````
1669 Global tags files can have three different formats:
1671 * Tagmanager format
1672 * Pipe-separated format
1673 * CTags format
1675 The first line of global tags files should be a comment, introduced
1676 by ``#`` followed by a space and a string like ``format=pipe``,
1677 ``format=ctags`` or ``format=tagmanager`` respectively, these are
1678 case-sensitive.  This helps Geany to read the file properly. If this
1679 line is missing, Geany tries to auto-detect the used format but this
1680 might fail.
1683 The Tagmanager format is a bit more complex and is used for files
1684 created by the ``geany -g`` command. There is one tag per line.
1685 Different tag attributes like the return value or the argument list
1686 are separated with different characters indicating the type of the
1687 following argument.  This is the more complete and recommended tag
1688 format.
1690 Pipe-separated format
1691 *********************
1692 The Pipe-separated format is easier to read and write.
1693 There is one tag per line and different tag attributes are separated
1694 by the pipe character (``|``). A line looks like::
1696     basename|string|(string path [, string suffix])|
1698 | The first field is the tag name (usually a function name).
1699 | The second field is the type of the return value.
1700 | The third field is the argument list for this tag.
1701 | The fourth field is the description for this tag but
1702   currently unused and should be left empty.
1704 Except for the first field (tag name), all other field can be left
1705 empty but the pipe separator must appear for them.
1707 You can easily write your own global tag files using this format.
1708 Just save them in your tags directory, as described earlier in the
1709 section `Global tags`_.
1711 CTags format
1712 ************
1713 This is the format that ctags generates, and that is used by Vim.
1714 This format is compatible with the format historically used by Vi.
1716 The format is described at http://ctags.sourceforge.net/FORMAT, but
1717 for the full list of existing extensions please refer to ctags.
1718 However, note that Geany may actually only honor a subset of the
1719 existing extensions.
1721 Generating a global tags file
1722 `````````````````````````````
1724 You can generate your own global tags files by parsing a list of
1725 source files. The command is::
1727     geany -g [-P] <Tag File> <File list>
1729 * Tag File filename should be in the format described earlier --
1730   see the section called `Global tags`_.
1731 * File list is a list of filenames, each with a full path (unless
1732   you are generating C/C++ tags and have set the CFLAGS environment
1733   variable appropriately).
1734 * ``-P`` or ``--no-preprocessing`` disables using the C pre-processor
1735   to process ``#include`` directives for C/C++ source files. Use this
1736   option if you want to specify each source file on the command-line
1737   instead of using a 'master' header file. Also can be useful if you
1738   don't want to specify the CFLAGS environment variable.
1740 Example for the wxD library for the D programming language::
1742     geany -g wxd.d.tags /home/username/wxd/wx/*.d
1745 Generating C/C++ tag files
1746 **************************
1747 You may need to first setup the `C ignore.tags`_ file.
1749 For C/C++ tag files gcc is required by default, so that header files
1750 can be preprocessed to include any other headers they depend upon. If
1751 you do not want this, use the ``-P`` option described above.
1753 For preprocessing, the environment variable CFLAGS should be set with
1754 appropriate ``-I/path`` include paths. The following example works with
1755 the bash shell, generating tags for the GnomeUI library::
1757     CFLAGS=`pkg-config --cflags libgnomeui-2.0` geany -g gnomeui.c.tags \
1758     /usr/include/libgnomeui-2.0/gnome.h
1760 You can adapt this command to use CFLAGS and header files appropriate
1761 for whichever libraries you want.
1764 Generating tag files on Windows
1765 *******************************
1766 This works basically the same as on other platforms::
1768     "c:\program files\geany\bin\geany" -g c:\mytags.php.tags c:\code\somefile.php
1771 C ignore.tags
1772 ^^^^^^^^^^^^^
1774 You can ignore certain tags for C-based languages if they would lead
1775 to wrong parsing of the code. Use the *Tools->Configuration
1776 Files->ignore.tags* menu item to open the user ``ignore.tags`` file.
1777 See also `Configuration file paths`_.
1779 List all tag names you want to ignore in this file, separated by spaces
1780 and/or newlines.
1782 Example::
1784     G_GNUC_NULL_TERMINATED
1785     G_GNUC_PRINTF
1786     G_GNUC_WARN_UNUSED_RESULT
1788 This will parse code like:
1790 ``gchar **utils_strv_new(const gchar *first, ...)
1791 G_GNUC_NULL_TERMINATED;``
1793 More detailed information about ignore tags usage from the Exuberant Ctags
1794 manual page:
1796     Specifies a list of identifiers which are to be specially handled
1797     while  parsing C and C++ source files. This option is specifically
1798     provided to handle special cases arising through the use of
1799     pre-processor macros. When the identifiers listed are simple identifiers,
1800     these identifiers will be ignored during parsing of the source files.
1801     If an identifier is suffixed with a '+' character, ctags will also
1802     ignore any parenthesis-enclosed argument list which may immediately
1803     follow the identifier in the source files.
1804     If two identifiers are separated with the '=' character, the first
1805     identifiers is replaced by the second identifiers for parsing purposes.
1807 For even more detailed information please read the manual page of
1808 Exuberant Ctags.
1810 Geany extends Ctags with a '*' character suffix - this means use
1811 prefix matching, e.g. G_GNUC_* will match G_GNUC_NULL_TERMINATED, etc.
1812 Note that prefix match items should be put after other items to ensure
1813 that items like G_GNUC_PRINTF+ get parsed correctly.
1816 Preferences
1817 -----------
1819 You may adjust Geany's settings using the Edit --> Preferences
1820 dialog. Any changes you make there can be applied by hitting either
1821 the Apply or the OK button. These settings will persist between Geany
1822 sessions. Note that most settings here have descriptive popup bubble
1823 help -- just hover the mouse over the item in question to get help
1824 on it.
1826 You may also adjust some View settings (under the View menu) that
1827 persist between Geany sessions. The settings under the Document menu,
1828 however, are only for the current document and revert to defaults
1829 when restarting Geany.
1831 .. note::
1832     In the paragraphs that follow, the text describing a dialog tab
1833     comes after the screenshot of that tab.
1836 General Startup preferences
1837 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
1839 .. image:: ./images/pref_dialog_gen_startup.png
1841 Startup
1842 ```````
1844 Load files from the last session
1845     On startup, load the same files you had open the last time you
1846     used Geany.
1848 Load virtual terminal support
1849     Load the library for running a terminal in the message window area.
1851 Enable plugin support
1852     Allow plugins to be used in Geany.
1854 Shutdown
1855 ````````
1856 Save window position and geometry
1857     Save the current position and size of the main window so next time
1858     you open Geany it's in the same location.
1860 Confirm Exit
1861     Have a dialog pop up to confirm that you really want to quit Geany.
1863 Paths
1864 `````
1866 Startup path
1867     Path to start in when opening or saving files.
1868     It must be an absolute path.
1870 Project files
1871     Path to start in when opening project files.
1873 Extra plugin path
1874     By default Geany looks in the system installation and the user
1875     configuration - see `Plugins`_. In addition the path entered here will be
1876     searched.
1877     Usually you do not need to set an additional path to search for
1878     plugins. It might be useful when Geany is installed on a multi-user machine
1879     and additional plugins are available in a common location for all users.
1880     Leave blank to not set an additional lookup path.
1883 General Miscellaneous preferences
1884 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1886 .. image:: ./images/pref_dialog_gen_misc.png
1888 Miscellaneous
1889 `````````````
1891 Beep on errors when compilation has finished
1892     Have the computer make a beeping sound when compilation of your program
1893     has completed or any errors occurred.
1895 Switch status message list at new message
1896     Switch to the status message tab (in the notebook window at the bottom)
1897     once a new status message arrives.
1899 Suppress status messages in the status bar
1900     Remove all messages from the status bar. The messages are still displayed
1901     in the status messages window.
1903     .. tip::
1904         Another option is to use the *Switch to Editor* keybinding - it
1905         reshows the document statistics on the status bar. See `Focus
1906         keybindings`_.
1908 Use Windows File Open/Save dialogs
1909     Defines whether to use the native Windows File Open/Save dialogs or
1910     whether to use the GTK default dialogs.
1912 Auto-focus widgets (focus follows mouse)
1913     Give the focus automatically to widgets below the mouse cursor.
1914     This works for the main editor widget, the scribble, the toolbar search field
1915     goto line fields and the VTE.
1917 Search
1918 ``````
1920 Always wrap search
1921     Always wrap search around the document when finding a match.
1923 Hide the Find dialog
1924     Hide the `Find`_ dialog after clicking Find Next/Previous.
1926 Use the current word under the cursor for Find dialogs
1927     Use current word under the cursor when opening the Find, Find in Files or Replace dialog and
1928     there is no selection. When this option is disabled, the search term last used in the
1929     appropriate Find dialog is used.
1931 Use the current file's directory for Find in Files
1932     When opening the Find in Files dialog, set the directory to search to the directory of the current
1933     active file. When this option is disabled, the directory of the last use of the Find in Files
1934     dialog is used. See `Find in Files`_ for details.
1936 Projects
1937 ````````
1939 Use project-based session files
1940     Save your current session when closing projects. You will be able to
1941     resume different project sessions, automatically opening the files
1942     you had open previously.
1944 Store project file inside the project base directory
1945     When creating new projects, the default path for the project file contains
1946     the project base path. Without this option enabled, the default project file
1947     path is one level above the project base path.
1948     In either case, you can easily set the final project file path in the
1949     *New Project* dialog. This option provides the more common
1950     defaults automatically for convenience.
1953 Interface preferences
1954 ^^^^^^^^^^^^^^^^^^^^^
1956 .. image:: ./images/pref_dialog_interface_interface.png
1958 Sidebar
1959 ```````
1961 Show sidebar
1962     Whether to show the sidebar at all.
1964 Show symbol list
1965     Show the list of functions, variables, and other information in the
1966     current document you are editing.
1968 Show documents list
1969     Show all the documents you have open currently. This can be used to
1970     change between documents (see `Switching between documents`_) and
1971     to perform some common operations such as saving, closing and reloading.
1973 Position
1974     Whether to place the sidebar on the left or right of the editor window.
1976 Message window
1977 ``````````````
1979 Position
1980     Whether to place the message window on the bottom or right of the editor window.
1982 Fonts
1983 `````
1985 Editor
1986     Change the font used to display documents.
1988 Symbol list
1989     Change the font used for the Symbols sidebar tab.
1991 Message window
1992     Change the font used for the message window area.
1994 Miscellaneous
1995 `````````````
1997 Show status bar
1998     Show the status bar at the bottom of the main window. It gives information about
1999     the file you are editing like the line and column you are on, whether any
2000     modifications were done, the file encoding, the filetype and other information.
2002 Interface Notebook tab preferences
2003 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2005 .. image:: ./images/pref_dialog_interface_notebook.png
2007 Editor tabs
2008 ```````````
2010 Show editor tabs
2011     Show a notebook tab for all documents so you can switch between them
2012     using the mouse (instead of using the Documents window).
2014 Show close buttons
2015     Make each tab show a close button so you can easily close open
2016     documents.
2018 Placement of new file tabs
2019     Whether to create a document with its notebook tab to the left or
2020     right of all existing tabs.
2022 Next to current
2023     Whether to place file tabs next to the current tab
2024     rather than at the edges of the notebook.
2026 Double-clicking hides all additional widgets
2027     Whether to call the View->Toggle All Additional Widgets command
2028     when double-clicking on a notebook tab.
2030 Tab positions
2031 `````````````
2033 Editor
2034     Set the positioning of the editor's notebook tabs to the right,
2035     left, top, or bottom of the editing window.
2037 Sidebar
2038     Set the positioning of the sidebar's notebook tabs to the right,
2039     left, top, or bottom of the sidebar window.
2041 Message window
2042     Set the positioning of the message window's notebook tabs to the
2043     right, left, top, or bottom of the message window.
2046 Interface Toolbar preferences
2047 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2049 Affects the main toolbar underneath the menu bar.
2051 .. image:: ./images/pref_dialog_interface_toolbar.png
2053 Toolbar
2054 ```````
2056 Show Toolbar
2057     Whether to show the toolbar.
2059 Append Toolbar to the Menu
2060     Allows to append the toolbar to the main menu bar instead of placing it below.
2061     This is useful to save vertical space.
2063 Customize Toolbar
2064     See `Customizing the toolbar`_.
2066 Appearance
2067 ``````````
2069 Icon Style
2070     Select the toolbar icon style to use - either icons and text, just
2071     icons or just text.
2072     The choice System default uses whatever icon style is set by GTK.
2074 Icon size
2075     Select the size of the icons you see (large, small or very small).
2076     The choice System default uses whatever icon size is set by GTK.
2079 Editor Features preferences
2080 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2082 .. image:: ./images/pref_dialog_edit_features.png
2084 Features
2085 ````````
2087 Line wrapping
2088     Show long lines wrapped around to new display lines.
2090 .. _smart_home_key:
2092 "Smart" home key
2093     Whether to move the cursor to the first non-whitespace character
2094     on the line when you hit the home key on your keyboard. Pressing it
2095     again will go to the very start of the line.
2097 Disable Drag and Drop
2098     Do not allow the dragging and dropping of selected text in documents.
2100 Code folding
2101     Allow groups of lines in a document to be collapsed for easier
2102     navigation/editing.
2104 Fold/Unfold all children of a fold point
2105     Whether to fold/unfold all child fold points when a parent line
2106     is folded.
2108 Use indicators to show compile errors
2109     Underline lines with compile errors using red squiggles to indicate
2110     them in the editor area.
2112 Newline strips trailing spaces
2113     Remove any whitespace at the end of the line when you hit the
2114     Enter/Return key. See also `Strip trailing spaces`_.  Note
2115     auto indentation is calculated before stripping, so although this
2116     setting will clear a blank line, it will not set the next line
2117     indentation back to zero.
2119 Line breaking column
2120     The editor column number to insert a newline at when Line Breaking
2121     is enabled for the current document.
2123 Comment toggle marker
2124     A string which is added when toggling a line comment in a source file.
2125     It is used to mark the comment as toggled.
2128 Editor Indentation preferences
2129 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2131 .. image:: ./images/pref_dialog_edit_indentation.png
2133 Indentation group
2134 `````````````````
2136 See `Indentation`_ for more information.
2138 Width
2139     The width of a single indent size in spaces. By default the indent
2140     size is equivalent to 4 spaces.
2142 Detect width from file
2143     Try to detect and set the indent width based on file content, when
2144     a file is opened.
2146 Type
2147     When Geany inserts indentation, whether to use:
2149     * Just Tabs
2150     * Just Spaces
2151     * Tabs and Spaces, depending on how much indentation is on a line
2153     The *Tabs and Spaces* indent type is also known as *Soft tab
2154     support* in some other editors.
2156 Detect type from file
2157     Try to detect and set the indent type based on file content, when
2158     a file is opened.
2160 Auto-indent mode
2161     The type of auto-indentation you wish to use after pressing Enter,
2162     if any.
2164     Basic
2165         Just add the indentation of the previous line.
2166     Current chars
2167         Add indentation based on the current filetype and any characters at
2168         the end of the line such as ``{``, ``}`` for C, ``:`` for Python.
2169     Match braces
2170         Like *Current chars* but for C-like languages, make a closing
2171         ``}`` brace line up with the matching opening brace.
2173 Tab key indents
2174     If set, pressing tab will indent the current line or selection, and
2175     unindent when pressing Shift-tab. Otherwise, the tab key will
2176     insert a tab character into the document (which can be different
2177     from indentation, depending on the indent type).
2179     .. note::
2180         There are also separate configurable keybindings for indent &
2181         unindent, but this preference allows the tab key to have different
2182         meanings in different contexts - e.g. for snippet completion.
2184 Editor Completions preferences
2185 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2187 .. image:: ./images/pref_dialog_edit_completions.png
2189 Completions
2190 ```````````
2192 Snippet Completion
2193     Whether to replace special keywords after typing Tab into a
2194     pre-defined text snippet.
2195     See `User-definable snippets`_.
2197 XML/HTML tag auto-closing
2198     When you open an XML/HTML tag automatically generate its
2199     completion tag.
2201 Automatic continuation multi-line comments
2202     Continue automatically multi-line comments in languages like C, C++
2203     and Java when a new line is entered inside such a comment.
2204     With this option enabled, Geany will insert a ``*`` on every new line
2205     inside a multi-line comment, for example when you press return in the
2206     following C code::
2208      /*
2209       * This is a C multi-line comment, press <Return>
2211     then Geany would insert::
2213       *
2215     on the next line with the correct indentation based on the previous line,
2216     as long as the multi-line is not closed by ``*/``.
2218 Autocomplete symbols
2219     When you start to type a symbol name, look for the full string to
2220     allow it to be completed for you.
2222 Autocomplete all words in document
2223     When you start to type a word, Geany will search the whole document for
2224     words starting with the typed part to complete it, assuming there
2225     are no tag names to show.
2227 Drop rest of word on completion
2228     Remove any word part to the right of the cursor when choosing a
2229     completion list item.
2231 Characters to type for autocompletion
2232     Number of characters of a word to type before autocompletion is
2233     displayed.
2235 Completion list height
2236     The number of rows to display for the autocompletion window.
2238 Max. symbol name suggestions
2239     The maximum number of items in the autocompletion list.
2241 Symbol list update frequency
2242     The minimum delay (in milliseconds) between two symbol list updates.
2244     This option determines how frequently the tag list is updated for the
2245     current document. The smaller the delay, the more up-to-date the symbol
2246     list (and then the completions); but rebuilding the symbol list has a
2247     cost in performance, especially with large files.
2249     The default value is 250ms, which means the symbol list will be updated
2250     at most four times per second, even if the document changes continuously.
2252     A value of 0 disables automatic updates, so the symbol list will only be
2253     updated upon document saving.
2256 Auto-close quotes and brackets
2257 ``````````````````````````````
2259 Geany can automatically insert a closing bracket and quote characters when
2260 you open them. For instance, you type a ``(`` and Geany will automatically
2261 insert ``)``. With the following options, you can define for which
2262 characters this should work.
2264 Parenthesis ( )
2265     Auto-close parenthesis when typing an opening one
2267 Curly brackets { }
2268     Auto-close curly brackets (braces) when typing an opening one
2270 Square brackets [ ]
2271     Auto-close square brackets when typing an opening one
2273 Single quotes ' '
2274     Auto-close single quotes when typing an opening one
2276 Double quotes " "
2277     Auto-close double quotes when typing an opening one
2280 Editor Display preferences
2281 ^^^^^^^^^^^^^^^^^^^^^^^^^^
2283 This is for visual elements displayed in the editor window.
2285 .. image:: ./images/pref_dialog_edit_display.png
2287 Display
2288 ```````
2290 Invert syntax highlighting colors
2291     Invert all colors, by default this makes white text on a black
2292     background.
2294 Show indendation guides
2295     Show vertical lines to help show how much leading indentation there
2296     is on each line.
2298 Show whitespaces
2299     Mark all tabs with an arrow "-->" symbol and spaces with dots to
2300     show which kinds of whitespace are used.
2302 Show line endings
2303     Display a symbol everywhere that a carriage return or line feed
2304     is present.
2306 Show line numbers
2307     Show or hide the Line Number margin.
2309 Show markers margin
2310     Show or hide the small margin right of the line numbers, which is used
2311     to mark lines.
2313 Stop scrolling at last line
2314     When enabled Geany stops scrolling when at the last line of the document.
2315     Otherwise you can scroll one more page even if there are no real lines.
2318 Long line marker
2319 ````````````````
2321 The long line marker helps to indicate overly-long lines, or as a hint
2322 to the user for when to break the line.
2324 Type
2325     Line
2326         Show a thin vertical line in the editor window at the given column
2327         position.
2328     Background
2329         Change the background color of characters after the given column
2330         position to the color set below. (This is recommended over the
2331         *Line* setting if you use proportional fonts).
2332     Disabled
2333         Don't mark long lines at all.
2335 Long line marker
2336     Set this value to a value greater than zero to specify the column
2337     where it should appear.
2339 Long line marker color
2340     Set the color of the long line marker.
2343 Virtual spaces
2344 ``````````````
2346 Virtual space is space beyond the end of each line.
2347 The cursor may be moved into virtual space but no real space will be
2348 added to the document until there is some text typed or some other
2349 text insertion command is used.
2351 Disabled
2352     Do not show virtual spaces
2354 Only for rectangular selections
2355     Only show virtual spaces beyond the end of lines when drawing a rectangular selection
2357 Always
2358     Always show virtual spaces beyond the end of lines
2361 Files preferences
2362 ^^^^^^^^^^^^^^^^^
2364 .. image:: ./images/pref_dialog_files.png
2366 New files
2367 `````````
2369 Open new documents from the command-line
2370     Whether to create new documents when passing filenames that don't
2371     exist from the command-line.
2373 Default encoding (new files)
2374     The type of file encoding you wish to use when creating files.
2376 Used fixed encoding when opening files
2377     Assume all files you are opening are using the type of encoding specified below.
2379 Default encoding (existing files)
2380     Opens all files with the specified encoding instead of auto-detecting it.
2381     Use this option when it's not possible for Geany to detect the exact encoding.
2383 Default end of line characters
2384     The end of line characters to which should be used for new files.
2385     On Windows systems, you generally want to use CR/LF which are the common
2386     characters to mark line breaks.
2387     On Unix-like systems, LF is default and CR is used on MAC systems.
2389 Saving files
2390 ````````````
2391 Perform formatting operations when a document is saved. These
2392 can each be undone with the Undo command.
2394 Ensure newline at file end
2395     Add a newline at the end of the document if one is missing.
2397 Ensure consistent line endings
2398     Ensures that newline characters always get converted before
2399     saving, avoiding mixed line endings in the same file.
2401 .. _Strip trailing spaces:
2403 Strip trailing spaces
2404     Remove any whitespace at the end of each document line.
2406     .. note::
2407         This does not apply to Diff documents, e.g. patch files.
2409 Replace tabs with spaces
2410     Replace all tabs in the document with the equivalent number of spaces.
2412     .. note::
2413         It is better to use spaces to indent than use this preference - see
2414         `Indentation`_.
2416 Miscellaneous
2417 `````````````
2419 Recent files list length
2420     The number of files to remember in the recently used files list.
2422 Disk check timeout
2423     The number of seconds to periodically check the current document's
2424     file on disk in case it has changed. Setting it to 0 will disable
2425     this feature.
2427     .. note::
2428         These checks are only performed on local files. Remote files are
2429         not checked for changes due to performance issues
2430         (remote files are files in ``~/.gvfs/``).
2433 Tools preferences
2434 ^^^^^^^^^^^^^^^^^
2436 .. image:: ./images/pref_dialog_tools.png
2438 Tool paths
2439 ``````````
2441 Terminal
2442     The command to execute a script in a terminal.  Occurrences of %c
2443     in the command are substituted with the run script name, see
2444     `Terminal emulators`_.
2446 Browser
2447     The location of your web browser executable.
2449 Grep
2450     The location of the grep executable.
2452 .. note::
2453     For Windows users: at the time of writing it is recommended to use
2454     the grep.exe from the UnxUtils project
2455     (http://sourceforge.net/projects/unxutils). The grep.exe from the
2456     Mingw project for instance might not work with Geany at the moment.
2458 Commands
2459 ````````
2461 Context action
2462     Set this to a command to execute on the current word.
2463     You can use the "%s" wildcard to pass the current word below the cursor
2464     to the specified command.
2467 Template preferences
2468 ^^^^^^^^^^^^^^^^^^^^
2470 This data is used as meta data for various template text to insert into
2471 a document, such as the file header. You only need to set fields that
2472 you want to use in your template files.
2474 .. image:: ./images/pref_dialog_templ.png
2476 Template data
2477 `````````````
2479 Developer
2480     The name of the developer who will be creating files.
2482 Initials
2483     The initials of the developer.
2485 Mail address
2486     The email address of the developer.
2488     .. note::
2489         You may wish to add anti-spam markup, e.g. ``name<at>site<dot>ext``.
2491 Company
2492     The company the developer is working for.
2494 Initial version
2495     The initial version of files you will be creating.
2497 Year
2498     Specify a format for the {year} wildcard. You can use any conversion specifiers
2499     which can be used with the ANSI C strftime function.  For details please see
2500     http://man.cx/strftime.
2502 Date
2503     Specify a format for the {date} wildcard. You can use any conversion specifiers
2504     which can be used with the ANSI C strftime function.  For details please see
2505     http://man.cx/strftime.
2507 Date & Time
2508     Specify a format for the {datetime} wildcard. You can use any conversion specifiers
2509     which can be used with the ANSI C strftime function.  For details please see
2510     http://man.cx/strftime.
2513 Keybinding preferences
2514 ^^^^^^^^^^^^^^^^^^^^^^
2516 .. image:: ./images/pref_dialog_keys.png
2518 There are some commands listed in the keybinding dialog that are not, by default,
2519 bound to a key combination, and may not be available as a menu item.
2521 .. note::
2522     For more information see the section `Keybindings`_.
2525 Printing preferences
2526 ^^^^^^^^^^^^^^^^^^^^
2528 .. image:: ./images/pref_dialog_printing.png
2530 Use external command for printing
2531     Use a system command to print your file out.
2533 Use native GTK printing
2534     Let the GTK GUI toolkit handle your print request.
2536 Print line numbers
2537     Print the line numbers on the left of your paper.
2539 Print page number
2540     Print the page number on the bottom right of your paper.
2542 Print page header
2543     Print a header on every page that is sent to the printer.
2545 Use base name of the printed file
2546     Don't use the entire path for the header, only the filename.
2548 Date format
2549     How the date should be printed. You can use the same format
2550     specifiers as in the ANSI C function strftime(). For details please
2551     see http://man.cx/strftime.
2554 Various preferences
2555 ^^^^^^^^^^^^^^^^^^^
2557 .. image:: ./images/pref_dialog_various.png
2559 Rarely used preferences, explained in the table below. A few of them require
2560 restart to take effect, and a few other will only affect newly opened or created
2561 documents before restart.
2563 ================================  ===========================================  ==========  ===========
2564 Key                               Description                                  Default     Applies
2565 ================================  ===========================================  ==========  ===========
2566 **Editor related**
2567 use_gtk_word_boundaries           Whether to look for the end of a word        true        to new
2568                                   when using word-boundary related                         documents
2569                                   Scintilla commands (see `Scintilla
2570                                   keyboard commands`_).
2571 brace_match_ltgt                  Whether to highlight <, > angle brackets.    false       immediately
2572 complete_snippets_whilst_editing  Whether to allow completion of snippets      false       immediately
2573                                   when editing an existing line (i.e. there
2574                                   is some text after the current cursor
2575                                   position on the line). Only used when the
2576                                   keybinding `Complete snippet` is set to
2577                                   ``Space``.
2578 show_editor_scrollbars            Whether to display scrollbars. If set to     true        immediately
2579                                   false, the horizontal and vertical
2580                                   scrollbars are hidden completely.
2581 indent_hard_tab_width             The size of a tab character. Don't change    8           immediately
2582                                   it unless you really need to; use the
2583                                   indentation settings instead.
2584 **Interface related**
2585 show_symbol_list_expanders        Whether to show or hide the small            true        to new
2586                                   expander icons on the symbol list                        documents
2587                                   treeview.
2588 allow_always_save                 Whether files can be saved always, even      false       immediately
2589                                   if they don't have any changes.
2590                                   By default, the Save button and menu
2591                                   item are disabled when a file is
2592                                   unchanged. When setting this option to
2593                                   true, the Save button and menu item are
2594                                   always active and files can be saved.
2595 compiler_tab_autoscroll           Whether to automatically scroll to the       true        immediately
2596                                   last line of the output in the Compiler
2597                                   tab.
2598 statusbar_template                The status bar statistics line format.       See below.  immediately
2599                                   (See `Statusbar Templates`_ for details).
2600 new_document_after_close          Whether to open a new document after all     false       immediately
2601                                   documents have been closed.
2602 msgwin_status_visible             Whether to show the Status tab in the        true        immediately
2603                                   Messages Window
2604 msgwin_compiler_visible           Whether to show the Compiler tab in the      true        immediately
2605                                   Messages Window
2606 msgwin_messages_visible           Whether to show the Messages tab in the      true        immediately
2607                                   Messages Window
2608 msgwin_scribble_visible           Whether to show the Scribble tab in the      true        immediately
2609                                   Messages Window
2610 **VTE related**
2611 emulation                         Terminal emulation mode. Only change this    xterm       immediately
2612                                   if you have VTE termcap files other than
2613                                   ``vte/termcap/xterm``.
2614 send_selection_unsafe             By default, Geany strips any trailing        false       immediately
2615                                   newline characters from the current
2616                                   selection before sending it to the terminal
2617                                   to not execute arbitrary code. This is
2618                                   mainly a security feature.
2619                                   If, for whatever reasons, you really want
2620                                   it to be executed directly, set this option
2621                                   to true.
2622 send_cmd_prefix                   String with which prefix the commands sent   Empty       immediately
2623                                   to the shell.  This may be used to tell
2624                                   some shells (BASH with ``HISTCONTROL`` set
2625                                   to ``ignorespace``, ZSH with
2626                                   ``HIST_IGNORE_SPACE`` enabled, etc.) from
2627                                   putting these commands in their history by
2628                                   setting this to a space.  Note that leading
2629                                   spaces must be escaped using `\s` in the
2630                                   configuration file.
2631 **File related**
2632 use_atomic_file_saving            Defines the mode how Geany saves files to    false       immediately
2633                                   disk. If disabled, Geany directly writes
2634                                   the content of the document to disk. This
2635                                   might cause loss of data when there is
2636                                   no more free space on disk to save the
2637                                   file. When set to true, Geany first saves
2638                                   the contents into a temporary file and if
2639                                   this succeeded, the temporary file is
2640                                   moved to the real file to save.
2641                                   This gives better error checking in case of
2642                                   no more free disk space. But it also
2643                                   destroys hard links of the original file
2644                                   and its permissions (e.g. executable flags
2645                                   are reset). Use this with care as it can
2646                                   break things seriously.
2647                                   The better approach would be to ensure your
2648                                   disk won't run out of free space.
2649 use_gio_unsafe_file_saving        Whether to use GIO as the unsafe file        true        immediately
2650                                   saving backend. It is better on most
2651                                   situations but is known not to work
2652                                   correctly on some complex setups.
2653 gio_unsafe_save_backup            Make a backup when using GIO unsafe file     false       immediately
2654                                   saving. Backup is named `filename~`.
2655 keep_edit_history_on_reload       Whether to maintain the edit history when    true        immediately
2656                                   reloading a file, and allow the operation
2657                                   to be reverted.
2658 **Filetype related**
2659 extract_filetype_regex            Regex to extract filetype name from file     See below.  immediately
2660                                   via capture group one.
2661 **Search related**
2662 find_selection_type               See `Find selection`_.                       0           immediately
2663 **Replace related**
2664 replace_and_find_by_default       Set ``Replace & Find`` button as default so  true        immediately
2665                                   it will be activated when the Enter key is
2666                                   pressed while one of the text fields has
2667                                   focus.
2668 **Build Menu related**
2669 number_ft_menu_items              The maximum number of menu items in the      2           on restart
2670                                   filetype section of the Build menu.
2671 number_non_ft_menu_items          The maximum number of menu items in the      3           on restart
2672                                   independent section of the Build menu.
2673 number_exec_menu_items            The maximum number of menu items in the      2           on restart
2674                                   execute section of the Build menu.
2675 ================================  ===========================================  ==========  ===========
2677 The extract_filetype_regex has the default value GEANY_DEFAULT_FILETYPE_REGEX.
2679 Statusbar Templates
2680 ```````````````````
2682 The default statusbar template is (note ``\t`` = tab):
2684 ``line: %l / %L\t col: %c\t sel: %s\t %w      %t      %mmode: %M      encoding: %e      filetype: %f      scope: %S``
2686 Settings the preference to an empty string will also cause Geany to use this
2687 internal default.
2689 The following format characters are available for the statusbar template:
2691 ============  ===========================================================
2692 Placeholder   Description
2693 ============  ===========================================================
2694   ``%l``      The current line number starting at 1
2695   ``%L``      The total number of lines
2696   ``%c``      The current column number starting at 0
2697   ``%C``      The current column number starting at 1
2698   ``%s``      The number of selected characters or if only whole lines
2699               selected, the number of selected lines.
2700   ``%w``      Shows ``RO`` when the document is in read-only mode,
2701               otherwise shows whether the editor is in overtype (OVR)
2702               or insert (INS) mode.
2703   ``%t``      Shows the indentation mode, either tabs (TAB),
2704               spaces (SP) or both (T/S).
2705   ``%m``      Shows whether the document is modified (MOD) or nothing.
2706   ``%M``      The name of the document's line-endings (ex. ``Unix (LF)``)
2707   ``%e``      The name of the document's encoding (ex. UTF-8).
2708   ``%f``      The filetype of the document (ex. None, Python, C, etc).
2709   ``%S``      The name of the scope where the caret is located.
2710   ``%p``      The caret position in the entire document starting at 0.
2711   ``%r``      Shows whether the document is read-only (RO) or nothing.
2712   ``%Y``      The Scintilla style number at the caret position. This is
2713               useful if you're debugging color schemes or related code.
2714 ============  ===========================================================
2716 Terminal (VTE) preferences
2717 ^^^^^^^^^^^^^^^^^^^^^^^^^^
2719 See also: `Virtual terminal emulator widget (VTE)`_.
2721 .. image:: ./images/pref_dialog_vte.png
2723 Terminal widget
2724 ```````````````
2726 Terminal font
2727     Select the font that will be used in the terminal emulation control.
2729 Foreground color
2730     Select the font color.
2732 Background color
2733     Select the background color of the terminal.
2735 Background image
2736     Select the background image to show behind the terminal's text.
2738 Scrollback lines
2739     The number of lines buffered so that you can scroll though the history.
2741 Shell
2742     The location of the shell on your system.
2744 Scroll on keystroke
2745     Scroll the terminal to the prompt line when pressing a key.
2747 Scroll on output
2748     Scroll the output down.
2750 Cursor blinks
2751     Let the terminal cursor blink.
2753 Override Geany keybindings
2754     Allow the VTE to receive keyboard shortcuts (apart from focus commands).
2756 Disable menu shortcut key (F10 by default)
2757     Disable the menu shortcut when you are in the virtual terminal.
2759 Follow path of the current file
2760     Make the path of the terminal change according to the path of the
2761     current file.
2763 Execute programs in VTE
2764     Execute programs in the virtual terminal instead of using the external
2765     terminal tool.  Note that if you run multiple execute commands at once
2766     the output may become mixed together in the VTE.
2768 Don't use run script
2769     Don't use the simple run script which is usually used to display
2770     the exit status of the executed program.
2771     This can be useful if you already have a program running in the VTE
2772     like a Python console (e.g. ipython). Use this with care.
2775 Project management
2776 ------------------
2778 Project management is optional in Geany. Currently it can be used for:
2780 * Storing and opening session files on a project basis.
2781 * Overriding default settings with project equivalents.
2782 * Configuring the Build menu on a project basis.
2784 A list of session files can be stored and opened with the project
2785 when the *Use project-based session files* preference is enabled,
2786 in the `Projects`_ group of the `General Miscellaneous preferences`_ tab
2787 of the `Preferences`_ dialog.
2789 As long as a project is open, the Build menu will use
2790 the items defined in project's settings, instead of the defaults.
2791 See `Build Menu Configuration`_ for information on configuring the menu.
2793 The current project's settings are saved when it is closed, or when
2794 Geany is shutdown. When restarting Geany, the previously opened project
2795 file that was in use at the end of the last session will be reopened.
2797 The project menu items are detailed below.
2800 New project
2801 ^^^^^^^^^^^
2803 To create a new project, fill in the *Name* field. By default this
2804 will setup a new project file ``~/projects/name.geany``. Usually it's
2805 best to store all your project files in the same directory (they are
2806 independent of any source directory trees).
2808 The Base path text field is setup to use ``~/projects/name``. This
2809 can safely be set to any existing path -- it will not touch the file
2810 structure contained in it.
2813 Project properties
2814 ^^^^^^^^^^^^^^^^^^
2816 You can set an optional description for the project. Currently it's
2817 only used for a template wildcard - see `Template wildcards`_.
2819 The *Base path* field is used as the directory to run the Build menu commands.
2820 The specified path can be an absolute path or it is considered to be
2821 relative to the project's file name.
2823 The *File patterns* field allows to specify a list of file patterns for the
2824 project, which can be used in the `Find in files`_ dialog.
2826 The *Indentation* tab allows you to override the default
2827 `Indentation`_ settings.
2830 Open project
2831 ^^^^^^^^^^^^
2833 The Open command displays a standard file chooser, starting in
2834 ``~/projects``. Choose a project file named with the ``.geany``
2835 extension.
2837 When project session support is enabled, Geany will close the currently
2838 open files and open the session files associated with the project.
2841 Close project
2842 ^^^^^^^^^^^^^
2844 Project file settings are saved when the project is closed.
2846 When project session support is enabled, Geany will close the project
2847 session files and open any previously closed default session files.
2850 Build menu
2851 ----------
2852 After editing code with Geany, the next step is to compile, link, build,
2853 interpret, run etc.  As Geany supports many languages each with a different
2854 approach to such operations, and as there are also many language independent
2855 software building systems, Geany does not have a built-in build system, nor
2856 does it limit which system you can use.  Instead the build menu provides
2857 a configurable and flexible means of running any external commands to
2858 execute your preferred build system.
2860 This section provides a description of the default configuration of the
2861 build menu and then covers how to configure it, and where the defaults fit in.
2863 Running the commands from within Geany has two benefits:
2865 * The current file is automatically saved before the command is run.
2866 * The output is captured in the Compiler notebook tab and parsed for
2867   warnings or errors.
2869 Warnings and errors that can be parsed for line numbers will be shown in
2870 red in the Compiler tab and you can click on them to switch to the relevant
2871 source file (or open it) and mark the line number.  Also lines with
2872 warnings or errors are marked in the source, see `Indicators`_ below.
2874 .. tip::
2875     If Geany's default error message parsing does not parse errors for
2876     the tool you're using, you can set a custom regex in the Build Commands
2877     Dialog, see `Build Menu Configuration`_.
2879 Indicators
2880 ^^^^^^^^^^
2882 Indicators are red squiggly underlines which are used to highlight
2883 errors which occurred while compiling the current file. So you can
2884 easily see where your code failed to compile. You can remove them by
2885 selecting *Remove Error Indicators* in the Document menu.
2887 If you do not like this feature, you can disable it - see `Editor Features
2888 preferences`_.
2891 Default build menu items
2892 ^^^^^^^^^^^^^^^^^^^^^^^^
2893 Depending on the current file's filetype, the default Build menu will contain
2894 the following items:
2896 * Compile
2897 * Build
2898 * Lint
2899 * Make All
2900 * Make Custom Target
2901 * Make Object
2902 * Next Error
2903 * Previous Error
2904 * Execute
2905 * Set Build Menu Commands
2908 Compile
2909 ```````
2911 The Compile command has different uses for different kinds of files.
2913 For compilable languages such as C and C++, the Compile command is
2914 set up to compile the current source file into a binary object file.
2916 Java source files will be compiled to class file bytecode.
2918 Interpreted languages such as Perl, Python, Ruby will compile to
2919 bytecode if the language supports it, or will run a syntax check,
2920 or if that is not available will run the file in its language interpreter.
2922 Build
2923 `````
2925 For compilable languages such as C and C++, the Build command will link
2926 the current source file's equivalent object file into an executable. If
2927 the object file does not exist, the source will be compiled and linked
2928 in one step, producing just the executable binary.
2930 Interpreted languages do not use the Build command.
2932 .. note::
2933     If you need complex settings for your build system, or several
2934     different settings, then writing a Makefile and using the Make
2935     commands is recommended; this will also make it easier for users to
2936     build your software.
2938 Lint
2939 ````
2941 Source code linters are often used to find code that doesn't correspond to
2942 certain style guidelines: non-portable code, common or hard to find
2943 errors, code "smells", variables used before being set, unused functions,
2944 division by zero, constant conditions, etc. Linters inspect the code and
2945 issue warnings much like the compilers do. This is formally referred to as
2946 static code analysis.
2948 Some common linters are pre-configured for you in the Build menu (``pep8``
2949 for Python, ``cppcheck`` for C/C++, JSHint for JavaScript, ``xmllint`` for
2950 XML, ``hlint`` for Haskell, ``shellcheck`` for shell code, ...), but all
2951 these are standalone tools you need to obtain before using.
2953 Make
2954 ````
2956 This runs "make" in the same directory as the
2957 current file.
2959 Make custom target
2960 ``````````````````
2962 This is similar to running 'Make' but you will be prompted for
2963 the make target name to be passed to the Make tool. For example,
2964 typing 'clean' in the dialog prompt will run "make clean".
2967 Make object
2968 ```````````
2970 Make object will run "make current_file.o" in the same directory as
2971 the current file, using the filename for 'current_file'. It is useful
2972 for building just the current file without building the whole project.
2974 Next error
2975 ``````````
2977 The next error item will move to the next detected error in the file.
2979 Previous error
2980 ``````````````
2981 The previous error item will move to the previous detected error in the file.
2983 Execute
2984 ```````
2986 Execute will run the corresponding executable file, shell script or
2987 interpreted script in a terminal window. The command set in the
2988 "Set Build Commands" dialog is run in a script to ensure the terminal
2989 stays open after execution completes.  Note: see `Terminal emulators`_
2990 below for the command format.  Alternatively the built-in VTE can be used
2991 if it is available - see `Virtual terminal emulator widget (VTE)`_.
2993 After your program or script has finished executing, the run script will
2994 prompt you to press the return key. This allows you to review any text
2995 output from the program before the terminal window is closed.
2997 .. note::
2998     The execute command output is not parsed for errors.
3001 Stopping running processes
3002 ``````````````````````````
3004 When there is a running program, the Execute menu item in the menu and
3005 the Run button in the toolbar
3006 each become a stop button so you can stop the current running program (and
3007 any child processes). This works by sending the SIGQUIT signal to the process.
3009 Depending on the process you started it is possible that the process
3010 cannot be stopped. For example this can happen when the process creates
3011 more than one child process.
3014 Terminal emulators
3015 ******************
3017 The Terminal field of the tools preferences tab requires a command to
3018 execute the terminal program and to pass it the name of the Geany run
3019 script that it should execute in a Bourne compatible shell (eg /bin/sh).
3020 The marker "%c" is substituted with the name of the Geany run script,
3021 which is created in the working directory set in the Build commands
3022 dialog, see `Build menu commands dialog`_ for details.
3024 As an example the default (Linux) command is::
3026     xterm -e "/bin/sh %c"
3029 Set build commands
3030 ``````````````````
3032 By default Compile, Build and Execute are fairly basic commands. You
3033 may wish to customise them using *Set Build Commands*.
3035 E.g. for C you can add any include paths and compile flags for the
3036 compiler, any library names and paths for the linker, and any
3037 arguments you want to use when running Execute.
3039 Build menu configuration
3040 ^^^^^^^^^^^^^^^^^^^^^^^^
3042 The build menu has considerable flexibility and configurability, allowing
3043 both menu labels the commands they execute and the directory they execute
3044 in to be configured.
3046 For example, if you change one of the default make commands to run say 'waf'
3047 you can also change the label to match.
3049 These settings are saved automatically when Geany is shut down.
3051 The build menu is divided into four groups of items each with different
3052 behaviors:
3054 * Filetype build commands - are configurable and depend on the filetype of the
3055   current document; they capture output in the compiler tab and parse it for
3056   errors.
3057 * Independent build commands - are configurable and mostly don't depend on the
3058   filetype of the current document; they also capture output in the
3059   compiler tab and parse it for errors.
3060 * Execute commands - are configurable and intended for executing your
3061   program or other long running programs.  The output is not parsed for errors
3062   and is directed to the terminal command selected in preferences.
3063 * Fixed commands - these perform built-in actions:
3065   * Go to the next error.
3066   * Go to the previous error.
3067   * Show the build menu commands dialog.
3069 The maximum numbers of items in each of the configurable groups can be
3070 configured in the `Various preferences`_. Even though the maximum number of
3071 items may have been increased, only those menu items that have values
3072 configured are shown in the menu.
3074 The groups of menu items obtain their configuration from four potential
3075 sources.  The highest priority source that has the menu item defined will
3076 be used. The sources in decreasing priority are:
3078 * A project file if open
3079 * The user preferences
3080 * The system filetype definitions
3081 * The defaults
3083 The detailed relationships between sources and the configurable menu item groups
3084 is shown in the following table.
3086 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
3087 | Group        | Project File        | Preferences              | System Filetype   |  Defaults                     |
3088 +==============+=====================+==========================+===================+===============================+
3089 | Filetype     | Loads From: project | Loads From:              | Loads From:       | None                          |
3090 |              | file                | filetypes.xxx file in    | filetypes.xxx in  |                               |
3091 |              |                     | ~/.config/geany/filedefs | Geany install     |                               |
3092 |              | Saves To: project   |                          |                   |                               |
3093 |              | file                | Saves to: as above,      | Saves to: as user |                               |
3094 |              |                     | creating if needed.      | preferences left. |                               |
3095 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
3096 | Filetype     | Loads From: project | Loads From:              | Loads From:       | 1:                            |
3097 | Independent  | file                | geany.conf file in       | filetypes.xxx in  |   Label: _Make                |
3098 |              |                     | ~/.config/geany          | Geany install     |   Command: make               |
3099 |              | Saves To: project   |                          |                   |                               |
3100 |              | file                | Saves to: as above,      | Saves to: as user | 2:                            |
3101 |              |                     | creating if needed.      | preferences left. |    Label: Make Custom _Target |
3102 |              |                     |                          |                   |    Command: make              |
3103 |              |                     |                          |                   |                               |
3104 |              |                     |                          |                   | 3:                            |
3105 |              |                     |                          |                   |    Label: Make _Object        |
3106 |              |                     |                          |                   |    Command: make %e.o         |
3107 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
3108 | Execute      | Loads From: project | Loads From:              | Loads From:       | Label: _Execute               |
3109 |              | file or else        | geany.conf file in       | filetypes.xxx in  | Command: ./%e                 |
3110 |              | filetype defined in | ~/.config/geany or else  | Geany install     |                               |
3111 |              | project file        | filetypes.xxx file in    |                   |                               |
3112 |              |                     | ~/.config/geany/filedefs | Saves To: as user |                               |
3113 |              | Saves To:           |                          | preferences left. |                               |
3114 |              | project file        | Saves To:                |                   |                               |
3115 |              |                     | filetypes.xxx file in    |                   |                               |
3116 |              |                     | ~/.config/geany/filedefs |                   |                               |
3117 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
3119 The following notes on the table reference cells by coordinate as (group,source):
3121 * General - for filetypes.xxx substitute the appropriate extension for
3122   the filetype of the current document for xxx - see `filenames`_.
3124 * System Filetypes - Labels loaded from these sources are locale sensitive
3125   and can contain translations.
3127 * (Filetype, Project File) and (Filetype, Preferences) - preferences use a full
3128   filetype file so that users can configure all other filetype preferences
3129   as well.  Projects can only configure menu items per filetype.  Saving
3130   in the project file means that there is only one file per project not
3131   a whole directory.
3133 * (Filetype-Independent, System Filetype) - although conceptually strange, defining
3134   filetype-independent commands in a filetype file, this provides the ability to
3135   define filetype dependent default menu items.
3137 * (Execute, Project File) and (Execute, Preferences) - the project independent
3138   execute and preferences independent execute commands can only be set by hand
3139   editing the appropriate file, see `Preferences file format`_ and `Project file
3140   format`_.
3142 Build menu commands dialog
3143 ^^^^^^^^^^^^^^^^^^^^^^^^^^
3145 Most of the configuration of the build menu is done through the Build Menu
3146 Commands Dialog.  You edit the configuration sourced from preferences in the
3147 dialog opened from the Build->Build Menu Commands item and you edit the
3148 configuration from the project in the build tab of the project preferences
3149 dialog.  Both use the same form shown below.
3151 .. image:: ./images/build_menu_commands_dialog.png
3153 The dialog is divided into three sections:
3155 * Filetype build commands (selected based on the current document's filetype).
3156 * Independent build commands (available regardless of filetype).
3157 * Filetype execute commands.
3159 The filetype and independent sections also each contain a field for the regular
3160 expression used for parsing command output for error and warning messages.
3162 The columns in the first three sections allow setting of the label, command,
3163 and working directory to run the command in.
3165 An item with an empty label will not be shown in the menu.
3167 An empty working directory will default to the directory of the current document.
3168 If there is no current document then the command will not run.
3170 The dialog will always show the command selected by priority, not just the
3171 commands configured in this configuration source. This ensures that you always
3172 see what the menu item is going to do if activated.
3174 If the current source of the menu item is higher priority than the
3175 configuration source you are editing then the command will be shown
3176 in the dialog but will be insensitive (greyed out).  This can't happen
3177 with the project source but can with the preferences source dialog.
3179 The clear buttons remove the definition from the configuration source you are editing.
3180 When you do this the command from the next lower priority source will be shown.
3181 To hide lower priority menu items without having anything show in the menu
3182 configure with a nothing in the label but at least one character in the command.
3184 Substitutions in commands and working directories
3185 `````````````````````````````````````````````````
3187 The first occurence of each of the following character sequences in each of the
3188 command and working directory fields is substituted by the items specified below
3189 before the command is run.
3191 * %d - substituted by the absolute path to the directory of the current file.
3192 * %e - substituted by the name of the current file without the extension or path.
3193 * %f - substituted by the name of the current file without the path.
3194 * %p - if a project is open, substituted by the base path from the project.
3195 * %l - substituted by the line number at the current cursor position.
3197 .. note::
3198    If the basepath set in the project preferences is not an absolute path , then it is
3199    taken as relative to the directory of the project file.  This allows a project file
3200    stored in the source tree to specify all commands and working directories relative
3201    to the tree itself, so that the whole tree including the project file, can be moved
3202    and even checked into and out of version control without having to re-configure the
3203    build menu.
3205 Build menu keyboard shortcuts
3206 `````````````````````````````
3208 Keyboard shortcuts can be defined for the first two filetype menu items, the first three
3209 independent menu items, the first two execute menu items and the fixed menu items.
3210 In the keybindings configuration dialog (see `Keybinding preferences`_)
3211 these items are identified by the default labels shown in the `Build Menu`_ section above.
3213 It is currently not possible to bind keyboard shortcuts to more than these menu items.
3215 You can also use underlines in the labels to set mnemonic characters.
3217 Old settings
3218 ````````````
3220 The configurable Build Menu capability was introduced in Geany 0.19 and
3221 required a new section to be added to the configuration files (See
3222 `Preferences file format`_).  Geany will still load older format project,
3223 preferences and filetype file settings and will attempt to map them into the new
3224 configuration format.  There is not a simple clean mapping between the formats.
3225 The mapping used produces the most sensible results for the majority of cases.
3226 However, if they do not map the way you want, you may have to manually
3227 configure some settings using the Build Commands
3228 Dialog or the Build tab of the project preferences dialog.
3230 Any setting configured in either of these dialogs will override settings mapped from
3231 older format configuration files.
3233 Printing support
3234 ----------------
3236 Since Geany 0.13 there has been printing support using GTK's printing API.
3237 The printed page(s) will look nearly the same as on your screen in Geany.
3238 Additionally, there are some options to modify the printed page(s).
3240 .. note::
3241     The background text color is set to white, except for text with
3242     a white foreground. This allows dark color schemes to save ink
3243     when printing.
3245 You can define whether to print line numbers, page numbers at the bottom of
3246 each page and whether to print a page header on each page. This header
3247 contains the filename of the printed document, the current page number and
3248 the date and time of printing. By default, the file name of the document
3249 with full path information is added to the header. If you prefer to add
3250 only the basename of the file(without any path information) you can set it
3251 in the preferences dialog. You can also adjust the format of the date and
3252 time added to the page header. The available conversion specifiers are the
3253 same as the ones which can be used with the ANSI C strftime function.
3255 All of these settings can also be changed in the print dialog just before
3256 actual printing is done.
3257 On Unix-like systems the provided print dialog offers a print preview. The
3258 preview file is opened with a PDF viewer and by default GTK uses ``evince``
3259 for print preview. If you have not installed evince or just want to use
3260 another PDF viewer, you can change the program to use in the file
3261 ``.gtkrc-2.0`` (usually found in your home directory). Simply add a line
3262 like::
3264     gtk-print-preview-command = "epdfview %f"
3266 at the end of the file. Of course, you can also use xpdf, kpdf or whatever
3267 as the print preview command.
3269 Geany also provides an alternative basic printing support using a custom
3270 print command. However, the printed document contains no syntax highlighting.
3271 You can adjust the command to which the filename is passed in the preferences
3272 dialog. The default command is::
3274     % lpr %f
3276 ``%f`` will be substituted by the filename of the current file. Geany
3277 will not show errors from the command itself, so you should make
3278 sure that it works before(e.g. by trying to execute it from the
3279 command line).
3281 A nicer example, which many prefer is::
3283     % a2ps -1 --medium=A4 -o - %f | xfprint4
3285 But this depends on a2ps and xfprint4. As a replacement for xfprint4,
3286 gtklp or similar programs can be used.
3290 Plugins
3291 -------
3293 Plugins are loaded at startup, if the *Enable plugin support*
3294 general preference is set. There is also a command-line option,
3295 ``-p``, which prevents plugins being loaded. Plugins are scanned in
3296 the following directories:
3298 * ``$prefix/lib/geany`` on Unix-like systems (see `Installation prefix`_)
3299 * The ``lib`` subfolder of the installation path on Windows.
3300 * The ``plugins`` subfolder of the user configuration directory - see
3301   `Configuration file paths`_.
3302 * The `Extra plugin path` preference (usually blank) - see `Paths`_.
3304 Most plugins add menu items to the *Tools* menu when they are loaded.
3306 See also `Plugin documentation`_ for information about single plugins
3307 which are included in Geany.
3309 Plugin manager
3310 ^^^^^^^^^^^^^^
3311 The Plugin Manager dialog lets you choose which plugins
3312 should be loaded at startup. You can also load and unload plugins on the
3313 fly using this dialog. Once you click the checkbox for a specific plugin
3314 in the dialog, it is loaded or unloaded according to its previous state.
3315 By default, no plugins are loaded at startup until you select some.
3316 You can also configure some plugin specific options if the plugin
3317 provides any.
3320 Keybindings
3321 -----------
3323 Geany supports the default keyboard shortcuts for the Scintilla
3324 editing widget. For a list of these commands, see `Scintilla
3325 keyboard commands`_. The Scintilla keyboard shortcuts will be overridden
3326 by any custom keybindings with the same keyboard shortcut.
3329 Switching documents
3330 ^^^^^^^^^^^^^^^^^^^
3332 There are some non-configurable bindings to switch between documents,
3333 listed below. These can also be overridden by custom keybindings.
3335 =============== ==================================
3336 Key             Action
3337 =============== ==================================
3338 Alt-[1-9]       Select left-most tab, from 1 to 9.
3339 Alt-0           Select right-most tab.
3340 =============== ==================================
3342 See also `Notebook tab keybindings`_.
3345 Configurable keybindings
3346 ^^^^^^^^^^^^^^^^^^^^^^^^
3348 For all actions listed below you can define your own keybindings. Open
3349 the Preferences dialog, select the desired action and click on
3350 change. In the resulting dialog you can press the key combination you
3351 want to assign to the action and it will be saved when you press OK.
3352 You can define only one key combination for each action and each key
3353 combination can only be defined for one action.
3355 The following tables list all customizable keyboard shortcuts, those
3356 which are common to many applications are marked with (C) after the
3357 shortcut.
3359 File keybindings
3360 ````````````````
3361 =============================== ========================= ==================================================
3362 Action                          Default shortcut          Description
3363 =============================== ========================= ==================================================
3364 New                             Ctrl-N  (C)               Creates a new file.
3366 Open                            Ctrl-O  (C)               Opens a file.
3368 Open selected file              Ctrl-Shift-O              Opens the selected filename.
3370 Re-open last closed tab                                   Re-opens the last closed document tab.
3372 Save                            Ctrl-S  (C)               Saves the current file.
3374 Save As                                                   Saves the current file under a new name.
3376 Save all                        Ctrl-Shift-S              Saves all open files.
3378 Close all                       Ctrl-Shift-W              Closes all open files.
3380 Close                           Ctrl-W  (C)               Closes the current file.
3382 Reload file                     Ctrl-R  (C)               Reloads the current file.
3384 Print                           Ctrl-P  (C)               Prints the current file.
3386 Quit                            Ctrl-Q  (C)               Quits Geany.
3387 =============================== ========================= ==================================================
3390 Editor keybindings
3391 ``````````````````
3392 =============================== ========================= ==================================================
3393 Action                          Default shortcut          Description
3394 =============================== ========================= ==================================================
3395 Undo                            Ctrl-Z  (C)               Un-does the last action.
3397 Redo                            Ctrl-Y                    Re-does the last action.
3399 Delete current line(s)          Ctrl-K                    Deletes the current line (and any lines with a
3400                                                           selection).
3402 Delete to line end              Ctrl-Shift-Delete         Deletes from the current caret position to the
3403                                                           end of the current line.
3405 Duplicate line or selection     Ctrl-D                    Duplicates the current line or selection.
3407 Transpose current line                                    Transposes the current line with the previous one.
3409 Scroll to current line          Ctrl-Shift-L              Scrolls the current line into the centre of the
3410                                                           view. The cursor position and or an existing
3411                                                           selection will not be changed.
3413 Scroll up by one line           Alt-Up                    Scrolls the view.
3415 Scroll down by one line         Alt-Down                  Scrolls the view.
3417 Complete word                   Ctrl-Space                Shows the autocompletion list. If already showing
3418                                                           tag completion, it shows document word completion
3419                                                           instead, even if it is not enabled for automatic
3420                                                           completion. Likewise if no tag suggestions are
3421                                                           available, it shows document word completion.
3423 Show calltip                    Ctrl-Shift-Space          Shows a calltip for the current function or
3424                                                           method.
3426 Complete snippet                Tab                       If you type a construct like if or for and press
3427                                                           this key, it will be completed with a matching
3428                                                           template.
3430 Suppress snippet completion                               If you type a construct like if or for and press
3431                                                           this key, it will not be completed, and a space or
3432                                                           tab will be inserted, depending on what the
3433                                                           construct completion keybinding is set to. For
3434                                                           example, if you have set the construct completion
3435                                                           keybinding to space, then setting this to
3436                                                           Shift+space will prevent construct completion and
3437                                                           insert a space.
3439 Context Action                                            Executes a command and passes the current word
3440                                                           (near the cursor position) or selection as an
3441                                                           argument. See the section called `Context
3442                                                           actions`_.
3444 Move cursor in snippet                                    Jumps to the next defined cursor positions in a
3445                                                           completed snippets if multiple cursor positions
3446                                                           where defined.
3448 Word part completion            Tab                       When the autocompletion list is visible, complete
3449                                                           the currently selected item up to the next word
3450                                                           part.
3452 Move line(s) up                 Alt-PageUp                Move the current line or selected lines up by
3453                                                           one line.
3455 Move line(s) down               Alt-PageDown              Move the current line or selected lines down by
3456                                                           one line.
3457 =============================== ========================= ==================================================
3460 Clipboard keybindings
3461 `````````````````````
3462 =============================== ========================= ==================================================
3463 Action                          Default shortcut          Description
3464 =============================== ========================= ==================================================
3465 Cut                             Ctrl-X  (C)               Cut the current selection to the clipboard.
3467 Copy                            Ctrl-C  (C)               Copy the current selection to the clipboard.
3469 Paste                           Ctrl-V  (C)               Paste the clipboard text into the current document.
3471 Cut current line(s)             Ctrl-Shift-X              Cuts the current line (and any lines with a
3472                                                           selection) to the clipboard.
3474 Copy current line(s)            Ctrl-Shift-C              Copies the current line (and any lines with a
3475                                                           selection) to the clipboard.
3476 =============================== ========================= ==================================================
3479 Select keybindings
3480 ``````````````````
3481 =============================== ========================= ==================================================
3482 Action                          Default shortcut          Description
3483 =============================== ========================= ==================================================
3484 Select all                      Ctrl-A  (C)               Makes a selection of all text in the current
3485                                                           document.
3487 Select current word             Alt-Shift-W               Selects the current word under the cursor.
3489 Select current paragraph        Alt-Shift-P               Selects the current paragraph under the cursor
3490                                                           which is defined by two empty lines around it.
3492 Select current line(s)          Alt-Shift-L               Selects the current line under the cursor (and any
3493                                                           partially selected lines).
3495 Select to previous word part                              (Extend) selection to previous word part boundary.
3497 Select to next word part                                  (Extend) selection to next word part boundary.
3498 =============================== ========================= ==================================================
3501 Insert keybindings
3502 ``````````````````
3503 =============================== ========================= ==================================================
3504 Action                          Default shortcut          Description
3505 =============================== ========================= ==================================================
3506 Insert date                     Shift-Alt-D               Inserts a customisable date.
3508 Insert alternative whitespace                             Inserts a tab character when spaces should
3509                                                           be used for indentation and inserts space
3510                                                           characters of the amount of a tab width when
3511                                                           tabs should be used for indentation.
3513 Insert New Line Before Current                            Inserts a new line with indentation.
3515 Insert New Line After Current                             Inserts a new line with indentation.
3516 =============================== ========================= ==================================================
3519 Format keybindings
3520 ``````````````````
3521 =============================== ========================= ==================================================
3522 Action                          Default shortcut          Description
3523 =============================== ========================= ==================================================
3524 Toggle case of selection        Ctrl-Alt-U                Changes the case of the selection. A lowercase
3525                                                           selection will be changed into uppercase and vice
3526                                                           versa. If the selection contains lower- and
3527                                                           uppercase characters, all will be converted to
3528                                                           lowercase.
3530 Comment line                                              Comments current line or selection.
3532 Uncomment line                                            Uncomments current line or selection.
3534 Toggle line commentation        Ctrl-E                    Comments a line if it is not commented or removes
3535                                                           a comment if the line is commented.
3537 Increase indent                 Ctrl-I                    Indents the current line or selection by one tab
3538                                                           or with spaces in the amount of the tab width
3539                                                           setting.
3541 Decrease indent                 Ctrl-U                    Removes one tab or the amount of spaces of
3542                                                           the tab width setting from the indentation of the
3543                                                           current line or selection.
3545 Increase indent by one space                              Indents the current line or selection by one
3546                                                           space.
3548 Decrease indent by one space                              Deindents the current line or selection by one
3549                                                           space.
3551 Smart line indent                                         Indents the current line or all selected lines
3552                                                           with the same indentation as the previous line.
3554 Send to Custom Command 1 (2,3)  Ctrl-1 (2,3)              Passes the current selection to a configured
3555                                                           external command (available for the first
3556                                                           three configured commands, see
3557                                                           `Sending text through custom commands`_ for
3558                                                           details).
3560 Send Selection to Terminal                                Sends the current selection or the current
3561                                                           line (if there is no selection) to the
3562                                                           embedded Terminal (VTE).
3564 Reflow lines/block                                        Reformat selected lines or current
3565                                                           (indented) text block,
3566                                                           breaking lines at the long line marker or the
3567                                                           line breaking column if line breaking is
3568                                                           enabled for the current document.
3569 =============================== ========================= ==================================================
3572 Settings keybindings
3573 ````````````````````
3574 =============================== ========================= ==================================================
3575 Action                          Default shortcut          Description
3576 =============================== ========================= ==================================================
3577 Preferences                     Ctrl-Alt-P                Opens preferences dialog.
3579 Plugin Preferences                                        Opens plugin preferences dialog.
3580 =============================== ========================= ==================================================
3583 Search keybindings
3584 ``````````````````
3585 =============================== ========================= ==================================================
3586 Action                          Default shortcut          Description
3587 =============================== ========================= ==================================================
3588 Find                            Ctrl-F  (C)               Opens the Find dialog.
3590 Find Next                       Ctrl-G                    Finds next result.
3592 Find Previous                   Ctrl-Shift-G              Finds previous result.
3594 Find Next Selection                                       Finds next occurence of selected text.
3596 Find Previous Selection                                   Finds previous occurence of selected text.
3598 Replace                         Ctrl-H  (C)               Opens the Replace dialog.
3600 Find in files                   Ctrl-Shift-F              Opens the Find in files dialog.
3602 Next message                                              Jumps to the line with the next message in
3603                                                           the Messages window.
3605 Previous message                                          Jumps to the line with the previous message
3606                                                           in the Messages window.
3608 Find Usage                      Ctrl-Shift-E              Finds all occurrences of the current word (near
3609                                                           the keyboard cursor) or selection in all open
3610                                                           documents and displays them in the messages
3611                                                           window.
3613 Find Document Usage             Ctrl-Shift-D              Finds all occurrences of the current word (near
3614                                                           the keyboard cursor) or selection in the current
3615                                                           document and displays them in the messages
3616                                                           window.
3618 Mark All                        Ctrl-Shift-M              Highlight all matches of the current
3619                                                           word/selection in the current document
3620                                                           with a colored box. If there's nothing to
3621                                                           find, or the cursor is next to an existing match,
3622                                                           the highlighted matches will be cleared.
3623 =============================== ========================= ==================================================
3626 Go to keybindings
3627 `````````````````
3628 =============================== ========================= ==================================================
3629 Action                          Default shortcut          Description
3630 =============================== ========================= ==================================================
3631 Navigate forward a location     Alt-Right  (C)            Switches to the next location in the navigation
3632                                                           history. See the section called `Code Navigation
3633                                                           History`_.
3635 Navigate back a location        Alt-Left  (C)             Switches to the previous location in the
3636                                                           navigation history. See the section called
3637                                                           `Code navigation history`_.
3639 Go to line                      Ctrl-L                    Focuses the Go to Line entry (if visible) or
3640                                                           shows the Go to line dialog.
3642 Goto matching brace             Ctrl-B                    If the cursor is ahead or behind a brace, then it
3643                                                           is moved to the brace which belongs to the current
3644                                                           one. If this keyboard shortcut is pressed again,
3645                                                           the cursor is moved back to the first brace.
3647 Toggle marker                   Ctrl-M                    Set a marker on the current line, or clear the
3648                                                           marker if there already is one.
3650 Goto next marker                Ctrl-.                    Goto the next marker in the current document.
3652 Goto previous marker            Ctrl-,                    Goto the previous marker in the current document.
3654 Go to tag definition            Ctrl-T                    Jump to the definition of the current word or
3655                                                           selection. See `Go to tag definition`_.
3657 Go to tag declaration           Ctrl-Shift-T              Jump to the declaration of the current word or
3658                                                           selection. See `Go to tag declaration`_.
3660 Go to Start of Line             Home                      Move the caret to the start of the line.
3661                                                           Behaves differently if smart_home_key_ is set.
3663 Go to End of Line               End                       Move the caret to the end of the line.
3665 Go to Start of Display Line     Alt-Home                  Move the caret to the start of the display line.
3666                                                           This is useful when you use line wrapping and
3667                                                           want to jump to the start of the wrapped, virtual
3668                                                           line, not the real start of the whole line.
3669                                                           If the line is not wrapped, it behaves like
3670                                                           `Go to Start of Line`.
3672 Go to End of Display Line       Alt-End                   Move the caret to the end of the display line.
3673                                                           If the line is not wrapped, it behaves like
3674                                                           `Go to End of Line`.
3676 Go to Previous Word Part        Ctrl-/                    Goto the previous part of the current word.
3678 Go to Next Word Part            Ctrl-\\                   Goto the next part of the current word.
3679 =============================== ========================= ==================================================
3681 View keybindings
3682 ````````````````
3683 =============================== ========================= ==================================================
3684 Action                          Default shortcut          Description
3685 =============================== ========================= ==================================================
3686 Fullscreen                      F11  (C)                  Switches to fullscreen mode.
3688 Toggle Messages Window                                    Toggles the message window (status and compiler
3689                                                           messages) on and off.
3691 Toggle Sidebar                                            Shows or hides the sidebar.
3693 Toggle all additional widgets                             Hide and show all additional widgets like the
3694                                                           notebook tabs, the toolbar, the messages window
3695                                                           and the status bar.
3697 Zoom In                         Ctrl-+  (C)               Zooms in the text.
3699 Zoom Out                        Ctrl--  (C)               Zooms out the text.
3701 Zoom Reset                      Ctrl-0                    Reset any previous zoom on the text.
3702 =============================== ========================= ==================================================
3704 Focus keybindings
3705 `````````````````
3706 ================================ ========================= ==================================================
3707 Action                           Default shortcut          Description
3708 ================================ ========================= ==================================================
3709 Switch to Editor                 F2                        Switches to editor widget.
3710                                                            Also reshows the document statistics line
3711                                                            (after a short timeout).
3713 Switch to Search Bar             F7                        Switches to the search bar in the toolbar (if
3714                                                            visible).
3716 Switch to Message Window                                   Focus the Message Window's current tab.
3718 Switch to Compiler                                         Focus the Compiler message window tab.
3720 Switch to Messages                                         Focus the Messages message window tab.
3722 Switch to Scribble               F6                        Switches to scribble widget.
3724 Switch to VTE                    F4                        Switches to VTE widget.
3726 Switch to Sidebar                                          Focus the Sidebar.
3728 Switch to Sidebar Symbol List                              Focus the Symbol list tab in the Sidebar
3729                                                            (if visible).
3731 Switch to Sidebar Document List                            Focus the Document list tab in the Sidebar
3732                                                            (if visible).
3733 ================================ ========================= ==================================================
3736 Notebook tab keybindings
3737 ````````````````````````
3738 =============================== ========================= ==================================================
3739 Action                          Default shortcut          Description
3740 =============================== ========================= ==================================================
3741 Switch to left document         Ctrl-PageUp   (C)         Switches to the previous open document.
3743 Switch to right document        Ctrl-PageDown (C)         Switches to the next open document.
3745 Switch to last used document    Ctrl-Tab                  Switches to the previously shown document (if it's
3746                                                           still open).
3747                                                           Holding Ctrl (or another modifier if the keybinding
3748                                                           has been changed) will show a dialog, then repeated
3749                                                           presses of the keybinding will switch to the 2nd-last
3750                                                           used document, 3rd-last, etc. Also known as
3751                                                           Most-Recently-Used documents switching.
3753 Move document left              Ctrl-Shift-PageUp         Changes the current document with the left hand
3754                                                           one.
3756 Move document right             Ctrl-Shift-PageDown       Changes the current document with the right hand
3757                                                           one.
3759 Move document first                                       Moves the current document to the first position.
3761 Move document last                                        Moves the current document to the last position.
3762 =============================== ========================= ==================================================
3765 Document keybindings
3766 ````````````````````
3767 ==================================== ==================== ==================================================
3768 Action                               Default shortcut     Description
3769 ==================================== ==================== ==================================================
3770 Clone                                                     See `Cloning documents`_.
3772 Replace tabs with space                                   Replaces all tabs with the right amount of spaces.
3774 Replace spaces with tabs                                  Replaces leading spaces with tab characters.
3776 Toggle current fold                                       Toggles the folding state of the current code block.
3778 Fold all                                                  Folds all contractible code blocks.
3780 Unfold all                                                Unfolds all contracted code blocks.
3782 Reload symbol list                   Ctrl-Shift-R         Reloads the tag/symbol list.
3784 Toggle Line wrapping                                      Enables or disables wrapping of long lines.
3786 Toggle Line breaking                                      Enables or disables automatic breaking of long
3787                                                           lines at a configurable column.
3789 Remove Markers                                            Remove any markers on lines or words which
3790                                                           were set by using 'Mark All' in the
3791                                                           search dialog or by manually marking lines.
3793 Remove Error Indicators                                   Remove any error indicators in the
3794                                                           current document.
3796 Remove Markers and Error Indicators                       Combines ``Remove Markers`` and
3797                                                           ``Remove Error Indicators``.
3798 ==================================== ==================== ==================================================
3801 Project keybindings
3802 ```````````````````
3803 =============================== ========================= ==================================================
3804 Action                          Default shortcut          Description
3805 =============================== ========================= ==================================================
3806 New                                                       Create a new project.
3807 Open                                                      Opens a project file.
3808 Properties                                                Shows project properties.
3809 Close                                                     Close the current project.
3810 =============================== ========================= ==================================================
3813 Build keybindings
3814 `````````````````
3815 =============================== ========================= ==================================================
3816 Action                          Default shortcut          Description
3817 =============================== ========================= ==================================================
3818 Compile                         F8                        Compiles the current file.
3820 Build                           F9                        Builds (compiles if necessary and links) the
3821                                                           current file.
3823 Make all                        Shift-F9                  Builds the current file with the Make tool.
3825 Make custom target              Ctrl-Shift-F9             Builds the current file with the Make tool and a
3826                                                           given target.
3828 Make object                     Shift-F8                  Compiles the current file with the Make tool.
3830 Next error                                                Jumps to the line with the next error from the
3831                                                           last build process.
3833 Previous error                                            Jumps to the line with the previous error from
3834                                                           the last build process.
3836 Run                             F5                        Executes the current file in a terminal emulation.
3838 Set Build Commands                                        Opens the build commands dialog.
3839 =============================== ========================= ==================================================
3842 Tools keybindings
3843 `````````````````
3844 =============================== ========================= ==================================================
3845 Action                          Default shortcut          Description
3846 =============================== ========================= ==================================================
3847 Show Color Chooser                                        Opens the Color Chooser dialog.
3848 =============================== ========================= ==================================================
3851 Help keybindings
3852 ````````````````
3853 =============================== ========================= ==================================================
3854 Action                          Default shortcut          Description
3855 =============================== ========================= ==================================================
3856 Help                            F1 (C)                       Opens the manual.
3857 =============================== ========================= ==================================================
3862 Configuration files
3863 ===================
3864 .. warning::
3865     You must use UTF-8 encoding *without BOM* for configuration files.
3868 Configuration file paths
3869 ------------------------
3870 Geany has default configuration files installed for the system and
3871 also per-user configuration files.
3873 The system files should not normally be edited because they will be
3874 overwritten when upgrading Geany.
3876 The user configuration directory can be overridden with the ``-c``
3877 switch, but this is not normally done. See `Command line options`_.
3879 .. note::
3880     Any missing subdirectories in the user configuration directory
3881     will be created when Geany starts.
3883 You can check the paths Geany is using with *Help->Debug Messages*.
3884 Near the top there should be 2 lines with something like::
3886     Geany-INFO: System data dir: /usr/share/geany
3887     Geany-INFO: User config dir: /home/username/.config/geany
3890 Paths on Unix-like systems
3891 ^^^^^^^^^^^^^^^^^^^^^^^^^^
3892 The system path is ``$prefix/share/geany``, where ``$prefix`` is the
3893 path where Geany is installed (see `Installation prefix`_).
3895 The user configuration directory is normally:
3896 ``/home/username/.config/geany``
3898 Paths on Windows
3899 ^^^^^^^^^^^^^^^^
3900 The system path is the ``data`` subfolder of the installation path
3901 on Windows.
3903 The user configuration directory might vary, but on Windows XP it's:
3904 ``C:\Documents and Settings\UserName\Application Data\geany``
3905 On Windows 7 and above you most likely will find it at:
3906 ``C:\users\UserName\Roaming\geany``
3909 Tools menu items
3910 ----------------
3911 There's a *Configuration files* submenu in the *Tools* menu that
3912 contains items for some of the available user configuration files.
3913 Clicking on one opens it in the editor for you to update. Geany will
3914 reload the file after you have saved it.
3916 .. note::
3917     Other configuration files not shown here will need to be opened
3918     manually, and will not be automatically reloaded when saved.
3919     (see *Reload Configuration* below).
3921 There's also a *Reload Configuration* item which can be used if you
3922 updated one of the other configuration files, or modified or added
3923 template files.
3925 *Reload Configuration* is also necessary to update syntax highlighting colors.
3927 .. note::
3928     Syntax highlighting colors aren't updated in open documents after
3929     saving filetypes.common as this may take a significant
3930     amount of time.
3933 Global configuration file
3934 -------------------------
3936 System administrators can add a global configuration file for Geany
3937 which will be used when starting Geany and a user configuration file
3938 does not exist.
3940 The global configuration file is read from ``geany.conf`` in the
3941 system configuration path - see `Configuration file paths`_. It can
3942 contain any settings which are found in the usual configuration file
3943 created by Geany, but does not have to contain all settings.
3945 .. note::
3946     This feature is mainly intended for package maintainers or system
3947     admins who want to set up Geany in a multi user environment and
3948     set some sane default values for this environment. Usually users won't
3949     need to do that.
3953 Filetype definition files
3954 -------------------------
3956 All color definitions and other filetype specific settings are
3957 stored in the filetype definition files. Those settings are colors
3958 for syntax highlighting, general settings like comment characters or
3959 word delimiter characters as well as compiler and linker settings.
3961 See also `Configuration file paths`_.
3963 Filenames
3964 ^^^^^^^^^
3965 Each filetype has a corresponding filetype definition file. The format
3966 for built-in filetype `Foo` is::
3968     filetypes.foo
3970 The extension is normally just the filetype name in lower case.
3972 However there are some exceptions:
3974 =============== =========
3975 Filetype        Extension
3976 =============== =========
3977 C++             cpp
3978 C#              cs
3979 Make            makefile
3980 Matlab/Octave   matlab
3981 =============== =========
3983 There is also the `special file filetypes.common`_.
3985 For `custom filetypes`_, the filename for `Foo` is different::
3987     filetypes.Foo.conf
3989 See the link for details.
3991 System files
3992 ^^^^^^^^^^^^
3993 The system-wide filetype configuration files can be found in the
3994 system configuration path and are called ``filetypes.$ext``,
3995 where $ext is the name of the filetype. For every
3996 filetype there is a corresponding definition file. There is one
3997 exception: ``filetypes.common`` -- this file is for general settings,
3998 which are not specific to a certain filetype.
4000 .. warning::
4001     It is not recommended that users edit the system-wide files,
4002     because they will be overridden when Geany is updated.
4004 User files
4005 ^^^^^^^^^^
4006 To change the settings, copy a file from the system configuration
4007 path to the subdirectory ``filedefs`` in your user configuration
4008 directory. Then you can edit the file and the changes will still be
4009 available after an update of Geany.
4011 Alternatively, you can create the file yourself and add only the
4012 settings you want to change. All missing settings will be read from
4013 the corresponding system configuration file.
4015 Custom filetypes
4016 ^^^^^^^^^^^^^^^^
4017 At startup Geany looks for ``filetypes.*.conf`` files in the system and
4018 user filetype paths, adding any filetypes found with the name matching
4019 the '``*``' wildcard - e.g. ``filetypes.Bar.conf``.
4021 Custom filetypes are not as powerful as built-in filetypes, but
4022 support for the following has been implemented:
4024 * Recognizing and setting the filetype (after the user has manually updated
4025   the `filetype extensions`_ file).
4026 * `Filetype group membership`_.
4027 * Reading filetype settings in the ``[settings]`` section, including:
4028     * Using an existing syntax highlighting lexer (`lexer_filetype`_ key).
4029     * Using an existing tag parser (`tag_parser`_ key).
4030 * Build commands (``[build-menu]`` section).
4031 * Loading global tags files (sharing the ``tag_parser`` filetype's namespace).
4033 See `Filetype configuration`_ for details on each setting.
4035 Creating a custom filetype from an existing filetype
4036 ````````````````````````````````````````````````````
4037 Because most filetype settings will relate to the syntax
4038 highlighting (e.g. styling, keywords, ``lexer_properties``
4039 sections), it is best to copy an existing filetype file that uses
4040 the lexer you wish to use as the basis of a custom filetype, using
4041 the correct filename extension format shown above, e.g.::
4043     cp filetypes.foo filetypes.Bar.conf
4045 Then add the ``lexer_filetype=Foo`` setting (if not already present)
4046 and add/adjust other settings.
4048 .. warning::
4049     The ``[styling]`` and ``[keywords]`` sections have key names
4050     specific to each filetype/lexer. You must follow the same
4051     names - in particular, some lexers only support one keyword
4052     list, or none.
4055 Filetype configuration
4056 ^^^^^^^^^^^^^^^^^^^^^^
4058 As well as the sections listed below, each filetype file can contain
4059 a [build-menu] section as described in `[build-menu] section`_.
4061 [styling] section
4062 `````````````````
4064 In this section the colors for syntax highlighting are defined. The
4065 manual format is:
4067 * ``key=foreground_color;background_color;bold_flag;italic_flag``
4069 Colors have to be specified as RGB hex values prefixed by
4070 0x or # similar to HTML/CSS hex triplets. For example, all of the following
4071 are valid values for pure red; 0xff0000, 0xf00, #ff0000, or #f00.  The
4072 values are case-insensitive but it is a good idea to use lower-case.
4073 Note that you can also use *named colors* as well by substituting the
4074 color value with the name of a color as defined in the ``[named_colors]``
4075 section, see the `[named_colors] Section`_ for more information.
4077 Bold and italic are flags and should only be "true" or "false". If their
4078 value is something other than "true" or "false", "false" is assumed.
4080 You can omit fields to use the values from the style named ``"default"``.
4082 E.g. ``key=0xff0000;;true``
4084 This makes the key style have red foreground text, default background
4085 color text and bold emphasis.
4087 Using a named style
4088 *******************
4089 The second format uses a *named style* name to reference a style
4090 defined in filetypes.common.
4092 * ``key=named_style``
4093 * ``key2=named_style2,bold,italic``
4095 The bold and italic parts are optional, and if present are used to
4096 toggle the bold or italic flags to the opposite of the named style's
4097 flags. In contrast to style definition booleans, they are a literal
4098 ",bold,italic" and commas are used instead of semi-colons.
4100 E.g. ``key=comment,italic``
4102 This makes the key style match the ``"comment"`` named style, but with
4103 italic emphasis.
4105 To define named styles, see the filetypes.common `[named_styles]
4106 Section`_.
4108 Reading styles from another filetype
4109 ************************************
4110 You can automatically copy all of the styles from another filetype
4111 definition file by using the following syntax for the ``[styling]``
4112 group::
4114         [styling=Foo]
4116 Where Foo is a filetype name. The corresponding ``[styling]``
4117 section from ``filetypes.foo`` will be read.
4119 This is useful when the same lexer is being used for multiple
4120 filetypes (e.g. C/C++/C#/Java/etc).  For example, to make the C++
4121 styling the same as the C styling, you would put the following in
4122 ``filetypes.cpp``::
4124         [styling=C]
4127 [keywords] section
4128 ``````````````````
4130 This section contains keys for different keyword lists specific to
4131 the filetype. Some filetypes do not support keywords, so adding a
4132 new key will not work. You can only add or remove keywords to/from
4133 an existing list.
4135 .. important::
4136     The keywords list must be in one line without line ending characters.
4139 [lexer_properties] section
4140 ``````````````````````````
4141 Here any special properties for the Scintilla lexer can be set in the
4142 format ``key.name.field=some.value``.
4144 Properties Geany uses are listed in the system filetype files. To find
4145 other properties you need Geany's source code::
4147     egrep -o 'GetProperty\w*\("([^"]+)"[^)]+\)' scintilla/Lex*.cxx
4150 [settings] section
4151 ``````````````````
4153 extension
4154     This is the default file extension used when saving files, not
4155     including the period character (``.``). The extension used should
4156     match one of the patterns associated with that filetype (see
4157     `Filetype extensions`_).
4159     *Example:* ``extension=cxx``
4161 wordchars
4162     These characters define word boundaries when making selections
4163     and searching using word matching options.
4165     *Example:* (look at system filetypes.\* files)
4167     .. note::
4168         This overrides the *whitespace_chars* filetypes.common setting.
4170 comment_single
4171     A character or string which is used to comment code. If you want to use
4172     multiline comments only, don't set this but rather comment_open and
4173     comment_close.
4175     Single-line comments are used in priority over multiline comments to
4176     comment a line, e.g. with the `Comment/Uncomment line` command.
4178     *Example:* ``comment_single=//``
4180 comment_open
4181     A character or string which is used to comment code. You need to also
4182     set comment_close to really use multiline comments. If you want to use
4183     single-line comments, prefer setting comment_single.
4185     Multiline comments are used in priority over single-line comments to
4186     comment a block, e.g. template comments.
4188     *Example:* ``comment_open=/*``
4190 comment_close
4191     If multiline comments are used, this is the character or string to
4192     close the comment.
4194     *Example:* ``comment_close=*/``
4196 comment_use_indent
4197     Set this to false if a comment character or string should start at
4198     column 0 of a line. If set to true it uses any indentation of the
4199     line.
4201     Note: Comment indentation
4203     ``comment_use_indent=true`` would generate this if a line is
4204     commented (e.g. with Ctrl-D)::
4206         #command_example();
4208     ``comment_use_indent=false`` would generate this if a line is
4209     commented (e.g. with Ctrl-D)::
4211         #   command_example();
4214     Note: This setting only works for single line comments (like '//',
4215     '#' or ';').
4217     *Example:* ``comment_use_indent=true``
4219 context_action_cmd
4220     A command which can be executed on the current word or the current
4221     selection.
4223     Example usage: Open the API documentation for the
4224     current function call at the cursor position.
4226     The command can
4227     be set for every filetype or if not set, a global command will
4228     be used. The command itself can be specified without the full
4229     path, then it is searched in $PATH. But for security reasons,
4230     it is recommended to specify the full path to the command. The
4231     wildcard %s will be replaced by the current word at the cursor
4232     position or by the current selection.
4234     Hint: for PHP files the following could be quite useful:
4235     context_action_cmd=firefox "http://www.php.net/%s"
4237     *Example:* ``context_action_cmd=devhelp -s "%s"``
4239 .. _tag_parser:
4241 tag_parser
4242     The TagManager language name, e.g. "C". Usually the same as the
4243     filetype name.
4245 .. _lexer_filetype:
4247 lexer_filetype
4248     A filetype name to setup syntax highlighting from another filetype.
4249     This must not be recursive, i.e. it should be a filetype name that
4250     doesn't use the *lexer_filetype* key itself, e.g.::
4252         lexer_filetype=C
4253         #lexer_filetype=C++
4255     The second line is wrong, because ``filetypes.cpp`` itself uses
4256     ``lexer_filetype=C``, which would be recursive.
4258 symbol_list_sort_mode
4259     What the default symbol list sort order should be.
4261     =====   =====================================
4262     Value   Meaning
4263     =====   =====================================
4264     0       Sort tags by name
4265     1       Sort tags by appearance (line number)
4266     =====   =====================================
4268 .. _xml_indent_tags:
4270 xml_indent_tags
4271     If this setting is set to *true*, a new line after a line ending with an
4272     unclosed XML/HTML tag will be automatically indented. This only applies
4273     to filetypes for which the HTML or XML lexer is used. Such filetypes have
4274     this setting in their system configuration files.
4276 mime_type
4277     The MIME type for this file type, e.g. "text/x-csrc".  This is used
4278     for example to chose the icon to display for this file type.
4281 [indentation] section
4282 `````````````````````
4284 This section allows definition of default indentation settings specific to
4285 the file type, overriding the ones configured in the preferences.  This can
4286 be useful for file types requiring specific indentation settings (e.g. tabs
4287 only for Makefile).  These settings don't override auto-detection if activated.
4289 width
4290     The forced indentation width.
4292 type
4293     The forced indentation type.
4295     =====   =======================
4296     Value   Indentation type
4297     =====   =======================
4298     0       Spaces only
4299     1       Tabs only
4300     2       Mixed (tabs and spaces)
4301     =====   =======================
4304 [build_settings] section
4305 ````````````````````````
4307 As of Geany 0.19 this section is supplemented by the `[build-menu] section`_.
4308 Values that are set in the [build-menu] section will override those in this section.
4310 error_regex
4311     This is a regular expression to parse a filename
4312     and line number from build output. If undefined, Geany will fall
4313     back to its default error message parsing.
4315     Only the first two matches will be read by Geany. Geany will look for
4316     a match that is purely digits, and use this for the line number. The
4317     remaining match will be used as the filename.
4319     *Example:* ``error_regex=(.+):([0-9]+):[0-9]+``
4321     This will parse a message such as:
4322     ``test.py:7:24: E202 whitespace before ']'``
4324 **Build commands**
4326 If any build menu item settings have been configured in the Build Menu Commands
4327 dialog or the Build tab of the project preferences dialog then these
4328 settings are stored in the [build-menu] section and override the settings in
4329 this section for that item.
4331 compiler
4332     This item specifies the command to compile source code files. But
4333     it is also possible to use it with interpreted languages like Perl
4334     or Python. With these filetypes you can use this option as a kind of
4335     syntax parser, which sends output to the compiler message window.
4337     You should quote the filename to also support filenames with
4338     spaces. The following wildcards for filenames are available:
4340     * %f -- complete filename without path
4341     * %e -- filename without path and without extension
4343     *Example:* ``compiler=gcc -Wall -c "%f"``
4345 linker
4346     This item specifies the command to link the file. If the file is not
4347     already compiled, it will be compiled while linking. The -o option
4348     is automatically added by Geany. This item works well with GNU gcc,
4349     but may be problematic with other compilers (esp. with the linker).
4351     *Example:* ``linker=gcc -Wall "%f"``
4353 run_cmd
4354     Use this item to execute your file. It has to have been built
4355     already. Use the %e wildcard to have only the name of the executable
4356     (i.e. without extension) or use the %f wildcard if you need the
4357     complete filename, e.g. for shell scripts.
4359     *Example:* ``run_cmd="./%e"``
4362 Special file filetypes.common
4363 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4365 There is a special filetype definition file called
4366 filetypes.common. This file defines some general non-filetype-specific
4367 settings.
4369 You can open the user filetypes.common with the
4370 *Tools->Configuration Files->filetypes.common* menu item. This adds
4371 the default settings to the user file if the file doesn't exist.
4372 Alternatively the file can be created manually, adding only the
4373 settings you want to change. All missing settings will be read from
4374 the system file.
4376 .. note::
4377     See the `Filetype configuration`_ section for how to define styles.
4380 [named_styles] section
4381 ``````````````````````
4382 Named styles declared here can be used in the [styling] section of any
4383 filetypes.* file.
4385 For example:
4387 *In filetypes.common*::
4389     [named_styles]
4390     foo=0xc00000;0xffffff;false;true
4391     bar=foo
4393 *In filetypes.c*::
4395     [styling]
4396     comment=foo
4398 This saves copying and pasting the whole style definition into several
4399 different files.
4401 .. note::
4402     You can define aliases for named styles, as shown with the ``bar``
4403     entry in the above example, but they must be declared after the
4404     original style.
4407 [named_colors] section
4408 ``````````````````````
4409 Named colors declared here can be used in the ``[styling]`` or
4410 ``[named_styles]`` section of any filetypes.* file or color scheme.
4412 For example::
4414     [named_colors]
4415     my_red_color=#FF0000
4416     my_blue_color=#0000FF
4418     [named_styles]
4419     foo=my_red_color;my_blue_color;false;true
4421 This allows to define a color pallete by name so that to change a color
4422 scheme-wide only involves changing the hex value in a single location.
4424 [styling] section
4425 `````````````````
4426 default
4427     This is the default style. It is used for styling files without a
4428     filetype set.
4430     *Example:* ``default=0x000000;0xffffff;false;false``
4432 selection
4433     The style for coloring selected text. The format is:
4435     * Foreground color
4436     * Background color
4437     * Use foreground color
4438     * Use background color
4440     The colors are only set if the 3rd or 4th argument is true. When
4441     the colors are not overridden, the default is a dark grey
4442     background with syntax highlighted foreground text.
4444     *Example:* ``selection=0xc0c0c0;0x00007F;true;true``
4446 brace_good
4447     The style for brace highlighting when a matching brace was found.
4449     *Example:* ``brace_good=0xff0000;0xFFFFFF;true;false``
4451 brace_bad
4452     The style for brace highlighting when no matching brace was found.
4454     *Example:* ``brace_bad=0x0000ff;0xFFFFFF;true;false``
4456 caret
4457     The style for coloring the caret(the blinking cursor). Only first
4458     and third argument is interpreted.
4459     Set the third argument to true to change the caret into a block caret.
4461     *Example:* ``caret=0x000000;0x0;false;false``
4463 caret_width
4464     The width for the caret(the blinking cursor). Only the first
4465     argument is interpreted. The width is specified in pixels with
4466     a maximum of three pixel. Use the width 0 to make the caret
4467     invisible.
4469     *Example:* ``caret=1;0;false;false``
4471 current_line
4472     The style for coloring the background of the current line. Only
4473     the second and third arguments are interpreted. The second argument
4474     is the background color. Use the third argument to enable or
4475     disable background highlighting for the current line (has to be
4476     true/false).
4478     *Example:* ``current_line=0x0;0xe5e5e5;true;false``
4480 indent_guide
4481     The style for coloring the indentation guides. Only the first and
4482     second arguments are interpreted.
4484     *Example:* ``indent_guide=0xc0c0c0;0xffffff;false;false``
4486 white_space
4487     The style for coloring the white space if it is shown. The first
4488     both arguments define the foreground and background colors, the
4489     third argument sets whether to use the defined foreground color
4490     or to use the color defined by each filetype for the white space.
4491     The fourth argument defines whether to use the background color.
4493     *Example:* ``white_space=0xc0c0c0;0xffffff;true;true``
4495 margin_linenumber
4496     Line number margin foreground and background colors.
4498 .. _Folding Settings:
4500 margin_folding
4501     Fold margin foreground and background colors.
4503 fold_symbol_highlight
4504     Highlight color of folding symbols.
4506 folding_style
4507     The style of folding icons. Only first and second arguments are
4508     used.
4510     Valid values for the first argument are:
4512     * 1 -- for boxes
4513     * 2 -- for circles
4514     * 3 -- for arrows
4515     * 4 -- for +/-
4517     Valid values for the second argument are:
4519     * 0 -- for no lines
4520     * 1 -- for straight lines
4521     * 2 -- for curved lines
4523     *Default:* ``folding_style=1;1;``
4525     *Arrows:* ``folding_style=3;0;``
4527 folding_horiz_line
4528     Draw a thin horizontal line at the line where text is folded. Only
4529     first argument is used.
4531     Valid values for the first argument are:
4533     * 0 -- disable, do not draw a line
4534     * 1 -- draw the line above folded text
4535     * 2 -- draw the line below folded text
4537     *Example:* ``folding_horiz_line=0;0;false;false``
4539 line_wrap_visuals
4540     First argument: drawing of visual flags to indicate a line is wrapped.
4541     This is a bitmask of the values:
4543     * 0 -- No visual flags
4544     * 1 -- Visual flag at end of subline of a wrapped line
4545     * 2 -- Visual flag at begin of subline of a wrapped line. Subline is
4546       indented by at least 1 to make room for the flag.
4548     Second argument: wether the visual flags to indicate a line is wrapped
4549     are drawn near the border or near the text. This is a bitmask of the values:
4551     * 0 -- Visual flags drawn near border
4552     * 1 -- Visual flag at end of subline drawn near text
4553     * 2 -- Visual flag at begin of subline drawn near text
4555     Only first and second arguments are interpreted.
4557     *Example:* ``line_wrap_visuals=3;0;false;false``
4559 line_wrap_indent
4560     First argument: sets the size of indentation of sublines for wrapped lines
4561     in terms of the width of a space, only used when the second argument is ``0``.
4563     Second argument: wrapped sublines can be indented to the position of their
4564     first subline or one more indent level. Possible values:
4566     * 0 - Wrapped sublines aligned to left of window plus amount set by the first argument
4567     * 1 - Wrapped sublines are aligned to first subline indent (use the same indentation)
4568     * 2 - Wrapped sublines are aligned to first subline indent plus one more level of indentation
4570     Only first and second arguments are interpreted.
4572     *Example:* ``line_wrap_indent=0;1;false;false``
4574 translucency
4575     Translucency for the current line (first argument) and the selection
4576     (second argument). Values between 0 and 256 are accepted.
4578     Note for Windows 95, 98 and ME users:
4579     keep this value at 256 to disable translucency otherwise Geany might crash.
4581     Only the first and second arguments are interpreted.
4583     *Example:* ``translucency=256;256;false;false``
4585 marker_line
4586     The style for a highlighted line (e.g when using Goto line or goto tag).
4587     The foreground color (first argument) is only used when the Markers margin
4588     is enabled (see View menu).
4590     Only the first and second arguments are interpreted.
4592     *Example:* ``marker_line=0x000000;0xffff00;false;false``
4594 marker_search
4595     The style for a marked search results (when using "Mark" in Search dialogs).
4596     The second argument sets the background color for the drawn rectangle.
4598     Only the second argument is interpreted.
4600     *Example:* ``marker_search=0x000000;0xb8f4b8;false;false``
4602 marker_mark
4603     The style for a marked line (e.g when using the "Toggle Marker" keybinding
4604     (Ctrl-M)). The foreground color (first argument) is only used
4605     when the Markers margin is enabled (see View menu).
4607     Only the first and second arguments are interpreted.
4609     *Example:* ``marker_mark=0x000000;0xb8f4b8;false;false``
4611 marker_translucency
4612     Translucency for the line marker (first argument) and the search marker
4613     (second argument). Values between 0 and 256 are accepted.
4615     Note for Windows 95, 98 and ME users:
4616     keep this value at 256 to disable translucency otherwise Geany might crash.
4618     Only the first and second arguments are interpreted.
4620     *Example:* ``marker_translucency=256;256;false;false``
4622 line_height
4623     Amount of space to be drawn above and below the line's baseline.
4624     The first argument defines the amount of space to be drawn above the line, the second
4625     argument defines the amount of space to be drawn below.
4627     Only the first and second arguments are interpreted.
4629     *Example:* ``line_height=0;0;false;false``
4631 calltips
4632     The style for coloring the calltips. The first two arguments
4633     define the foreground and background colors, the third and fourth
4634     arguments set whether to use the defined colors.
4636     *Example:* ``calltips=0xc0c0c0;0xffffff;false;false``
4639 [settings] section
4640 ``````````````````
4641 whitespace_chars
4642     Characters to treat as whitespace. These characters are ignored
4643     when moving, selecting and deleting across word boundaries
4644     (see `Scintilla keyboard commands`_).
4646     This should include space (\\s) and tab (\\t).
4648     *Example:* ``whitespace_chars=\s\t!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~``
4652 Filetype extensions
4653 -------------------
4655 .. note::
4656     To change the default filetype extension used when saving a new file,
4657     see `Filetype definition files`_.
4659 You can override the list of file extensions that Geany uses to detect
4660 filetypes using the user ``filetype_extensions.conf`` file. Use the
4661 *Tools->Configuration Files->filetype_extensions.conf* menu item. See
4662 also `Configuration file paths`_.
4664 You should only list lines for filetype extensions that you want to
4665 override in the user configuration file and remove or comment out
4666 others. The patterns are listed after the ``=`` sign, using a
4667 semi-colon separated list of patterns which should be matched for
4668 that filetype.
4670 For example, to override the filetype extensions for Make, the file
4671 should look like::
4673     [Extensions]
4674     Make=Makefile*;*.mk;Buildfile;
4676 Filetype group membership
4677 ^^^^^^^^^^^^^^^^^^^^^^^^^
4678 Group membership is also stored in ``filetype_extensions.conf``. This
4679 file is used to store information Geany needs at startup, whereas the
4680 separate filetype definition files hold information only needed when
4681 a document with their filetype is used.
4683 The format looks like::
4685     [Groups]
4686     Programming=C;C++;
4687     Script=Perl;Python;
4688     Markup=HTML;XML;
4689     Misc=Diff;Conf;
4690     None=None;
4692 The key names cannot be configured.
4694 .. note::
4695     Group membership is only read at startup.
4697 Preferences file format
4698 -----------------------
4700 The user preferences file ``geany.conf`` holds settings for all the items configured
4701 in the preferences dialog. This file should not be edited while Geany is running
4702 as the file will be overwritten when the preferences in Geany are changed or Geany
4703 is quit.
4706 [build-menu] section
4707 ^^^^^^^^^^^^^^^^^^^^
4709 The [build-menu] section contains the configuration of the build menu.
4710 This section can occur in filetype, preferences and project files and
4711 always has the format described here.  Different menu items are loaded
4712 from different files, see the table in the `Build Menu Configuration`_
4713 section for details.  All the settings can be configured from the dialogs
4714 except the execute command in filetype files and filetype definitions in
4715 the project file, so these are the only ones which need hand editing.
4717 The build-menu section stores one entry for each setting for each menu item that
4718 is configured.  The keys for these settings have the format:
4720   ``GG_NN_FF``
4722 where:
4724 * GG - is the menu item group,
4726   - FT for filetype
4727   - NF for independent (non-filetype)
4728   - EX for execute
4730 * NN - is a two decimal digit number of the item within the group,
4731   starting at 00
4732 * FF - is the field,
4734   - LB for label
4735   - CM for command
4736   - WD for working directory
4739 Project file format
4740 -------------------
4742 The project file contains project related settings and possibly a
4743 record of the current session files.
4746 [build-menu] additions
4747 ^^^^^^^^^^^^^^^^^^^^^^
4749 The project file also can have extra fields in the [build-menu] section
4750 in addition to those listed in `[build-menu] section`_ above.
4752 When filetype menu items are configured for the project they are stored
4753 in the project file.
4755 The ``filetypes`` entry is a list of the filetypes which exist in the
4756 project file.
4758 For each filetype the entries for that filetype have the format defined in
4759 `[build-menu] section`_ but the key is prefixed by the name of the filetype
4760 as it appears in the ``filetypes`` entry, eg the entry for the label of
4761 filetype menu item 0 for the C filetype would be
4763   ``CFT_00_LB=Label``
4766 Templates
4767 ---------
4769 Geany supports the following templates:
4771 * ChangeLog entry
4772 * File header
4773 * Function description
4774 * Short GPL notice
4775 * Short BSD notice
4776 * File templates
4778 To use these templates, just open the Edit menu or open the popup menu
4779 by right-clicking in the editor widget, and choose "Insert Comments"
4780 and insert templates as you want.
4782 Some templates (like File header or ChangeLog entry) will always be
4783 inserted at the top of the file.
4785 To insert a function description, the cursor must be inside
4786 of the function, so that the function name can be determined
4787 automatically. The description will be positioned correctly one line
4788 above the function, just check it out. If the cursor is not inside
4789 of a function or the function name cannot be determined, the inserted
4790 function description won't contain the correct function name but "unknown"
4791 instead.
4793 .. note::
4794     Geany automatically reloads template information when it notices you
4795     save a file in the user's template configuration directory. You can
4796     also force this by selecting *Tools->Reload Configuration*.
4799 Template meta data
4800 ^^^^^^^^^^^^^^^^^^
4802 Meta data can be used with all templates, but by default user set
4803 meta data is only used for the ChangeLog and File header templates.
4805 In the configuration dialog you can find a tab "Templates" (see
4806 `Template preferences`_). You can define the default values
4807 which will be inserted in the templates.
4810 File templates
4811 ^^^^^^^^^^^^^^
4813 File templates are templates used as the basis of a new file. To
4814 use them, choose the *New (with Template)* menu item from the *File*
4815 menu.
4817 By default, file templates are installed for some filetypes. Custom
4818 file templates can be added by creating the appropriate template file. You can
4819 also edit the default file templates.
4821 The file's contents are just the text to place in the document, with
4822 optional template wildcards like ``{fileheader}``. The fileheader
4823 wildcard can be placed anywhere, but it's usually put on the first
4824 line of the file, followed by a blank line.
4826 Adding file templates
4827 `````````````````````
4829 File templates are read from ``templates/files`` under the
4830 `Configuration file paths`_.
4832 The filetype to use is detected from the template file's extension, if
4833 any. For example, creating a file ``module.c`` would add a menu item
4834 which created a new document with the filetype set to 'C'.
4836 The template file is read from disk when the corresponding menu item is
4837 clicked.
4840 Customizing templates
4841 ^^^^^^^^^^^^^^^^^^^^^
4843 Each template can be customized to your needs. The templates are
4844 stored in the ``~/.config/geany/templates/`` directory (see the section called
4845 `Command line options`_ for further information about the configuration
4846 directory). Just open the desired template with an editor (ideally,
4847 Geany ;-) ) and edit the template to your needs. There are some
4848 wildcards which will be automatically replaced by Geany at startup.
4851 Template wildcards
4852 ``````````````````
4854 All wildcards must be enclosed by "{" and "}", e.g. {date}.
4856 **Wildcards for character escaping**
4858 ============== ============================================= =======================================
4859 Wildcard       Description                                   Available in
4860 ============== ============================================= =======================================
4861 ob             { Opening Brace (used to prevent other        file templates, file header, snippets.
4862                wildcards being expanded).
4863 cb             } Closing Brace.                              file templates, file header, snippets.
4864 pc             \% Percent (used to escape e.g. %block% in
4865                snippets).                                    snippets.
4866 ============== ============================================= =======================================
4868 **Global wildcards**
4870 These are configurable, see `Template preferences`_.
4872 ============== ============================================= =======================================
4873 Wildcard       Description                                   Available in
4874 ============== ============================================= =======================================
4875 developer      The name of the developer.                    file templates, file header,
4876                                                              function description, ChangeLog entry,
4877                                                              bsd, gpl, snippets.
4879 initial        The developer's initials, e.g. "ET" for       file templates, file header,
4880                Enrico Tröger or "JFD" for John Foobar Doe.   function description, ChangeLog entry,
4881                                                              bsd, gpl, snippets.
4883 mail           The email address of the developer.           file templates, file header,
4884                                                              function description, ChangeLog entry,
4885                                                              bsd, gpl, snippets.
4887 company        The company the developer is working for.     file templates, file header,
4888                                                              function description, ChangeLog entry,
4889                                                              bsd, gpl, snippets.
4891 version        The initial version of a new file.            file templates, file header,
4892                                                              function description, ChangeLog entry,
4893                                                              bsd, gpl, snippets.
4894 ============== ============================================= =======================================
4896 **Date & time wildcards**
4898 The format for these wildcards can be changed in the preferences
4899 dialog, see `Template preferences`_. You can use any conversion
4900 specifiers which can be used with the ANSI C strftime function.
4901 For details please see http://man.cx/strftime.
4903 ============== ============================================= =======================================
4904 Wildcard       Description                                   Available in
4905 ============== ============================================= =======================================
4906 year           The current year. Default format is: YYYY.    file templates, file header,
4907                                                              function description, ChangeLog entry,
4908                                                              bsd, gpl, snippets.
4910 date           The current date. Default format:             file templates, file header,
4911                YYYY-MM-DD.                                   function description, ChangeLog entry,
4912                                                              bsd, gpl, snippets.
4914 datetime       The current date and time. Default format:    file templates, file header,
4915                DD.MM.YYYY HH:mm:ss ZZZZ.                     function description, ChangeLog entry,
4916                                                              bsd, gpl, snippets.
4917 ============== ============================================= =======================================
4919 **Dynamic wildcards**
4921 ============== ============================================= =======================================
4922 Wildcard       Description                                   Available in
4923 ============== ============================================= =======================================
4924 untitled       The string "untitled" (this will be           file templates, file header,
4925                translated to your locale), used in           function description, ChangeLog entry,
4926                file templates.                               bsd, gpl, snippets.
4928 geanyversion   The actual Geany version, e.g.                file templates, file header,
4929                "Geany |(version)|".                          function description, ChangeLog entry,
4930                                                              bsd, gpl, snippets.
4932 filename       The filename of the current file.             file header, snippets, file
4933                For new files, it's only replaced when        templates.
4934                first saving if found on the first 4 lines
4935                of the file.
4937 project        The current project's name, if any.           file header, snippets, file templates.
4939 description    The current project's description, if any.    file header, snippets, file templates.
4941 functionname   The function name of the function at the      function description.
4942                cursor position. This wildcard will only be
4943                replaced in the function description
4944                template.
4946 command:path   Executes the specified command and replace    file templates, file header,
4947                the wildcard with the command's standard      function description, ChangeLog entry,
4948                output. See `Special {command:} wildcard`_    bsd, gpl, snippets.
4949                for details.
4950 ============== ============================================= =======================================
4952 **Template insertion wildcards**
4954 ============== ============================================= =======================================
4955 Wildcard       Description                                   Available in
4956 ============== ============================================= =======================================
4957 gpl            This wildcard inserts a short GPL notice.     file header.
4959 bsd            This wildcard inserts a BSD licence notice.   file header.
4961 fileheader     The file header template. This wildcard       snippets, file templates.
4962                will only be replaced in file templates.
4963 ============== ============================================= =======================================
4966 Special {command:} wildcard
4967 ***************************
4969 The {command:} wildcard is a special one because it can execute
4970 a specified command and put the command's output (stdout) into
4971 the template.
4973 Example::
4975     {command:uname -a}
4977 will result in::
4979     Linux localhost 2.6.9-023stab046.2-smp #1 SMP Mon Dec 10 15:04:55 MSK 2007 x86_64 GNU/Linux
4981 Using this wildcard you can insert nearly any arbitrary text into the
4982 template.
4984 In the environment of the executed command the variables
4985 ``GEANY_FILENAME``, ``GEANY_FILETYPE`` and ``GEANY_FUNCNAME`` are set.
4986 The value of these variables is filled in only if Geany knows about it.
4987 For example, ``GEANY_FUNCNAME`` is only filled within the function
4988 description template. However, these variables are ``always`` set,
4989 just maybe with an empty value.
4990 You can easily access them e.g. within an executed shell script using::
4992     $GEANY_FILENAME
4995 .. note::
4996     If the specified command could not be found or not executed, the wildcard is substituted
4997     by an empty string. In such cases, you can find the occurred error message on Geany's
4998     standard error and in the Help->Debug Messages dialog.
5001 Customizing the toolbar
5002 -----------------------
5004 You can add, remove and reorder the elements in the toolbar by using
5005 the toolbar editor, or by manually editing the configuration file
5006 ``ui_toolbar.xml``.
5008 The toolbar editor can be opened from the preferences editor on the Toolbar tab or
5009 by right-clicking on the toolbar itself and choosing it from the menu.
5011 Manually editing the toolbar layout
5012 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5014 To override the system-wide configuration file, copy it to your user
5015 configuration directory (see `Configuration file paths`_).
5017 For example::
5019     % cp /usr/local/share/geany/ui_toolbar.xml /home/username/.config/geany/
5021 Then edit it and add any of the available elements listed in the file or remove
5022 any of the existing elements. Of course, you can also reorder the elements as
5023 you wish and add or remove additional separators.
5024 This file must be valid XML, otherwise the global toolbar UI definition
5025 will be used instead.
5027 Your changes are applied once you save the file.
5029 .. note::
5030     (1) You cannot add new actions which are not listed below.
5031     (2) Everything you add or change must be inside the /ui/toolbar/ path.
5034 Available toolbar elements
5035 ^^^^^^^^^^^^^^^^^^^^^^^^^^
5037 ================== ==============================================================================
5038 Element name       Description
5039 ================== ==============================================================================
5040 New                Create a new file
5041 Open               Open an existing file
5042 Save               Save the current file
5043 SaveAll            Save all open files
5044 Reload             Reload the current file from disk
5045 Close              Close the current file
5046 CloseAll           Close all open files
5047 Print              Print the current file
5048 Cut                Cut the current selection
5049 Copy               Copy the current selection
5050 Paste              Paste the contents of the clipboard
5051 Delete             Delete the current selection
5052 Undo               Undo the last modification
5053 Redo               Redo the last modification
5054 NavBack            Navigate back a location
5055 NavFor             Navigate forward a location
5056 Compile            Compile the current file
5057 Build              Build the current file, includes a submenu for Make commands. Geany
5058                    remembers the last chosen action from the submenu and uses this as default
5059                    action when the button itself is clicked.
5060 Run                Run or view the current file
5061 Color              Open a color chooser dialog, to interactively pick colors from a palette
5062 ZoomIn             Zoom in the text
5063 ZoomOut            Zoom out the text
5064 UnIndent           Decrease indentation
5065 Indent             Increase indentation
5066 Replace            Replace text in the current document
5067 SearchEntry        The search field belonging to the 'Search' element (can be used alone)
5068 Search             Find the entered text in the current file (only useful if you also
5069                    use 'SearchEntry')
5070 GotoEntry          The goto field belonging to the 'Goto' element (can be used alone)
5071 Goto               Jump to the entered line number (only useful if you also use 'GotoEntry')
5072 Preferences        Show the preferences dialog
5073 Quit               Quit Geany
5074 ================== ==============================================================================
5078 Plugin documentation
5079 ====================
5081 HTML Characters
5082 ---------------
5084 The HTML Characters plugin helps when working with special
5085 characters in XML/HTML, e.g. German Umlauts ü and ä.
5088 Insert entity dialog
5089 ^^^^^^^^^^^^^^^^^^^^
5091 When the plugin is enabled, you can insert special character
5092 entities using *Tools->Insert Special HTML Characters*.
5094 This opens up a dialog where you can find a huge amount of special
5095 characters sorted by category that you might like to use inside your
5096 document. You can expand and collapse the categories by clicking on
5097 the little arrow on the left hand side. Once you have found the
5098 desired character click on it and choose "Insert". This will insert
5099 the entity for the character at the current cursor position. You
5100 might also like to double click the chosen entity instead.
5103 Replace special chars by its entity
5104 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5106 To help make a XML/HTML document valid the plugin supports
5107 replacement of special chars known by the plugin. Both bulk
5108 replacement and immediate replacement during typing are supported.
5110 A few characters will not be replaced. These are
5111         * "
5112         * &
5113         * <
5114         * >
5115         *   (`&nbsp;`)
5118 At typing time
5119 ``````````````
5121 You can activate/deactivate this feature using the *Tools->HTML
5122 Replacement->Auto-replace Special Characters* menu item. If it's
5123 activated, all special characters (beside the given exceptions from
5124 above) known by the plugin will be replaced by their entities.
5126 You could also set a keybinding for the plugin to toggle the status
5127 of this feature.
5130 Bulk replacement
5131 ````````````````
5133 After inserting a huge amount of text, e.g. by using copy & paste, the
5134 plugin allows bulk replacement of all known characters (beside the
5135 mentioned exceptions). You can find the function under the same
5136 menu at *Tools->HTML Replacement->Replace Characters in Selection*, or
5137 configure a keybinding for the plugin.
5140 Save Actions
5141 ------------
5143 Auto Save
5144 ^^^^^^^^^
5146 This plugin provides an option to automatically save documents.
5147 You can choose to save the current document, or all of your documents, at
5148 a given delay.
5151 Save on focus out
5152 ^^^^^^^^^^^^^^^^^
5154 You can save the current document when the editor's focus goes out.
5155 Every pop-up, menu dialogs, or anything else that can make the editor lose the focus,
5156 will make the current document to be saved.
5159 Instant Save
5160 ^^^^^^^^^^^^
5161 This plugin sets on every new file (*File->New* or *File->New (with template)*)
5162 a randomly chosen filename and set its filetype appropriate to the used template
5163 or when no template was used, to a configurable default filetype.
5164 This enables you to quickly compile, build and/or run the new file without the
5165 need to give it an explicit filename using the Save As dialog. This might be
5166 useful when you often create new files just for testing some code or something
5167 similar.
5170 Backup Copy
5171 ^^^^^^^^^^^
5173 This plugin creates a backup copy of the current file in Geany when it is
5174 saved. You can specify the directory where the backup copy is saved and
5175 you can configure the automatically added extension in the configure dialog
5176 in Geany's plugin manager.
5178 After the plugin was loaded in Geany's plugin manager, every file is
5179 copied into the configured backup directory when the file is saved in Geany.
5183 Contributing to this document
5184 =============================
5186 This document (``geany.txt``) is written in `reStructuredText`__
5187 (or "reST"). The source file for it is located in Geany's ``doc``
5188 subdirectory.  If you intend on making changes, you should grab the
5189 source right from Git to make sure you've got the newest version.
5190 First, you need to configure the build system to generate the HTML
5191 documentation passing the *--enable-html-docs* option to the *configure*
5192 script. Then after editing the file, run ``make`` (from the root build
5193 directory or from the *doc* subdirectory) to build the HTML documentation
5194 and see how your changes look. This regenerates the ``geany.html`` file
5195 inside the *doc* subdirectory. To generate a PDF file, configure with
5196 *--enable-pdf-docs* and run ``make`` as for the HTML version. The generated
5197 PDF file is named geany-|(version)|.pdf and is located inside the *doc*
5198 subdirectory.
5200 __ http://docutils.sourceforge.net/rst.html
5202 After you are happy with your changes, create a patch e.g. by using::
5204     % git diff geany.txt > foo.patch
5206 or even better, by creating a Git-formatted patch which will keep authoring
5207 and description data, by first committing your changes (doing so in a fresh
5208 new branch is recommended for `master` not to diverge from upstream) and then
5209 using git format-patch::
5211     % git checkout -b my-documentation-changes # create a fresh branch
5212     % git commit geany.txt
5213     Write a good commit message...
5214     % git format-patch HEAD^
5215     % git checkout master # go back to master
5217 and then submit that file to the mailing list for review.
5219 Also you can clone the Geany repository at GitHub and send a pull request.
5221 Note, you will need the Python docutils software package installed
5222 to build the docs. The package is named ``python-docutils`` on Debian
5223 and Fedora systems.
5228 Scintilla keyboard commands
5229 ===========================
5231 Copyright © 1998, 2006 Neil Hodgson <neilh(at)scintilla(dot)org>
5233 This appendix is distributed under the terms of the License for
5234 Scintilla and SciTE. A copy of this license can be found in the file
5235 ``scintilla/License.txt`` included with the source code of this
5236 program and in the appendix of this document. See `License for
5237 Scintilla and SciTE`_.
5239 20 June 2006
5243 Keyboard commands
5244 -----------------
5246 Keyboard commands for Scintilla mostly follow common Windows and GTK+
5247 conventions. All move keys (arrows, page up/down, home and end)
5248 allows to extend or reduce the stream selection when holding the
5249 Shift key, and the rectangular selection when holding the
5250 appropriate keys (see `Column mode editing (rectangular selections)`_).
5252 Some keys may not be available with some national keyboards
5253 or because they are taken by the system such as by a window manager
5254 or GTK. Keyboard equivalents of menu commands are listed in the
5255 menus. Some less common commands with no menu equivalent are:
5257 =============================================   ======================
5258 Action                                          Shortcut key
5259 =============================================   ======================
5260 Magnify text size.                              Ctrl-Keypad+
5261 Reduce text size.                               Ctrl-Keypad-
5262 Restore text size to normal.                    Ctrl-Keypad/
5263 Indent block.                                   Tab
5264 Dedent block.                                   Shift-Tab
5265 Delete to start of word.                        Ctrl-BackSpace
5266 Delete to end of word.                          Ctrl-Delete
5267 Delete to start of line.                        Ctrl-Shift-BackSpace
5268 Go to start of document.                        Ctrl-Home
5269 Extend selection to start of document.          Ctrl-Shift-Home
5270 Go to start of display line.                    Alt-Home
5271 Extend selection to start of display line.      Alt-Shift-Home
5272 Go to end of document.                          Ctrl-End
5273 Extend selection to end of document.            Ctrl-Shift-End
5274 Extend selection to end of display line.        Alt-Shift-End
5275 Previous paragraph. Shift extends selection.    Ctrl-Up
5276 Next paragraph. Shift extends selection.        Ctrl-Down
5277 Previous word. Shift extends selection.         Ctrl-Left
5278 Next word. Shift extends selection.             Ctrl-Right
5279 =============================================   ======================
5284 Tips and tricks
5285 ===============
5287 Document notebook
5288 -----------------
5290 * Double-click on empty space in the notebook tab bar to open a
5291   new document.
5292 * Middle-click on a document's notebook tab to close the document.
5293 * Hold `Ctrl` and click on any notebook tab to switch to the last used
5294   document.
5295 * Double-click on a document's notebook tab to toggle all additional
5296   widgets (to show them again use the View menu or the keyboard
5297   shortcut). The interface pref must be enabled for this to work.
5299 Editor
5300 ------
5302 * Alt-scroll wheel moves up/down a page.
5303 * Ctrl-scroll wheel zooms in/out.
5304 * Shift-scroll wheel scrolls 8 characters right/left.
5305 * Ctrl-click on a word in a document to perform *Go to Tag Definition*.
5306 * Ctrl-click on a bracket/brace to perform *Go to Matching Brace*.
5308 Interface
5309 ---------
5311 * Double-click on a symbol-list group to expand or compact it.
5313 GTK-related
5314 -----------
5316 * Scrolling the mouse wheel over a notebook tab bar will switch
5317   notebook pages.
5319 The following are derived from X-Windows features (but GTK still supports
5320 them on Windows):
5322 * Middle-click pastes the last selected text.
5323 * Middle-click on a scrollbar moves the scrollbar to that
5324   position without having to drag it.
5328 Compile-time options
5329 ====================
5331 There are some options which can only be changed at compile time,
5332 and some options which are used as the default for configurable
5333 options. To change these options, edit the appropriate source file
5334 in the ``src`` subdirectory. Look for a block of lines starting with
5335 ``#define GEANY_*``. Any definitions which are not listed here should
5336 not be changed.
5338 .. note::
5339     Most users should not need to change these options.
5341 src/geany.h
5342 -----------
5344 ==============================  ============================================  ==================
5345 Option                          Description                                   Default
5346 ==============================  ============================================  ==================
5347 GEANY_STRING_UNTITLED           A string used as the default name for new     untitled
5348                                 files. Be aware that the string can be
5349                                 translated, so change it only if you know
5350                                 what you are doing.
5351 GEANY_WINDOW_MINIMAL_WIDTH      The minimal width of the main window.         620
5352 GEANY_WINDOW_MINIMAL_HEIGHT     The minimal height of the main window.        440
5353 GEANY_WINDOW_DEFAULT_WIDTH      The default width of the main window at the   900
5354                                 first start.
5355 GEANY_WINDOW_DEFAULT_HEIGHT     The default height of the main window at the  600
5356                                 first start.
5357  **Windows specific**
5358 GEANY_USE_WIN32_DIALOG          Set this to 1 if you want to use the default  0
5359                                 Windows file open and save dialogs instead
5360                                 GTK's file open and save dialogs. The
5361                                 default Windows file dialogs are missing
5362                                 some nice features like choosing a filetype
5363                                 or an encoding. *Do not touch this setting
5364                                 when building on a non-Win32 system.*
5365 ==============================  ============================================  ==================
5367 project.h
5368 ---------
5370 ==============================  ============================================  ==================
5371 Option                          Description                                   Default
5372 ==============================  ============================================  ==================
5373 GEANY_PROJECT_EXT               The default filename extension for Geany      geany
5374                                 project files. It is used when creating new
5375                                 projects and as filter mask for the project
5376                                 open dialog.
5377 ==============================  ============================================  ==================
5379 filetypes.c
5380 -----------
5382 ==============================  ============================================  ==================
5383 Option                          Description                                   Default
5384 ==============================  ============================================  ==================
5385 GEANY_FILETYPE_SEARCH_LINES     The number of lines to search for the         2
5386                                 filetype with the extract filetype regex.
5387 ==============================  ============================================  ==================
5389 editor.h
5390 --------
5392 ==============================  ============================================  ==================
5393 Option                          Description                                   Default
5394 ==============================  ============================================  ==================
5395 GEANY_WORDCHARS                 These characters define word boundaries when  a string with:
5396                                 making selections and searching using word    a-z, A-Z, 0-9 and
5397                                 matching options.                             underscore.
5398 ==============================  ============================================  ==================
5400 keyfile.c
5401 ---------
5403 These are default settings that can be overridden in the `Preferences`_ dialog.
5405 ==============================  ============================================  ==================
5406 Option                          Description                                   Default
5407 ==============================  ============================================  ==================
5408 GEANY_MIN_SYMBOLLIST_CHARS      How many characters you need to type to       4
5409                                 trigger the autocompletion list.
5410 GEANY_DISK_CHECK_TIMEOUT        Time in seconds between checking a file for   30
5411                                 external changes.
5412 GEANY_DEFAULT_TOOLS_MAKE        The make tool. This can also include a path.  "make"
5413 GEANY_DEFAULT_TOOLS_TERMINAL    A terminal emulator command, see              See below.
5414                                 `Terminal emulators`_.
5415 GEANY_DEFAULT_TOOLS_BROWSER     A web browser. This can also include a path.  "firefox"
5416 GEANY_DEFAULT_TOOLS_PRINTCMD    A printing tool. It should be able to accept  "lpr"
5417                                 and process plain text files. This can also
5418                                 include a path.
5419 GEANY_DEFAULT_TOOLS_GREP        A grep tool. It should be compatible with     "grep"
5420                                 GNU grep. This can also include a path.
5421 GEANY_DEFAULT_MRU_LENGTH        The length of the "Recent files" list.        10
5422 GEANY_DEFAULT_FONT_SYMBOL_LIST  The font used in sidebar to show symbols and  "Sans 9"
5423                                 open files.
5424 GEANY_DEFAULT_FONT_MSG_WINDOW   The font used in the messages window.         "Sans 9"
5425 GEANY_DEFAULT_FONT_EDITOR       The font used in the editor window.           "Monospace 10"
5426 GEANY_TOGGLE_MARK               A string which is used to mark a toggled      "~ "
5427                                 comment.
5428 GEANY_MAX_AUTOCOMPLETE_WORDS    How many autocompletion suggestions should    30
5429                                 Geany provide.
5430 GEANY_DEFAULT_FILETYPE_REGEX    The default regex to extract filetypes from   See below.
5431                                 files.
5432 ==============================  ============================================  ==================
5434 The GEANY_DEFAULT_FILETYPE_REGEX default value is  -\\*-\\s*([^\\s]+)\\s*-\\*- which finds Emacs filetypes.
5436 The GEANY_DEFAULT_TOOLS_TERMINAL default value on Windows is::
5438     cmd.exe /Q /C %c
5440 and on any non-Windows system is::
5442     xterm -e "/bin/sh %c"
5445 build.c
5446 -------
5448 ==============================  ============================================  ==================
5449 Option                          Description                                   Default
5450 ==============================  ============================================  ==================
5451 GEANY_BUILD_ERR_HIGHLIGHT_MAX   Amount of build error indicators to           50
5452                                 be shown in the editor window.
5453                                 This affects the special coloring
5454                                 when Geany detects a compiler output line as
5455                                 an error message and then highlights the
5456                                 corresponding line in the source code.
5457                                 Usually only the first few messages are
5458                                 interesting because following errors are
5459                                 just after-effects.
5460                                 All errors in the Compiler window are parsed
5461                                 and unaffected by this value.
5462 PRINTBUILDCMDS                  Every time a build menu item priority         FALSE
5463                                 calculation is run, print the state of the
5464                                 menu item table in the form of the table
5465                                 in `Build Menu Configuration`_.  May be
5466                                 useful to debug configuration file
5467                                 overloading.  Warning produces a lot of
5468                                 output.  Can also be enabled/disabled by the
5469                                 debugger by setting printbuildcmds to 1/0
5470                                 overriding the compile setting.
5471 ==============================  ============================================  ==================
5475 GNU General Public License
5476 ==========================
5480                 GNU GENERAL PUBLIC LICENSE
5481                    Version 2, June 1991
5483      Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5484         51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
5485      Everyone is permitted to copy and distribute verbatim copies
5486      of this license document, but changing it is not allowed.
5488                     Preamble
5490       The licenses for most software are designed to take away your
5491     freedom to share and change it.  By contrast, the GNU General Public
5492     License is intended to guarantee your freedom to share and change free
5493     software--to make sure the software is free for all its users.  This
5494     General Public License applies to most of the Free Software
5495     Foundation's software and to any other program whose authors commit to
5496     using it.  (Some other Free Software Foundation software is covered by
5497     the GNU Library General Public License instead.)  You can apply it to
5498     your programs, too.
5500       When we speak of free software, we are referring to freedom, not
5501     price.  Our General Public Licenses are designed to make sure that you
5502     have the freedom to distribute copies of free software (and charge for
5503     this service if you wish), that you receive source code or can get it
5504     if you want it, that you can change the software or use pieces of it
5505     in new free programs; and that you know you can do these things.
5507       To protect your rights, we need to make restrictions that forbid
5508     anyone to deny you these rights or to ask you to surrender the rights.
5509     These restrictions translate to certain responsibilities for you if you
5510     distribute copies of the software, or if you modify it.
5512       For example, if you distribute copies of such a program, whether
5513     gratis or for a fee, you must give the recipients all the rights that
5514     you have.  You must make sure that they, too, receive or can get the
5515     source code.  And you must show them these terms so they know their
5516     rights.
5518       We protect your rights with two steps: (1) copyright the software, and
5519     (2) offer you this license which gives you legal permission to copy,
5520     distribute and/or modify the software.
5522       Also, for each author's protection and ours, we want to make certain
5523     that everyone understands that there is no warranty for this free
5524     software.  If the software is modified by someone else and passed on, we
5525     want its recipients to know that what they have is not the original, so
5526     that any problems introduced by others will not reflect on the original
5527     authors' reputations.
5529       Finally, any free program is threatened constantly by software
5530     patents.  We wish to avoid the danger that redistributors of a free
5531     program will individually obtain patent licenses, in effect making the
5532     program proprietary.  To prevent this, we have made it clear that any
5533     patent must be licensed for everyone's free use or not licensed at all.
5535       The precise terms and conditions for copying, distribution and
5536     modification follow.
5538                 GNU GENERAL PUBLIC LICENSE
5539        TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
5541       0. This License applies to any program or other work which contains
5542     a notice placed by the copyright holder saying it may be distributed
5543     under the terms of this General Public License.  The "Program", below,
5544     refers to any such program or work, and a "work based on the Program"
5545     means either the Program or any derivative work under copyright law:
5546     that is to say, a work containing the Program or a portion of it,
5547     either verbatim or with modifications and/or translated into another
5548     language.  (Hereinafter, translation is included without limitation in
5549     the term "modification".)  Each licensee is addressed as "you".
5551     Activities other than copying, distribution and modification are not
5552     covered by this License; they are outside its scope.  The act of
5553     running the Program is not restricted, and the output from the Program
5554     is covered only if its contents constitute a work based on the
5555     Program (independent of having been made by running the Program).
5556     Whether that is true depends on what the Program does.
5558       1. You may copy and distribute verbatim copies of the Program's
5559     source code as you receive it, in any medium, provided that you
5560     conspicuously and appropriately publish on each copy an appropriate
5561     copyright notice and disclaimer of warranty; keep intact all the
5562     notices that refer to this License and to the absence of any warranty;
5563     and give any other recipients of the Program a copy of this License
5564     along with the Program.
5566     You may charge a fee for the physical act of transferring a copy, and
5567     you may at your option offer warranty protection in exchange for a fee.
5569       2. You may modify your copy or copies of the Program or any portion
5570     of it, thus forming a work based on the Program, and copy and
5571     distribute such modifications or work under the terms of Section 1
5572     above, provided that you also meet all of these conditions:
5574         a) You must cause the modified files to carry prominent notices
5575         stating that you changed the files and the date of any change.
5577         b) You must cause any work that you distribute or publish, that in
5578         whole or in part contains or is derived from the Program or any
5579         part thereof, to be licensed as a whole at no charge to all third
5580         parties under the terms of this License.
5582         c) If the modified program normally reads commands interactively
5583         when run, you must cause it, when started running for such
5584         interactive use in the most ordinary way, to print or display an
5585         announcement including an appropriate copyright notice and a
5586         notice that there is no warranty (or else, saying that you provide
5587         a warranty) and that users may redistribute the program under
5588         these conditions, and telling the user how to view a copy of this
5589         License.  (Exception: if the Program itself is interactive but
5590         does not normally print such an announcement, your work based on
5591         the Program is not required to print an announcement.)
5593     These requirements apply to the modified work as a whole.  If
5594     identifiable sections of that work are not derived from the Program,
5595     and can be reasonably considered independent and separate works in
5596     themselves, then this License, and its terms, do not apply to those
5597     sections when you distribute them as separate works.  But when you
5598     distribute the same sections as part of a whole which is a work based
5599     on the Program, the distribution of the whole must be on the terms of
5600     this License, whose permissions for other licensees extend to the
5601     entire whole, and thus to each and every part regardless of who wrote it.
5603     Thus, it is not the intent of this section to claim rights or contest
5604     your rights to work written entirely by you; rather, the intent is to
5605     exercise the right to control the distribution of derivative or
5606     collective works based on the Program.
5608     In addition, mere aggregation of another work not based on the Program
5609     with the Program (or with a work based on the Program) on a volume of
5610     a storage or distribution medium does not bring the other work under
5611     the scope of this License.
5613       3. You may copy and distribute the Program (or a work based on it,
5614     under Section 2) in object code or executable form under the terms of
5615     Sections 1 and 2 above provided that you also do one of the following:
5617         a) Accompany it with the complete corresponding machine-readable
5618         source code, which must be distributed under the terms of Sections
5619         1 and 2 above on a medium customarily used for software interchange; or,
5621         b) Accompany it with a written offer, valid for at least three
5622         years, to give any third party, for a charge no more than your
5623         cost of physically performing source distribution, a complete
5624         machine-readable copy of the corresponding source code, to be
5625         distributed under the terms of Sections 1 and 2 above on a medium
5626         customarily used for software interchange; or,
5628         c) Accompany it with the information you received as to the offer
5629         to distribute corresponding source code.  (This alternative is
5630         allowed only for noncommercial distribution and only if you
5631         received the program in object code or executable form with such
5632         an offer, in accord with Subsection b above.)
5634     The source code for a work means the preferred form of the work for
5635     making modifications to it.  For an executable work, complete source
5636     code means all the source code for all modules it contains, plus any
5637     associated interface definition files, plus the scripts used to
5638     control compilation and installation of the executable.  However, as a
5639     special exception, the source code distributed need not include
5640     anything that is normally distributed (in either source or binary
5641     form) with the major components (compiler, kernel, and so on) of the
5642     operating system on which the executable runs, unless that component
5643     itself accompanies the executable.
5645     If distribution of executable or object code is made by offering
5646     access to copy from a designated place, then offering equivalent
5647     access to copy the source code from the same place counts as
5648     distribution of the source code, even though third parties are not
5649     compelled to copy the source along with the object code.
5651       4. You may not copy, modify, sublicense, or distribute the Program
5652     except as expressly provided under this License.  Any attempt
5653     otherwise to copy, modify, sublicense or distribute the Program is
5654     void, and will automatically terminate your rights under this License.
5655     However, parties who have received copies, or rights, from you under
5656     this License will not have their licenses terminated so long as such
5657     parties remain in full compliance.
5659       5. You are not required to accept this License, since you have not
5660     signed it.  However, nothing else grants you permission to modify or
5661     distribute the Program or its derivative works.  These actions are
5662     prohibited by law if you do not accept this License.  Therefore, by
5663     modifying or distributing the Program (or any work based on the
5664     Program), you indicate your acceptance of this License to do so, and
5665     all its terms and conditions for copying, distributing or modifying
5666     the Program or works based on it.
5668       6. Each time you redistribute the Program (or any work based on the
5669     Program), the recipient automatically receives a license from the
5670     original licensor to copy, distribute or modify the Program subject to
5671     these terms and conditions.  You may not impose any further
5672     restrictions on the recipients' exercise of the rights granted herein.
5673     You are not responsible for enforcing compliance by third parties to
5674     this License.
5676       7. If, as a consequence of a court judgment or allegation of patent
5677     infringement or for any other reason (not limited to patent issues),
5678     conditions are imposed on you (whether by court order, agreement or
5679     otherwise) that contradict the conditions of this License, they do not
5680     excuse you from the conditions of this License.  If you cannot
5681     distribute so as to satisfy simultaneously your obligations under this
5682     License and any other pertinent obligations, then as a consequence you
5683     may not distribute the Program at all.  For example, if a patent
5684     license would not permit royalty-free redistribution of the Program by
5685     all those who receive copies directly or indirectly through you, then
5686     the only way you could satisfy both it and this License would be to
5687     refrain entirely from distribution of the Program.
5689     If any portion of this section is held invalid or unenforceable under
5690     any particular circumstance, the balance of the section is intended to
5691     apply and the section as a whole is intended to apply in other
5692     circumstances.
5694     It is not the purpose of this section to induce you to infringe any
5695     patents or other property right claims or to contest validity of any
5696     such claims; this section has the sole purpose of protecting the
5697     integrity of the free software distribution system, which is
5698     implemented by public license practices.  Many people have made
5699     generous contributions to the wide range of software distributed
5700     through that system in reliance on consistent application of that
5701     system; it is up to the author/donor to decide if he or she is willing
5702     to distribute software through any other system and a licensee cannot
5703     impose that choice.
5705     This section is intended to make thoroughly clear what is believed to
5706     be a consequence of the rest of this License.
5708       8. If the distribution and/or use of the Program is restricted in
5709     certain countries either by patents or by copyrighted interfaces, the
5710     original copyright holder who places the Program under this License
5711     may add an explicit geographical distribution limitation excluding
5712     those countries, so that distribution is permitted only in or among
5713     countries not thus excluded.  In such case, this License incorporates
5714     the limitation as if written in the body of this License.
5716       9. The Free Software Foundation may publish revised and/or new versions
5717     of the General Public License from time to time.  Such new versions will
5718     be similar in spirit to the present version, but may differ in detail to
5719     address new problems or concerns.
5721     Each version is given a distinguishing version number.  If the Program
5722     specifies a version number of this License which applies to it and "any
5723     later version", you have the option of following the terms and conditions
5724     either of that version or of any later version published by the Free
5725     Software Foundation.  If the Program does not specify a version number of
5726     this License, you may choose any version ever published by the Free Software
5727     Foundation.
5729       10. If you wish to incorporate parts of the Program into other free
5730     programs whose distribution conditions are different, write to the author
5731     to ask for permission.  For software which is copyrighted by the Free
5732     Software Foundation, write to the Free Software Foundation; we sometimes
5733     make exceptions for this.  Our decision will be guided by the two goals
5734     of preserving the free status of all derivatives of our free software and
5735     of promoting the sharing and reuse of software generally.
5737                     NO WARRANTY
5739       11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
5740     FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
5741     OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
5742     PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
5743     OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
5744     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
5745     TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
5746     PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
5747     REPAIR OR CORRECTION.
5749       12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
5750     WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
5751     REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
5752     INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
5753     OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
5754     TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
5755     YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
5756     PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
5757     POSSIBILITY OF SUCH DAMAGES.
5759                  END OF TERMS AND CONDITIONS
5761             How to Apply These Terms to Your New Programs
5763       If you develop a new program, and you want it to be of the greatest
5764     possible use to the public, the best way to achieve this is to make it
5765     free software which everyone can redistribute and change under these terms.
5767       To do so, attach the following notices to the program.  It is safest
5768     to attach them to the start of each source file to most effectively
5769     convey the exclusion of warranty; and each file should have at least
5770     the "copyright" line and a pointer to where the full notice is found.
5772         <one line to give the program's name and a brief idea of what it does.>
5773         Copyright (C) <year>  <name of author>
5775         This program is free software; you can redistribute it and/or modify
5776         it under the terms of the GNU General Public License as published by
5777         the Free Software Foundation; either version 2 of the License, or
5778         (at your option) any later version.
5780         This program is distributed in the hope that it will be useful,
5781         but WITHOUT ANY WARRANTY; without even the implied warranty of
5782         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5783         GNU General Public License for more details.
5785         You should have received a copy of the GNU General Public License along
5786         with this program; if not, write to the Free Software Foundation, Inc.,
5787         51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
5790     Also add information on how to contact you by electronic and paper mail.
5792     If the program is interactive, make it output a short notice like this
5793     when it starts in an interactive mode:
5795         Gnomovision version 69, Copyright (C) year  name of author
5796         Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
5797         This is free software, and you are welcome to redistribute it
5798         under certain conditions; type `show c' for details.
5800     The hypothetical commands `show w' and `show c' should show the appropriate
5801     parts of the General Public License.  Of course, the commands you use may
5802     be called something other than `show w' and `show c'; they could even be
5803     mouse-clicks or menu items--whatever suits your program.
5805     You should also get your employer (if you work as a programmer) or your
5806     school, if any, to sign a "copyright disclaimer" for the program, if
5807     necessary.  Here is a sample; alter the names:
5809       Yoyodyne, Inc., hereby disclaims all copyright interest in the program
5810       `Gnomovision' (which makes passes at compilers) written by James Hacker.
5812       <signature of Ty Coon>, 1 April 1989
5813       Ty Coon, President of Vice
5815     This General Public License does not permit incorporating your program into
5816     proprietary programs.  If your program is a subroutine library, you may
5817     consider it more useful to permit linking proprietary applications with the
5818     library.  If this is what you want to do, use the GNU Library General
5819     Public License instead of this License.
5824 License for Scintilla and SciTE
5825 ===============================
5827 Copyright 1998-2003 by Neil Hodgson <neilh(at)scintilla(dot)org>
5829 All Rights Reserved
5831 Permission to use, copy, modify, and distribute this software and
5832 its documentation for any purpose and without fee is hereby granted,
5833 provided that the above copyright notice appear in all copies and
5834 that both that copyright notice and this permission notice appear in
5835 supporting documentation.
5837 NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
5838 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
5839 NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
5840 CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
5841 OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
5842 OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
5843 USE OR PERFORMANCE OF THIS SOFTWARE.