Work around a `-Wformat-overflow` warning
[geany-mirror.git] / doc / geany.txt
bloba0a6ca2931462f57e8b05c0d84292ad6be3d6c81
1 .. |(version)| replace:: 1.33
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: 2017-11-19
18 :Version: |(version)|
20 Copyright © 2005-2017
22 This document is distributed under the terms of the GNU General Public
23 License as published by the Free Software Foundation; either version 2
24 of the License, or (at your option) any later version. A copy of this
25 license can be found in the file COPYING included with the source code
26 of this program, and also in the chapter `GNU General Public License`_.
29 .. contents::
33 Introduction
34 ============
37 About Geany
38 -----------
40 Geany is a small and lightweight Integrated Development Environment. It
41 was developed to provide a small and fast IDE, which has only a few
42 dependencies on other packages. Another goal was to be as independent
43 as possible from a particular Desktop Environment like KDE or GNOME -
44 Geany only requires the GTK+ runtime libraries.
46 Some basic features of Geany:
48 * Syntax highlighting
49 * Code folding
50 * Autocompletion of symbols/words
51 * Construct completion/snippets
52 * Auto-closing of XML and HTML tags
53 * Calltips
54 * Many supported filetypes including C, Java, PHP, HTML, Python, Perl,
55   Pascal, and others
56 * Symbol lists
57 * Code navigation
58 * Build system to compile and execute your code
59 * Simple project management
60 * Plugin interface
64 Where to get it
65 ---------------
67 You can obtain Geany from 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.24) libraries and their dependencies
107 (Pango, GLib and ATK). Your distro should provide packages for these,
108 usually installed by default. For Windows, you can download an installer
109 from the website which bundles these libraries.
112 Binary packages
113 ---------------
115 There are many binary packages available. For an up-to-date but maybe
116 incomplete list see 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.24) libraries and header files.
124 You also need the Pango, GLib and ATK libraries and header files.
125 All these files are available at http://www.gtk.org, but very often
126 your distro will provide development packages to save the trouble of
127 building these yourself.
129 Furthermore you need, of course, a C and C++ compiler. The GNU versions
130 of these tools are recommended.
132 Autotools based build system
133 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
135 To compile Geany yourself, you just need the Make tool, preferably GNU Make.
137 Then run the following commands::
139     $ ./configure
140     $ make
142 Then as root::
144     % make install
146 Or via sudo::
148     % sudo make install
150 Custom installation
151 ^^^^^^^^^^^^^^^^^^^
152 The configure script supports several common options, for a detailed
153 list, type::
155     $ ./configure --help
158 You may also want to read the INSTALL file for advanced installation
159 options.
161 * See also `Compile-time options`_.
163 Dynamic linking loader support and VTE
164 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
165 In the case that your system lacks dynamic linking loader support, you
166 probably want to pass the option ``--disable-vte`` to the ``configure``
167 script. This prevents compiling Geany with dynamic linking loader
168 support for automatically loading ``libvte.so.4`` if available.
170 Build problems
171 ^^^^^^^^^^^^^^
172 If there are any errors during compilation, check your build
173 environment and try to find the error, otherwise contact the mailing
174 list or one the authors. Sometimes you might need to ask for specific
175 help from your distribution.
178 Installation prefix
179 -------------------
180 If you want to find Geany's system files after installation you may
181 want to know the installation prefix.
183 Pass the ``--print-prefix`` option to Geany to check this - see
184 `Command line options`_. The first path is the prefix.
186 On Unix-like systems this is commonly ``/usr`` if you installed from
187 a binary package, or ``/usr/local`` if you build from source.
189 .. note::
190     Editing system files is not necessary as you should use the
191     per-user configuration files instead, which don't need root
192     permissions. See `Configuration files`_.
195 Usage
196 =====
199 Getting started
200 ---------------
202 You can start Geany in the following ways:
204 * From the Desktop Environment menu:
206   Choose in your application menu of your used Desktop Environment:
207   Development --> Geany.
209   At Windows-systems you will find Geany after installation inside
210   the application menu within its special folder.
212 * From the command line:
214   To start Geany from a command line, type the following and press
215   Return::
217       % geany
219 The Geany workspace
220 -------------------
222 The Geany window is shown in the following figure:
224 .. image:: ./images/main_window.png
226 The workspace has the following parts:
228 * The menu.
229 * An optional toolbar.
230 * An optional sidebar that can show the following tabs:
232   * Documents - A document list, and
233   * Symbols - A list of symbols in your code.
235 * The main editor window.
236 * An optional message window which can show the following tabs:
238   * Status - A list of status messages.
239   * Compiler - The output of compiling or building programs.
240   * Messages - Results of 'Find Usage', 'Find in Files' and other actions
241   * Scribble - A text scratchpad for any use.
242   * Terminal - An optional terminal window.
244 * A status bar
246 Most of these can be configured in the `Interface preferences`_, the
247 `View menu`_, or the popup menu for the relevant area.
249 Additional tabs may be added to the sidebar and message window by plugins.
251 The position of the tabs can be selected in the interface preferences.
253 The sizes of the sidebar and message window can be adjusted by
254 dragging the dividers.
256 Command line options
257 --------------------
259 ============  =======================  =================================================
260 Short option  Long option              Function
261 ============  =======================  =================================================
262 *none*        +number                  Set initial line number for the first opened file
263                                        (same as --line, do not put a space between the + sign
264                                        and the number). E.g. "geany +7 foo.bar" will open the
265                                        file foo.bar and place the cursor in line 7.
267 *none*        --column                 Set initial column number for the first opened file.
269 -c dir_name   --config=directory_name  Use an alternate configuration directory. The default
270                                        configuration directory is ``~/.config/geany/`` and that
271                                        is where ``geany.conf`` and other configuration files
272                                        reside.
274 *none*        --ft-names               Print a list of Geany's internal filetype names (useful
275                                        for snippets configuration).
277 -g            --generate-tags          Generate a global tags file (see
278                                        `Generating a global tags file`_).
280 -P            --no-preprocessing       Don't preprocess C/C++ files when generating tags file.
282 -i            --new-instance           Do not open files in a running instance, force opening
283                                        a new instance. Only available if Geany was compiled
284                                        with support for Sockets.
286 -l            --line                   Set initial line number for the first opened file.
288 *none*        --list-documents         Return a list of open documents in a running Geany
289                                        instance.
290                                        This can be used to read the currently opened documents in
291                                        Geany from an external script or tool. The returned list
292                                        is separated by newlines (LF) and consists of the full,
293                                        UTF-8 encoded filenames of the documents.
294                                        Only available if Geany was compiled with support for
295                                        Sockets.
297 -m            --no-msgwin              Do not show the message window. Use this option if you
298                                        do not need compiler messages or VTE support.
300 -n            --no-ctags               Do not load symbol completion and call tip data. Use this
301                                        option if you do not want to use them.
303 -p            --no-plugins             Do not load plugins or plugin support.
305 *none*        --print-prefix           Print installation prefix, the data directory, the lib
306                                        directory and the locale directory (in that order) to
307                                        stdout, one line each. This is mainly intended for plugin
308                                        authors to detect installation paths.
310 -r            --read-only              Open all files given on the command line in read-only mode.
311                                        This only applies to files opened explicitly from the command
312                                        line, so files from previous sessions or project files are
313                                        unaffected.
315 -s            --no-session             Do not load the previous session's files.
317 -t            --no-terminal            Do not load terminal support. Use this option if you do
318                                        not want to load the virtual terminal emulator widget
319                                        at startup. If you do not have ``libvte.so.4`` installed,
320                                        then terminal-support is automatically disabled. Only
321                                        available if Geany was compiled with support for VTE.
323 *none*        --socket-file            Use this socket filename for communication with a
324                                        running Geany instance. This can be used with the following
325                                        command to execute Geany on the current workspace::
327                                          geany --socket-file=/tmp/geany-sock-$(xprop -root _NET_CURRENT_DESKTOP | awk '{print $3}')
329 *none*        --vte-lib                Specify explicitly the path including filename or only
330                                        the filename to the VTE library, e.g.
331                                        ``/usr/lib/libvte.so`` or ``libvte.so``. This option is
332                                        only needed when the auto-detection does not work. Only
333                                        available if Geany was compiled with support for VTE.
335 -v            --verbose                Be verbose (print useful status messages).
337 -V            --version                Show version information and exit.
339 -?            --help                   Show help information and exit.
341 *none*        [files ...]              Open all given files at startup. This option causes
342                                        Geany to ignore loading stored files from the last
343                                        session (if enabled).
344                                        Geany also recognizes line and column information when
345                                        appended to the filename with colons, e.g.
346                                        "geany foo.bar:10:5" will open the file foo.bar and
347                                        place the cursor in line 10 at column 5.
349                                        Projects can also be opened but a project file (\*.geany)
350                                        must be the first non-option argument. All additionally
351                                        given files are ignored.
352 ============  =======================  =================================================
354 You can also pass line number and column number information, e.g.::
356     geany some_file.foo:55:4
358 Geany supports all generic GTK options, a list is available on the
359 help screen.
363 General
364 -------
367 Startup
368 ^^^^^^^
370 At startup, Geany loads all files from the last time Geany was
371 launched. You can disable this feature in the preferences dialog
372 (see `General Startup preferences`_).
374 You can start several instances of Geany, but only the first will
375 load files from the last session. In the subsequent instances, you
376 can find these files in the file menu under the "Recent files" item.
377 By default this contains the last 10 recently opened files. You can
378 change the number of recently opened files in the preferences dialog.
380 To run a second instance of Geany, do not specify any filenames on
381 the command-line, or disable opening files in a running instance
382 using the appropriate command line option.
385 Opening files from the command-line in a running instance
386 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
388 Geany detects if there is an instance of itself already running and opens files
389 from the command-line in that instance. So, Geany can
390 be used to view and edit files by opening them from other programs
391 such as a file manager.
393 You can also pass line number and column number information, e.g.::
395     geany some_file.foo:55:4
397 This would open the file ``some_file.foo`` with the cursor on line 55,
398 column 4.
400 If you do not like this for some reason, you can disable using the first
401 instance by using the appropriate command line option -- see the section
402 called `Command line options`_.
405 Virtual terminal emulator widget (VTE)
406 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
408 If you have installed ``libvte.so`` on your system, it is loaded
409 automatically by Geany, and you will have a terminal widget in the
410 notebook at the bottom.
412 If Geany cannot find any ``libvte.so`` at startup, the terminal widget
413 will not be loaded. So there is no need to install the package containing
414 this file in order to run Geany. Additionally, you can disable the use
415 of the terminal widget by command line option, for more information
416 see the section called `Command line options`_.
418 You can use this terminal (from now on called VTE) much as you would
419 a terminal program like xterm. There is basic clipboard support. You
420 can paste the contents of the clipboard by pressing the right mouse
421 button to open the popup menu, and choosing Paste. To copy text from
422 the VTE, just select the desired text and then press the right mouse
423 button and choose Copy from the popup menu. On systems running the
424 X Window System you can paste the last selected text by pressing the
425 middle mouse button in the VTE (on 2-button mice, the middle button
426 can often be simulated by pressing both mouse buttons together).
428 In the preferences dialog you can specify a shell which should be
429 started in the VTE. To make the specified shell a login shell just
430 use the appropriate command line options for the shell. These options
431 should be found in the manual page of the shell. For zsh and bash
432 you can use the argument ``--login``.
434 .. note::
435     Geany tries to load ``libvte.so``. If this fails, it tries to load
436     some other filenames. If this fails too, you should check whether you
437     installed libvte correctly. Again note, Geany will run without this
438     library.
440 It could be, that the library is called something else than
441 ``libvte.so`` (e.g. on FreeBSD 6.0 it is called ``libvte.so.8``). If so
442 please set a link to the correct file (as root)::
444     # ln -s /usr/lib/libvte.so.X /usr/lib/libvte.so
446 Obviously, you have to adjust the paths and set X to the number of your
447 ``libvte.so``.
449 You can also specify the filename of the VTE library to use on the command
450 line (see the section called `Command line options`_) or at compile time
451 by specifying the command line option ``--with-vte-module-path`` to
452 ./configure.
455 Defining own widget styles using .gtkrc-2.0
456 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
458 You can define your widget style for many of Geany's GUI parts. To
459 do this, just edit your ``.gtkrc-2.0`` (usually found in your home
460 directory on UNIX-like systems and in the etc subdirectory of your
461 Geany installation on Windows).
463 To have a defined style used by Geany you must assign it to
464 at least one of Geany's widgets. For example use the following line::
466     widget "Geany*" style "geanyStyle"
468 This would assign your style "geany_style" to all Geany
469 widgets. You can also assign styles only to specific widgets. At the
470 moment you can use the following widgets:
472 * GeanyMainWindow
473 * GeanyEditMenu
474 * GeanyToolbarMenu
475 * GeanyDialog
476 * GeanyDialogPrefs
477 * GeanyDialogProject
478 * GeanyDialogSearch
479 * GeanyMenubar
480 * GeanyToolbar
482 An example of a simple ``.gtkrc-2.0``::
484     style "geanyStyle"
485     {
486         font_name="Sans 12"
487     }
488     widget "GeanyMainWindow" style "geanyStyle"
490     style "geanyStyle"
491     {
492         font_name="Sans 10"
493     }
494     widget "GeanyPrefsDialog" style "geanyStyle"
497 Documents
498 ---------
500 Switching between documents
501 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
503 The documents list and the editor tabs are two different ways
504 to switch between documents using the mouse. When you hit the key
505 combination to move between tabs, the order is determined by the tab
506 order. It is not alphabetical as shown in the documents list
507 (regardless of whether or not editor tabs are visible).
509 See the `Notebook tab keybindings`_ section for useful
510 shortcuts including for Most-Recently-Used document switching.
512 Cloning documents
513 ^^^^^^^^^^^^^^^^^
514 The `Document->Clone` menu item copies the current document's text,
515 cursor position and properties into a new untitled document. If
516 there is a selection, only the selected text is copied. This can be
517 useful when making temporary copies of text or for creating
518 documents with similar or identical contents.
521 Character sets and Unicode Byte-Order-Mark (BOM)
522 ------------------------------------------------
525 Using character sets
526 ^^^^^^^^^^^^^^^^^^^^
528 Geany provides support for detecting and converting character sets. So
529 you can open and save files in different character sets, and even
530 convert a file from one character set to another. To do this,
531 Geany uses the character conversion capabilities of the GLib library.
533 Only text files are supported, i.e. opening files which contain
534 NULL-bytes may fail. Geany will try to open the file anyway but it is
535 likely that the file will be truncated because it can only be read up
536 to the first occurrence of a NULL-byte. All characters after this
537 position are lost and are not written when you save the file.
539 Geany tries to detect the encoding of a file while opening it, but
540 auto-detecting the encoding of a file is not easy and sometimes an
541 encoding might not be detected correctly. In this case you have to
542 set the encoding of the file manually in order to display it
543 correctly. You can this in the file open dialog by selecting an
544 encoding in the drop down box or by reloading the file with the
545 file menu item "Reload as". The auto-detection works well for most
546 encodings but there are also some encodings where it is known that
547 auto-detection has problems.
549 There are different ways to set different encodings in Geany:
551 * Using the file open dialog
553   This opens the file with the encoding specified in the encoding drop
554   down box. If the encoding is set to "Detect from file" auto-detection
555   will be used. If the encoding is set to "Without encoding (None)" the
556   file will be opened without any character conversion and Geany will
557   not try to auto-detect the encoding (see below for more information).
559 * Using the "Reload as" menu item
561   This item reloads the current file with the specified encoding. It can
562   help if you opened a file and found out that the wrong encoding was used.
564 * Using the "Set encoding" menu item
566   Contrary to the above two options, this will not change or reload
567   the current file unless you save it. It is useful when you want to
568   change the encoding of the file.
570 * Specifying the encoding in the file itself
572   As mentioned above, auto-detecting the encoding of a file may fail on
573   some encodings. If you know that Geany doesn't open a certain file,
574   you can add the specification line, described in the next section,
575   to the beginning of the file to force Geany to use a specific
576   encoding when opening the file.
579 In-file encoding specification
580 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
582 Geany detects meta tags of HTML files which contain charset information
583 like::
585     <meta http-equiv="content-type" content="text/html; charset=ISO-8859-15" />
587 and the specified charset is used when opening the file. This is useful if the
588 encoding of the file cannot be detected properly.
589 For non-HTML files you can also define a line like::
591     /* geany_encoding=ISO-8859-15 */
593 or::
595     # geany_encoding=ISO-8859-15 #
597 to force an encoding to be used. The #, /\* and \*/ are examples
598 of filetype-specific comment characters. It doesn't matter which
599 characters are around the string " geany_encoding=ISO-8859-15 " as long
600 as there is at least one whitespace character before and after this
601 string. Whitespace characters are in this case a space or tab character.
602 An example to use this could be you have a file with ISO-8859-15
603 encoding but Geany constantly detects the file encoding as ISO-8859-1.
604 Then you simply add such a line to the file and Geany will open it
605 correctly the next time.
607 Since Geany 0.15 you can also use lines which match the
608 regular expression used to find the encoding string:
609 ``coding[\t ]*[:=][\t ]*([a-z0-9-]+)[\t ]*``
611 .. note::
612     These specifications must be in the first 512 bytes of the file.
613     Anything after the first 512 bytes will not be recognized.
615 Some examples are::
617     # encoding = ISO-8859-15
619 or::
621     # coding: ISO-8859-15
623 Special encoding "None"
624 ^^^^^^^^^^^^^^^^^^^^^^^
626 There is a special encoding "None" which uses no
627 encoding. It is useful when you know that Geany cannot auto-detect
628 the encoding of a file and it is not displayed correctly. Especially
629 when the file contains NULL-bytes this can be useful to skip auto
630 detection and open the file properly at least until the occurrence
631 of the first NULL-byte. Using this encoding opens the file as it is
632 without any character conversion.
635 Unicode Byte-Order-Mark (BOM)
636 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
638 Furthermore, Geany detects a Unicode Byte Order Mark (see
639 http://en.wikipedia.org/wiki/Byte_Order_Mark for details). Of course,
640 this feature is only available if the opened file is in a Unicode
641 encoding. The Byte Order Mark helps to detect the encoding of a file,
642 e.g. whether it is UTF-16LE or UTF-16BE and so on. On Unix-like systems
643 using a Byte Order Mark could cause some problems for programs not
644 expecting it, e.g. the compiler gcc stops
645 with stray errors, PHP does not parse a script containing a BOM and
646 script files starting with a she-bang maybe cannot be started. In the
647 status bar you can easily see whether the file starts with a BOM or
648 not.
650 If you want to set a BOM for a file or if you want to remove it
651 from a file, just use the document menu and toggle the checkbox.
653 .. note::
654     If you are unsure what a BOM is or if you do not understand where
655     to use it, then it is probably not important for you and you can
656     safely ignore it.
660 Editing
661 -------
664 Folding
665 ^^^^^^^
667 Geany provides basic code folding support. Folding means the ability to
668 show and hide parts of the text in the current file. You can hide
669 unimportant code sections and concentrate on the parts you are working on
670 and later you can show hidden sections again. In the editor window there is
671 a small grey margin on the left side with [+] and [-] symbols which
672 show hidden parts and hide parts of the file respectively. By
673 clicking on these icons you can simply show and hide sections which are
674 marked by vertical lines within this margin. For many filetypes nested
675 folding is supported, so there may be several fold points within other
676 fold points.
678 .. note::
679     You can customize the folding icon and line styles - see the
680     filetypes.common `Folding Settings`_.
682 If you don't like it or don't need it at all, you can simply disable
683 folding support completely in the preferences dialog.
685 The folding behaviour can be changed with the "Fold/Unfold all children of
686 a fold point" option in the preference dialog. If activated, Geany will
687 unfold all nested fold points below the current one if they are already
688 folded (when clicking on a [+] symbol).
689 When clicking on a [-] symbol, Geany will fold all nested fold points
690 below the current one if they are unfolded.
692 This option can be inverted by pressing the Shift
693 key while clicking on a fold symbol. That means, if the "Fold/Unfold all
694 children of a fold point" option is enabled, pressing Shift will disable
695 it for this click and vice versa.
698 Column mode editing (rectangular selections)
699 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
701 There is basic support for column mode editing. To use it, create a
702 rectangular selection by holding down the Control and Shift keys
703 (or Alt and Shift on Windows) while selecting some text.
704 Once a rectangular selection exists you can start editing the text within
705 this selection and the modifications will be done for every line in the
706 selection.
708 It is also possible to create a zero-column selection - this is
709 useful to insert text on multiple lines.
711 Drag and drop of text
712 ^^^^^^^^^^^^^^^^^^^^^
714 If you drag selected text in the editor widget of Geany the text is
715 moved to the position where the mouse pointer is when releasing the
716 mouse button. Holding Control when releasing the mouse button will
717 copy the text instead. This behaviour was changed in Geany 0.11 -
718 before the selected text was copied to the new position.
721 Indentation
722 ^^^^^^^^^^^
724 Geany allows each document to indent either with a tab character,
725 multiple spaces or a combination of both.
727 The *Tabs* setting indents with one tab character per indent level, and
728 displays tabs as the indent width.
730 The *Spaces* setting indents with the number of spaces set in the indent
731 width for each level.
733 The *Tabs and Spaces* setting indents with spaces as above, then converts
734 as many spaces as it can to tab characters at the rate of one tab for
735 each multiple of the `Various preference` setting
736 *indent_hard_tab_width* (default 8) and displays tabs as the
737 *indent_hard_tab_width* value.
739 The default indent settings are set in `Editor Indentation
740 preferences`_ (see the link for more information).
742 The default settings can be overridden per-document using the
743 Document menu. They can also be overridden by projects - see
744 `Project management`_.
746 The indent mode for the current document is shown on the status bar
747 as follows:
750     Indent with Tab characters.
752     Indent with spaces.
754     Indent with tabs and spaces, depending on how much indentation is
755     on a line.
757 Applying new indentation settings
758 `````````````````````````````````
759 After changing the default settings you may wish to apply the new
760 settings to every document in the current session. To do this use the
761 *Project->Apply Default Indentation* menu item.
763 Detecting indent type
764 `````````````````````
765 The *Detect from file* indentation preference can be used to
766 scan each file as it's opened and set the indent type based on
767 how many lines start with a tab vs. 2 or more spaces.
770 Auto-indentation
771 ^^^^^^^^^^^^^^^^
773 When enabled, auto-indentation happens when pressing *Enter* in the
774 Editor. It adds a certain amount of indentation to the new line so the
775 user doesn't always have to indent each line manually.
777 Geany has four types of auto-indentation:
779 None
780     Disables auto-indentation completely.
781 Basic
782     Adds the same amount of whitespace on a new line as on the previous line.
783     For the *Tabs* and the *Spaces* indent types the indentation will use the
784     same combination of characters as the previous line.  The
785     *Tabs and Spaces* indentation type converts as explained above.
786 Current chars
787     Does the same as *Basic* but also indents a new line after an opening
788     brace '{', and de-indents when typing a closing brace '}'. For Python,
789     a new line will be indented after typing ':' at the end of the
790     previous line.
791 Match braces
792     Similar to *Current chars* but the closing brace will be aligned to
793     match the indentation of the line with the opening brace.  This
794     requires the filetype to be one where Geany knows that the Scintilla
795     lexer understands matching braces (C, C++, D, HTML, Pascal, Bash,
796     Perl, TCL).
798 There is also XML-tag auto-indentation. This is enabled when the
799 mode is more than just Basic, and is also controlled by a filetype
800 setting - see `xml_indent_tags`_.
803 Bookmarks
804 ^^^^^^^^^
806 Geany provides a handy bookmarking feature that lets you mark one
807 or more lines in a document, and return the cursor to them using a
808 key combination.
810 To place a mark on a line, either left-mouse-click in the left margin
811 of the editor window, or else use Ctrl-m. This will
812 produce a small green plus symbol in the margin. You can have as many
813 marks in a document as you like. Click again (or use Ctrl-m again)
814 to remove the bookmark. To remove all the marks in a given document,
815 use "Remove Markers" in the Document menu.
817 To navigate down your document, jumping from one mark to the next,
818 use Ctrl-. (control period). To go in the opposite direction on
819 the page, use Ctrl-, (control comma). Using the bookmarking feature
820 together with the commands to switch from one editor tab to another
821 (Ctrl-PgUp/PgDn and Ctrl-Tab) provides a particularly fast way to
822 navigate around multiple files.
825 Code navigation history
826 ^^^^^^^^^^^^^^^^^^^^^^^
828 To ease navigation in source files and especially between
829 different files, Geany lets you jump between different navigation
830 points. Currently, this works for the following:
832 * `Go to symbol declaration`_
833 * `Go to symbol definition`_
834 * Symbol list items
835 * Build errors
836 * Message items
838 When using one of these actions, Geany remembers your current position
839 and jumps to the new one. If you decide to go back to your previous
840 position in the file, just use "Navigate back a location". To
841 get back to the new position again, just use "Navigate forward a
842 location". This makes it easier to navigate in e.g.  foreign code
843 and between different files.
846 Sending text through custom commands
847 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
849 You can define several custom commands in Geany and send the current
850 selection to one of these commands using the *Edit->Format->Send
851 Selection to* menu or keybindings. The output of the command will be
852 used to replace the current selection. This makes it possible to use
853 text formatting tools with Geany in a general way.
855 The selected text will be sent to the standard input of the executed
856 command, so the command should be able to read from it and it should
857 print all results to its standard output which will be read by
858 Geany. To help finding errors in executing the command, the output
859 of the program's standard error will be printed on Geany's standard
860 output.
862 If there is no selection, the whole current line is used instead.
864 To add a custom command, use the *Send Selection to->Set Custom
865 Commands* menu item. Click on *Add* to get a new item and type the
866 command. You can also specify some command line options. Empty
867 commands are not saved.
869 Normal shell quoting is supported, so you can do things like:
871 * ``sed 's/\./(dot)/g'``
873 The above example would normally be done with the `Replace all`_
874 function, but it can be handy to have common commands already set up.
876 Note that the command is not run in a shell, so if you want to use
877 shell features like pipes and command chains, you need to explicitly
878 launch the shell and pass it your command:
880 * ``sh -c 'sort | uniq'``
883 Context actions
884 ^^^^^^^^^^^^^^^
886 You can execute the context action command on the current word at the
887 cursor position or the available selection.  This word or selection
888 can be used as an argument to the command.
889 The context action is invoked by a menu entry in the popup menu of the
890 editor and also a keyboard shortcut (see the section called
891 `Keybindings`_).
893 The command can be specified in the preferences dialog and also for
894 each filetype (see "context_action_cmd" in the section called
895 `Filetype configuration`_). When the context action is invoked, the filetype
896 specific command is used if available, otherwise the command
897 specified in the preferences dialog is executed.
899 The current word or selection can be referred with the wildcard "%s"
900 in the command, it will be replaced by the current word or
901 selection before the command is executed.
903 For example a context action can be used to open API documentation
904 in a browser window, the command to open the PHP API documentation
905 would be::
907     firefox "http://www.php.net/%s"
909 when executing the command, the %s is substituted by the word near
910 the cursor position or by the current selection. If the cursor is at
911 the word "echo", a browser window will open(assumed your browser is
912 called firefox) and it will open the address: http://www.php.net/echo.
915 Autocompletion
916 ^^^^^^^^^^^^^^
918 Geany can offer a list of possible completions for symbols defined in the
919 tags files and for all words in open documents.
921 The autocompletion list for symbols is presented when the first few
922 characters of the symbol are typed (configurable, see `Editor Completions
923 preferences`_, default 4) or when the *Complete word*
924 keybinding is pressed (configurable, see `Editor keybindings`_,
925 default Ctrl-Space).
927 When the defined keybinding is typed and the *Autocomplete all words in
928 document* preference (in `Editor Completions preferences`_)
929 is selected then the autocompletion list will show all matching words
930 in the document, if there are no matching symbols.
932 If you don't want to use autocompletion it can be dismissed until
933 the next symbol by pressing Escape. The autocompletion list is updated
934 as more characters are typed so that it only shows completions that start
935 with the characters typed so far. If no symbols begin with the sequence,
936 the autocompletion window is closed.
938 The up and down arrows will move the selected item. The highlighted
939 item on the autocompletion list can be chosen from the list by pressing
940 Enter/Return. You can also double-click to select an item. The sequence
941 will be completed to match the chosen item, and if the *Drop rest of
942 word on completion* preference is set (in `Editor Completions
943 preferences`_) then any characters after the cursor that match
944 a symbol or word are deleted.
946 Word part completion
947 ````````````````````
948 By default, pressing Tab will complete the selected item by word part;
949 useful e.g. for adding the prefix ``gtk_combo_box_entry_`` without typing it
950 manually:
952 * gtk_com<TAB>
953 * gtk_combo_<TAB>
954 * gtk_combo_box_<e><TAB>
955 * gtk_combo_box_entry_<s><ENTER>
956 * gtk_combo_box_entry_set_text_column
958 The key combination can be changed from Tab - See `Editor keybindings`_.
959 If you clear/change the key combination for word part completion, Tab
960 will complete the whole word instead, like Enter.
962 Scope autocompletion
963 ````````````````````
964 E.g.::
966     struct
967     {
968         int i;
969         char c;
970     } foo;
972 When you type ``foo.`` it will show an autocompletion list with 'i' and
973 'c' symbols.
975 It only works for languages that set parent scope names for e.g. struct
976 members. Currently this means C-like languages. The C parser only
977 parses global scopes, so this won't work for structs or objects declared
978 in local scope.
981 User-definable snippets
982 ^^^^^^^^^^^^^^^^^^^^^^^
984 Snippets are small strings or code constructs which can be replaced or
985 completed to a more complex string. So you can save a lot of time when
986 typing common strings and letting Geany do the work for you.
987 To know what to complete or replace Geany reads a configuration file
988 called ``snippets.conf`` at startup.
990 Maybe you need to often type your name, so define a snippet like this::
992     [Default]
993     myname=Enrico Tröger
995 Every time you write ``myname`` <TAB> in Geany, it will replace "myname"
996 with "Enrico Tröger". The key to start autocompletion can be changed
997 in the preferences dialog, by default it is TAB. The corresponding keybinding
998 is called `Complete snippet`.
1000 **Paths**
1002 You can override the default snippets using the user
1003 ``snippets.conf`` file. Use the *Tools->Configuration
1004 Files->snippets.conf* menu item. See also `Configuration file paths`_.
1006 This adds the default settings to the user file if the file doesn't
1007 exist. Alternatively the file can be created manually, adding only
1008 the settings you want to change. All missing settings will be read
1009 from the system snippets file.
1011 **Snippet groups**
1013 The file ``snippets.conf`` contains sections defining snippets that
1014 are available for particular filetypes and in general.
1016 The two sections "Default" and "Special" apply to all filetypes.
1017 "Default" contains all snippets which are available for every
1018 filetype and "Special" contains snippets which can only be used in
1019 other snippets. So you can define often used parts of snippets and
1020 just use the special snippet as a placeholder (see the
1021 ``snippets.conf`` for details).
1023 You can define sections with the name of a filetype eg "C++".  The
1024 snippets in that section are only available for use in files with that
1025 filetype.  Snippets in filetype sections will hide snippets with the
1026 same name in the "Default" section when used in a file of that
1027 filetype.
1029 **Substitution sequences for snippets**
1031 To define snippets you can use several special character sequences which
1032 will be replaced when using the snippet:
1034 ================  =========================================================
1035 \\n or %newline%  Insert a new line (it will be replaced by the used EOL
1036                   char(s): LF, CR/LF, or CR).
1038 \\t or %ws%       Insert an indentation step, it will be replaced according
1039                   to the current document's indent mode.
1041 \\s               \\s to force whitespace at beginning or end of a value
1042                   ('key= value' won't work, use 'key=\\svalue')
1044 %cursor%          Place the cursor at this position after completion has
1045                   been done. You can define multiple %cursor% wildcards
1046                   and use the keybinding `Move cursor in snippet` to jump
1047                   to the next defined cursor position in the completed
1048                   snippet.
1050 %...%             "..." means the name of a key in the "Special" section.
1051                   If you have defined a key "brace_open" in the "Special"
1052                   section you can use %brace_open% in any other snippet.
1053 ================  =========================================================
1055 Snippet names must not contain spaces otherwise they won't
1056 work correctly. But beside that you can define almost any
1057 string as a snippet and use it later in Geany. It is not limited
1058 to existing contructs of certain programming languages(like ``if``,
1059 ``for``, ``switch``). Define whatever you need.
1061 **Template wildcards**
1063 Since Geany 0.15 you can also use most of the available templates wildcards
1064 listed in `Template wildcards`_. All wildcards which are listed as
1065 `available in snippets` can be used. For instance to improve the above example::
1067     [Default]
1068     myname=My name is {developer}
1069     mysystem=My system: {command:uname -a}
1071 this will replace ``myname`` with "My name is " and the value of the template
1072 preference ``developer``.
1074 **Word characters**
1076 You can change the way Geany recognizes the word to complete,
1077 that is how the start and end of a word is recognised when the
1078 snippet completion is requested. The section "Special" may
1079 contain a key "wordchars" which lists all characters a string may contain
1080 to be recognized as a word for completion. Leave it commented to use
1081 default characters or define it to add or remove characters to fit your
1082 needs.
1084 Snippet keybindings
1085 ```````````````````
1087 Normally you would type the snippet name and press Tab. However, you
1088 can define keybindings for snippets under the *Keybindings* group in
1089 ``snippets.conf``::
1091     [Keybindings]
1092     for=<Ctrl>7
1093     block_cursor=<Ctrl>8
1095 .. note::
1096     Snippet keybindings may be overridden by Geany's configurable
1097     keybindings.
1100 Inserting Unicode characters
1101 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1103 You can insert Unicode code points by hitting Ctrl-Shift-u, then still holding
1104 Ctrl-Shift, type some hex digits representing the code point for the character
1105 you want and hit Enter or Return (still holding Ctrl-Shift). If you release
1106 Ctrl-Shift before hitting Enter or Return (or any other character), the code
1107 insertion is completed, but the typed character is also entered.  In the case
1108 of Enter/Return, it is a newline, as you might expect.
1111 In some earlier versions of Geany, you might need to first unbind Ctrl-Shift-u
1112 in the `keybinding preferences`_, then select *Tools->Reload Configuration*
1113 or restart Geany. Note that it works slightly differently from other GTK
1114 applications, in that you'll need to continue to hold down the Ctrl and Shift
1115 keys while typing the code point hex digits (and the Enter or Return to finish the code point).
1118 Search, replace and go to
1119 -------------------------
1121 This section describes search-related commands from the Search menu
1122 and the editor window's popup menu:
1124 * Find
1125 * Find selection
1126 * Find usage
1127 * Find in files
1128 * Replace
1129 * Go to symbol definition
1130 * Go to symbol declaration
1131 * Go to line
1133 See also `Search`_ preferences.
1135 Toolbar entries
1136 ^^^^^^^^^^^^^^^
1137 There are also two toolbar entries:
1139 * Search bar
1140 * Go to line entry
1142 There are keybindings to focus each of these - see `Focus
1143 keybindings`_. Pressing Escape will then focus the editor.
1145 Search bar
1146 ``````````
1147 The quickest way to find some text is to use the search bar entry in
1148 the toolbar. This performs a case-insensitive search in the current
1149 document whilst you type. Pressing Enter will search again, and pressing
1150 Shift-Enter will search backwards.
1152 Find
1153 ^^^^
1155 The Find dialog is used for finding text in one or more open documents.
1157 .. image:: ./images/find_dialog.png
1160 Matching options
1161 ````````````````
1163 The syntax for the *Use regular expressions* option is shown in
1164 `Regular expressions`_.
1166 .. note::
1167     *Use escape sequences* is implied for regular expressions.
1169 The *Use multi-line matching* option enables multi-line regular
1170 expressions instead of single-line ones.  See `Regular expressions`_ for
1171 more details on the differences between the two modes.
1173 The *Use escape sequences* option will transform any escaped characters
1174 into their UTF-8 equivalent. For example, \\t will be transformed into
1175 a tab character. Other recognized symbols are: \\\\, \\n, \\r, \\uXXXX
1176 (Unicode characters).
1179 Find all
1180 ````````
1182 To find all matches, click on the Find All expander. This will reveal
1183 several options:
1185 * In Document
1186 * In Session
1187 * Mark
1189 Find All In Document will show a list of matching lines in the
1190 current document in the Messages tab of the Message Window. *Find All
1191 In Session* does the same for all open documents.
1193 Mark will highlight all matches in the current document with a
1194 colored box. These markers can be removed by selecting the
1195 Remove Markers command from the Document menu.
1198 Change font in search dialog text fields
1199 ````````````````````````````````````````
1201 All search related dialogs use a Monospace for the text input fields to
1202 increase the readability of input text. This is useful when you are
1203 typing input such as regular expressions with spaces, periods and commas which
1204 might it hard to read with a proportional font.
1206 If you want to change the font, you can do this easily
1207 by inserting the following style into your ``.gtkrc-2.0``
1208 (usually found in your home directory on UNIX-like systems and in the
1209 etc subdirectory of your Geany installation on Windows)::
1211     style "search_style"
1212     {
1213         font_name="Monospace 8"
1214     }
1215     widget "GeanyDialogSearch.*.GtkEntry" style:highest "search_style"
1217 Please note the addition of ":highest" in the last line which sets the priority
1218 of this style to the highest available. Otherwise, the style is ignored
1219 for the search dialogs.
1222 Find selection
1223 ^^^^^^^^^^^^^^
1224 The *Find Next/Previous Selection* commands perform a search for the
1225 current selected text. If nothing is selected, by default the current
1226 word is used instead. This can be customized by the
1227 *find_selection_type* preference - see `Various preferences`_.
1229 =====   =============================================
1230 Value   *find_selection_type* behaviour
1231 =====   =============================================
1232 0       Use the current word (default).
1233 1       Try the X selection first, then current word.
1234 2       Repeat last search.
1235 =====   =============================================
1238 Find usage
1239 ^^^^^^^^^^
1241 *Find Usage* searches all open files. It is similar to the *Find All In
1242 Session* option in the Find dialog.
1244 If there is a selection, then it is used as the search text; otherwise
1245 the current word is used. The current word is either taken from the
1246 word nearest the edit cursor, or the word underneath the popup menu
1247 click position when the popup menu is used. The search results are
1248 shown in the Messages tab of the Message Window.
1250 .. note::
1251     You can also use Find Usage for symbol list items from the popup
1252     menu.
1255 Find in files
1256 ^^^^^^^^^^^^^
1258 *Find in Files* is a more powerful version of *Find Usage* that searches
1259 all files in a certain directory using the Grep tool. The Grep tool
1260 must be correctly set in Preferences to the path of the system's Grep
1261 utility. GNU Grep is recommended (see note below).
1263 .. image:: ./images/find_in_files_dialog.png
1265 The *Search* field is initially set to the current word in the editor
1266 (depending on `Search`_ preferences).
1268 The *Files* setting allows to choose which files are included in the
1269 search, depending on the mode:
1272     Search in all files;
1273 Project
1274     Use the current project's patterns, see `Project properties`_;
1275 Custom
1276     Use custom patterns.
1278 Both project and custom patterns use a glob-style syntax, each
1279 pattern separated by a space. To search all ``.c`` and ``.h`` files,
1280 use: ``*.c *.h``.
1281 Note that an empty pattern list searches in all files rather
1282 than none.
1284 The *Directory* field is initially set to the current document's directory,
1285 unless this field has already been edited and the current document has
1286 not changed. Otherwise, the current document's directory is prepended to
1287 the drop-down history. This can be disabled - see `Search`_ preferences.
1289 The *Encoding* field can be used to define the encoding of the files
1290 to be searched. The entered search text is converted to the chosen encoding
1291 and the search results are converted back to UTF-8.
1293 The *Extra options* field is used to pass any additional arguments to
1294 the grep tool.
1296 .. note::
1297     The *Files* setting uses ``--include=`` when searching recursively,
1298     *Recurse in subfolders* uses ``-r``; both are GNU Grep options and may
1299     not work with other Grep implementations.
1302 Filtering out version control files
1303 ```````````````````````````````````
1305 When using the *Recurse in subfolders* option with a directory that's
1306 under version control, you can set the *Extra options* field to filter
1307 out version control files.
1309 If you have GNU Grep >= 2.5.2 you can use the ``--exclude-dir``
1310 argument to filter out CVS and hidden directories like ``.svn``.
1312 Example: ``--exclude-dir=.svn --exclude-dir=CVS``
1314 If you have an older Grep, you can try using the ``--exclude`` flag
1315 to filter out filenames.
1317 SVN Example: ``--exclude=*.svn-base``
1319 The --exclude argument only matches the file name part, not the path.
1322 Replace
1323 ^^^^^^^
1325 The Replace dialog is used for replacing text in one or more open
1326 documents.
1328 .. image:: ./images/replace_dialog.png
1330 The Replace dialog has the same options for matching text as the Find
1331 dialog. See the section `Matching options`_.
1333 The *Use regular expressions* option allows regular expressions to
1334 be used in the search string and back references in the replacement
1335 text -- see the entry for '\\n' in `Regular expressions`_.
1337 Replace all
1338 ```````````
1340 To replace several matches, click on the *Replace All* expander. This
1341 will reveal several options:
1343 * In Document
1344 * In Session
1345 * In Selection
1347 *Replace All In Document* will replace all matching text in the
1348 current document. *Replace All In Session* does the same for all open
1349 documents. *Replace All In Selection* will replace all matching text
1350 in the current selection of the current document.
1353 Go to symbol definition
1354 ^^^^^^^^^^^^^^^^^^^^^^^
1356 If the current word or selection is the name of a symbol definition
1357 (e.g. a function name) and the file containing the symbol definition is
1358 open, this command will switch to that file and go to the
1359 corresponding line number. The current word is either the word
1360 nearest the edit cursor, or the word underneath the popup menu click
1361 position when the popup menu is used.
1363 If there are more symbols with the same name to which the goto can be performed,
1364 a pop up is shown with a list of all the occurrences. After selecting a symbol
1365 from the list Geany jumps to the corresponding symbol location. Geany tries to
1366 suggest the nearest symbol (symbol from the current file, other open documents
1367 or current directory) as the best candidate for the goto and places this symbol
1368 at the beginning of the list typed in boldface.
1370 .. note::
1371     If the corresponding symbol is on the current line, Geany will first
1372     look for a symbol declaration instead, as this is more useful.
1373     Likewise *Go to symbol declaration* will search for a symbol definition
1374     first in this case also.
1377 Go to symbol declaration
1378 ^^^^^^^^^^^^^^^^^^^^^^^^
1380 Like *Go to symbol definition*, but for a forward declaration such as a
1381 C function prototype or ``extern`` declaration instead of a function
1382 body.
1385 Go to line
1386 ^^^^^^^^^^
1388 Go to a particular line number in the current file.
1391 Regular expressions
1392 ^^^^^^^^^^^^^^^^^^^
1394 You can use regular expressions in the Find and Replace dialogs
1395 by selecting the *Use regular expressions* check box (see `Matching
1396 options`_). The syntax is Perl compatible. Basic syntax is described
1397 in the table below. For full details, see
1398 http://www.geany.org/manual/gtk/glib/glib-regex-syntax.html.
1400 By default regular expressions are matched on a line-by-line basis.
1401 If you are interested in multi-line regular expressions, matched against
1402 the whole buffer at once, see the section `Multi-line regular expressions`_
1403 below.
1405 .. note::
1406     1. The *Use escape sequences* dialog option always applies for regular
1407        expressions.
1408     2. Searching backwards with regular expressions is not supported.
1409     3. The *Use multi-line matching* dialog option to select single or
1410        multi-line matching.
1412 **In a regular expression, the following characters are interpreted:**
1414 ======= ============================================================
1415 .       Matches any character.
1417 (       This marks the start of a region for tagging a match.
1419 )       This marks the end of a tagged region.
1421 \\n     Where n is 1 through 9 refers to the first through ninth tagged
1422         region when searching or replacing.
1424         Searching for (Wiki)\\1 matches WikiWiki.
1426         If the search string was Fred([1-9])XXX and the
1427         replace string was Sam\\1YYY, when applied to Fred2XXX this
1428         would generate Sam2YYY.
1430 \\0     When replacing, the whole matching text.
1432 \\b     This matches a word boundary.
1434 \\c     A backslash followed by d, D, s, S, w or W, becomes a
1435         character class (both inside and outside sets []).
1437         * d: decimal digits
1438         * D: any char except decimal digits
1439         * s: whitespace (space, \\t \\n \\r \\f \\v)
1440         * S: any char except whitespace (see above)
1441         * w: alphanumeric & underscore
1442         * W: any char except alphanumeric & underscore
1444 \\x     This allows you to use a character x that would otherwise have
1445         a special meaning. For example, \\[ would be interpreted as [
1446         and not as the start of a character set. Use \\\\ for a literal
1447         backslash.
1449 [...]   Matches one of the characters in the set. If the first
1450         character in the set is ^, it matches the characters NOT in
1451         the set, i.e. complements the set. A shorthand S-E (start
1452         dash end) is used to specify a set of characters S up to E,
1453         inclusive.
1455         The special characters ] and - have no special
1456         meaning if they appear first in the set. - can also be last
1457         in the set. To include both, put ] first: []A-Z-].
1459         Examples::
1461         []|-]    matches these 3 chars
1462         []-|]    matches from ] to | chars
1463         [a-z]    any lowercase alpha
1464         [^]-]    any char except - and ]
1465         [^A-Z]   any char except uppercase alpha
1466         [a-zA-Z] any alpha
1468 ^       This matches the start of a line (unless used inside a set, see
1469         above).
1471 $       This matches the end of a line.
1473 \*      This matches 0 or more times. For example, Sa*m matches Sm, Sam,
1474         Saam, Saaam and so on.
1476 \+      This matches 1 or more times. For example, Sa+m matches Sam,
1477         Saam, Saaam and so on.
1479 \?      This matches 0 or 1 time(s). For example, Joh?n matches John, Jon.
1480 ======= ============================================================
1482 .. note::
1483     This table is adapted from Scintilla and SciTE documentation,
1484     distributed under the `License for Scintilla and SciTE`_.
1487 Multi-line regular expressions
1488 ``````````````````````````````
1490 .. note::
1491     The *Use multi-line matching* dialog option enables multi-line
1492     regular expressions.
1494 Multi-line regular expressions work just like single-line ones but a
1495 match can span several lines.
1497 While the syntax is the same, a few practical differences applies:
1499 ======= ============================================================
1500 .       Matches any character but newlines.  This behavior can be changed
1501         to also match newlines using the (?s) option, see
1502         http://www.geany.org/manual/gtk/glib/glib-regex-syntax.html#idp5671632
1504 [^...]  A negative range (see above) *will* match newlines if they are
1505         not explicitly listed in that negative range.  For example, range
1506         [^a-z] will match newlines, while range [^a-z\\r\\n] won't.
1507         While this is the expected behavior, it can lead to tricky
1508         problems if one doesn't think about it when writing an expression.
1509 ======= ============================================================
1512 View menu
1513 ---------
1514 The View menu allows various elements of the main window to be shown
1515 or hidden, and also provides various display-related editor options.
1517 Color schemes dialog
1518 ^^^^^^^^^^^^^^^^^^^^
1519 The Color Schemes dialog is available under the *View->Change Color Scheme*
1520 menu item. It lists various color schemes for editor highlighting
1521 styles, including the default scheme first. Other items are available
1522 based on what color scheme files Geany found at startup.
1524 Color scheme files are read from the `Configuration file paths`_ under
1525 the ``colorschemes`` subdirectory. They should have the extension
1526 ``.conf``. The default color scheme
1527 is read from ``filetypes.common``.
1529 The `[named_styles] section`_  and `[named_colors] section`_ are the
1530 same as for ``filetypes.common``.
1532 The ``[theme_info]`` section can contain information about the
1533 theme. The ``name`` and ``description`` keys are read to set the
1534 menu item text and tooltip, respectively. These keys can have
1535 translations, e.g.::
1537     key=Hello
1538     key[de]=Hallo
1539     key[fr_FR]=Bonjour
1541 Symbols and tags files
1542 ----------------------
1544 Upon opening, files of supported filetypes are parsed to extract the symbol
1545 information (aka "workspace symbols"). You can also have Geany automatically
1546 load external files containing the symbol information (aka "global
1547 tags files") upon startup, or manually using *Tools --> Load Tags File*.
1549 Geany uses its own tags file format, similar to what ``ctags`` uses
1550 (but is incompatible with ctags). You use Geany to generate global
1551 tags files, as described below.
1554 Workspace symbols
1555 ^^^^^^^^^^^^^^^^^
1557 Each document is parsed for symbols whenever a file is loaded, saved or
1558 modified (see *Symbol list update frequency* preference in the `Editor
1559 Completions preferences`_). These are shown in the Symbol list in the
1560 Sidebar. These symbols are also used for autocompletion and calltips
1561 for all documents open in the current session that have the same filetype.
1563 The *Go to Symbol* commands can be used with all workspace symbols. See
1564 `Go to symbol definition`_.
1567 Global tags files
1568 ^^^^^^^^^^^^^^^^^
1570 Global tags files are used to provide symbols for autocompletion and calltips
1571 without having to open the source files containing these symbols. This is intended
1572 for library APIs, as the tags file only has to be updated when you upgrade
1573 the library.
1575 You can load a custom global tags file in two ways:
1577 * Using the *Load Tags File* command in the Tools menu.
1578 * By moving or symlinking tags files to the ``tags`` subdirectory of
1579   one of the `configuration file paths`_ before starting Geany.
1581 You can either download these files or generate your own. They have
1582 the format::
1584     name.lang_ext.tags
1586 *lang_ext* is one of the extensions set for the filetype associated
1587 with the tags parser. See the section called `Filetype extensions`_ for
1588 more information.
1591 Default global tags files
1592 `````````````````````````
1594 Some global tags files are distributed with Geany and will be loaded
1595 automatically when the corresponding filetype is first used. Currently
1596 this includes global tags files for these languages:
1598 * C
1599 * Pascal
1600 * PHP
1601 * HTML -- &symbol; completion, e.g. for ampersand, copyright, etc.
1602 * LaTeX
1603 * Python
1606 Global tags file format
1607 ```````````````````````
1609 Global tags files can have three different formats:
1611 * Tagmanager format
1612 * Pipe-separated format
1613 * CTags format
1615 The first line of global tags files should be a comment, introduced
1616 by ``#`` followed by a space and a string like ``format=pipe``,
1617 ``format=ctags`` or ``format=tagmanager`` respectively, these are
1618 case-sensitive.  This helps Geany to read the file properly. If this
1619 line is missing, Geany tries to auto-detect the used format but this
1620 might fail.
1623 The Tagmanager format is a bit more complex and is used for files
1624 created by the ``geany -g`` command. There is one symbol per line.
1625 Different symbol attributes like the return value or the argument list
1626 are separated with different characters indicating the type of the
1627 following argument.  This is the more complete and recommended tags file
1628 format.
1630 Pipe-separated format
1631 *********************
1632 The Pipe-separated format is easier to read and write.
1633 There is one symbol per line and different symbol attributes are separated
1634 by the pipe character (``|``). A line looks like::
1636     basename|string|(string path [, string suffix])|
1638 | The first field is the symbol name (usually a function name).
1639 | The second field is the type of the return value.
1640 | The third field is the argument list for this symbol.
1641 | The fourth field is the description for this symbol but
1642   currently unused and should be left empty.
1644 Except for the first field (symbol name), all other field can be left
1645 empty but the pipe separator must appear for them.
1647 You can easily write your own global tags files using this format.
1648 Just save them in your tags directory, as described earlier in the
1649 section `Global tags files`_.
1651 CTags format
1652 ************
1653 This is the format that ctags generates, and that is used by Vim.
1654 This format is compatible with the format historically used by Vi.
1656 The format is described at http://ctags.sourceforge.net/FORMAT, but
1657 for the full list of existing extensions please refer to ctags.
1658 However, note that Geany may actually only honor a subset of the
1659 existing extensions.
1661 Generating a global tags file
1662 `````````````````````````````
1664 You can generate your own global tags files by parsing a list of
1665 source files. The command is::
1667     geany -g [-P] <Tags File> <File list>
1669 * Tags File filename should be in the format described earlier --
1670   see the section called `Global tags files`_.
1671 * File list is a list of filenames, each with a full path (unless
1672   you are generating C/C++ tags files and have set the CFLAGS environment
1673   variable appropriately).
1674 * ``-P`` or ``--no-preprocessing`` disables using the C pre-processor
1675   to process ``#include`` directives for C/C++ source files. Use this
1676   option if you want to specify each source file on the command-line
1677   instead of using a 'master' header file. Also can be useful if you
1678   don't want to specify the CFLAGS environment variable.
1680 Example for the wxD library for the D programming language::
1682     geany -g wxd.d.tags /home/username/wxd/wx/*.d
1685 Generating C/C++ tags files
1686 ***************************
1687 You may need to first setup the `C ignore.tags`_ file.
1689 For C/C++ tags files gcc is required by default, so that header files
1690 can be preprocessed to include any other headers they depend upon. If
1691 you do not want this, use the ``-P`` option described above.
1693 For preprocessing, the environment variable CFLAGS should be set with
1694 appropriate ``-I/path`` include paths. The following example works with
1695 the bash shell, generating a tags file for the GnomeUI library::
1697     CFLAGS=`pkg-config --cflags libgnomeui-2.0` geany -g gnomeui.c.tags \
1698     /usr/include/libgnomeui-2.0/gnome.h
1700 You can adapt this command to use CFLAGS and header files appropriate
1701 for whichever libraries you want.
1704 Generating tags files on Windows
1705 ********************************
1706 This works basically the same as on other platforms::
1708     "c:\program files\geany\bin\geany" -g c:\mytags.php.tags c:\code\somefile.php
1711 C ignore.tags
1712 ^^^^^^^^^^^^^
1714 You can ignore certain symbols for C-based languages if they would lead
1715 to wrong parsing of the code. Use the *Tools->Configuration
1716 Files->ignore.tags* menu item to open the user ``ignore.tags`` file.
1717 See also `Configuration file paths`_.
1719 List all symbol names you want to ignore in this file, separated by spaces
1720 and/or newlines.
1722 Example::
1724     G_GNUC_NULL_TERMINATED
1725     G_GNUC_PRINTF
1726     G_GNUC_WARN_UNUSED_RESULT
1728 This will parse code like:
1730 ``gchar **utils_strv_new(const gchar *first, ...)
1731 G_GNUC_NULL_TERMINATED;``
1733 More detailed information about ignore.tags usage from the Exuberant Ctags
1734 manual page:
1736     Specifies a list of identifiers which are to be specially handled
1737     while  parsing C and C++ source files. This option is specifically
1738     provided to handle special cases arising through the use of
1739     pre-processor macros. When the identifiers listed are simple identifiers,
1740     these identifiers will be ignored during parsing of the source files.
1741     If an identifier is suffixed with a '+' character, ctags will also
1742     ignore any parenthesis-enclosed argument list which may immediately
1743     follow the identifier in the source files.
1744     If two identifiers are separated with the '=' character, the first
1745     identifiers is replaced by the second identifiers for parsing purposes.
1747 For even more detailed information please read the manual page of
1748 Exuberant Ctags.
1750 Geany extends Ctags with a '*' character suffix - this means use
1751 prefix matching, e.g. G_GNUC_* will match G_GNUC_NULL_TERMINATED, etc.
1752 Note that prefix match items should be put after other items to ensure
1753 that items like G_GNUC_PRINTF+ get parsed correctly.
1756 Preferences
1757 -----------
1759 You may adjust Geany's settings using the Edit --> Preferences
1760 dialog. Any changes you make there can be applied by hitting either
1761 the Apply or the OK button. These settings will persist between Geany
1762 sessions. Note that most settings here have descriptive popup bubble
1763 help -- just hover the mouse over the item in question to get help
1764 on it.
1766 You may also adjust some View settings (under the View menu) that
1767 persist between Geany sessions. The settings under the Document menu,
1768 however, are only for the current document and revert to defaults
1769 when restarting Geany.
1771 .. note::
1772     In the paragraphs that follow, the text describing a dialog tab
1773     comes after the screenshot of that tab.
1776 General Startup preferences
1777 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
1779 .. image:: ./images/pref_dialog_gen_startup.png
1781 Startup
1782 ```````
1784 Load files from the last session
1785     On startup, load the same files you had open the last time you
1786     used Geany.
1788 Load virtual terminal support
1789     Load the library for running a terminal in the message window area.
1791 Enable plugin support
1792     Allow plugins to be used in Geany.
1794 Shutdown
1795 ````````
1796 Save window position and geometry
1797     Save the current position and size of the main window so next time
1798     you open Geany it's in the same location.
1800 Confirm Exit
1801     Have a dialog pop up to confirm that you really want to quit Geany.
1803 Paths
1804 `````
1806 Startup path
1807     Path to start in when opening or saving files.
1808     It must be an absolute path.
1810 Project files
1811     Path to start in when opening project files.
1813 Extra plugin path
1814     By default Geany looks in the system installation and the user
1815     configuration - see `Plugins`_. In addition the path entered here will be
1816     searched.
1817     Usually you do not need to set an additional path to search for
1818     plugins. It might be useful when Geany is installed on a multi-user machine
1819     and additional plugins are available in a common location for all users.
1820     Leave blank to not set an additional lookup path.
1823 General Miscellaneous preferences
1824 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1826 .. image:: ./images/pref_dialog_gen_misc.png
1828 Miscellaneous
1829 `````````````
1831 Beep on errors when compilation has finished
1832     Have the computer make a beeping sound when compilation of your program
1833     has completed or any errors occurred.
1835 Switch status message list at new message
1836     Switch to the status message tab (in the notebook window at the bottom)
1837     once a new status message arrives.
1839 Suppress status messages in the status bar
1840     Remove all messages from the status bar. The messages are still displayed
1841     in the status messages window.
1843     .. tip::
1844         Another option is to use the *Switch to Editor* keybinding - it
1845         reshows the document statistics on the status bar. See `Focus
1846         keybindings`_.
1848 Use Windows File Open/Save dialogs
1849     Defines whether to use the native Windows File Open/Save dialogs or
1850     whether to use the GTK default dialogs.
1852 Auto-focus widgets (focus follows mouse)
1853     Give the focus automatically to widgets below the mouse cursor.
1854     This works for the main editor widget, the scribble, the toolbar search field
1855     goto line fields and the VTE.
1857 Search
1858 ``````
1860 Always wrap search
1861     Always wrap search around the document when finding a match.
1863 Hide the Find dialog
1864     Hide the `Find`_ dialog after clicking Find Next/Previous.
1866 Use the current word under the cursor for Find dialogs
1867     Use current word under the cursor when opening the Find, Find in Files or Replace dialog and
1868     there is no selection. When this option is disabled, the search term last used in the
1869     appropriate Find dialog is used.
1871 Use the current file's directory for Find in Files
1872     When opening the Find in Files dialog, set the directory to search to the directory of the current
1873     active file. When this option is disabled, the directory of the last use of the Find in Files
1874     dialog is used. See `Find in Files`_ for details.
1876 Projects
1877 ````````
1879 Use project-based session files
1880     Save your current session when closing projects. You will be able to
1881     resume different project sessions, automatically opening the files
1882     you had open previously.
1884 Store project file inside the project base directory
1885     When creating new projects, the default path for the project file contains
1886     the project base path. Without this option enabled, the default project file
1887     path is one level above the project base path.
1888     In either case, you can easily set the final project file path in the
1889     *New Project* dialog. This option provides the more common
1890     defaults automatically for convenience.
1893 Interface preferences
1894 ^^^^^^^^^^^^^^^^^^^^^
1896 .. image:: ./images/pref_dialog_interface_interface.png
1898 Sidebar
1899 ```````
1901 Show sidebar
1902     Whether to show the sidebar at all.
1904 Show symbol list
1905     Show the list of functions, variables, and other information in the
1906     current document you are editing.
1908 Show documents list
1909     Show all the documents you have open currently. This can be used to
1910     change between documents (see `Switching between documents`_) and
1911     to perform some common operations such as saving, closing and reloading.
1913 Position
1914     Whether to place the sidebar on the left or right of the editor window.
1916 Message window
1917 ``````````````
1919 Position
1920     Whether to place the message window on the bottom or right of the editor window.
1922 Fonts
1923 `````
1925 Editor
1926     Change the font used to display documents.
1928 Symbol list
1929     Change the font used for the Symbols sidebar tab.
1931 Message window
1932     Change the font used for the message window area.
1934 Miscellaneous
1935 `````````````
1937 Show status bar
1938     Show the status bar at the bottom of the main window. It gives information about
1939     the file you are editing like the line and column you are on, whether any
1940     modifications were done, the file encoding, the filetype and other information.
1942 Interface Notebook tab preferences
1943 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1945 .. image:: ./images/pref_dialog_interface_notebook.png
1947 Editor tabs
1948 ```````````
1950 Show editor tabs
1951     Show a notebook tab for all documents so you can switch between them
1952     using the mouse (instead of using the Documents window).
1954 Show close buttons
1955     Make each tab show a close button so you can easily close open
1956     documents.
1958 Placement of new file tabs
1959     Whether to create a document with its notebook tab to the left or
1960     right of all existing tabs.
1962 Next to current
1963     Whether to place file tabs next to the current tab
1964     rather than at the edges of the notebook.
1966 Double-clicking hides all additional widgets
1967     Whether to call the View->Toggle All Additional Widgets command
1968     when double-clicking on a notebook tab.
1970 Tab positions
1971 `````````````
1973 Editor
1974     Set the positioning of the editor's notebook tabs to the right,
1975     left, top, or bottom of the editing window.
1977 Sidebar
1978     Set the positioning of the sidebar's notebook tabs to the right,
1979     left, top, or bottom of the sidebar window.
1981 Message window
1982     Set the positioning of the message window's notebook tabs to the
1983     right, left, top, or bottom of the message window.
1986 Interface Toolbar preferences
1987 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1989 Affects the main toolbar underneath the menu bar.
1991 .. image:: ./images/pref_dialog_interface_toolbar.png
1993 Toolbar
1994 ```````
1996 Show Toolbar
1997     Whether to show the toolbar.
1999 Append Toolbar to the Menu
2000     Allows to append the toolbar to the main menu bar instead of placing it below.
2001     This is useful to save vertical space.
2003 Customize Toolbar
2004     See `Customizing the toolbar`_.
2006 Appearance
2007 ``````````
2009 Icon Style
2010     Select the toolbar icon style to use - either icons and text, just
2011     icons or just text.
2012     The choice System default uses whatever icon style is set by GTK.
2014 Icon size
2015     Select the size of the icons you see (large, small or very small).
2016     The choice System default uses whatever icon size is set by GTK.
2019 Editor Features preferences
2020 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2022 .. image:: ./images/pref_dialog_edit_features.png
2024 Features
2025 ````````
2027 Line wrapping
2028     Show long lines wrapped around to new display lines.
2030 .. _smart_home_key:
2032 "Smart" home key
2033     Whether to move the cursor to the first non-whitespace character
2034     on the line when you hit the home key on your keyboard. Pressing it
2035     again will go to the very start of the line.
2037 Disable Drag and Drop
2038     Do not allow the dragging and dropping of selected text in documents.
2040 Code folding
2041     Allow groups of lines in a document to be collapsed for easier
2042     navigation/editing.
2044 Fold/Unfold all children of a fold point
2045     Whether to fold/unfold all child fold points when a parent line
2046     is folded.
2048 Use indicators to show compile errors
2049     Underline lines with compile errors using red squiggles to indicate
2050     them in the editor area.
2052 Newline strips trailing spaces
2053     Remove any whitespace at the end of the line when you hit the
2054     Enter/Return key. See also `Strip trailing spaces`_.  Note
2055     auto indentation is calculated before stripping, so although this
2056     setting will clear a blank line, it will not set the next line
2057     indentation back to zero.
2059 Line breaking column
2060     The editor column number to insert a newline at when Line Breaking
2061     is enabled for the current document.
2063 Comment toggle marker
2064     A string which is added when toggling a line comment in a source file.
2065     It is used to mark the comment as toggled.
2068 Editor Indentation preferences
2069 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2071 .. image:: ./images/pref_dialog_edit_indentation.png
2073 Indentation group
2074 `````````````````
2076 See `Indentation`_ for more information.
2078 Width
2079     The width of a single indent size in spaces. By default the indent
2080     size is equivalent to 4 spaces.
2082 Detect width from file
2083     Try to detect and set the indent width based on file content, when
2084     a file is opened.
2086 Type
2087     When Geany inserts indentation, whether to use:
2089     * Just Tabs
2090     * Just Spaces
2091     * Tabs and Spaces, depending on how much indentation is on a line
2093     The *Tabs and Spaces* indent type is also known as *Soft tab
2094     support* in some other editors.
2096 Detect type from file
2097     Try to detect and set the indent type based on file content, when
2098     a file is opened.
2100 Auto-indent mode
2101     The type of auto-indentation you wish to use after pressing Enter,
2102     if any.
2104     Basic
2105         Just add the indentation of the previous line.
2106     Current chars
2107         Add indentation based on the current filetype and any characters at
2108         the end of the line such as ``{``, ``}`` for C, ``:`` for Python.
2109     Match braces
2110         Like *Current chars* but for C-like languages, make a closing
2111         ``}`` brace line up with the matching opening brace.
2113 Tab key indents
2114     If set, pressing tab will indent the current line or selection, and
2115     unindent when pressing Shift-tab. Otherwise, the tab key will
2116     insert a tab character into the document (which can be different
2117     from indentation, depending on the indent type).
2119     .. note::
2120         There are also separate configurable keybindings for indent &
2121         unindent, but this preference allows the tab key to have different
2122         meanings in different contexts - e.g. for snippet completion.
2124 Editor Completions preferences
2125 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2127 .. image:: ./images/pref_dialog_edit_completions.png
2129 Completions
2130 ```````````
2132 Snippet Completion
2133     Whether to replace special keywords after typing Tab into a
2134     pre-defined text snippet.
2135     See `User-definable snippets`_.
2137 XML/HTML tag auto-closing
2138     When you open an XML/HTML tag automatically generate its
2139     completion tag.
2141 Automatic continuation multi-line comments
2142     Continue automatically multi-line comments in languages like C, C++
2143     and Java when a new line is entered inside such a comment.
2144     With this option enabled, Geany will insert a ``*`` on every new line
2145     inside a multi-line comment, for example when you press return in the
2146     following C code::
2148      /*
2149       * This is a C multi-line comment, press <Return>
2151     then Geany would insert::
2153       *
2155     on the next line with the correct indentation based on the previous line,
2156     as long as the multi-line is not closed by ``*/``.
2158 Autocomplete symbols
2159     When you start to type a symbol name, look for the full string to
2160     allow it to be completed for you.
2162 Autocomplete all words in document
2163     When you start to type a word, Geany will search the whole document for
2164     words starting with the typed part to complete it, assuming there
2165     are no symbol names to show.
2167 Drop rest of word on completion
2168     Remove any word part to the right of the cursor when choosing a
2169     completion list item.
2171 Characters to type for autocompletion
2172     Number of characters of a word to type before autocompletion is
2173     displayed.
2175 Completion list height
2176     The number of rows to display for the autocompletion window.
2178 Max. symbol name suggestions
2179     The maximum number of items in the autocompletion list.
2181 Symbol list update frequency
2182     The minimum delay (in milliseconds) between two symbol list updates.
2184     This option determines how frequently the symbol list is updated for the
2185     current document. The smaller the delay, the more up-to-date the symbol
2186     list (and then the completions); but rebuilding the symbol list has a
2187     cost in performance, especially with large files.
2189     The default value is 250ms, which means the symbol list will be updated
2190     at most four times per second, even if the document changes continuously.
2192     A value of 0 disables automatic updates, so the symbol list will only be
2193     updated upon document saving.
2196 Auto-close quotes and brackets
2197 ``````````````````````````````
2199 Geany can automatically insert a closing bracket and quote characters when
2200 you open them. For instance, you type a ``(`` and Geany will automatically
2201 insert ``)``. With the following options, you can define for which
2202 characters this should work.
2204 Parenthesis ( )
2205     Auto-close parenthesis when typing an opening one
2207 Curly brackets { }
2208     Auto-close curly brackets (braces) when typing an opening one
2210 Square brackets [ ]
2211     Auto-close square brackets when typing an opening one
2213 Single quotes ' '
2214     Auto-close single quotes when typing an opening one
2216 Double quotes " "
2217     Auto-close double quotes when typing an opening one
2220 Editor Display preferences
2221 ^^^^^^^^^^^^^^^^^^^^^^^^^^
2223 This is for visual elements displayed in the editor window.
2225 .. image:: ./images/pref_dialog_edit_display.png
2227 Display
2228 ```````
2230 Invert syntax highlighting colors
2231     Invert all colors, by default this makes white text on a black
2232     background.
2234 Show indendation guides
2235     Show vertical lines to help show how much leading indentation there
2236     is on each line.
2238 Show whitespaces
2239     Mark all tabs with an arrow "-->" symbol and spaces with dots to
2240     show which kinds of whitespace are used.
2242 Show line endings
2243     Display a symbol everywhere that a carriage return or line feed
2244     is present.
2246 Show line numbers
2247     Show or hide the Line Number margin.
2249 Show markers margin
2250     Show or hide the small margin right of the line numbers, which is used
2251     to mark lines.
2253 Stop scrolling at last line
2254     When enabled Geany stops scrolling when at the last line of the document.
2255     Otherwise you can scroll one more page even if there are no real lines.
2257 Lines visible around the cursor
2258     The number of lines to maintain between the cursor and the top and bottom
2259     edges of the view. This allows some lines of context around the cursor to
2260     always be visible. If *Stop scrolling at last line* is disabled, the cursor
2261     will never reach the bottom edge when this value is greater than 0.
2264 Long line marker
2265 ````````````````
2267 The long line marker helps to indicate overly-long lines, or as a hint
2268 to the user for when to break the line.
2270 Type
2271     Line
2272         Show a thin vertical line in the editor window at the given column
2273         position.
2274     Background
2275         Change the background color of characters after the given column
2276         position to the color set below. (This is recommended over the
2277         *Line* setting if you use proportional fonts).
2278     Disabled
2279         Don't mark long lines at all.
2281 Long line marker
2282     Set this value to a value greater than zero to specify the column
2283     where it should appear.
2285 Long line marker color
2286     Set the color of the long line marker.
2289 Virtual spaces
2290 ``````````````
2292 Virtual space is space beyond the end of each line.
2293 The cursor may be moved into virtual space but no real space will be
2294 added to the document until there is some text typed or some other
2295 text insertion command is used.
2297 Disabled
2298     Do not show virtual spaces
2300 Only for rectangular selections
2301     Only show virtual spaces beyond the end of lines when drawing a rectangular selection
2303 Always
2304     Always show virtual spaces beyond the end of lines
2307 Files preferences
2308 ^^^^^^^^^^^^^^^^^
2310 .. image:: ./images/pref_dialog_files.png
2312 New files
2313 `````````
2315 Open new documents from the command-line
2316     Whether to create new documents when passing filenames that don't
2317     exist from the command-line.
2319 Default encoding (new files)
2320     The type of file encoding you wish to use when creating files.
2322 Used fixed encoding when opening files
2323     Assume all files you are opening are using the type of encoding specified below.
2325 Default encoding (existing files)
2326     Opens all files with the specified encoding instead of auto-detecting it.
2327     Use this option when it's not possible for Geany to detect the exact encoding.
2329 Default end of line characters
2330     The end of line characters to which should be used for new files.
2331     On Windows systems, you generally want to use CR/LF which are the common
2332     characters to mark line breaks.
2333     On Unix-like systems, LF is default and CR is used on MAC systems.
2335 Saving files
2336 ````````````
2337 Perform formatting operations when a document is saved. These
2338 can each be undone with the Undo command.
2340 Ensure newline at file end
2341     Add a newline at the end of the document if one is missing.
2343 Ensure consistent line endings
2344     Ensures that newline characters always get converted before
2345     saving, avoiding mixed line endings in the same file.
2347 .. _Strip trailing spaces:
2349 Strip trailing spaces
2350     Remove any whitespace at the end of each document line.
2352     .. note::
2353         This does not apply to Diff documents, e.g. patch files.
2355 Replace tabs with spaces
2356     Replace all tabs in the document with the equivalent number of spaces.
2358     .. note::
2359         It is better to use spaces to indent than use this preference - see
2360         `Indentation`_.
2362 Miscellaneous
2363 `````````````
2365 Recent files list length
2366     The number of files to remember in the recently used files list.
2368 Disk check timeout
2369     The number of seconds to periodically check the current document's
2370     file on disk in case it has changed. Setting it to 0 will disable
2371     this feature.
2373     .. note::
2374         These checks are only performed on local files. Remote files are
2375         not checked for changes due to performance issues
2376         (remote files are files in ``~/.gvfs/``).
2379 Tools preferences
2380 ^^^^^^^^^^^^^^^^^
2382 .. image:: ./images/pref_dialog_tools.png
2384 Tool paths
2385 ``````````
2387 Terminal
2388     The command to execute a script in a terminal.  Occurrences of %c
2389     in the command are substituted with the run script name, see
2390     `Terminal emulators`_.
2392 Browser
2393     The location of your web browser executable.
2395 Grep
2396     The location of the grep executable.
2398 .. note::
2399     For Windows users: at the time of writing it is recommended to use
2400     the grep.exe from the UnxUtils project
2401     (http://sourceforge.net/projects/unxutils). The grep.exe from the
2402     Mingw project for instance might not work with Geany at the moment.
2404 Commands
2405 ````````
2407 Context action
2408     Set this to a command to execute on the current word.
2409     You can use the "%s" wildcard to pass the current word below the cursor
2410     to the specified command.
2413 Template preferences
2414 ^^^^^^^^^^^^^^^^^^^^
2416 This data is used as meta data for various template text to insert into
2417 a document, such as the file header. You only need to set fields that
2418 you want to use in your template files.
2420 .. image:: ./images/pref_dialog_templ.png
2422 Template data
2423 `````````````
2425 Developer
2426     The name of the developer who will be creating files.
2428 Initials
2429     The initials of the developer.
2431 Mail address
2432     The email address of the developer.
2434     .. note::
2435         You may wish to add anti-spam markup, e.g. ``name<at>site<dot>ext``.
2437 Company
2438     The company the developer is working for.
2440 Initial version
2441     The initial version of files you will be creating.
2443 Year
2444     Specify a format for the {year} wildcard. You can use any conversion specifiers
2445     which can be used with the ANSI C strftime function.  For details please see
2446     http://man.cx/strftime.
2448 Date
2449     Specify a format for the {date} wildcard. You can use any conversion specifiers
2450     which can be used with the ANSI C strftime function.  For details please see
2451     http://man.cx/strftime.
2453 Date & Time
2454     Specify a format for the {datetime} wildcard. You can use any conversion specifiers
2455     which can be used with the ANSI C strftime function.  For details please see
2456     http://man.cx/strftime.
2459 Keybinding preferences
2460 ^^^^^^^^^^^^^^^^^^^^^^
2462 .. image:: ./images/pref_dialog_keys.png
2464 There are some commands listed in the keybinding dialog that are not, by default,
2465 bound to a key combination, and may not be available as a menu item.
2467 .. note::
2468     For more information see the section `Keybindings`_.
2471 Printing preferences
2472 ^^^^^^^^^^^^^^^^^^^^
2474 .. image:: ./images/pref_dialog_printing.png
2476 Use external command for printing
2477     Use a system command to print your file out.
2479 Use native GTK printing
2480     Let the GTK GUI toolkit handle your print request.
2482 Print line numbers
2483     Print the line numbers on the left of your paper.
2485 Print page number
2486     Print the page number on the bottom right of your paper.
2488 Print page header
2489     Print a header on every page that is sent to the printer.
2491 Use base name of the printed file
2492     Don't use the entire path for the header, only the filename.
2494 Date format
2495     How the date should be printed. You can use the same format
2496     specifiers as in the ANSI C function strftime(). For details please
2497     see http://man.cx/strftime.
2500 Various preferences
2501 ^^^^^^^^^^^^^^^^^^^
2503 .. image:: ./images/pref_dialog_various.png
2505 Rarely used preferences, explained in the table below. A few of them require
2506 restart to take effect, and a few other will only affect newly opened or created
2507 documents before restart.
2509 ================================  ===========================================  ==========  ===========
2510 Key                               Description                                  Default     Applies
2511 ================================  ===========================================  ==========  ===========
2512 **Editor related**
2513 use_gtk_word_boundaries           Whether to look for the end of a word        true        to new
2514                                   when using word-boundary related                         documents
2515                                   Scintilla commands (see `Scintilla
2516                                   keyboard commands`_).
2517 brace_match_ltgt                  Whether to highlight <, > angle brackets.    false       immediately
2518 complete_snippets_whilst_editing  Whether to allow completion of snippets      false       immediately
2519                                   when editing an existing line (i.e. there
2520                                   is some text after the current cursor
2521                                   position on the line). Only used when the
2522                                   keybinding `Complete snippet` is set to
2523                                   ``Space``.
2524 show_editor_scrollbars            Whether to display scrollbars. If set to     true        immediately
2525                                   false, the horizontal and vertical
2526                                   scrollbars are hidden completely.
2527 indent_hard_tab_width             The size of a tab character. Don't change    8           immediately
2528                                   it unless you really need to; use the
2529                                   indentation settings instead.
2530 editor_ime_interaction            Input method editor (IME)'s candidate        0           to new
2531                                   window behaviour. May be 0 (windowed) or                 documents
2532                                   1 (inline)
2533 **Interface related**
2534 show_symbol_list_expanders        Whether to show or hide the small            true        to new
2535                                   expander icons on the symbol list                        documents
2536                                   treeview.
2537 allow_always_save                 Whether files can be saved always, even      false       immediately
2538                                   if they don't have any changes.
2539                                   By default, the Save button and menu
2540                                   item are disabled when a file is
2541                                   unchanged. When setting this option to
2542                                   true, the Save button and menu item are
2543                                   always active and files can be saved.
2544 compiler_tab_autoscroll           Whether to automatically scroll to the       true        immediately
2545                                   last line of the output in the Compiler
2546                                   tab.
2547 statusbar_template                The status bar statistics line format.       See below.  immediately
2548                                   (See `Statusbar Templates`_ for details).
2549 new_document_after_close          Whether to open a new document after all     false       immediately
2550                                   documents have been closed.
2551 msgwin_status_visible             Whether to show the Status tab in the        true        immediately
2552                                   Messages Window
2553 msgwin_compiler_visible           Whether to show the Compiler tab in the      true        immediately
2554                                   Messages Window
2555 msgwin_messages_visible           Whether to show the Messages tab in the      true        immediately
2556                                   Messages Window
2557 msgwin_scribble_visible           Whether to show the Scribble tab in the      true        immediately
2558                                   Messages Window
2559 **VTE related**
2560 send_selection_unsafe             By default, Geany strips any trailing        false       immediately
2561                                   newline characters from the current
2562                                   selection before sending it to the terminal
2563                                   to not execute arbitrary code. This is
2564                                   mainly a security feature.
2565                                   If, for whatever reasons, you really want
2566                                   it to be executed directly, set this option
2567                                   to true.
2568 send_cmd_prefix                   String with which prefix the commands sent   Empty       immediately
2569                                   to the shell.  This may be used to tell
2570                                   some shells (BASH with ``HISTCONTROL`` set
2571                                   to ``ignorespace``, ZSH with
2572                                   ``HIST_IGNORE_SPACE`` enabled, etc.) from
2573                                   putting these commands in their history by
2574                                   setting this to a space.  Note that leading
2575                                   spaces must be escaped using `\s` in the
2576                                   configuration file.
2577 **File related**
2578 use_atomic_file_saving            Defines the mode how Geany saves files to    false       immediately
2579                                   disk. If disabled, Geany directly writes
2580                                   the content of the document to disk. This
2581                                   might cause loss of data when there is
2582                                   no more free space on disk to save the
2583                                   file. When set to true, Geany first saves
2584                                   the contents into a temporary file and if
2585                                   this succeeded, the temporary file is
2586                                   moved to the real file to save.
2587                                   This gives better error checking in case of
2588                                   no more free disk space. But it also
2589                                   destroys hard links of the original file
2590                                   and its permissions (e.g. executable flags
2591                                   are reset). Use this with care as it can
2592                                   break things seriously.
2593                                   The better approach would be to ensure your
2594                                   disk won't run out of free space.
2595 use_gio_unsafe_file_saving        Whether to use GIO as the unsafe file        true        immediately
2596                                   saving backend. It is better on most
2597                                   situations but is known not to work
2598                                   correctly on some complex setups.
2599 gio_unsafe_save_backup            Make a backup when using GIO unsafe file     false       immediately
2600                                   saving. Backup is named `filename~`.
2601 keep_edit_history_on_reload       Whether to maintain the edit history when    true        immediately
2602                                   reloading a file, and allow the operation
2603                                   to be reverted.
2604 reload_clean_doc_on_file_change   Whether to automatically reload documents    false       immediately
2605                                   that have no changes but which have changed
2606                                   on disk.
2607                                   If unsaved changes exist then the user is
2608                                   prompted to reload manually.
2609 **Filetype related**
2610 extract_filetype_regex            Regex to extract filetype name from file     See below.  immediately
2611                                   via capture group one.
2612 **Search related**
2613 find_selection_type               See `Find selection`_.                       0           immediately
2614 **Replace related**
2615 replace_and_find_by_default       Set ``Replace & Find`` button as default so  true        immediately
2616                                   it will be activated when the Enter key is
2617                                   pressed while one of the text fields has
2618                                   focus.
2619 **Build Menu related**
2620 number_ft_menu_items              The maximum number of menu items in the      2           on restart
2621                                   filetype section of the Build menu.
2622 number_non_ft_menu_items          The maximum number of menu items in the      3           on restart
2623                                   independent section of the Build menu.
2624 number_exec_menu_items            The maximum number of menu items in the      2           on restart
2625                                   execute section of the Build menu.
2626 ================================  ===========================================  ==========  ===========
2628 The extract_filetype_regex has the default value GEANY_DEFAULT_FILETYPE_REGEX.
2630 Statusbar Templates
2631 ```````````````````
2633 The default statusbar template is (note ``\t`` = tab):
2635 ``line: %l / %L\t col: %c\t sel: %s\t %w      %t      %mmode: %M      encoding: %e      filetype: %f      scope: %S``
2637 Settings the preference to an empty string will also cause Geany to use this
2638 internal default.
2640 The following format characters are available for the statusbar template:
2642 ============  ===========================================================
2643 Placeholder   Description
2644 ============  ===========================================================
2645   ``%l``      The current line number starting at 1
2646   ``%L``      The total number of lines
2647   ``%c``      The current column number starting at 0, including virtual
2648               space.
2649   ``%C``      The current column number starting at 1, including virtual
2650               space.
2651   ``%s``      The number of selected characters or if only whole lines
2652               selected, the number of selected lines.
2653   ``%n``      The number of selected characters, even if only whole lines
2654               are selected.
2655   ``%w``      Shows ``RO`` when the document is in read-only mode,
2656               otherwise shows whether the editor is in overtype (OVR)
2657               or insert (INS) mode.
2658   ``%t``      Shows the indentation mode, either tabs (TAB),
2659               spaces (SP) or both (T/S).
2660   ``%m``      Shows whether the document is modified (MOD) or nothing.
2661   ``%M``      The name of the document's line-endings (ex. ``Unix (LF)``)
2662   ``%e``      The name of the document's encoding (ex. UTF-8).
2663   ``%f``      The filetype of the document (ex. None, Python, C, etc).
2664   ``%S``      The name of the scope where the caret is located.
2665   ``%p``      The caret position in the entire document starting at 0.
2666   ``%r``      Shows whether the document is read-only (RO) or nothing.
2667   ``%Y``      The Scintilla style number at the caret position. This is
2668               useful if you're debugging color schemes or related code.
2669 ============  ===========================================================
2671 Terminal (VTE) preferences
2672 ^^^^^^^^^^^^^^^^^^^^^^^^^^
2674 See also: `Virtual terminal emulator widget (VTE)`_.
2676 .. image:: ./images/pref_dialog_vte.png
2678 Terminal widget
2679 ```````````````
2681 Terminal font
2682     Select the font that will be used in the terminal emulation control.
2684 Foreground color
2685     Select the font color.
2687 Background color
2688     Select the background color of the terminal.
2690 Background image
2691     Select the background image to show behind the terminal's text.
2693 Scrollback lines
2694     The number of lines buffered so that you can scroll though the history.
2696 Shell
2697     The location of the shell on your system.
2699 Scroll on keystroke
2700     Scroll the terminal to the prompt line when pressing a key.
2702 Scroll on output
2703     Scroll the output down.
2705 Cursor blinks
2706     Let the terminal cursor blink.
2708 Override Geany keybindings
2709     Allow the VTE to receive keyboard shortcuts (apart from focus commands).
2711 Disable menu shortcut key (F10 by default)
2712     Disable the menu shortcut when you are in the virtual terminal.
2714 Follow path of the current file
2715     Make the path of the terminal change according to the path of the
2716     current file.
2718 Execute programs in VTE
2719     Execute programs in the virtual terminal instead of using the external
2720     terminal tool.  Note that if you run multiple execute commands at once
2721     the output may become mixed together in the VTE.
2723 Don't use run script
2724     Don't use the simple run script which is usually used to display
2725     the exit status of the executed program.
2726     This can be useful if you already have a program running in the VTE
2727     like a Python console (e.g. ipython). Use this with care.
2730 Project management
2731 ------------------
2733 Project management is optional in Geany. Currently it can be used for:
2735 * Storing and opening session files on a project basis.
2736 * Overriding default settings with project equivalents.
2737 * Configuring the Build menu on a project basis.
2739 A list of session files can be stored and opened with the project
2740 when the *Use project-based session files* preference is enabled,
2741 in the `Projects`_ group of the `General Miscellaneous preferences`_ tab
2742 of the `Preferences`_ dialog.
2744 As long as a project is open, the Build menu will use
2745 the items defined in project's settings, instead of the defaults.
2746 See `Build Menu Configuration`_ for information on configuring the menu.
2748 The current project's settings are saved when it is closed, or when
2749 Geany is shutdown. When restarting Geany, the previously opened project
2750 file that was in use at the end of the last session will be reopened.
2752 The project menu items are detailed below.
2755 New project
2756 ^^^^^^^^^^^
2758 To create a new project, fill in the *Name* field. By default this
2759 will setup a new project file ``~/projects/name.geany``. Usually it's
2760 best to store all your project files in the same directory (they are
2761 independent of any source directory trees).
2763 The Base path text field is setup to use ``~/projects/name``. This
2764 can safely be set to any existing path -- it will not touch the file
2765 structure contained in it.
2768 Project properties
2769 ^^^^^^^^^^^^^^^^^^
2771 You can set an optional description for the project. Currently it's
2772 only used for a template wildcard - see `Template wildcards`_.
2774 The *Base path* field is used as the directory to run the Build menu commands.
2775 The specified path can be an absolute path or it is considered to be
2776 relative to the project's file name.
2778 The *File patterns* field allows to specify a list of file patterns for the
2779 project, which can be used in the `Find in files`_ dialog.
2781 The *Indentation* tab allows you to override the default
2782 `Indentation`_ settings.
2785 Open project
2786 ^^^^^^^^^^^^
2788 The Open command displays a standard file chooser, starting in
2789 ``~/projects``. Choose a project file named with the ``.geany``
2790 extension.
2792 When project session support is enabled, Geany will close the currently
2793 open files and open the session files associated with the project.
2796 Close project
2797 ^^^^^^^^^^^^^
2799 Project file settings are saved when the project is closed.
2801 When project session support is enabled, Geany will close the project
2802 session files and open any previously closed default session files.
2805 Build menu
2806 ----------
2807 After editing code with Geany, the next step is to compile, link, build,
2808 interpret, run etc.  As Geany supports many languages each with a different
2809 approach to such operations, and as there are also many language independent
2810 software building systems, Geany does not have a built-in build system, nor
2811 does it limit which system you can use.  Instead the build menu provides
2812 a configurable and flexible means of running any external commands to
2813 execute your preferred build system.
2815 This section provides a description of the default configuration of the
2816 build menu and then covers how to configure it, and where the defaults fit in.
2818 Running the commands from within Geany has two benefits:
2820 * The current file is automatically saved before the command is run.
2821 * The output is captured in the Compiler notebook tab and parsed for
2822   warnings or errors.
2824 Warnings and errors that can be parsed for line numbers will be shown in
2825 red in the Compiler tab and you can click on them to switch to the relevant
2826 source file (or open it) and mark the line number.  Also lines with
2827 warnings or errors are marked in the source, see `Indicators`_ below.
2829 .. tip::
2830     If Geany's default error message parsing does not parse errors for
2831     the tool you're using, you can set a custom regex in the Build Commands
2832     Dialog, see `Build Menu Configuration`_.
2834 Indicators
2835 ^^^^^^^^^^
2837 Indicators are red squiggly underlines which are used to highlight
2838 errors which occurred while compiling the current file. So you can
2839 easily see where your code failed to compile. You can remove them by
2840 selecting *Remove Error Indicators* in the Document menu.
2842 If you do not like this feature, you can disable it - see `Editor Features
2843 preferences`_.
2846 Default build menu items
2847 ^^^^^^^^^^^^^^^^^^^^^^^^
2848 Depending on the current file's filetype, the default Build menu will contain
2849 the following items:
2851 * Compile
2852 * Build
2853 * Lint
2854 * Make All
2855 * Make Custom Target
2856 * Make Object
2857 * Next Error
2858 * Previous Error
2859 * Execute
2860 * Set Build Menu Commands
2863 Compile
2864 ```````
2866 The Compile command has different uses for different kinds of files.
2868 For compilable languages such as C and C++, the Compile command is
2869 set up to compile the current source file into a binary object file.
2871 Java source files will be compiled to class file bytecode.
2873 Interpreted languages such as Perl, Python, Ruby will compile to
2874 bytecode if the language supports it, or will run a syntax check,
2875 or if that is not available will run the file in its language interpreter.
2877 Build
2878 `````
2880 For compilable languages such as C and C++, the Build command will link
2881 the current source file's equivalent object file into an executable. If
2882 the object file does not exist, the source will be compiled and linked
2883 in one step, producing just the executable binary.
2885 Interpreted languages do not use the Build command.
2887 .. note::
2888     If you need complex settings for your build system, or several
2889     different settings, then writing a Makefile and using the Make
2890     commands is recommended; this will also make it easier for users to
2891     build your software.
2893 Lint
2894 ````
2896 Source code linters are often used to find code that doesn't correspond to
2897 certain style guidelines: non-portable code, common or hard to find
2898 errors, code "smells", variables used before being set, unused functions,
2899 division by zero, constant conditions, etc. Linters inspect the code and
2900 issue warnings much like the compilers do. This is formally referred to as
2901 static code analysis.
2903 Some common linters are pre-configured for you in the Build menu (``pep8``
2904 for Python, ``cppcheck`` for C/C++, JSHint for JavaScript, ``xmllint`` for
2905 XML, ``hlint`` for Haskell, ``shellcheck`` for shell code, ...), but all
2906 these are standalone tools you need to obtain before using.
2908 Make
2909 ````
2911 This runs "make" in the same directory as the
2912 current file.
2914 Make custom target
2915 ``````````````````
2917 This is similar to running 'Make' but you will be prompted for
2918 the make target name to be passed to the Make tool. For example,
2919 typing 'clean' in the dialog prompt will run "make clean".
2922 Make object
2923 ```````````
2925 Make object will run "make current_file.o" in the same directory as
2926 the current file, using the filename for 'current_file'. It is useful
2927 for building just the current file without building the whole project.
2929 Next error
2930 ``````````
2932 The next error item will move to the next detected error in the file.
2934 Previous error
2935 ``````````````
2936 The previous error item will move to the previous detected error in the file.
2938 Execute
2939 ```````
2941 Execute will run the corresponding executable file, shell script or
2942 interpreted script in a terminal window. The command set in the
2943 "Set Build Commands" dialog is run in a script to ensure the terminal
2944 stays open after execution completes.  Note: see `Terminal emulators`_
2945 below for the command format.  Alternatively the built-in VTE can be used
2946 if it is available - see `Virtual terminal emulator widget (VTE)`_.
2948 After your program or script has finished executing, the run script will
2949 prompt you to press the return key. This allows you to review any text
2950 output from the program before the terminal window is closed.
2952 .. note::
2953     The execute command output is not parsed for errors.
2956 Stopping running processes
2957 ``````````````````````````
2959 When there is a running program, the Execute menu item in the menu and
2960 the Run button in the toolbar
2961 each become a stop button so you can stop the current running program (and
2962 any child processes). This works by sending the SIGQUIT signal to the process.
2964 Depending on the process you started it is possible that the process
2965 cannot be stopped. For example this can happen when the process creates
2966 more than one child process.
2969 Terminal emulators
2970 ******************
2972 The Terminal field of the tools preferences tab requires a command to
2973 execute the terminal program and to pass it the name of the Geany run
2974 script that it should execute in a Bourne compatible shell (eg /bin/sh).
2975 The marker "%c" is substituted with the name of the Geany run script,
2976 which is created in the temporary directory and which changes the working
2977 directory to the directory set in the Build commands dialog, see
2978 `Build menu commands dialog`_ for details.
2980 As an example the default (Linux) command is::
2982     xterm -e "/bin/sh %c"
2985 Set build commands
2986 ``````````````````
2988 By default Compile, Build and Execute are fairly basic commands. You
2989 may wish to customise them using *Set Build Commands*.
2991 E.g. for C you can add any include paths and compile flags for the
2992 compiler, any library names and paths for the linker, and any
2993 arguments you want to use when running Execute.
2995 Build menu configuration
2996 ^^^^^^^^^^^^^^^^^^^^^^^^
2998 The build menu has considerable flexibility and configurability, allowing
2999 both menu labels the commands they execute and the directory they execute
3000 in to be configured.
3002 For example, if you change one of the default make commands to run say 'waf'
3003 you can also change the label to match.
3005 These settings are saved automatically when Geany is shut down.
3007 The build menu is divided into four groups of items each with different
3008 behaviors:
3010 * Filetype build commands - are configurable and depend on the filetype of the
3011   current document; they capture output in the compiler tab and parse it for
3012   errors.
3013 * Independent build commands - are configurable and mostly don't depend on the
3014   filetype of the current document; they also capture output in the
3015   compiler tab and parse it for errors.
3016 * Execute commands - are configurable and intended for executing your
3017   program or other long running programs.  The output is not parsed for errors
3018   and is directed to the terminal command selected in preferences.
3019 * Fixed commands - these perform built-in actions:
3021   * Go to the next error.
3022   * Go to the previous error.
3023   * Show the build menu commands dialog.
3025 The maximum numbers of items in each of the configurable groups can be
3026 configured in the `Various preferences`_. Even though the maximum number of
3027 items may have been increased, only those menu items that have values
3028 configured are shown in the menu.
3030 The groups of menu items obtain their configuration from four potential
3031 sources.  The highest priority source that has the menu item defined will
3032 be used. The sources in decreasing priority are:
3034 * A project file if open
3035 * The user preferences
3036 * The system filetype definitions
3037 * The defaults
3039 The detailed relationships between sources and the configurable menu item groups
3040 is shown in the following table.
3042 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
3043 | Group        | Project File        | Preferences              | System Filetype   |  Defaults                     |
3044 +==============+=====================+==========================+===================+===============================+
3045 | Filetype     | Loads From: project | Loads From:              | Loads From:       | None                          |
3046 |              | file                | filetypes.xxx file in    | filetypes.xxx in  |                               |
3047 |              |                     | ~/.config/geany/filedefs | Geany install     |                               |
3048 |              | Saves To: project   |                          |                   |                               |
3049 |              | file                | Saves to: as above,      | Saves to: as user |                               |
3050 |              |                     | creating if needed.      | preferences left. |                               |
3051 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
3052 | Filetype     | Loads From: project | Loads From:              | Loads From:       | 1:                            |
3053 | Independent  | file                | geany.conf file in       | filetypes.xxx in  |   Label: _Make                |
3054 |              |                     | ~/.config/geany          | Geany install     |   Command: make               |
3055 |              | Saves To: project   |                          |                   |                               |
3056 |              | file                | Saves to: as above,      | Saves to: as user | 2:                            |
3057 |              |                     | creating if needed.      | preferences left. |    Label: Make Custom _Target |
3058 |              |                     |                          |                   |    Command: make              |
3059 |              |                     |                          |                   |                               |
3060 |              |                     |                          |                   | 3:                            |
3061 |              |                     |                          |                   |    Label: Make _Object        |
3062 |              |                     |                          |                   |    Command: make %e.o         |
3063 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
3064 | Execute      | Loads From: project | Loads From:              | Loads From:       | Label: _Execute               |
3065 |              | file or else        | geany.conf file in       | filetypes.xxx in  | Command: ./%e                 |
3066 |              | filetype defined in | ~/.config/geany or else  | Geany install     |                               |
3067 |              | project file        | filetypes.xxx file in    |                   |                               |
3068 |              |                     | ~/.config/geany/filedefs | Saves To: as user |                               |
3069 |              | Saves To:           |                          | preferences left. |                               |
3070 |              | project file        | Saves To:                |                   |                               |
3071 |              |                     | filetypes.xxx file in    |                   |                               |
3072 |              |                     | ~/.config/geany/filedefs |                   |                               |
3073 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
3075 The following notes on the table reference cells by coordinate as (group,source):
3077 * General - for filetypes.xxx substitute the appropriate extension for
3078   the filetype of the current document for xxx - see `filenames`_.
3080 * System Filetypes - Labels loaded from these sources are locale sensitive
3081   and can contain translations.
3083 * (Filetype, Project File) and (Filetype, Preferences) - preferences use a full
3084   filetype file so that users can configure all other filetype preferences
3085   as well.  Projects can only configure menu items per filetype.  Saving
3086   in the project file means that there is only one file per project not
3087   a whole directory.
3089 * (Filetype-Independent, System Filetype) - although conceptually strange, defining
3090   filetype-independent commands in a filetype file, this provides the ability to
3091   define filetype dependent default menu items.
3093 * (Execute, Project File) and (Execute, Preferences) - the project independent
3094   execute and preferences independent execute commands can only be set by hand
3095   editing the appropriate file, see `Preferences file format`_ and `Project file
3096   format`_.
3098 Build menu commands dialog
3099 ^^^^^^^^^^^^^^^^^^^^^^^^^^
3101 Most of the configuration of the build menu is done through the Build Menu
3102 Commands Dialog.  You edit the configuration sourced from preferences in the
3103 dialog opened from the Build->Build Menu Commands item and you edit the
3104 configuration from the project in the build tab of the project preferences
3105 dialog.  Both use the same form shown below.
3107 .. image:: ./images/build_menu_commands_dialog.png
3109 The dialog is divided into three sections:
3111 * Filetype build commands (selected based on the current document's filetype).
3112 * Independent build commands (available regardless of filetype).
3113 * Filetype execute commands.
3115 The filetype and independent sections also each contain a field for the regular
3116 expression used for parsing command output for error and warning messages.
3118 The columns in the first three sections allow setting of the label, command,
3119 and working directory to run the command in.
3121 An item with an empty label will not be shown in the menu.
3123 An empty working directory will default to the directory of the current document.
3124 If there is no current document then the command will not run.
3126 The dialog will always show the command selected by priority, not just the
3127 commands configured in this configuration source. This ensures that you always
3128 see what the menu item is going to do if activated.
3130 If the current source of the menu item is higher priority than the
3131 configuration source you are editing then the command will be shown
3132 in the dialog but will be insensitive (greyed out).  This can't happen
3133 with the project source but can with the preferences source dialog.
3135 The clear buttons remove the definition from the configuration source you are editing.
3136 When you do this the command from the next lower priority source will be shown.
3137 To hide lower priority menu items without having anything show in the menu
3138 configure with a nothing in the label but at least one character in the command.
3140 Substitutions in commands and working directories
3141 `````````````````````````````````````````````````
3143 The first occurrence of each of the following character sequences in each of the
3144 command and working directory fields is substituted by the items specified below
3145 before the command is run.
3147 * %d - substituted by the absolute path to the directory of the current file.
3148 * %e - substituted by the name of the current file without the extension or path.
3149 * %f - substituted by the name of the current file without the path.
3150 * %p - if a project is open, substituted by the base path from the project.
3151 * %l - substituted by the line number at the current cursor position.
3153 .. note::
3154    If the basepath set in the project preferences is not an absolute path , then it is
3155    taken as relative to the directory of the project file.  This allows a project file
3156    stored in the source tree to specify all commands and working directories relative
3157    to the tree itself, so that the whole tree including the project file, can be moved
3158    and even checked into and out of version control without having to re-configure the
3159    build menu.
3161 Build menu keyboard shortcuts
3162 `````````````````````````````
3164 Keyboard shortcuts can be defined for the first two filetype menu items, the first three
3165 independent menu items, the first execute menu item and the fixed menu items.
3166 In the keybindings configuration dialog (see `Keybinding preferences`_)
3167 these items are identified by the default labels shown in the `Build Menu`_ section above.
3169 It is currently not possible to bind keyboard shortcuts to more than these menu items.
3171 You can also use underlines in the labels to set mnemonic characters.
3173 Old settings
3174 ````````````
3176 The configurable Build Menu capability was introduced in Geany 0.19 and
3177 required a new section to be added to the configuration files (See
3178 `Preferences file format`_).  Geany will still load older format project,
3179 preferences and filetype file settings and will attempt to map them into the new
3180 configuration format.  There is not a simple clean mapping between the formats.
3181 The mapping used produces the most sensible results for the majority of cases.
3182 However, if they do not map the way you want, you may have to manually
3183 configure some settings using the Build Commands
3184 Dialog or the Build tab of the project preferences dialog.
3186 Any setting configured in either of these dialogs will override settings mapped from
3187 older format configuration files.
3189 Printing support
3190 ----------------
3192 Since Geany 0.13 there has been printing support using GTK's printing API.
3193 The printed page(s) will look nearly the same as on your screen in Geany.
3194 Additionally, there are some options to modify the printed page(s).
3196 .. note::
3197     The background text color is set to white, except for text with
3198     a white foreground. This allows dark color schemes to save ink
3199     when printing.
3201 You can define whether to print line numbers, page numbers at the bottom of
3202 each page and whether to print a page header on each page. This header
3203 contains the filename of the printed document, the current page number and
3204 the date and time of printing. By default, the file name of the document
3205 with full path information is added to the header. If you prefer to add
3206 only the basename of the file(without any path information) you can set it
3207 in the preferences dialog. You can also adjust the format of the date and
3208 time added to the page header. The available conversion specifiers are the
3209 same as the ones which can be used with the ANSI C strftime function.
3211 All of these settings can also be changed in the print dialog just before
3212 actual printing is done.
3213 On Unix-like systems the provided print dialog offers a print preview. The
3214 preview file is opened with a PDF viewer and by default GTK uses ``evince``
3215 for print preview. If you have not installed evince or just want to use
3216 another PDF viewer, you can change the program to use in the file
3217 ``.gtkrc-2.0`` (usually found in your home directory). Simply add a line
3218 like::
3220     gtk-print-preview-command = "epdfview %f"
3222 at the end of the file. Of course, you can also use xpdf, kpdf or whatever
3223 as the print preview command.
3225 Geany also provides an alternative basic printing support using a custom
3226 print command. However, the printed document contains no syntax highlighting.
3227 You can adjust the command to which the filename is passed in the preferences
3228 dialog. The default command is::
3230     % lpr %f
3232 ``%f`` will be substituted by the filename of the current file. Geany
3233 will not show errors from the command itself, so you should make
3234 sure that it works before(e.g. by trying to execute it from the
3235 command line).
3237 A nicer example, which many prefer is::
3239     % a2ps -1 --medium=A4 -o - %f | xfprint4
3241 But this depends on a2ps and xfprint4. As a replacement for xfprint4,
3242 gtklp or similar programs can be used.
3246 Plugins
3247 -------
3249 Plugins are loaded at startup, if the *Enable plugin support*
3250 general preference is set. There is also a command-line option,
3251 ``-p``, which prevents plugins being loaded. Plugins are scanned in
3252 the following directories:
3254 * ``$prefix/lib/geany`` on Unix-like systems (see `Installation prefix`_)
3255 * The ``lib`` subfolder of the installation path on Windows.
3256 * The ``plugins`` subfolder of the user configuration directory - see
3257   `Configuration file paths`_.
3258 * The `Extra plugin path` preference (usually blank) - see `Paths`_.
3260 Most plugins add menu items to the *Tools* menu when they are loaded.
3262 See also `Plugin documentation`_ for information about single plugins
3263 which are included in Geany.
3265 Plugin manager
3266 ^^^^^^^^^^^^^^
3267 The Plugin Manager dialog lets you choose which plugins
3268 should be loaded at startup. You can also load and unload plugins on the
3269 fly using this dialog. Once you click the checkbox for a specific plugin
3270 in the dialog, it is loaded or unloaded according to its previous state.
3271 By default, no plugins are loaded at startup until you select some.
3272 You can also configure some plugin specific options if the plugin
3273 provides any.
3276 Keybindings
3277 -----------
3279 Geany supports the default keyboard shortcuts for the Scintilla
3280 editing widget. For a list of these commands, see `Scintilla
3281 keyboard commands`_. The Scintilla keyboard shortcuts will be overridden
3282 by any custom keybindings with the same keyboard shortcut.
3285 Switching documents
3286 ^^^^^^^^^^^^^^^^^^^
3288 There are some non-configurable bindings to switch between documents,
3289 listed below. These can also be overridden by custom keybindings.
3291 =============== ==================================
3292 Key             Action
3293 =============== ==================================
3294 Alt-[1-9]       Select left-most tab, from 1 to 9.
3295 Alt-0           Select right-most tab.
3296 =============== ==================================
3298 See also `Notebook tab keybindings`_.
3301 Configurable keybindings
3302 ^^^^^^^^^^^^^^^^^^^^^^^^
3304 For all actions listed below you can define your own keybindings. Open
3305 the Preferences dialog, select the desired action and click on
3306 change. In the resulting dialog you can press the key combination you
3307 want to assign to the action and it will be saved when you press OK.
3308 You can define only one key combination for each action and each key
3309 combination can only be defined for one action.
3311 The following tables list all customizable keyboard shortcuts, those
3312 which are common to many applications are marked with (C) after the
3313 shortcut.
3315 File keybindings
3316 ````````````````
3317 =============================== ========================= ==================================================
3318 Action                          Default shortcut          Description
3319 =============================== ========================= ==================================================
3320 New                             Ctrl-N  (C)               Creates a new file.
3322 Open                            Ctrl-O  (C)               Opens a file.
3324 Open selected file              Ctrl-Shift-O              Opens the selected filename.
3326 Re-open last closed tab                                   Re-opens the last closed document tab.
3328 Save                            Ctrl-S  (C)               Saves the current file.
3330 Save As                                                   Saves the current file under a new name.
3332 Save all                        Ctrl-Shift-S              Saves all open files.
3334 Close all                       Ctrl-Shift-W              Closes all open files.
3336 Close                           Ctrl-W  (C)               Closes the current file.
3338 Reload file                     Ctrl-R  (C)               Reloads the current file.
3340 Print                           Ctrl-P  (C)               Prints the current file.
3342 Quit                            Ctrl-Q  (C)               Quits Geany.
3343 =============================== ========================= ==================================================
3346 Editor keybindings
3347 ``````````````````
3348 =============================== ========================= ==================================================
3349 Action                          Default shortcut          Description
3350 =============================== ========================= ==================================================
3351 Undo                            Ctrl-Z  (C)               Un-does the last action.
3353 Redo                            Ctrl-Y                    Re-does the last action.
3355 Delete current line(s)          Ctrl-K                    Deletes the current line (and any lines with a
3356                                                           selection).
3358 Delete to line end              Ctrl-Shift-Delete         Deletes from the current caret position to the
3359                                                           end of the current line.
3361 Delete to line start            Ctrl-Shift-BackSpace      Deletes from the beginning of the line to the
3362                                                           current caret position.
3364 Duplicate line or selection     Ctrl-D                    Duplicates the current line or selection.
3366 Transpose current line                                    Transposes the current line with the previous one.
3368 Scroll to current line          Ctrl-Shift-L              Scrolls the current line into the centre of the
3369                                                           view. The cursor position and or an existing
3370                                                           selection will not be changed.
3372 Scroll up by one line           Alt-Up                    Scrolls the view.
3374 Scroll down by one line         Alt-Down                  Scrolls the view.
3376 Complete word                   Ctrl-Space                Shows the autocompletion list. If already showing
3377                                                           symbol completion, it shows document word completion
3378                                                           instead, even if it is not enabled for automatic
3379                                                           completion. Likewise if no symbol suggestions are
3380                                                           available, it shows document word completion.
3382 Show calltip                    Ctrl-Shift-Space          Shows a calltip for the current function or
3383                                                           method.
3385 Complete snippet                Tab                       If you type a construct like if or for and press
3386                                                           this key, it will be completed with a matching
3387                                                           template.
3389 Suppress snippet completion                               If you type a construct like if or for and press
3390                                                           this key, it will not be completed, and a space or
3391                                                           tab will be inserted, depending on what the
3392                                                           construct completion keybinding is set to. For
3393                                                           example, if you have set the construct completion
3394                                                           keybinding to space, then setting this to
3395                                                           Shift+space will prevent construct completion and
3396                                                           insert a space.
3398 Context Action                                            Executes a command and passes the current word
3399                                                           (near the cursor position) or selection as an
3400                                                           argument. See the section called `Context
3401                                                           actions`_.
3403 Move cursor in snippet                                    Jumps to the next defined cursor positions in a
3404                                                           completed snippets if multiple cursor positions
3405                                                           where defined.
3407 Word part completion            Tab                       When the autocompletion list is visible, complete
3408                                                           the currently selected item up to the next word
3409                                                           part.
3411 Move line(s) up                 Alt-PageUp                Move the current line or selected lines up by
3412                                                           one line.
3414 Move line(s) down               Alt-PageDown              Move the current line or selected lines down by
3415                                                           one line.
3416 =============================== ========================= ==================================================
3419 Clipboard keybindings
3420 `````````````````````
3421 =============================== ========================= ==================================================
3422 Action                          Default shortcut          Description
3423 =============================== ========================= ==================================================
3424 Cut                             Ctrl-X  (C)               Cut the current selection to the clipboard.
3426 Copy                            Ctrl-C  (C)               Copy the current selection to the clipboard.
3428 Paste                           Ctrl-V  (C)               Paste the clipboard text into the current document.
3430 Cut current line(s)             Ctrl-Shift-X              Cuts the current line (and any lines with a
3431                                                           selection) to the clipboard.
3433 Copy current line(s)            Ctrl-Shift-C              Copies the current line (and any lines with a
3434                                                           selection) to the clipboard.
3435 =============================== ========================= ==================================================
3438 Select keybindings
3439 ``````````````````
3440 =============================== ========================= ==================================================
3441 Action                          Default shortcut          Description
3442 =============================== ========================= ==================================================
3443 Select all                      Ctrl-A  (C)               Makes a selection of all text in the current
3444                                                           document.
3446 Select current word             Alt-Shift-W               Selects the current word under the cursor.
3448 Select current paragraph        Alt-Shift-P               Selects the current paragraph under the cursor
3449                                                           which is defined by two empty lines around it.
3451 Select current line(s)          Alt-Shift-L               Selects the current line under the cursor (and any
3452                                                           partially selected lines).
3454 Select to previous word part                              (Extend) selection to previous word part boundary.
3456 Select to next word part                                  (Extend) selection to next word part boundary.
3457 =============================== ========================= ==================================================
3460 Insert keybindings
3461 ``````````````````
3462 =============================== ========================= ==================================================
3463 Action                          Default shortcut          Description
3464 =============================== ========================= ==================================================
3465 Insert date                     Shift-Alt-D               Inserts a customisable date.
3467 Insert alternative whitespace                             Inserts a tab character when spaces should
3468                                                           be used for indentation and inserts space
3469                                                           characters of the amount of a tab width when
3470                                                           tabs should be used for indentation.
3472 Insert New Line Before Current                            Inserts a new line with indentation.
3474 Insert New Line After Current                             Inserts a new line with indentation.
3475 =============================== ========================= ==================================================
3478 Format keybindings
3479 ``````````````````
3480 =============================== ========================= ==================================================
3481 Action                          Default shortcut          Description
3482 =============================== ========================= ==================================================
3483 Toggle case of selection        Ctrl-Alt-U                Changes the case of the selection. A lowercase
3484                                                           selection will be changed into uppercase and vice
3485                                                           versa. If the selection contains lower- and
3486                                                           uppercase characters, all will be converted to
3487                                                           lowercase.
3489 Comment line                                              Comments current line or selection.
3491 Uncomment line                                            Uncomments current line or selection.
3493 Toggle line commentation        Ctrl-E                    Comments a line if it is not commented or removes
3494                                                           a comment if the line is commented.
3496 Increase indent                 Ctrl-I                    Indents the current line or selection by one tab
3497                                                           or with spaces in the amount of the tab width
3498                                                           setting.
3500 Decrease indent                 Ctrl-U                    Removes one tab or the amount of spaces of
3501                                                           the tab width setting from the indentation of the
3502                                                           current line or selection.
3504 Increase indent by one space                              Indents the current line or selection by one
3505                                                           space.
3507 Decrease indent by one space                              Deindents the current line or selection by one
3508                                                           space.
3510 Smart line indent                                         Indents the current line or all selected lines
3511                                                           with the same indentation as the previous line.
3513 Send to Custom Command 1 (2,3)  Ctrl-1 (2,3)              Passes the current selection to a configured
3514                                                           external command (available for the first
3515                                                           9 configured commands, see
3516                                                           `Sending text through custom commands`_ for
3517                                                           details).
3519 Send Selection to Terminal                                Sends the current selection or the current
3520                                                           line (if there is no selection) to the
3521                                                           embedded Terminal (VTE).
3523 Reflow lines/block                                        Reformat selected lines or current
3524                                                           (indented) text block,
3525                                                           breaking lines at the long line marker or the
3526                                                           line breaking column if line breaking is
3527                                                           enabled for the current document.
3528 =============================== ========================= ==================================================
3531 Settings keybindings
3532 ````````````````````
3533 =============================== ========================= ==================================================
3534 Action                          Default shortcut          Description
3535 =============================== ========================= ==================================================
3536 Preferences                     Ctrl-Alt-P                Opens preferences dialog.
3538 Plugin Preferences                                        Opens plugin preferences dialog.
3539 =============================== ========================= ==================================================
3542 Search keybindings
3543 ``````````````````
3544 =============================== ========================= ==================================================
3545 Action                          Default shortcut          Description
3546 =============================== ========================= ==================================================
3547 Find                            Ctrl-F  (C)               Opens the Find dialog.
3549 Find Next                       Ctrl-G                    Finds next result.
3551 Find Previous                   Ctrl-Shift-G              Finds previous result.
3553 Find Next Selection                                       Finds next occurrence of selected text.
3555 Find Previous Selection                                   Finds previous occurrence of selected text.
3557 Replace                         Ctrl-H  (C)               Opens the Replace dialog.
3559 Find in files                   Ctrl-Shift-F              Opens the Find in files dialog.
3561 Next message                                              Jumps to the line with the next message in
3562                                                           the Messages window.
3564 Previous message                                          Jumps to the line with the previous message
3565                                                           in the Messages window.
3567 Find Usage                      Ctrl-Shift-E              Finds all occurrences of the current word
3568                                                           or selection (see note below) in all open
3569                                                           documents and displays them in the messages
3570                                                           window.
3572 Find Document Usage             Ctrl-Shift-D              Finds all occurrences of the current word
3573                                                           or selection (see note below) in the current
3574                                                           document and displays them in the messages
3575                                                           window.
3577 Mark All                        Ctrl-Shift-M              Highlight all matches of the current
3578                                                           word/selection (see note below) in the current
3579                                                           document with a colored box. If there's nothing
3580                                                           to find, or the cursor is next to an existing
3581                                                           match, the highlighted matches will be cleared.
3582 =============================== ========================= ==================================================
3584 .. note::
3585     The keybindings marked "see note below" work like this: if no text is
3586     selected, the word under cursor is used, and *it has to match fully*
3587     (like when `Match only a whole word` is enabled in the Search dialog).
3588     However if some text is selected, then it is matched regardless of
3589     word boundaries.
3592 Go to keybindings
3593 `````````````````
3594 =============================== ========================= ==================================================
3595 Action                          Default shortcut          Description
3596 =============================== ========================= ==================================================
3597 Navigate forward a location     Alt-Right  (C)            Switches to the next location in the navigation
3598                                                           history. See the section called `Code Navigation
3599                                                           History`_.
3601 Navigate back a location        Alt-Left  (C)             Switches to the previous location in the
3602                                                           navigation history. See the section called
3603                                                           `Code navigation history`_.
3605 Go to line                      Ctrl-L                    Focuses the Go to Line entry (if visible) or
3606                                                           shows the Go to line dialog.
3608 Goto matching brace             Ctrl-B                    If the cursor is ahead or behind a brace, then it
3609                                                           is moved to the brace which belongs to the current
3610                                                           one. If this keyboard shortcut is pressed again,
3611                                                           the cursor is moved back to the first brace.
3613 Toggle marker                   Ctrl-M                    Set a marker on the current line, or clear the
3614                                                           marker if there already is one.
3616 Goto next marker                Ctrl-.                    Goto the next marker in the current document.
3618 Goto previous marker            Ctrl-,                    Goto the previous marker in the current document.
3620 Go to symbol definition         Ctrl-T                    Jump to the definition of the current word or
3621                                                           selection. See `Go to symbol definition`_.
3623 Go to symbol declaration        Ctrl-Shift-T              Jump to the declaration of the current word or
3624                                                           selection. See `Go to symbol declaration`_.
3626 Go to Start of Line             Home                      Move the caret to the start of the line.
3627                                                           Behaves differently if smart_home_key_ is set.
3629 Go to End of Line               End                       Move the caret to the end of the line.
3631 Go to Start of Display Line     Alt-Home                  Move the caret to the start of the display line.
3632                                                           This is useful when you use line wrapping and
3633                                                           want to jump to the start of the wrapped, virtual
3634                                                           line, not the real start of the whole line.
3635                                                           If the line is not wrapped, it behaves like
3636                                                           `Go to Start of Line`.
3638 Go to End of Display Line       Alt-End                   Move the caret to the end of the display line.
3639                                                           If the line is not wrapped, it behaves like
3640                                                           `Go to End of Line`.
3642 Go to Previous Word Part        Ctrl-/                    Goto the previous part of the current word.
3644 Go to Next Word Part            Ctrl-\\                   Goto the next part of the current word.
3645 =============================== ========================= ==================================================
3647 View keybindings
3648 ````````````````
3649 =============================== ========================= ==================================================
3650 Action                          Default shortcut          Description
3651 =============================== ========================= ==================================================
3652 Fullscreen                      F11  (C)                  Switches to fullscreen mode.
3654 Toggle Messages Window                                    Toggles the message window (status and compiler
3655                                                           messages) on and off.
3657 Toggle Sidebar                                            Shows or hides the sidebar.
3659 Toggle all additional widgets                             Hide and show all additional widgets like the
3660                                                           notebook tabs, the toolbar, the messages window
3661                                                           and the status bar.
3663 Zoom In                         Ctrl-+  (C)               Zooms in the text.
3665 Zoom Out                        Ctrl--  (C)               Zooms out the text.
3667 Zoom Reset                      Ctrl-0                    Reset any previous zoom on the text.
3668 =============================== ========================= ==================================================
3670 Focus keybindings
3671 `````````````````
3672 ================================ ========================= ==================================================
3673 Action                           Default shortcut          Description
3674 ================================ ========================= ==================================================
3675 Switch to Editor                 F2                        Switches to editor widget.
3676                                                            Also reshows the document statistics line
3677                                                            (after a short timeout).
3679 Switch to Search Bar             F7                        Switches to the search bar in the toolbar (if
3680                                                            visible).
3682 Switch to Message Window                                   Focus the Message Window's current tab.
3684 Switch to Compiler                                         Focus the Compiler message window tab.
3686 Switch to Messages                                         Focus the Messages message window tab.
3688 Switch to Scribble               F6                        Switches to scribble widget.
3690 Switch to VTE                    F4                        Switches to VTE widget.
3692 Switch to Sidebar                                          Focus the Sidebar.
3694 Switch to Sidebar Symbol List                              Focus the Symbol list tab in the Sidebar
3695                                                            (if visible).
3697 Switch to Sidebar Document List                            Focus the Document list tab in the Sidebar
3698                                                            (if visible).
3699 ================================ ========================= ==================================================
3702 Notebook tab keybindings
3703 ````````````````````````
3704 =============================== ========================= ==================================================
3705 Action                          Default shortcut          Description
3706 =============================== ========================= ==================================================
3707 Switch to left document         Ctrl-PageUp   (C)         Switches to the previous open document.
3709 Switch to right document        Ctrl-PageDown (C)         Switches to the next open document.
3711 Switch to last used document    Ctrl-Tab                  Switches to the previously shown document (if it's
3712                                                           still open).
3713                                                           Holding Ctrl (or another modifier if the keybinding
3714                                                           has been changed) will show a dialog, then repeated
3715                                                           presses of the keybinding will switch to the 2nd-last
3716                                                           used document, 3rd-last, etc. Also known as
3717                                                           Most-Recently-Used documents switching.
3719 Move document left              Ctrl-Shift-PageUp         Changes the current document with the left hand
3720                                                           one.
3722 Move document right             Ctrl-Shift-PageDown       Changes the current document with the right hand
3723                                                           one.
3725 Move document first                                       Moves the current document to the first position.
3727 Move document last                                        Moves the current document to the last position.
3728 =============================== ========================= ==================================================
3731 Document keybindings
3732 ````````````````````
3733 ==================================== ==================== ==================================================
3734 Action                               Default shortcut     Description
3735 ==================================== ==================== ==================================================
3736 Clone                                                     See `Cloning documents`_.
3738 Replace tabs with space                                   Replaces all tabs with the right amount of spaces
3739                                                           in the whole document, or the current selection.
3741 Replace spaces with tabs                                  Replaces leading spaces with tab characters in the
3742                                                           whole document, or the current selection.
3744 Toggle current fold                                       Toggles the folding state of the current code block.
3746 Fold all                                                  Folds all contractible code blocks.
3748 Unfold all                                                Unfolds all contracted code blocks.
3750 Reload symbol list                   Ctrl-Shift-R         Reloads the symbol list.
3752 Toggle Line wrapping                                      Enables or disables wrapping of long lines.
3754 Toggle Line breaking                                      Enables or disables automatic breaking of long
3755                                                           lines at a configurable column.
3757 Remove Markers                                            Remove any markers on lines or words which
3758                                                           were set by using 'Mark All' in the
3759                                                           search dialog or by manually marking lines.
3761 Remove Error Indicators                                   Remove any error indicators in the
3762                                                           current document.
3764 Remove Markers and Error Indicators                       Combines ``Remove Markers`` and
3765                                                           ``Remove Error Indicators``.
3766 ==================================== ==================== ==================================================
3769 Project keybindings
3770 ```````````````````
3771 =============================== ========================= ==================================================
3772 Action                          Default shortcut          Description
3773 =============================== ========================= ==================================================
3774 New                                                       Create a new project.
3775 Open                                                      Opens a project file.
3776 Properties                                                Shows project properties.
3777 Close                                                     Close the current project.
3778 =============================== ========================= ==================================================
3781 Build keybindings
3782 `````````````````
3783 =============================== ========================= ==================================================
3784 Action                          Default shortcut          Description
3785 =============================== ========================= ==================================================
3786 Compile                         F8                        Compiles the current file.
3788 Build                           F9                        Builds (compiles if necessary and links) the
3789                                                           current file.
3791 Make all                        Shift-F9                  Builds the current file with the Make tool.
3793 Make custom target              Ctrl-Shift-F9             Builds the current file with the Make tool and a
3794                                                           given target.
3796 Make object                     Shift-F8                  Compiles the current file with the Make tool.
3798 Next error                                                Jumps to the line with the next error from the
3799                                                           last build process.
3801 Previous error                                            Jumps to the line with the previous error from
3802                                                           the last build process.
3804 Run                             F5                        Executes the current file in a terminal emulation.
3806 Set Build Commands                                        Opens the build commands dialog.
3807 =============================== ========================= ==================================================
3810 Tools keybindings
3811 `````````````````
3812 =============================== ========================= ==================================================
3813 Action                          Default shortcut          Description
3814 =============================== ========================= ==================================================
3815 Show Color Chooser                                        Opens the Color Chooser dialog.
3816 =============================== ========================= ==================================================
3819 Help keybindings
3820 ````````````````
3821 =============================== ========================= ==================================================
3822 Action                          Default shortcut          Description
3823 =============================== ========================= ==================================================
3824 Help                            F1 (C)                       Opens the manual.
3825 =============================== ========================= ==================================================
3830 Configuration files
3831 ===================
3832 .. warning::
3833     You must use UTF-8 encoding *without BOM* for configuration files.
3836 Configuration file paths
3837 ------------------------
3838 Geany has default configuration files installed for the system and
3839 also per-user configuration files.
3841 The system files should not normally be edited because they will be
3842 overwritten when upgrading Geany.
3844 The user configuration directory can be overridden with the ``-c``
3845 switch, but this is not normally done. See `Command line options`_.
3847 .. note::
3848     Any missing subdirectories in the user configuration directory
3849     will be created when Geany starts.
3851 You can check the paths Geany is using with *Help->Debug Messages*.
3852 Near the top there should be 2 lines with something like::
3854     Geany-INFO: System data dir: /usr/share/geany
3855     Geany-INFO: User config dir: /home/username/.config/geany
3858 Paths on Unix-like systems
3859 ^^^^^^^^^^^^^^^^^^^^^^^^^^
3860 The system path is ``$prefix/share/geany``, where ``$prefix`` is the
3861 path where Geany is installed (see `Installation prefix`_).
3863 The user configuration directory is normally:
3864 ``/home/username/.config/geany``
3866 Paths on Windows
3867 ^^^^^^^^^^^^^^^^
3868 The system path is the ``data`` subfolder of the installation path
3869 on Windows.
3871 The user configuration directory might vary, but on Windows XP it's:
3872 ``C:\Documents and Settings\UserName\Application Data\geany``
3873 On Windows 7 and above you most likely will find it at:
3874 ``C:\users\UserName\Roaming\geany``
3877 Tools menu items
3878 ----------------
3879 There's a *Configuration files* submenu in the *Tools* menu that
3880 contains items for some of the available user configuration files.
3881 Clicking on one opens it in the editor for you to update. Geany will
3882 reload the file after you have saved it.
3884 .. note::
3885     Other configuration files not shown here will need to be opened
3886     manually, and will not be automatically reloaded when saved.
3887     (see *Reload Configuration* below).
3889 There's also a *Reload Configuration* item which can be used if you
3890 updated one of the other configuration files, or modified or added
3891 template files.
3893 *Reload Configuration* is also necessary to update syntax highlighting colors.
3895 .. note::
3896     Syntax highlighting colors aren't updated in open documents after
3897     saving filetypes.common as this may take a significant
3898     amount of time.
3901 Global configuration file
3902 -------------------------
3904 System administrators can add a global configuration file for Geany
3905 which will be used when starting Geany and a user configuration file
3906 does not exist.
3908 The global configuration file is read from ``geany.conf`` in the
3909 system configuration path - see `Configuration file paths`_. It can
3910 contain any settings which are found in the usual configuration file
3911 created by Geany, but does not have to contain all settings.
3913 .. note::
3914     This feature is mainly intended for package maintainers or system
3915     admins who want to set up Geany in a multi user environment and
3916     set some sane default values for this environment. Usually users won't
3917     need to do that.
3921 Filetype definition files
3922 -------------------------
3924 All color definitions and other filetype specific settings are
3925 stored in the filetype definition files. Those settings are colors
3926 for syntax highlighting, general settings like comment characters or
3927 word delimiter characters as well as compiler and linker settings.
3929 See also `Configuration file paths`_.
3931 Filenames
3932 ^^^^^^^^^
3933 Each filetype has a corresponding filetype definition file. The format
3934 for built-in filetype `Foo` is::
3936     filetypes.foo
3938 The extension is normally just the filetype name in lower case.
3940 However there are some exceptions:
3942 =============== =========
3943 Filetype        Extension
3944 =============== =========
3945 C++             cpp
3946 C#              cs
3947 Make            makefile
3948 Matlab/Octave   matlab
3949 =============== =========
3951 There is also the `special file filetypes.common`_.
3953 For `custom filetypes`_, the filename for `Foo` is different::
3955     filetypes.Foo.conf
3957 See the link for details.
3959 System files
3960 ^^^^^^^^^^^^
3961 The system-wide filetype configuration files can be found in the
3962 system configuration path and are called ``filetypes.$ext``,
3963 where $ext is the name of the filetype. For every
3964 filetype there is a corresponding definition file. There is one
3965 exception: ``filetypes.common`` -- this file is for general settings,
3966 which are not specific to a certain filetype.
3968 .. warning::
3969     It is not recommended that users edit the system-wide files,
3970     because they will be overridden when Geany is updated.
3972 User files
3973 ^^^^^^^^^^
3974 To change the settings, copy a file from the system configuration
3975 path to the subdirectory ``filedefs`` in your user configuration
3976 directory. Then you can edit the file and the changes will still be
3977 available after an update of Geany.
3979 Alternatively, you can create the file yourself and add only the
3980 settings you want to change. All missing settings will be read from
3981 the corresponding system configuration file.
3983 Custom filetypes
3984 ^^^^^^^^^^^^^^^^
3985 At startup Geany looks for ``filetypes.*.conf`` files in the system and
3986 user filetype paths, adding any filetypes found with the name matching
3987 the '``*``' wildcard - e.g. ``filetypes.Bar.conf``.
3989 Custom filetypes are not as powerful as built-in filetypes, but
3990 support for the following has been implemented:
3992 * Recognizing and setting the filetype (after the user has manually updated
3993   the `filetype extensions`_ file).
3994 * `Filetype group membership`_.
3995 * Reading filetype settings in the ``[settings]`` section, including:
3996     * Using an existing syntax highlighting lexer (`lexer_filetype`_ key).
3997     * Using an existing tags parser (`tag_parser`_ key).
3998 * Build commands (``[build-menu]`` section).
3999 * Loading global tags files (sharing the ``tag_parser`` filetype's namespace).
4001 See `Filetype configuration`_ for details on each setting.
4003 Creating a custom filetype from an existing filetype
4004 ````````````````````````````````````````````````````
4005 Because most filetype settings will relate to the syntax
4006 highlighting (e.g. styling, keywords, ``lexer_properties``
4007 sections), it is best to copy an existing filetype file that uses
4008 the lexer you wish to use as the basis of a custom filetype, using
4009 the correct filename extension format shown above, e.g.::
4011     cp filetypes.foo filetypes.Bar.conf
4013 Then add the ``lexer_filetype=Foo`` setting (if not already present)
4014 and add/adjust other settings.
4016 .. warning::
4017     The ``[styling]`` and ``[keywords]`` sections have key names
4018     specific to each filetype/lexer. You must follow the same
4019     names - in particular, some lexers only support one keyword
4020     list, or none.
4023 Filetype configuration
4024 ^^^^^^^^^^^^^^^^^^^^^^
4026 As well as the sections listed below, each filetype file can contain
4027 a [build-menu] section as described in `[build-menu] section`_.
4029 [styling] section
4030 `````````````````
4032 In this section the colors for syntax highlighting are defined. The
4033 manual format is:
4035 * ``key=foreground_color;background_color;bold_flag;italic_flag``
4037 Colors have to be specified as RGB hex values prefixed by
4038 0x or # similar to HTML/CSS hex triplets. For example, all of the following
4039 are valid values for pure red; 0xff0000, 0xf00, #ff0000, or #f00.  The
4040 values are case-insensitive but it is a good idea to use lower-case.
4041 Note that you can also use *named colors* as well by substituting the
4042 color value with the name of a color as defined in the ``[named_colors]``
4043 section, see the `[named_colors] Section`_ for more information.
4045 Bold and italic are flags and should only be "true" or "false". If their
4046 value is something other than "true" or "false", "false" is assumed.
4048 You can omit fields to use the values from the style named ``"default"``.
4050 E.g. ``key=0xff0000;;true``
4052 This makes the key style have red foreground text, default background
4053 color text and bold emphasis.
4055 Using a named style
4056 *******************
4057 The second format uses a *named style* name to reference a style
4058 defined in filetypes.common.
4060 * ``key=named_style``
4061 * ``key2=named_style2,bold,italic``
4063 The bold and italic parts are optional, and if present are used to
4064 toggle the bold or italic flags to the opposite of the named style's
4065 flags. In contrast to style definition booleans, they are a literal
4066 ",bold,italic" and commas are used instead of semi-colons.
4068 E.g. ``key=comment,italic``
4070 This makes the key style match the ``"comment"`` named style, but with
4071 italic emphasis.
4073 To define named styles, see the filetypes.common `[named_styles]
4074 Section`_.
4076 Reading styles from another filetype
4077 ************************************
4078 You can automatically copy all of the styles from another filetype
4079 definition file by using the following syntax for the ``[styling]``
4080 group::
4082         [styling=Foo]
4084 Where Foo is a filetype name. The corresponding ``[styling]``
4085 section from ``filetypes.foo`` will be read.
4087 This is useful when the same lexer is being used for multiple
4088 filetypes (e.g. C/C++/C#/Java/etc).  For example, to make the C++
4089 styling the same as the C styling, you would put the following in
4090 ``filetypes.cpp``::
4092         [styling=C]
4095 [keywords] section
4096 ``````````````````
4098 This section contains keys for different keyword lists specific to
4099 the filetype. Some filetypes do not support keywords, so adding a
4100 new key will not work. You can only add or remove keywords to/from
4101 an existing list.
4103 .. important::
4104     The keywords list must be in one line without line ending characters.
4107 [lexer_properties] section
4108 ``````````````````````````
4109 Here any special properties for the Scintilla lexer can be set in the
4110 format ``key.name.field=some.value``.
4112 Properties Geany uses are listed in the system filetype files. To find
4113 other properties you need Geany's source code::
4115     egrep -o 'GetProperty\w*\("([^"]+)"[^)]+\)' scintilla/Lex*.cxx
4118 [settings] section
4119 ``````````````````
4121 extension
4122     This is the default file extension used when saving files, not
4123     including the period character (``.``). The extension used should
4124     match one of the patterns associated with that filetype (see
4125     `Filetype extensions`_).
4127     *Example:* ``extension=cxx``
4129 wordchars
4130     These characters define word boundaries when making selections
4131     and searching using word matching options.
4133     *Example:* (look at system filetypes.\* files)
4135     .. note::
4136         This overrides the *wordchars* filetypes.common setting, and
4137         has precedence over the *whitespace_chars* setting.
4139 comment_single
4140     A character or string which is used to comment code. If you want to use
4141     multiline comments only, don't set this but rather comment_open and
4142     comment_close.
4144     Single-line comments are used in priority over multiline comments to
4145     comment a line, e.g. with the `Comment/Uncomment line` command.
4147     *Example:* ``comment_single=//``
4149 comment_open
4150     A character or string which is used to comment code. You need to also
4151     set comment_close to really use multiline comments. If you want to use
4152     single-line comments, prefer setting comment_single.
4154     Multiline comments are used in priority over single-line comments to
4155     comment a block, e.g. template comments.
4157     *Example:* ``comment_open=/*``
4159 comment_close
4160     If multiline comments are used, this is the character or string to
4161     close the comment.
4163     *Example:* ``comment_close=*/``
4165 comment_use_indent
4166     Set this to false if a comment character or string should start at
4167     column 0 of a line. If set to true it uses any indentation of the
4168     line.
4170     Note: Comment indentation
4172     ``comment_use_indent=true`` would generate this if a line is
4173     commented (e.g. with Ctrl-D)::
4175         #command_example();
4177     ``comment_use_indent=false`` would generate this if a line is
4178     commented (e.g. with Ctrl-D)::
4180         #   command_example();
4183     Note: This setting only works for single line comments (like '//',
4184     '#' or ';').
4186     *Example:* ``comment_use_indent=true``
4188 context_action_cmd
4189     A command which can be executed on the current word or the current
4190     selection.
4192     Example usage: Open the API documentation for the
4193     current function call at the cursor position.
4195     The command can
4196     be set for every filetype or if not set, a global command will
4197     be used. The command itself can be specified without the full
4198     path, then it is searched in $PATH. But for security reasons,
4199     it is recommended to specify the full path to the command. The
4200     wildcard %s will be replaced by the current word at the cursor
4201     position or by the current selection.
4203     Hint: for PHP files the following could be quite useful:
4204     context_action_cmd=firefox "http://www.php.net/%s"
4206     *Example:* ``context_action_cmd=devhelp -s "%s"``
4208 .. _tag_parser:
4210 tag_parser
4211     The TagManager language name, e.g. "C". Usually the same as the
4212     filetype name.
4214 .. _lexer_filetype:
4216 lexer_filetype
4217     A filetype name to setup syntax highlighting from another filetype.
4218     This must not be recursive, i.e. it should be a filetype name that
4219     doesn't use the *lexer_filetype* key itself, e.g.::
4221         lexer_filetype=C
4222         #lexer_filetype=C++
4224     The second line is wrong, because ``filetypes.cpp`` itself uses
4225     ``lexer_filetype=C``, which would be recursive.
4227 symbol_list_sort_mode
4228     What the default symbol list sort order should be.
4230     =====   ========================================
4231     Value   Meaning
4232     =====   ========================================
4233     0       Sort symbols by name
4234     1       Sort symbols by appearance (line number)
4235     =====   ========================================
4237 .. _xml_indent_tags:
4239 xml_indent_tags
4240     If this setting is set to *true*, a new line after a line ending with an
4241     unclosed XML/HTML tag will be automatically indented. This only applies
4242     to filetypes for which the HTML or XML lexer is used. Such filetypes have
4243     this setting in their system configuration files.
4245 mime_type
4246     The MIME type for this file type, e.g. "text/x-csrc".  This is used
4247     for example to chose the icon to display for this file type.
4250 [indentation] section
4251 `````````````````````
4253 This section allows definition of default indentation settings specific to
4254 the file type, overriding the ones configured in the preferences.  This can
4255 be useful for file types requiring specific indentation settings (e.g. tabs
4256 only for Makefile).  These settings don't override auto-detection if activated.
4258 width
4259     The forced indentation width.
4261 type
4262     The forced indentation type.
4264     =====   =======================
4265     Value   Indentation type
4266     =====   =======================
4267     0       Spaces only
4268     1       Tabs only
4269     2       Mixed (tabs and spaces)
4270     =====   =======================
4273 [build_settings] section
4274 ````````````````````````
4276 As of Geany 0.19 this section is supplemented by the `[build-menu] section`_.
4277 Values that are set in the [build-menu] section will override those in this section.
4279 error_regex
4280     This is a Perl-compatible regular expression (PCRE) to parse a filename
4281     (absolute or relative) and line number from the build output.
4282     If undefined, Geany will fall back to its default error message parsing.
4284     Only the first two match groups will be read by Geany. These groups can
4285     occur in any order: the match group consisting of only digits will be used
4286     as the line number, and the other group as the filename.  In no group
4287     consists of only digits, the match will fail.
4289     *Example:* ``error_regex=^(.+):([0-9]+):[0-9]+``
4291     This will parse a message such as:
4292     ``test.py:7:24: E202 whitespace before ']'``
4294 **Build commands**
4296 If any build menu item settings have been configured in the Build Menu Commands
4297 dialog or the Build tab of the project preferences dialog then these
4298 settings are stored in the [build-menu] section and override the settings in
4299 this section for that item.
4301 compiler
4302     This item specifies the command to compile source code files. But
4303     it is also possible to use it with interpreted languages like Perl
4304     or Python. With these filetypes you can use this option as a kind of
4305     syntax parser, which sends output to the compiler message window.
4307     You should quote the filename to also support filenames with
4308     spaces. The following wildcards for filenames are available:
4310     * %f -- complete filename without path
4311     * %e -- filename without path and without extension
4313     *Example:* ``compiler=gcc -Wall -c "%f"``
4315 linker
4316     This item specifies the command to link the file. If the file is not
4317     already compiled, it will be compiled while linking. The -o option
4318     is automatically added by Geany. This item works well with GNU gcc,
4319     but may be problematic with other compilers (esp. with the linker).
4321     *Example:* ``linker=gcc -Wall "%f"``
4323 run_cmd
4324     Use this item to execute your file. It has to have been built
4325     already. Use the %e wildcard to have only the name of the executable
4326     (i.e. without extension) or use the %f wildcard if you need the
4327     complete filename, e.g. for shell scripts.
4329     *Example:* ``run_cmd="./%e"``
4332 Special file filetypes.common
4333 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4335 There is a special filetype definition file called
4336 filetypes.common. This file defines some general non-filetype-specific
4337 settings.
4339 You can open the user filetypes.common with the
4340 *Tools->Configuration Files->filetypes.common* menu item. This adds
4341 the default settings to the user file if the file doesn't exist.
4342 Alternatively the file can be created manually, adding only the
4343 settings you want to change. All missing settings will be read from
4344 the system file.
4346 .. note::
4347     See the `Filetype configuration`_ section for how to define styles.
4350 [named_styles] section
4351 ``````````````````````
4352 Named styles declared here can be used in the [styling] section of any
4353 filetypes.* file.
4355 For example:
4357 *In filetypes.common*::
4359     [named_styles]
4360     foo=0xc00000;0xffffff;false;true
4361     bar=foo
4363 *In filetypes.c*::
4365     [styling]
4366     comment=foo
4368 This saves copying and pasting the whole style definition into several
4369 different files.
4371 .. note::
4372     You can define aliases for named styles, as shown with the ``bar``
4373     entry in the above example, but they must be declared after the
4374     original style.
4377 [named_colors] section
4378 ``````````````````````
4379 Named colors declared here can be used in the ``[styling]`` or
4380 ``[named_styles]`` section of any filetypes.* file or color scheme.
4382 For example::
4384     [named_colors]
4385     my_red_color=#FF0000
4386     my_blue_color=#0000FF
4388     [named_styles]
4389     foo=my_red_color;my_blue_color;false;true
4391 This allows to define a color palette by name so that to change a color
4392 scheme-wide only involves changing the hex value in a single location.
4394 [styling] section
4395 `````````````````
4396 default
4397     This is the default style. It is used for styling files without a
4398     filetype set.
4400     *Example:* ``default=0x000000;0xffffff;false;false``
4402 selection
4403     The style for coloring selected text. The format is:
4405     * Foreground color
4406     * Background color
4407     * Use foreground color
4408     * Use background color
4410     The colors are only set if the 3rd or 4th argument is true. When
4411     the colors are not overridden, the default is a dark grey
4412     background with syntax highlighted foreground text.
4414     *Example:* ``selection=0xc0c0c0;0x00007F;true;true``
4416 brace_good
4417     The style for brace highlighting when a matching brace was found.
4419     *Example:* ``brace_good=0xff0000;0xFFFFFF;true;false``
4421 brace_bad
4422     The style for brace highlighting when no matching brace was found.
4424     *Example:* ``brace_bad=0x0000ff;0xFFFFFF;true;false``
4426 caret
4427     The style for coloring the caret(the blinking cursor). Only first
4428     and third argument is interpreted.
4429     Set the third argument to true to change the caret into a block caret.
4431     *Example:* ``caret=0x000000;0x0;false;false``
4433 caret_width
4434     The width for the caret(the blinking cursor). Only the first
4435     argument is interpreted. The width is specified in pixels with
4436     a maximum of three pixel. Use the width 0 to make the caret
4437     invisible.
4439     *Example:* ``caret_width=3``
4441 current_line
4442     The style for coloring the background of the current line. Only
4443     the second and third arguments are interpreted. The second argument
4444     is the background color. Use the third argument to enable or
4445     disable background highlighting for the current line (has to be
4446     true/false).
4448     *Example:* ``current_line=0x0;0xe5e5e5;true;false``
4450 indent_guide
4451     The style for coloring the indentation guides. Only the first and
4452     second arguments are interpreted.
4454     *Example:* ``indent_guide=0xc0c0c0;0xffffff;false;false``
4456 white_space
4457     The style for coloring the white space if it is shown. The first
4458     both arguments define the foreground and background colors, the
4459     third argument sets whether to use the defined foreground color
4460     or to use the color defined by each filetype for the white space.
4461     The fourth argument defines whether to use the background color.
4463     *Example:* ``white_space=0xc0c0c0;0xffffff;true;true``
4465 margin_linenumber
4466     Line number margin foreground and background colors.
4468 .. _Folding Settings:
4470 margin_folding
4471     Fold margin foreground and background colors.
4473 fold_symbol_highlight
4474     Highlight color of folding symbols.
4476 folding_style
4477     The style of folding icons. Only first and second arguments are
4478     used.
4480     Valid values for the first argument are:
4482     * 1 -- for boxes
4483     * 2 -- for circles
4484     * 3 -- for arrows
4485     * 4 -- for +/-
4487     Valid values for the second argument are:
4489     * 0 -- for no lines
4490     * 1 -- for straight lines
4491     * 2 -- for curved lines
4493     *Default:* ``folding_style=1;1;``
4495     *Arrows:* ``folding_style=3;0;``
4497 folding_horiz_line
4498     Draw a thin horizontal line at the line where text is folded. Only
4499     first argument is used.
4501     Valid values for the first argument are:
4503     * 0 -- disable, do not draw a line
4504     * 1 -- draw the line above folded text
4505     * 2 -- draw the line below folded text
4507     *Example:* ``folding_horiz_line=0;0;false;false``
4509 line_wrap_visuals
4510     First argument: drawing of visual flags to indicate a line is wrapped.
4511     This is a bitmask of the values:
4513     * 0 -- No visual flags
4514     * 1 -- Visual flag at end of subline of a wrapped line
4515     * 2 -- Visual flag at begin of subline of a wrapped line. Subline is
4516       indented by at least 1 to make room for the flag.
4518     Second argument: wether the visual flags to indicate a line is wrapped
4519     are drawn near the border or near the text. This is a bitmask of the values:
4521     * 0 -- Visual flags drawn near border
4522     * 1 -- Visual flag at end of subline drawn near text
4523     * 2 -- Visual flag at begin of subline drawn near text
4525     Only first and second arguments are interpreted.
4527     *Example:* ``line_wrap_visuals=3;0;false;false``
4529 line_wrap_indent
4530     First argument: sets the size of indentation of sublines for wrapped lines
4531     in terms of the width of a space, only used when the second argument is ``0``.
4533     Second argument: wrapped sublines can be indented to the position of their
4534     first subline or one more indent level. Possible values:
4536     * 0 - Wrapped sublines aligned to left of window plus amount set by the first argument
4537     * 1 - Wrapped sublines are aligned to first subline indent (use the same indentation)
4538     * 2 - Wrapped sublines are aligned to first subline indent plus one more level of indentation
4540     Only first and second arguments are interpreted.
4542     *Example:* ``line_wrap_indent=0;1;false;false``
4544 translucency
4545     Translucency for the current line (first argument) and the selection
4546     (second argument). Values between 0 and 256 are accepted.
4548     Note for Windows 95, 98 and ME users:
4549     keep this value at 256 to disable translucency otherwise Geany might crash.
4551     Only the first and second arguments are interpreted.
4553     *Example:* ``translucency=256;256;false;false``
4555 marker_line
4556     The style for a highlighted line (e.g when using Goto line or goto symbol).
4557     The foreground color (first argument) is only used when the Markers margin
4558     is enabled (see View menu).
4560     Only the first and second arguments are interpreted.
4562     *Example:* ``marker_line=0x000000;0xffff00;false;false``
4564 marker_search
4565     The style for a marked search results (when using "Mark" in Search dialogs).
4566     The second argument sets the background color for the drawn rectangle.
4568     Only the second argument is interpreted.
4570     *Example:* ``marker_search=0x000000;0xb8f4b8;false;false``
4572 marker_mark
4573     The style for a marked line (e.g when using the "Toggle Marker" keybinding
4574     (Ctrl-M)). The foreground color (first argument) is only used
4575     when the Markers margin is enabled (see View menu).
4577     Only the first and second arguments are interpreted.
4579     *Example:* ``marker_mark=0x000000;0xb8f4b8;false;false``
4581 marker_translucency
4582     Translucency for the line marker (first argument) and the search marker
4583     (second argument). Values between 0 and 256 are accepted.
4585     Note for Windows 95, 98 and ME users:
4586     keep this value at 256 to disable translucency otherwise Geany might crash.
4588     Only the first and second arguments are interpreted.
4590     *Example:* ``marker_translucency=256;256;false;false``
4592 line_height
4593     Amount of space to be drawn above and below the line's baseline.
4594     The first argument defines the amount of space to be drawn above the line, the second
4595     argument defines the amount of space to be drawn below.
4597     Only the first and second arguments are interpreted.
4599     *Example:* ``line_height=0;0;false;false``
4601 calltips
4602     The style for coloring the calltips. The first two arguments
4603     define the foreground and background colors, the third and fourth
4604     arguments set whether to use the defined colors.
4606     *Example:* ``calltips=0xc0c0c0;0xffffff;false;false``
4608 indicator_error
4609     The color of the error indicator.
4611     Only the first argument (foreground color) is used.
4613     *Example:* ``indicator_error=0xff0000``
4616 [settings] section
4617 ``````````````````
4618 whitespace_chars
4619     Characters to treat as whitespace. These characters are ignored
4620     when moving, selecting and deleting across word boundaries
4621     (see `Scintilla keyboard commands`_).
4623     This should include space (\\s) and tab (\\t).
4625     *Example:* ``whitespace_chars=\s\t!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~``
4627 wordchars
4628     These characters define word boundaries when making selections
4629     and searching using word matching options.
4631     *Example:* ``wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789``
4633     .. note::
4634         This has precedence over the *whitespace_chars* setting.
4638 Filetype extensions
4639 -------------------
4641 .. note::
4642     To change the default filetype extension used when saving a new file,
4643     see `Filetype definition files`_.
4645 You can override the list of file extensions that Geany uses to detect
4646 filetypes using the user ``filetype_extensions.conf`` file. Use the
4647 *Tools->Configuration Files->filetype_extensions.conf* menu item. See
4648 also `Configuration file paths`_.
4650 You should only list lines for filetype extensions that you want to
4651 override in the user configuration file and remove or comment out
4652 others. The patterns are listed after the ``=`` sign, using a
4653 semi-colon separated list of patterns which should be matched for
4654 that filetype.
4656 For example, to override the filetype extensions for Make, the file
4657 should look like::
4659     [Extensions]
4660     Make=Makefile*;*.mk;Buildfile;
4662 Filetype group membership
4663 ^^^^^^^^^^^^^^^^^^^^^^^^^
4664 Group membership is also stored in ``filetype_extensions.conf``. This
4665 file is used to store information Geany needs at startup, whereas the
4666 separate filetype definition files hold information only needed when
4667 a document with their filetype is used.
4669 The format looks like::
4671     [Groups]
4672     Programming=C;C++;
4673     Script=Perl;Python;
4674     Markup=HTML;XML;
4675     Misc=Diff;Conf;
4676     None=None;
4678 The key names cannot be configured.
4680 .. note::
4681     Group membership is only read at startup.
4683 Preferences file format
4684 -----------------------
4686 The user preferences file ``geany.conf`` holds settings for all the items configured
4687 in the preferences dialog. This file should not be edited while Geany is running
4688 as the file will be overwritten when the preferences in Geany are changed or Geany
4689 is quit.
4692 [build-menu] section
4693 ^^^^^^^^^^^^^^^^^^^^
4695 The [build-menu] section contains the configuration of the build menu.
4696 This section can occur in filetype, preferences and project files and
4697 always has the format described here.  Different menu items are loaded
4698 from different files, see the table in the `Build Menu Configuration`_
4699 section for details.  All the settings can be configured from the dialogs
4700 except the execute command in filetype files and filetype definitions in
4701 the project file, so these are the only ones which need hand editing.
4703 The build-menu section stores one entry for each setting for each menu item that
4704 is configured.  The keys for these settings have the format:
4706   ``GG_NN_FF``
4708 where:
4710 * GG - is the menu item group,
4712   - FT for filetype
4713   - NF for independent (non-filetype)
4714   - EX for execute
4716 * NN - is a two decimal digit number of the item within the group,
4717   starting at 00
4718 * FF - is the field,
4720   - LB for label
4721   - CM for command
4722   - WD for working directory
4725 Project file format
4726 -------------------
4728 The project file contains project related settings and possibly a
4729 record of the current session files.
4732 [build-menu] additions
4733 ^^^^^^^^^^^^^^^^^^^^^^
4735 The project file also can have extra fields in the [build-menu] section
4736 in addition to those listed in `[build-menu] section`_ above.
4738 When filetype menu items are configured for the project they are stored
4739 in the project file.
4741 The ``filetypes`` entry is a list of the filetypes which exist in the
4742 project file.
4744 For each filetype the entries for that filetype have the format defined in
4745 `[build-menu] section`_ but the key is prefixed by the name of the filetype
4746 as it appears in the ``filetypes`` entry, eg the entry for the label of
4747 filetype menu item 0 for the C filetype would be
4749   ``CFT_00_LB=Label``
4752 Templates
4753 ---------
4755 Geany supports the following templates:
4757 * ChangeLog entry
4758 * File header
4759 * Function description
4760 * Short GPL notice
4761 * Short BSD notice
4762 * File templates
4764 To use these templates, just open the Edit menu or open the popup menu
4765 by right-clicking in the editor widget, and choose "Insert Comments"
4766 and insert templates as you want.
4768 Some templates (like File header or ChangeLog entry) will always be
4769 inserted at the top of the file.
4771 To insert a function description, the cursor must be inside
4772 of the function, so that the function name can be determined
4773 automatically. The description will be positioned correctly one line
4774 above the function, just check it out. If the cursor is not inside
4775 of a function or the function name cannot be determined, the inserted
4776 function description won't contain the correct function name but "unknown"
4777 instead.
4779 .. note::
4780     Geany automatically reloads template information when it notices you
4781     save a file in the user's template configuration directory. You can
4782     also force this by selecting *Tools->Reload Configuration*.
4785 Template meta data
4786 ^^^^^^^^^^^^^^^^^^
4788 Meta data can be used with all templates, but by default user set
4789 meta data is only used for the ChangeLog and File header templates.
4791 In the configuration dialog you can find a tab "Templates" (see
4792 `Template preferences`_). You can define the default values
4793 which will be inserted in the templates.
4796 File templates
4797 ^^^^^^^^^^^^^^
4799 File templates are templates used as the basis of a new file. To
4800 use them, choose the *New (with Template)* menu item from the *File*
4801 menu.
4803 By default, file templates are installed for some filetypes. Custom
4804 file templates can be added by creating the appropriate template file. You can
4805 also edit the default file templates.
4807 The file's contents are just the text to place in the document, with
4808 optional template wildcards like ``{fileheader}``. The fileheader
4809 wildcard can be placed anywhere, but it's usually put on the first
4810 line of the file, followed by a blank line.
4812 Adding file templates
4813 `````````````````````
4815 File templates are read from ``templates/files`` under the
4816 `Configuration file paths`_.
4818 The filetype to use is detected from the template file's extension, if
4819 any. For example, creating a file ``module.c`` would add a menu item
4820 which created a new document with the filetype set to 'C'.
4822 The template file is read from disk when the corresponding menu item is
4823 clicked.
4826 Customizing templates
4827 ^^^^^^^^^^^^^^^^^^^^^
4829 Each template can be customized to your needs. The templates are
4830 stored in the ``~/.config/geany/templates/`` directory (see the section called
4831 `Command line options`_ for further information about the configuration
4832 directory). Just open the desired template with an editor (ideally,
4833 Geany ;-) ) and edit the template to your needs. There are some
4834 wildcards which will be automatically replaced by Geany at startup.
4837 Template wildcards
4838 ``````````````````
4840 All wildcards must be enclosed by "{" and "}", e.g. {date}.
4842 **Wildcards for character escaping**
4844 ============== ============================================= =======================================
4845 Wildcard       Description                                   Available in
4846 ============== ============================================= =======================================
4847 ob             { Opening Brace (used to prevent other        file templates, file header, snippets.
4848                wildcards being expanded).
4849 cb             } Closing Brace.                              file templates, file header, snippets.
4850 pc             \% Percent (used to escape e.g. %block% in
4851                snippets).                                    snippets.
4852 ============== ============================================= =======================================
4854 **Global wildcards**
4856 These are configurable, see `Template preferences`_.
4858 ============== ============================================= =======================================
4859 Wildcard       Description                                   Available in
4860 ============== ============================================= =======================================
4861 developer      The name of the developer.                    file templates, file header,
4862                                                              function description, ChangeLog entry,
4863                                                              bsd, gpl, snippets.
4865 initial        The developer's initials, e.g. "ET" for       file templates, file header,
4866                Enrico Tröger or "JFD" for John Foobar Doe.   function description, ChangeLog entry,
4867                                                              bsd, gpl, snippets.
4869 mail           The email address of the developer.           file templates, file header,
4870                                                              function description, ChangeLog entry,
4871                                                              bsd, gpl, snippets.
4873 company        The company the developer is working for.     file templates, file header,
4874                                                              function description, ChangeLog entry,
4875                                                              bsd, gpl, snippets.
4877 version        The initial version of a new file.            file templates, file header,
4878                                                              function description, ChangeLog entry,
4879                                                              bsd, gpl, snippets.
4880 ============== ============================================= =======================================
4882 **Date & time wildcards**
4884 The format for these wildcards can be changed in the preferences
4885 dialog, see `Template preferences`_. You can use any conversion
4886 specifiers which can be used with the ANSI C strftime function.
4887 For details please see http://man.cx/strftime.
4889 ============== ============================================= =======================================
4890 Wildcard       Description                                   Available in
4891 ============== ============================================= =======================================
4892 year           The current year. Default format is: YYYY.    file templates, file header,
4893                                                              function description, ChangeLog entry,
4894                                                              bsd, gpl, snippets.
4896 date           The current date. Default format:             file templates, file header,
4897                YYYY-MM-DD.                                   function description, ChangeLog entry,
4898                                                              bsd, gpl, snippets.
4900 datetime       The current date and time. Default format:    file templates, file header,
4901                DD.MM.YYYY HH:mm:ss ZZZZ.                     function description, ChangeLog entry,
4902                                                              bsd, gpl, snippets.
4903 ============== ============================================= =======================================
4905 **Dynamic wildcards**
4907 ============== ============================================= =======================================
4908 Wildcard       Description                                   Available in
4909 ============== ============================================= =======================================
4910 untitled       The string "untitled" (this will be           file templates, file header,
4911                translated to your locale), used in           function description, ChangeLog entry,
4912                file templates.                               bsd, gpl, snippets.
4914 geanyversion   The actual Geany version, e.g.                file templates, file header,
4915                "Geany |(version)|".                          function description, ChangeLog entry,
4916                                                              bsd, gpl, snippets.
4918 filename       The filename of the current file.             file header, snippets, file
4919                For new files, it's only replaced when        templates.
4920                first saving if found on the first 4 lines
4921                of the file.
4923 project        The current project's name, if any.           file header, snippets, file templates.
4925 description    The current project's description, if any.    file header, snippets, file templates.
4927 functionname   The function name of the function at the      function description.
4928                cursor position. This wildcard will only be
4929                replaced in the function description
4930                template.
4932 command:path   Executes the specified command and replace    file templates, file header,
4933                the wildcard with the command's standard      function description, ChangeLog entry,
4934                output. See `Special {command:} wildcard`_    bsd, gpl, snippets.
4935                for details.
4936 ============== ============================================= =======================================
4938 **Template insertion wildcards**
4940 ============== ============================================= =======================================
4941 Wildcard       Description                                   Available in
4942 ============== ============================================= =======================================
4943 gpl            This wildcard inserts a short GPL notice.     file header.
4945 bsd            This wildcard inserts a BSD licence notice.   file header.
4947 fileheader     The file header template. This wildcard       snippets, file templates.
4948                will only be replaced in file templates.
4949 ============== ============================================= =======================================
4952 Special {command:} wildcard
4953 ***************************
4955 The {command:} wildcard is a special one because it can execute
4956 a specified command and put the command's output (stdout) into
4957 the template.
4959 Example::
4961     {command:uname -a}
4963 will result in::
4965     Linux localhost 2.6.9-023stab046.2-smp #1 SMP Mon Dec 10 15:04:55 MSK 2007 x86_64 GNU/Linux
4967 Using this wildcard you can insert nearly any arbitrary text into the
4968 template.
4970 In the environment of the executed command the variables
4971 ``GEANY_FILENAME``, ``GEANY_FILETYPE`` and ``GEANY_FUNCNAME`` are set.
4972 The value of these variables is filled in only if Geany knows about it.
4973 For example, ``GEANY_FUNCNAME`` is only filled within the function
4974 description template. However, these variables are ``always`` set,
4975 just maybe with an empty value.
4976 You can easily access them e.g. within an executed shell script using::
4978     $GEANY_FILENAME
4981 .. note::
4982     If the specified command could not be found or not executed, the wildcard is substituted
4983     by an empty string. In such cases, you can find the occurred error message on Geany's
4984     standard error and in the Help->Debug Messages dialog.
4987 Customizing the toolbar
4988 -----------------------
4990 You can add, remove and reorder the elements in the toolbar by using
4991 the toolbar editor, or by manually editing the configuration file
4992 ``ui_toolbar.xml``.
4994 The toolbar editor can be opened from the preferences editor on the Toolbar tab or
4995 by right-clicking on the toolbar itself and choosing it from the menu.
4997 Manually editing the toolbar layout
4998 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5000 To override the system-wide configuration file, copy it to your user
5001 configuration directory (see `Configuration file paths`_).
5003 For example::
5005     % cp /usr/local/share/geany/ui_toolbar.xml /home/username/.config/geany/
5007 Then edit it and add any of the available elements listed in the file or remove
5008 any of the existing elements. Of course, you can also reorder the elements as
5009 you wish and add or remove additional separators.
5010 This file must be valid XML, otherwise the global toolbar UI definition
5011 will be used instead.
5013 Your changes are applied once you save the file.
5015 .. note::
5016     (1) You cannot add new actions which are not listed below.
5017     (2) Everything you add or change must be inside the /ui/toolbar/ path.
5020 Available toolbar elements
5021 ^^^^^^^^^^^^^^^^^^^^^^^^^^
5023 ================== ==============================================================================
5024 Element name       Description
5025 ================== ==============================================================================
5026 New                Create a new file
5027 Open               Open an existing file
5028 Save               Save the current file
5029 SaveAll            Save all open files
5030 Reload             Reload the current file from disk
5031 Close              Close the current file
5032 CloseAll           Close all open files
5033 Print              Print the current file
5034 Cut                Cut the current selection
5035 Copy               Copy the current selection
5036 Paste              Paste the contents of the clipboard
5037 Delete             Delete the current selection
5038 Undo               Undo the last modification
5039 Redo               Redo the last modification
5040 NavBack            Navigate back a location
5041 NavFor             Navigate forward a location
5042 Compile            Compile the current file
5043 Build              Build the current file, includes a submenu for Make commands. Geany
5044                    remembers the last chosen action from the submenu and uses this as default
5045                    action when the button itself is clicked.
5046 Run                Run or view the current file
5047 Color              Open a color chooser dialog, to interactively pick colors from a palette
5048 ZoomIn             Zoom in the text
5049 ZoomOut            Zoom out the text
5050 UnIndent           Decrease indentation
5051 Indent             Increase indentation
5052 Replace            Replace text in the current document
5053 SearchEntry        The search field belonging to the 'Search' element (can be used alone)
5054 Search             Find the entered text in the current file (only useful if you also
5055                    use 'SearchEntry')
5056 GotoEntry          The goto field belonging to the 'Goto' element (can be used alone)
5057 Goto               Jump to the entered line number (only useful if you also use 'GotoEntry')
5058 Preferences        Show the preferences dialog
5059 Quit               Quit Geany
5060 ================== ==============================================================================
5064 Plugin documentation
5065 ====================
5067 HTML Characters
5068 ---------------
5070 The HTML Characters plugin helps when working with special
5071 characters in XML/HTML, e.g. German Umlauts ü and ä.
5074 Insert entity dialog
5075 ^^^^^^^^^^^^^^^^^^^^
5077 When the plugin is enabled, you can insert special character
5078 entities using *Tools->Insert Special HTML Characters*.
5080 This opens up a dialog where you can find a huge amount of special
5081 characters sorted by category that you might like to use inside your
5082 document. You can expand and collapse the categories by clicking on
5083 the little arrow on the left hand side. Once you have found the
5084 desired character click on it and choose "Insert". This will insert
5085 the entity for the character at the current cursor position. You
5086 might also like to double click the chosen entity instead.
5089 Replace special chars by its entity
5090 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5092 To help make a XML/HTML document valid the plugin supports
5093 replacement of special chars known by the plugin. Both bulk
5094 replacement and immediate replacement during typing are supported.
5096 A few characters will not be replaced. These are
5097         * "
5098         * &
5099         * <
5100         * >
5101         *   (`&nbsp;`)
5104 At typing time
5105 ``````````````
5107 You can activate/deactivate this feature using the *Tools->HTML
5108 Replacement->Auto-replace Special Characters* menu item. If it's
5109 activated, all special characters (beside the given exceptions from
5110 above) known by the plugin will be replaced by their entities.
5112 You could also set a keybinding for the plugin to toggle the status
5113 of this feature.
5116 Bulk replacement
5117 ````````````````
5119 After inserting a huge amount of text, e.g. by using copy & paste, the
5120 plugin allows bulk replacement of all known characters (beside the
5121 mentioned exceptions). You can find the function under the same
5122 menu at *Tools->HTML Replacement->Replace Characters in Selection*, or
5123 configure a keybinding for the plugin.
5126 Save Actions
5127 ------------
5129 Auto Save
5130 ^^^^^^^^^
5132 This plugin provides an option to automatically save documents.
5133 You can choose to save the current document, or all of your documents, at
5134 a given delay.
5137 Save on focus out
5138 ^^^^^^^^^^^^^^^^^
5140 You can save the current document when the editor's focus goes out.
5141 Every pop-up, menu dialogs, or anything else that can make the editor lose the focus,
5142 will make the current document to be saved.
5145 Instant Save
5146 ^^^^^^^^^^^^
5147 This plugin sets on every new file (*File->New* or *File->New (with template)*)
5148 a randomly chosen filename and set its filetype appropriate to the used template
5149 or when no template was used, to a configurable default filetype.
5150 This enables you to quickly compile, build and/or run the new file without the
5151 need to give it an explicit filename using the Save As dialog. This might be
5152 useful when you often create new files just for testing some code or something
5153 similar.
5156 Backup Copy
5157 ^^^^^^^^^^^
5159 This plugin creates a backup copy of the current file in Geany when it is
5160 saved. You can specify the directory where the backup copy is saved and
5161 you can configure the automatically added extension in the configure dialog
5162 in Geany's plugin manager.
5164 After the plugin was loaded in Geany's plugin manager, every file is
5165 copied into the configured backup directory *after* the file has been saved
5166 in Geany.
5168 The created backup copy file permissions are set to read-write only for
5169 the user. This should help to not create world-readable files on possibly
5170 unsecure destination directories like /tmp (especially useful
5171 on multi-user systems).
5172 This applies only to non-Windows systems. On Windows, no explicit file
5173 permissions are set.
5176 Additionally, you can define how many levels of the original file's
5177 directory structure should be replicated in the backup copy path.
5178 For example, setting the option
5179 *Directory levels to include in the backup destination* to *2*
5180 cause the plugin to create the last two components of the original
5181 file's path in the backup copy path and place the new file there.
5184 Contributing to this document
5185 =============================
5187 This document (``geany.txt``) is written in `reStructuredText`__
5188 (or "reST"). The source file for it is located in Geany's ``doc``
5189 subdirectory.  If you intend on making changes, you should grab the
5190 source right from Git to make sure you've got the newest version.
5191 First, you need to configure the build system to generate the HTML
5192 documentation passing the *--enable-html-docs* option to the *configure*
5193 script. Then after editing the file, run ``make`` (from the root build
5194 directory or from the *doc* subdirectory) to build the HTML documentation
5195 and see how your changes look. This regenerates the ``geany.html`` file
5196 inside the *doc* subdirectory. To generate a PDF file, configure with
5197 *--enable-pdf-docs* and run ``make`` as for the HTML version. The generated
5198 PDF file is named geany-|(version)|.pdf and is located inside the *doc*
5199 subdirectory.
5201 __ http://docutils.sourceforge.net/rst.html
5203 After you are happy with your changes, create a patch e.g. by using::
5205     % git diff geany.txt > foo.patch
5207 or even better, by creating a Git-formatted patch which will keep authoring
5208 and description data, by first committing your changes (doing so in a fresh
5209 new branch is recommended for `master` not to diverge from upstream) and then
5210 using git format-patch::
5212     % git checkout -b my-documentation-changes # create a fresh branch
5213     % git commit geany.txt
5214     Write a good commit message...
5215     % git format-patch HEAD^
5216     % git checkout master # go back to master
5218 and then submit that file to the mailing list for review.
5220 Also you can clone the Geany repository at GitHub and send a pull request.
5222 Note, you will need the Python docutils software package installed
5223 to build the docs. The package is named ``python-docutils`` on Debian
5224 and Fedora systems.
5229 Scintilla keyboard commands
5230 ===========================
5232 Copyright © 1998, 2006 Neil Hodgson <neilh(at)scintilla(dot)org>
5234 This appendix is distributed under the terms of the License for
5235 Scintilla and SciTE. A copy of this license can be found in the file
5236 ``scintilla/License.txt`` included with the source code of this
5237 program and in the appendix of this document. See `License for
5238 Scintilla and SciTE`_.
5240 20 June 2006
5244 Keyboard commands
5245 -----------------
5247 Keyboard commands for Scintilla mostly follow common Windows and GTK+
5248 conventions. All move keys (arrows, page up/down, home and end)
5249 allows to extend or reduce the stream selection when holding the
5250 Shift key, and the rectangular selection when holding the
5251 appropriate keys (see `Column mode editing (rectangular selections)`_).
5253 Some keys may not be available with some national keyboards
5254 or because they are taken by the system such as by a window manager
5255 or GTK. Keyboard equivalents of menu commands are listed in the
5256 menus. Some less common commands with no menu equivalent are:
5258 =============================================   ======================
5259 Action                                          Shortcut key
5260 =============================================   ======================
5261 Magnify text size.                              Ctrl-Keypad+
5262 Reduce text size.                               Ctrl-Keypad-
5263 Restore text size to normal.                    Ctrl-Keypad/
5264 Indent block.                                   Tab
5265 Dedent block.                                   Shift-Tab
5266 Delete to start of word.                        Ctrl-BackSpace
5267 Delete to end of word.                          Ctrl-Delete
5268 Delete to start of line.                        Ctrl-Shift-BackSpace
5269 Go to start of document.                        Ctrl-Home
5270 Extend selection to start of document.          Ctrl-Shift-Home
5271 Go to start of display line.                    Alt-Home
5272 Extend selection to start of display line.      Alt-Shift-Home
5273 Go to end of document.                          Ctrl-End
5274 Extend selection to end of document.            Ctrl-Shift-End
5275 Extend selection to end of display line.        Alt-Shift-End
5276 Previous paragraph. Shift extends selection.    Ctrl-Up
5277 Next paragraph. Shift extends selection.        Ctrl-Down
5278 Previous word. Shift extends selection.         Ctrl-Left
5279 Next word. Shift extends selection.             Ctrl-Right
5280 =============================================   ======================
5285 Tips and tricks
5286 ===============
5288 Document notebook
5289 -----------------
5291 * Double-click on empty space in the notebook tab bar to open a
5292   new document.
5293 * Middle-click on a document's notebook tab to close the document.
5294 * Hold `Ctrl` and click on any notebook tab to switch to the last used
5295   document.
5296 * Double-click on a document's notebook tab to toggle all additional
5297   widgets (to show them again use the View menu or the keyboard
5298   shortcut). The interface pref must be enabled for this to work.
5300 Editor
5301 ------
5303 * Alt-scroll wheel moves up/down a page.
5304 * Ctrl-scroll wheel zooms in/out.
5305 * Shift-scroll wheel scrolls 8 characters right/left.
5306 * Ctrl-click on a word in a document to perform *Go to Symbol Definition*.
5307 * Ctrl-click on a bracket/brace to perform *Go to Matching Brace*.
5309 Interface
5310 ---------
5312 * Double-click on a symbol-list group to expand or compact it.
5314 GTK-related
5315 -----------
5317 * Scrolling the mouse wheel over a notebook tab bar will switch
5318   notebook pages.
5320 The following are derived from X-Windows features (but GTK still supports
5321 them on Windows):
5323 * Middle-click pastes the last selected text.
5324 * Middle-click on a scrollbar moves the scrollbar to that
5325   position without having to drag it.
5329 Compile-time options
5330 ====================
5332 There are some options which can only be changed at compile time,
5333 and some options which are used as the default for configurable
5334 options. To change these options, edit the appropriate source file
5335 in the ``src`` subdirectory. Look for a block of lines starting with
5336 ``#define GEANY_*``. Any definitions which are not listed here should
5337 not be changed.
5339 .. note::
5340     Most users should not need to change these options.
5342 src/geany.h
5343 -----------
5345 ==============================  ============================================  ==================
5346 Option                          Description                                   Default
5347 ==============================  ============================================  ==================
5348 GEANY_STRING_UNTITLED           A string used as the default name for new     untitled
5349                                 files. Be aware that the string can be
5350                                 translated, so change it only if you know
5351                                 what you are doing.
5352 GEANY_WINDOW_MINIMAL_WIDTH      The minimal width of the main window.         620
5353 GEANY_WINDOW_MINIMAL_HEIGHT     The minimal height of the main window.        440
5354 GEANY_WINDOW_DEFAULT_WIDTH      The default width of the main window at the   900
5355                                 first start.
5356 GEANY_WINDOW_DEFAULT_HEIGHT     The default height of the main window at the  600
5357                                 first start.
5358  **Windows specific**
5359 GEANY_USE_WIN32_DIALOG          Set this to 1 if you want to use the default  0
5360                                 Windows file open and save dialogs instead
5361                                 GTK's file open and save dialogs. The
5362                                 default Windows file dialogs are missing
5363                                 some nice features like choosing a filetype
5364                                 or an encoding. *Do not touch this setting
5365                                 when building on a non-Win32 system.*
5366 ==============================  ============================================  ==================
5368 project.h
5369 ---------
5371 ==============================  ============================================  ==================
5372 Option                          Description                                   Default
5373 ==============================  ============================================  ==================
5374 GEANY_PROJECT_EXT               The default filename extension for Geany      geany
5375                                 project files. It is used when creating new
5376                                 projects and as filter mask for the project
5377                                 open dialog.
5378 ==============================  ============================================  ==================
5380 filetypes.c
5381 -----------
5383 ==============================  ============================================  ==================
5384 Option                          Description                                   Default
5385 ==============================  ============================================  ==================
5386 GEANY_FILETYPE_SEARCH_LINES     The number of lines to search for the         2
5387                                 filetype with the extract filetype regex.
5388 ==============================  ============================================  ==================
5390 editor.h
5391 --------
5393 ==============================  ============================================  ==================
5394 Option                          Description                                   Default
5395 ==============================  ============================================  ==================
5396 GEANY_WORDCHARS                 These characters define word boundaries when  a string with:
5397                                 making selections and searching using word    a-z, A-Z, 0-9 and
5398                                 matching options.                             underscore.
5399 ==============================  ============================================  ==================
5401 keyfile.c
5402 ---------
5404 These are default settings that can be overridden in the `Preferences`_ dialog.
5406 ==============================  ============================================  ==================
5407 Option                          Description                                   Default
5408 ==============================  ============================================  ==================
5409 GEANY_MIN_SYMBOLLIST_CHARS      How many characters you need to type to       4
5410                                 trigger the autocompletion list.
5411 GEANY_DISK_CHECK_TIMEOUT        Time in seconds between checking a file for   30
5412                                 external changes.
5413 GEANY_DEFAULT_TOOLS_MAKE        The make tool. This can also include a path.  "make"
5414 GEANY_DEFAULT_TOOLS_TERMINAL    A terminal emulator command, see              See below.
5415                                 `Terminal emulators`_.
5416 GEANY_DEFAULT_TOOLS_BROWSER     A web browser. This can also include a path.  "firefox"
5417 GEANY_DEFAULT_TOOLS_PRINTCMD    A printing tool. It should be able to accept  "lpr"
5418                                 and process plain text files. This can also
5419                                 include a path.
5420 GEANY_DEFAULT_TOOLS_GREP        A grep tool. It should be compatible with     "grep"
5421                                 GNU grep. This can also include a path.
5422 GEANY_DEFAULT_MRU_LENGTH        The length of the "Recent files" list.        10
5423 GEANY_DEFAULT_FONT_SYMBOL_LIST  The font used in sidebar to show symbols and  "Sans 9"
5424                                 open files.
5425 GEANY_DEFAULT_FONT_MSG_WINDOW   The font used in the messages window.         "Sans 9"
5426 GEANY_DEFAULT_FONT_EDITOR       The font used in the editor window.           "Monospace 10"
5427 GEANY_TOGGLE_MARK               A string which is used to mark a toggled      "~ "
5428                                 comment.
5429 GEANY_MAX_AUTOCOMPLETE_WORDS    How many autocompletion suggestions should    30
5430                                 Geany provide.
5431 GEANY_DEFAULT_FILETYPE_REGEX    The default regex to extract filetypes from   See below.
5432                                 files.
5433 ==============================  ============================================  ==================
5435 The GEANY_DEFAULT_FILETYPE_REGEX default value is  -\\*-\\s*([^\\s]+)\\s*-\\*- which finds Emacs filetypes.
5437 The GEANY_DEFAULT_TOOLS_TERMINAL default value on Windows is::
5439     cmd.exe /Q /C %c
5441 and on any non-Windows system is::
5443     xterm -e "/bin/sh %c"
5446 build.c
5447 -------
5449 ==============================  ============================================  ==================
5450 Option                          Description                                   Default
5451 ==============================  ============================================  ==================
5452 GEANY_BUILD_ERR_HIGHLIGHT_MAX   Amount of build error indicators to           50
5453                                 be shown in the editor window.
5454                                 This affects the special coloring
5455                                 when Geany detects a compiler output line as
5456                                 an error message and then highlights the
5457                                 corresponding line in the source code.
5458                                 Usually only the first few messages are
5459                                 interesting because following errors are
5460                                 just after-effects.
5461                                 All errors in the Compiler window are parsed
5462                                 and unaffected by this value.
5463 PRINTBUILDCMDS                  Every time a build menu item priority         FALSE
5464                                 calculation is run, print the state of the
5465                                 menu item table in the form of the table
5466                                 in `Build Menu Configuration`_.  May be
5467                                 useful to debug configuration file
5468                                 overloading.  Warning produces a lot of
5469                                 output.  Can also be enabled/disabled by the
5470                                 debugger by setting printbuildcmds to 1/0
5471                                 overriding the compile setting.
5472 ==============================  ============================================  ==================
5476 GNU General Public License
5477 ==========================
5481                 GNU GENERAL PUBLIC LICENSE
5482                    Version 2, June 1991
5484      Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5485         51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
5486      Everyone is permitted to copy and distribute verbatim copies
5487      of this license document, but changing it is not allowed.
5489                     Preamble
5491       The licenses for most software are designed to take away your
5492     freedom to share and change it.  By contrast, the GNU General Public
5493     License is intended to guarantee your freedom to share and change free
5494     software--to make sure the software is free for all its users.  This
5495     General Public License applies to most of the Free Software
5496     Foundation's software and to any other program whose authors commit to
5497     using it.  (Some other Free Software Foundation software is covered by
5498     the GNU Library General Public License instead.)  You can apply it to
5499     your programs, too.
5501       When we speak of free software, we are referring to freedom, not
5502     price.  Our General Public Licenses are designed to make sure that you
5503     have the freedom to distribute copies of free software (and charge for
5504     this service if you wish), that you receive source code or can get it
5505     if you want it, that you can change the software or use pieces of it
5506     in new free programs; and that you know you can do these things.
5508       To protect your rights, we need to make restrictions that forbid
5509     anyone to deny you these rights or to ask you to surrender the rights.
5510     These restrictions translate to certain responsibilities for you if you
5511     distribute copies of the software, or if you modify it.
5513       For example, if you distribute copies of such a program, whether
5514     gratis or for a fee, you must give the recipients all the rights that
5515     you have.  You must make sure that they, too, receive or can get the
5516     source code.  And you must show them these terms so they know their
5517     rights.
5519       We protect your rights with two steps: (1) copyright the software, and
5520     (2) offer you this license which gives you legal permission to copy,
5521     distribute and/or modify the software.
5523       Also, for each author's protection and ours, we want to make certain
5524     that everyone understands that there is no warranty for this free
5525     software.  If the software is modified by someone else and passed on, we
5526     want its recipients to know that what they have is not the original, so
5527     that any problems introduced by others will not reflect on the original
5528     authors' reputations.
5530       Finally, any free program is threatened constantly by software
5531     patents.  We wish to avoid the danger that redistributors of a free
5532     program will individually obtain patent licenses, in effect making the
5533     program proprietary.  To prevent this, we have made it clear that any
5534     patent must be licensed for everyone's free use or not licensed at all.
5536       The precise terms and conditions for copying, distribution and
5537     modification follow.
5539                 GNU GENERAL PUBLIC LICENSE
5540        TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
5542       0. This License applies to any program or other work which contains
5543     a notice placed by the copyright holder saying it may be distributed
5544     under the terms of this General Public License.  The "Program", below,
5545     refers to any such program or work, and a "work based on the Program"
5546     means either the Program or any derivative work under copyright law:
5547     that is to say, a work containing the Program or a portion of it,
5548     either verbatim or with modifications and/or translated into another
5549     language.  (Hereinafter, translation is included without limitation in
5550     the term "modification".)  Each licensee is addressed as "you".
5552     Activities other than copying, distribution and modification are not
5553     covered by this License; they are outside its scope.  The act of
5554     running the Program is not restricted, and the output from the Program
5555     is covered only if its contents constitute a work based on the
5556     Program (independent of having been made by running the Program).
5557     Whether that is true depends on what the Program does.
5559       1. You may copy and distribute verbatim copies of the Program's
5560     source code as you receive it, in any medium, provided that you
5561     conspicuously and appropriately publish on each copy an appropriate
5562     copyright notice and disclaimer of warranty; keep intact all the
5563     notices that refer to this License and to the absence of any warranty;
5564     and give any other recipients of the Program a copy of this License
5565     along with the Program.
5567     You may charge a fee for the physical act of transferring a copy, and
5568     you may at your option offer warranty protection in exchange for a fee.
5570       2. You may modify your copy or copies of the Program or any portion
5571     of it, thus forming a work based on the Program, and copy and
5572     distribute such modifications or work under the terms of Section 1
5573     above, provided that you also meet all of these conditions:
5575         a) You must cause the modified files to carry prominent notices
5576         stating that you changed the files and the date of any change.
5578         b) You must cause any work that you distribute or publish, that in
5579         whole or in part contains or is derived from the Program or any
5580         part thereof, to be licensed as a whole at no charge to all third
5581         parties under the terms of this License.
5583         c) If the modified program normally reads commands interactively
5584         when run, you must cause it, when started running for such
5585         interactive use in the most ordinary way, to print or display an
5586         announcement including an appropriate copyright notice and a
5587         notice that there is no warranty (or else, saying that you provide
5588         a warranty) and that users may redistribute the program under
5589         these conditions, and telling the user how to view a copy of this
5590         License.  (Exception: if the Program itself is interactive but
5591         does not normally print such an announcement, your work based on
5592         the Program is not required to print an announcement.)
5594     These requirements apply to the modified work as a whole.  If
5595     identifiable sections of that work are not derived from the Program,
5596     and can be reasonably considered independent and separate works in
5597     themselves, then this License, and its terms, do not apply to those
5598     sections when you distribute them as separate works.  But when you
5599     distribute the same sections as part of a whole which is a work based
5600     on the Program, the distribution of the whole must be on the terms of
5601     this License, whose permissions for other licensees extend to the
5602     entire whole, and thus to each and every part regardless of who wrote it.
5604     Thus, it is not the intent of this section to claim rights or contest
5605     your rights to work written entirely by you; rather, the intent is to
5606     exercise the right to control the distribution of derivative or
5607     collective works based on the Program.
5609     In addition, mere aggregation of another work not based on the Program
5610     with the Program (or with a work based on the Program) on a volume of
5611     a storage or distribution medium does not bring the other work under
5612     the scope of this License.
5614       3. You may copy and distribute the Program (or a work based on it,
5615     under Section 2) in object code or executable form under the terms of
5616     Sections 1 and 2 above provided that you also do one of the following:
5618         a) Accompany it with the complete corresponding machine-readable
5619         source code, which must be distributed under the terms of Sections
5620         1 and 2 above on a medium customarily used for software interchange; or,
5622         b) Accompany it with a written offer, valid for at least three
5623         years, to give any third party, for a charge no more than your
5624         cost of physically performing source distribution, a complete
5625         machine-readable copy of the corresponding source code, to be
5626         distributed under the terms of Sections 1 and 2 above on a medium
5627         customarily used for software interchange; or,
5629         c) Accompany it with the information you received as to the offer
5630         to distribute corresponding source code.  (This alternative is
5631         allowed only for noncommercial distribution and only if you
5632         received the program in object code or executable form with such
5633         an offer, in accord with Subsection b above.)
5635     The source code for a work means the preferred form of the work for
5636     making modifications to it.  For an executable work, complete source
5637     code means all the source code for all modules it contains, plus any
5638     associated interface definition files, plus the scripts used to
5639     control compilation and installation of the executable.  However, as a
5640     special exception, the source code distributed need not include
5641     anything that is normally distributed (in either source or binary
5642     form) with the major components (compiler, kernel, and so on) of the
5643     operating system on which the executable runs, unless that component
5644     itself accompanies the executable.
5646     If distribution of executable or object code is made by offering
5647     access to copy from a designated place, then offering equivalent
5648     access to copy the source code from the same place counts as
5649     distribution of the source code, even though third parties are not
5650     compelled to copy the source along with the object code.
5652       4. You may not copy, modify, sublicense, or distribute the Program
5653     except as expressly provided under this License.  Any attempt
5654     otherwise to copy, modify, sublicense or distribute the Program is
5655     void, and will automatically terminate your rights under this License.
5656     However, parties who have received copies, or rights, from you under
5657     this License will not have their licenses terminated so long as such
5658     parties remain in full compliance.
5660       5. You are not required to accept this License, since you have not
5661     signed it.  However, nothing else grants you permission to modify or
5662     distribute the Program or its derivative works.  These actions are
5663     prohibited by law if you do not accept this License.  Therefore, by
5664     modifying or distributing the Program (or any work based on the
5665     Program), you indicate your acceptance of this License to do so, and
5666     all its terms and conditions for copying, distributing or modifying
5667     the Program or works based on it.
5669       6. Each time you redistribute the Program (or any work based on the
5670     Program), the recipient automatically receives a license from the
5671     original licensor to copy, distribute or modify the Program subject to
5672     these terms and conditions.  You may not impose any further
5673     restrictions on the recipients' exercise of the rights granted herein.
5674     You are not responsible for enforcing compliance by third parties to
5675     this License.
5677       7. If, as a consequence of a court judgment or allegation of patent
5678     infringement or for any other reason (not limited to patent issues),
5679     conditions are imposed on you (whether by court order, agreement or
5680     otherwise) that contradict the conditions of this License, they do not
5681     excuse you from the conditions of this License.  If you cannot
5682     distribute so as to satisfy simultaneously your obligations under this
5683     License and any other pertinent obligations, then as a consequence you
5684     may not distribute the Program at all.  For example, if a patent
5685     license would not permit royalty-free redistribution of the Program by
5686     all those who receive copies directly or indirectly through you, then
5687     the only way you could satisfy both it and this License would be to
5688     refrain entirely from distribution of the Program.
5690     If any portion of this section is held invalid or unenforceable under
5691     any particular circumstance, the balance of the section is intended to
5692     apply and the section as a whole is intended to apply in other
5693     circumstances.
5695     It is not the purpose of this section to induce you to infringe any
5696     patents or other property right claims or to contest validity of any
5697     such claims; this section has the sole purpose of protecting the
5698     integrity of the free software distribution system, which is
5699     implemented by public license practices.  Many people have made
5700     generous contributions to the wide range of software distributed
5701     through that system in reliance on consistent application of that
5702     system; it is up to the author/donor to decide if he or she is willing
5703     to distribute software through any other system and a licensee cannot
5704     impose that choice.
5706     This section is intended to make thoroughly clear what is believed to
5707     be a consequence of the rest of this License.
5709       8. If the distribution and/or use of the Program is restricted in
5710     certain countries either by patents or by copyrighted interfaces, the
5711     original copyright holder who places the Program under this License
5712     may add an explicit geographical distribution limitation excluding
5713     those countries, so that distribution is permitted only in or among
5714     countries not thus excluded.  In such case, this License incorporates
5715     the limitation as if written in the body of this License.
5717       9. The Free Software Foundation may publish revised and/or new versions
5718     of the General Public License from time to time.  Such new versions will
5719     be similar in spirit to the present version, but may differ in detail to
5720     address new problems or concerns.
5722     Each version is given a distinguishing version number.  If the Program
5723     specifies a version number of this License which applies to it and "any
5724     later version", you have the option of following the terms and conditions
5725     either of that version or of any later version published by the Free
5726     Software Foundation.  If the Program does not specify a version number of
5727     this License, you may choose any version ever published by the Free Software
5728     Foundation.
5730       10. If you wish to incorporate parts of the Program into other free
5731     programs whose distribution conditions are different, write to the author
5732     to ask for permission.  For software which is copyrighted by the Free
5733     Software Foundation, write to the Free Software Foundation; we sometimes
5734     make exceptions for this.  Our decision will be guided by the two goals
5735     of preserving the free status of all derivatives of our free software and
5736     of promoting the sharing and reuse of software generally.
5738                     NO WARRANTY
5740       11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
5741     FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
5742     OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
5743     PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
5744     OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
5745     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
5746     TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
5747     PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
5748     REPAIR OR CORRECTION.
5750       12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
5751     WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
5752     REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
5753     INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
5754     OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
5755     TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
5756     YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
5757     PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
5758     POSSIBILITY OF SUCH DAMAGES.
5760                  END OF TERMS AND CONDITIONS
5762             How to Apply These Terms to Your New Programs
5764       If you develop a new program, and you want it to be of the greatest
5765     possible use to the public, the best way to achieve this is to make it
5766     free software which everyone can redistribute and change under these terms.
5768       To do so, attach the following notices to the program.  It is safest
5769     to attach them to the start of each source file to most effectively
5770     convey the exclusion of warranty; and each file should have at least
5771     the "copyright" line and a pointer to where the full notice is found.
5773         <one line to give the program's name and a brief idea of what it does.>
5774         Copyright (C) <year>  <name of author>
5776         This program is free software; you can redistribute it and/or modify
5777         it under the terms of the GNU General Public License as published by
5778         the Free Software Foundation; either version 2 of the License, or
5779         (at your option) any later version.
5781         This program is distributed in the hope that it will be useful,
5782         but WITHOUT ANY WARRANTY; without even the implied warranty of
5783         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5784         GNU General Public License for more details.
5786         You should have received a copy of the GNU General Public License along
5787         with this program; if not, write to the Free Software Foundation, Inc.,
5788         51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
5791     Also add information on how to contact you by electronic and paper mail.
5793     If the program is interactive, make it output a short notice like this
5794     when it starts in an interactive mode:
5796         Gnomovision version 69, Copyright (C) year  name of author
5797         Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
5798         This is free software, and you are welcome to redistribute it
5799         under certain conditions; type `show c' for details.
5801     The hypothetical commands `show w' and `show c' should show the appropriate
5802     parts of the General Public License.  Of course, the commands you use may
5803     be called something other than `show w' and `show c'; they could even be
5804     mouse-clicks or menu items--whatever suits your program.
5806     You should also get your employer (if you work as a programmer) or your
5807     school, if any, to sign a "copyright disclaimer" for the program, if
5808     necessary.  Here is a sample; alter the names:
5810       Yoyodyne, Inc., hereby disclaims all copyright interest in the program
5811       `Gnomovision' (which makes passes at compilers) written by James Hacker.
5813       <signature of Ty Coon>, 1 April 1989
5814       Ty Coon, President of Vice
5816     This General Public License does not permit incorporating your program into
5817     proprietary programs.  If your program is a subroutine library, you may
5818     consider it more useful to permit linking proprietary applications with the
5819     library.  If this is what you want to do, use the GNU Library General
5820     Public License instead of this License.
5825 License for Scintilla and SciTE
5826 ===============================
5828 Copyright 1998-2003 by Neil Hodgson <neilh(at)scintilla(dot)org>
5830 All Rights Reserved
5832 Permission to use, copy, modify, and distribute this software and
5833 its documentation for any purpose and without fee is hereby granted,
5834 provided that the above copyright notice appear in all copies and
5835 that both that copyright notice and this permission notice appear in
5836 supporting documentation.
5838 NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
5839 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
5840 NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
5841 CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
5842 OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
5843 OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
5844 USE OR PERFORMANCE OF THIS SOFTWARE.