1 .. |(version)| replace:: 1.38
2 .. -*- reStructuredText -*-
8 -------------------------
9 A fast, light, GTK+ IDE
10 -------------------------
12 :Authors: Enrico Tröger,
20 Copyright © 2005 The Geany contributors
22 This document is distributed under the terms of the GNU General Public
23 License as published by the Free Software Foundation; either version 2
24 of the License, or (at your option) any later version. A copy of this
25 license can be found in the file COPYING included with the source code
26 of this program, and also in the chapter `GNU General Public License`_.
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:
50 * Autocompletion of symbols/words
51 * Construct completion/snippets
52 * Auto-closing of XML and HTML tags
54 * Many supported filetypes including C, Java, PHP, HTML, Python, Perl,
58 * Build system to compile and execute your code
59 * Simple project management
67 You can obtain Geany from https://www.geany.org/ or perhaps also from
68 your distribution. For a list of available packages, please see
69 https://www.geany.org/Download/ThirdPartyPackages.
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`_.
91 This documentation is available in HTML and text formats.
92 The latest version can always be found at https://www.geany.org/.
94 If you want to contribute to it, see `Contributing to this document`_.
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.
115 There are many binary packages available. For an up-to-date but maybe
116 incomplete list see https://www.geany.org/Download/ThirdPartyPackages.
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::
152 The configure script supports several common options, for a detailed
158 You may also want to read the INSTALL file for advanced installation
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.
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.
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.
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`_.
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
222 The Geany window is shown in the following figure:
224 .. image:: ./images/main_window.png
226 The workspace has the following parts:
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.
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.
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
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
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
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
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
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,
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``.
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
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
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
455 Customizing Geany's appearance using GTK+ CSS
456 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
458 To override GTK+ CSS styles, you can use traditional mechanisms or you
459 can create a file named ``geany.css`` in the user configuration directory
460 (usually ``~/.config/geany``) which will be loaded after other CSS styles
461 are applied to allow overriding the default styles.
463 Geany offers a number of CSS IDs which can be used to taylor its
464 appearence. Among the more interesting include:
466 * ``geany-compiler-context`` - the style used for build command output surrounding errors
467 * ``geany-compiler-error`` - the style used for build command errors
468 * ``geany-compiler-message`` - the style other output encountered while running build command
469 * ``geany-document-status-changed`` - the style for document tab labels when the document is changed
470 * ``geany-document-status-disk-changed`` - the style for document tab labels when the file on disk has changed
471 * ``geany-document-status-readyonly``` - the style for document tab labels when the document is read-only
472 * ``geany-search-entry-no-match`` - the style of find/replace diaog entries when no match is found
473 * ``geany-terminal-dirty`` - the style for the message window Terminal tab label when the terminal output has changed.
479 Switching between documents
480 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
482 The documents list and the editor tabs are two different ways
483 to switch between documents using the mouse. When you hit the key
484 combination to move between tabs, the order is determined by the tab
485 order. It is not alphabetical as shown in the documents list
486 (regardless of whether or not editor tabs are visible).
488 See the `Notebook tab keybindings`_ section for useful
489 shortcuts including for Most-Recently-Used document switching.
493 The `Document->Clone` menu item copies the current document's text,
494 cursor position and properties into a new untitled document. If
495 there is a selection, only the selected text is copied. This can be
496 useful when making temporary copies of text or for creating
497 documents with similar or identical contents.
499 Automatic filename insertion on `Save As...`
500 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
501 If a document is saved via `Document->Save As...` then the filename is
502 automatically inserted into the comment header replacing text like
503 `untitled.ext` in the first 3 lines of the file. E.g. if a new ``.c``
504 file is created using `File->New (with Template)` then the text `untitled.c`
505 in line 2 would be replaced with the choosen file name on `Save As...`
506 (this example assumes the default file templates being used).
509 Character sets and Unicode Byte-Order-Mark (BOM)
510 ------------------------------------------------
516 Geany provides support for detecting and converting character sets. So
517 you can open and save files in different character sets, and even
518 convert a file from one character set to another. To do this,
519 Geany uses the character conversion capabilities of the GLib library.
521 Only text files are supported, i.e. opening files which contain
522 NULL-bytes may fail. Geany will try to open the file anyway but it is
523 likely that the file will be truncated because it can only be read up
524 to the first occurrence of a NULL-byte. All characters after this
525 position are lost and are not written when you save the file.
527 Geany tries to detect the encoding of a file while opening it, but
528 auto-detecting the encoding of a file is not easy and sometimes an
529 encoding might not be detected correctly. In this case you have to
530 set the encoding of the file manually in order to display it
531 correctly. You can this in the file open dialog by selecting an
532 encoding in the drop down box or by reloading the file with the
533 file menu item "Reload as". The auto-detection works well for most
534 encodings but there are also some encodings where it is known that
535 auto-detection has problems.
537 There are different ways to set different encodings in Geany:
539 * Using the file open dialog
541 This opens the file with the encoding specified in the encoding drop
542 down box. If the encoding is set to "Detect from file" auto-detection
543 will be used. If the encoding is set to "Without encoding (None)" the
544 file will be opened without any character conversion and Geany will
545 not try to auto-detect the encoding (see below for more information).
547 * Using the "Reload as" menu item
549 This item reloads the current file with the specified encoding. It can
550 help if you opened a file and found out that the wrong encoding was used.
552 * Using the "Set encoding" menu item
554 Contrary to the above two options, this will not change or reload
555 the current file unless you save it. It is useful when you want to
556 change the encoding of the file.
558 * Specifying the encoding in the file itself
560 As mentioned above, auto-detecting the encoding of a file may fail on
561 some encodings. If you know that Geany doesn't open a certain file,
562 you can add the specification line, described in the next section,
563 to the beginning of the file to force Geany to use a specific
564 encoding when opening the file.
567 In-file encoding specification
568 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
570 Geany detects meta tags of HTML files which contain charset information
573 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-15" />
575 and the specified charset is used when opening the file. This is useful if the
576 encoding of the file cannot be detected properly.
577 For non-HTML files you can also define a line like::
579 /* geany_encoding=ISO-8859-15 */
583 # geany_encoding=ISO-8859-15 #
585 to force an encoding to be used. The #, /\* and \*/ are examples
586 of filetype-specific comment characters. It doesn't matter which
587 characters are around the string " geany_encoding=ISO-8859-15 " as long
588 as there is at least one whitespace character before and after this
589 string. Whitespace characters are in this case a space or tab character.
590 An example to use this could be you have a file with ISO-8859-15
591 encoding but Geany constantly detects the file encoding as ISO-8859-1.
592 Then you simply add such a line to the file and Geany will open it
593 correctly the next time.
595 Since Geany 0.15 you can also use lines which match the
596 regular expression used to find the encoding string:
597 ``coding[\t ]*[:=][\t ]*([a-z0-9-]+)[\t ]*``
600 These specifications must be in the first 512 bytes of the file.
601 Anything after the first 512 bytes will not be recognized.
605 # encoding = ISO-8859-15
609 # coding: ISO-8859-15
611 Special encoding "None"
612 ^^^^^^^^^^^^^^^^^^^^^^^
614 There is a special encoding "None" which uses no
615 encoding. It is useful when you know that Geany cannot auto-detect
616 the encoding of a file and it is not displayed correctly. Especially
617 when the file contains NULL-bytes this can be useful to skip auto
618 detection and open the file properly at least until the occurrence
619 of the first NULL-byte. Using this encoding opens the file as it is
620 without any character conversion.
623 Unicode Byte-Order-Mark (BOM)
624 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
626 Furthermore, Geany detects a Unicode Byte Order Mark (see
627 http://en.wikipedia.org/wiki/Byte_Order_Mark for details). Of course,
628 this feature is only available if the opened file is in a Unicode
629 encoding. The Byte Order Mark helps to detect the encoding of a file,
630 e.g. whether it is UTF-16LE or UTF-16BE and so on. On Unix-like systems
631 using a Byte Order Mark could cause some problems for programs not
632 expecting it, e.g. the compiler gcc stops
633 with stray errors, PHP does not parse a script containing a BOM and
634 script files starting with a she-bang maybe cannot be started. In the
635 status bar you can easily see whether the file starts with a BOM or
638 If you want to set a BOM for a file or if you want to remove it
639 from a file, just use the document menu and toggle the checkbox.
642 If you are unsure what a BOM is or if you do not understand where
643 to use it, then it is probably not important for you and you can
655 Geany provides basic code folding support. Folding means the ability to
656 show and hide parts of the text in the current file. You can hide
657 unimportant code sections and concentrate on the parts you are working on
658 and later you can show hidden sections again. In the editor window there is
659 a small grey margin on the left side with [+] and [-] symbols which
660 show hidden parts and hide parts of the file respectively. By
661 clicking on these icons you can simply show and hide sections which are
662 marked by vertical lines within this margin. For many filetypes nested
663 folding is supported, so there may be several fold points within other
667 You can customize the folding icon and line styles - see the
668 filetypes.common `Folding Settings`_.
670 If you don't like it or don't need it at all, you can simply disable
671 folding support completely in the preferences dialog.
673 The folding behaviour can be changed with the "Fold/Unfold all children of
674 a fold point" option in the preference dialog. If activated, Geany will
675 unfold all nested fold points below the current one if they are already
676 folded (when clicking on a [+] symbol).
677 When clicking on a [-] symbol, Geany will fold all nested fold points
678 below the current one if they are unfolded.
680 This option can be inverted by pressing the Shift
681 key while clicking on a fold symbol. That means, if the "Fold/Unfold all
682 children of a fold point" option is enabled, pressing Shift will disable
683 it for this click and vice versa.
686 Column mode editing (rectangular selections)
687 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
689 There is basic support for column mode editing. To use it, create a
690 rectangular selection by holding down the Control and Shift keys
691 (or Alt and Shift on Windows) while selecting some text.
692 Once a rectangular selection exists you can start editing the text within
693 this selection and the modifications will be done for every line in the
696 It is also possible to create a zero-column selection - this is
697 useful to insert text on multiple lines.
699 Drag and drop of text
700 ^^^^^^^^^^^^^^^^^^^^^
702 If you drag selected text in the editor widget of Geany the text is
703 moved to the position where the mouse pointer is when releasing the
704 mouse button. Holding Control when releasing the mouse button will
705 copy the text instead. This behaviour was changed in Geany 0.11 -
706 before the selected text was copied to the new position.
712 Geany allows each document to indent either with a tab character,
713 multiple spaces or a combination of both.
715 The *Tabs* setting indents with one tab character per indent level, and
716 displays tabs as the indent width.
718 The *Spaces* setting indents with the number of spaces set in the indent
719 width for each level.
721 The *Tabs and Spaces* setting indents with spaces as above, then converts
722 as many spaces as it can to tab characters at the rate of one tab for
723 each multiple of the `Various preference` setting
724 *indent_hard_tab_width* (default 8) and displays tabs as the
725 *indent_hard_tab_width* value.
727 The default indent settings are set in `Editor Indentation
728 preferences`_ (see the link for more information).
730 The default settings can be overridden per-document using the
731 Document menu. They can also be overridden by projects - see
732 `Project management`_.
734 The indent mode for the current document is shown on the status bar
738 Indent with Tab characters.
742 Indent with tabs and spaces, depending on how much indentation is
745 Applying new indentation settings
746 `````````````````````````````````
747 After changing the default settings you may wish to apply the new
748 settings to every document in the current session. To do this use the
749 *Project->Apply Default Indentation* menu item.
751 Detecting indent type
752 `````````````````````
753 The *Detect from file* indentation preference can be used to
754 scan each file as it's opened and set the indent type based on
755 how many lines start with a tab vs. 2 or more spaces.
761 When enabled, auto-indentation happens when pressing *Enter* in the
762 Editor. It adds a certain amount of indentation to the new line so the
763 user doesn't always have to indent each line manually.
765 Geany has four types of auto-indentation:
768 Disables auto-indentation completely.
770 Adds the same amount of whitespace on a new line as on the previous line.
771 For the *Tabs* and the *Spaces* indent types the indentation will use the
772 same combination of characters as the previous line. The
773 *Tabs and Spaces* indentation type converts as explained above.
775 Does the same as *Basic* but also indents a new line after an opening
776 brace '{', and de-indents when typing a closing brace '}'. For Python,
777 a new line will be indented after typing ':' at the end of the
780 Similar to *Current chars* but the closing brace will be aligned to
781 match the indentation of the line with the opening brace. This
782 requires the filetype to be one where Geany knows that the Scintilla
783 lexer understands matching braces (C, C++, D, HTML, Pascal, Bash,
786 There is also XML-tag auto-indentation. This is enabled when the
787 mode is more than just Basic, and is also controlled by a filetype
788 setting - see `xml_indent_tags`_.
794 Geany provides a handy bookmarking feature that lets you mark one
795 or more lines in a document, and return the cursor to them using a
798 To place a mark on a line, either left-mouse-click in the left margin
799 of the editor window, or else use Ctrl-m. This will
800 produce a small green plus symbol in the margin. You can have as many
801 marks in a document as you like. Click again (or use Ctrl-m again)
802 to remove the bookmark. To remove all the marks in a given document,
803 use "Remove Markers" in the Document menu.
805 To navigate down your document, jumping from one mark to the next,
806 use Ctrl-. (control period). To go in the opposite direction on
807 the page, use Ctrl-, (control comma). Using the bookmarking feature
808 together with the commands to switch from one editor tab to another
809 (Ctrl-PgUp/PgDn and Ctrl-Tab) provides a particularly fast way to
810 navigate around multiple files.
813 Code navigation history
814 ^^^^^^^^^^^^^^^^^^^^^^^
816 To ease navigation in source files and especially between
817 different files, Geany lets you jump between different navigation
818 points. Currently, this works for the following:
820 * `Go to symbol declaration`_
821 * `Go to symbol definition`_
826 When using one of these actions, Geany remembers your current position
827 and jumps to the new one. If you decide to go back to your previous
828 position in the file, just use "Navigate back a location". To
829 get back to the new position again, just use "Navigate forward a
830 location". This makes it easier to navigate in e.g. foreign code
831 and between different files.
834 Sending text through custom commands
835 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
837 You can define several custom commands in Geany and send the current
838 selection to one of these commands using the *Edit->Format->Send
839 Selection to* menu or keybindings. The output of the command will be
840 used to replace the current selection. This makes it possible to use
841 text formatting tools with Geany in a general way.
843 The selected text will be sent to the standard input of the executed
844 command, so the command should be able to read from it and it should
845 print all results to its standard output which will be read by
846 Geany. To help finding errors in executing the command, the output
847 of the program's standard error will be printed on Geany's standard
850 If there is no selection, the whole current line is used instead.
852 To add a custom command, use the *Send Selection to->Set Custom
853 Commands* menu item. Click on *Add* to get a new item and type the
854 command. You can also specify some command line options. Empty
855 commands are not saved.
857 Normal shell quoting is supported, so you can do things like:
859 * ``sed 's/\./(dot)/g'``
861 The above example would normally be done with the `Replace all`_
862 function, but it can be handy to have common commands already set up.
864 Note that the command is not run in a shell, so if you want to use
865 shell features like pipes and command chains, you need to explicitly
866 launch the shell and pass it your command:
868 * ``sh -c 'sort | uniq'``
874 You can execute the context action command on the current word at the
875 cursor position or the available selection. This word or selection
876 can be used as an argument to the command.
877 The context action is invoked by a menu entry in the popup menu of the
878 editor and also a keyboard shortcut (see the section called
881 The command can be specified in the preferences dialog and also for
882 each filetype (see "context_action_cmd" in the section called
883 `Filetype configuration`_). When the context action is invoked, the filetype
884 specific command is used if available, otherwise the command
885 specified in the preferences dialog is executed.
887 The current word or selection can be referred with the wildcard "%s"
888 in the command, it will be replaced by the current word or
889 selection before the command is executed.
891 For example a context action can be used to open API documentation
892 in a browser window, the command to open the PHP API documentation
895 firefox "http://www.php.net/%s"
897 when executing the command, the %s is substituted by the word near
898 the cursor position or by the current selection. If the cursor is at
899 the word "echo", a browser window will open(assumed your browser is
900 called firefox) and it will open the address: http://www.php.net/echo.
906 Geany can offer a list of possible completions for symbols defined in the
907 tags files and for all words in open documents.
909 The autocompletion list for symbols is presented when the first few
910 characters of the symbol are typed (configurable, see `Editor Completions
911 preferences`_, default 4) or when the *Complete word*
912 keybinding is pressed (configurable, see `Editor keybindings`_,
915 When the defined keybinding is typed and the *Autocomplete all words in
916 document* preference (in `Editor Completions preferences`_)
917 is selected then the autocompletion list will show all matching words
918 in the document, if there are no matching symbols.
920 If you don't want to use autocompletion it can be dismissed until
921 the next symbol by pressing Escape. The autocompletion list is updated
922 as more characters are typed so that it only shows completions that start
923 with the characters typed so far. If no symbols begin with the sequence,
924 the autocompletion window is closed.
926 The up and down arrows will move the selected item. The highlighted
927 item on the autocompletion list can be chosen from the list by pressing
928 Enter/Return. You can also double-click to select an item. The sequence
929 will be completed to match the chosen item, and if the *Drop rest of
930 word on completion* preference is set (in `Editor Completions
931 preferences`_) then any characters after the cursor that match
932 a symbol or word are deleted.
936 By default, pressing Tab will complete the selected item by word part;
937 useful e.g. for adding the prefix ``gtk_combo_box_entry_`` without typing it
942 * gtk_combo_box_<e><TAB>
943 * gtk_combo_box_entry_<s><ENTER>
944 * gtk_combo_box_entry_set_text_column
946 The key combination can be changed from Tab - See `Editor keybindings`_.
947 If you clear/change the key combination for word part completion, Tab
948 will complete the whole word instead, like Enter.
960 When you type ``foo.`` it will show an autocompletion list with 'i' and
963 It only works for languages that set parent scope names for e.g. struct
964 members. Currently this means C-like languages. The C parser only
965 parses global scopes, so this won't work for structs or objects declared
969 User-definable snippets
970 ^^^^^^^^^^^^^^^^^^^^^^^
972 Snippets are small strings or code constructs which can be replaced or
973 completed to a more complex string. So you can save a lot of time when
974 typing common strings and letting Geany do the work for you.
975 To know what to complete or replace Geany reads a configuration file
976 called ``snippets.conf`` at startup.
978 Maybe you need to often type your name, so define a snippet like this::
983 Every time you write ``myname`` <TAB> in Geany, it will replace "myname"
984 with "Enrico Tröger". The key to start autocompletion can be changed
985 in the preferences dialog, by default it is TAB. The corresponding keybinding
986 is called `Complete snippet`.
990 You can override the default snippets using the user
991 ``snippets.conf`` file. Use the *Tools->Configuration
992 Files->snippets.conf* menu item. See also `Configuration file paths`_.
994 This adds the default settings to the user file if the file doesn't
995 exist. Alternatively the file can be created manually, adding only
996 the settings you want to change. All missing settings will be read
997 from the system snippets file.
1001 The file ``snippets.conf`` contains sections defining snippets that
1002 are available for particular filetypes and in general.
1004 The two sections "Default" and "Special" apply to all filetypes.
1005 "Default" contains all snippets which are available for every
1006 filetype and "Special" contains snippets which can only be used in
1007 other snippets. So you can define often used parts of snippets and
1008 just use the special snippet as a placeholder (see the
1009 ``snippets.conf`` for details).
1011 You can define sections with the name of a filetype eg "C++". The
1012 snippets in that section are only available for use in files with that
1013 filetype. Snippets in filetype sections will hide snippets with the
1014 same name in the "Default" section when used in a file of that
1017 **Substitution sequences for snippets**
1019 To define snippets you can use several special character sequences which
1020 will be replaced when using the snippet:
1022 ================ =========================================================
1023 \\n or %newline% Insert a new line (it will be replaced by the used EOL
1024 char(s): LF, CR/LF, or CR).
1026 \\t or %ws% Insert an indentation step, it will be replaced according
1027 to the current document's indent mode.
1029 \\s \\s to force whitespace at beginning or end of a value
1030 ('key= value' won't work, use 'key=\\svalue')
1032 %cursor% Place the cursor at this position after completion has
1033 been done. You can define multiple %cursor% wildcards
1034 and use the keybinding `Move cursor in snippet` to jump
1035 to the next defined cursor position in the completed
1038 %...% "..." means the name of a key in the "Special" section.
1039 If you have defined a key "brace_open" in the "Special"
1040 section you can use %brace_open% in any other snippet.
1041 ================ =========================================================
1043 Snippet names must not contain spaces otherwise they won't
1044 work correctly. But beside that you can define almost any
1045 string as a snippet and use it later in Geany. It is not limited
1046 to existing contructs of certain programming languages(like ``if``,
1047 ``for``, ``switch``). Define whatever you need.
1049 **Template wildcards**
1051 Since Geany 0.15 you can also use most of the available templates wildcards
1052 listed in `Template wildcards`_. All wildcards which are listed as
1053 `available in snippets` can be used. For instance to improve the above example::
1056 myname=My name is {developer}
1057 mysystem=My system: {command:uname -a}
1059 this will replace ``myname`` with "My name is " and the value of the template
1060 preference ``developer``.
1064 You can change the way Geany recognizes the word to complete,
1065 that is how the start and end of a word is recognised when the
1066 snippet completion is requested. The section "Special" may
1067 contain a key "wordchars" which lists all characters a string may contain
1068 to be recognized as a word for completion. Leave it commented to use
1069 default characters or define it to add or remove characters to fit your
1075 Normally you would type the snippet name and press Tab. However, you
1076 can define keybindings for snippets under the *Keybindings* group in
1081 block_cursor=<Ctrl>8
1084 Snippet keybindings may be overridden by Geany's configurable
1088 Inserting Unicode characters
1089 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1091 You can insert Unicode code points by hitting Ctrl-Shift-u, then still holding
1092 Ctrl-Shift, type some hex digits representing the code point for the character
1093 you want and hit Enter or Return (still holding Ctrl-Shift). If you release
1094 Ctrl-Shift before hitting Enter or Return (or any other character), the code
1095 insertion is completed, but the typed character is also entered. In the case
1096 of Enter/Return, it is a newline, as you might expect.
1099 In some earlier versions of Geany, you might need to first unbind Ctrl-Shift-u
1100 in the `keybinding preferences`_, then select *Tools->Reload Configuration*
1101 or restart Geany. Note that it works slightly differently from other GTK
1102 applications, in that you'll need to continue to hold down the Ctrl and Shift
1103 keys while typing the code point hex digits (and the Enter or Return to finish the code point).
1106 Inserting color values
1107 ^^^^^^^^^^^^^^^^^^^^^^
1109 You can insert a color value by selecting *Tools->Color Chooser* from the menu.
1110 A dialog appears to select the wanted color. If the cursor is placed inside a
1111 *#RRGGBB* format color value then the dialog will show that color after opening.
1112 On clicking on *Apply* or *Select* the code for the chosen color will be inserted
1113 in the format *#RRGGBB*. If text is selected, then it will be replaced with the
1114 color code on the first click on *Apply* or *Select*. If no text is selected or
1115 on subsequent clicks the color code is inserted at the current cursor position.
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:
1129 * Go to symbol definition
1130 * Go to symbol declaration
1133 See also `Search`_ preferences.
1137 There are also two toolbar entries:
1142 There are keybindings to focus each of these - see `Focus
1143 keybindings`_. Pressing Escape will then focus the editor.
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.
1155 The Find dialog is used for finding text in one or more open documents.
1157 .. image:: ./images/find_dialog.png
1163 The syntax for the *Use regular expressions* option is shown in
1164 `Regular expressions`_.
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).
1182 To find all matches, click on the Find All expander. This will reveal
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 font 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 be hard to read with a proportional font.
1206 If you want to change the font, you can do this easily by using the following
1207 custom CSS snippet, see `Customizing Geany's appearance using GTK+ CSS`_::
1209 #GeanyDialogSearch GtkEntry /* GTK < 3.20 */,
1210 #GeanyDialogSearch entry /* GTK >= 3.20 */ {
1211 font: 8pt monospace;
1217 The *Find Next/Previous Selection* commands perform a search for the
1218 current selected text. If nothing is selected, by default the current
1219 word is used instead. This can be customized by the
1220 *find_selection_type* preference - see `Various preferences`_.
1222 ===== =============================================
1223 Value *find_selection_type* behaviour
1224 ===== =============================================
1225 0 Use the current word (default).
1226 1 Try the X selection first, then current word.
1227 2 Repeat last search.
1228 ===== =============================================
1234 *Find Usage* searches all open files. It is similar to the *Find All In
1235 Session* option in the Find dialog.
1237 If there is a selection, then it is used as the search text; otherwise
1238 the current word is used. The current word is either taken from the
1239 word nearest the edit cursor, or the word underneath the popup menu
1240 click position when the popup menu is used. The search results are
1241 shown in the Messages tab of the Message Window.
1244 You can also use Find Usage for symbol list items from the popup
1251 *Find in Files* is a more powerful version of *Find Usage* that searches
1252 all files in a certain directory using the Grep tool. The Grep tool
1253 must be correctly set in Preferences to the path of the system's Grep
1254 utility. GNU Grep is recommended (see note below).
1256 .. image:: ./images/find_in_files_dialog.png
1258 The *Search* field is initially set to the current word in the editor
1259 (depending on `Search`_ preferences).
1261 The *Files* setting allows to choose which files are included in the
1262 search, depending on the mode:
1265 Search in all files;
1267 Use the current project's patterns, see `Project properties`_;
1269 Use custom patterns.
1271 Both project and custom patterns use a glob-style syntax, each
1272 pattern separated by a space. To search all ``.c`` and ``.h`` files,
1274 Note that an empty pattern list searches in all files rather
1277 The *Directory* field is initially set to the current document's directory,
1278 unless this field has already been edited and the current document has
1279 not changed. Otherwise, the current document's directory is prepended to
1280 the drop-down history. This can be disabled - see `Search`_ preferences.
1282 The *Encoding* field can be used to define the encoding of the files
1283 to be searched. The entered search text is converted to the chosen encoding
1284 and the search results are converted back to UTF-8.
1286 The *Extra options* field is used to pass any additional arguments to
1290 The *Files* setting uses ``--include=`` when searching recursively,
1291 *Recurse in subfolders* uses ``-r``; both are GNU Grep options and may
1292 not work with other Grep implementations.
1295 Filtering out version control files
1296 ```````````````````````````````````
1298 When using the *Recurse in subfolders* option with a directory that's
1299 under version control, you can set the *Extra options* field to filter
1300 out version control files.
1302 If you have GNU Grep >= 2.5.2 you can use the ``--exclude-dir``
1303 argument to filter out CVS and hidden directories like ``.svn``.
1305 Example: ``--exclude-dir=.svn --exclude-dir=CVS``
1307 If you have an older Grep, you can try using the ``--exclude`` flag
1308 to filter out filenames.
1310 SVN Example: ``--exclude=*.svn-base``
1312 The --exclude argument only matches the file name part, not the path.
1318 The Replace dialog is used for replacing text in one or more open
1321 .. image:: ./images/replace_dialog.png
1323 The Replace dialog has the same options for matching text as the Find
1324 dialog. See the section `Matching options`_.
1326 The *Use regular expressions* option allows regular expressions to
1327 be used in the search string and back references in the replacement
1328 text -- see the entry for '\\n' in `Regular expressions`_.
1333 To replace several matches, click on the *Replace All* expander. This
1334 will reveal several options:
1340 *Replace All In Document* will replace all matching text in the
1341 current document. *Replace All In Session* does the same for all open
1342 documents. *Replace All In Selection* will replace all matching text
1343 in the current selection of the current document.
1346 Go to symbol definition
1347 ^^^^^^^^^^^^^^^^^^^^^^^
1349 If the current word or selection is the name of a symbol definition
1350 (e.g. a function name) and the file containing the symbol definition is
1351 open, this command will switch to that file and go to the
1352 corresponding line number. The current word is either the word
1353 nearest the edit cursor, or the word underneath the popup menu click
1354 position when the popup menu is used.
1356 If there are more symbols with the same name to which the goto can be performed,
1357 a pop up is shown with a list of all the occurrences. After selecting a symbol
1358 from the list Geany jumps to the corresponding symbol location. Geany tries to
1359 suggest the nearest symbol (symbol from the current file, other open documents
1360 or current directory) as the best candidate for the goto and places this symbol
1361 at the beginning of the list typed in boldface.
1364 If the corresponding symbol is on the current line, Geany will first
1365 look for a symbol declaration instead, as this is more useful.
1366 Likewise *Go to symbol declaration* will search for a symbol definition
1367 first in this case also.
1370 Go to symbol declaration
1371 ^^^^^^^^^^^^^^^^^^^^^^^^
1373 Like *Go to symbol definition*, but for a forward declaration such as a
1374 C function prototype or ``extern`` declaration instead of a function
1381 Go to a particular line number in the current file.
1387 You can use regular expressions in the Find and Replace dialogs
1388 by selecting the *Use regular expressions* check box (see `Matching
1389 options`_). The syntax is Perl compatible. Basic syntax is described
1390 in the table below. For full details, see
1391 https://www.geany.org/manual/gtk/glib/glib-regex-syntax.html.
1393 By default regular expressions are matched on a line-by-line basis.
1394 If you are interested in multi-line regular expressions, matched against
1395 the whole buffer at once, see the section `Multi-line regular expressions`_
1399 1. The *Use escape sequences* dialog option always applies for regular
1401 2. Searching backwards with regular expressions is not supported.
1402 3. The *Use multi-line matching* dialog option to select single or
1403 multi-line matching.
1405 **In a regular expression, the following characters are interpreted:**
1407 ======= ============================================================
1408 . Matches any character.
1410 ( This marks the start of a region for tagging a match.
1412 ) This marks the end of a tagged region.
1414 \\n Where n is 1 through 9 refers to the first through ninth tagged
1415 region when searching or replacing.
1417 Searching for (Wiki)\\1 matches WikiWiki.
1419 If the search string was Fred([1-9])XXX and the
1420 replace string was Sam\\1YYY, when applied to Fred2XXX this
1421 would generate Sam2YYY.
1423 \\0 When replacing, the whole matching text.
1425 \\b This matches a word boundary.
1427 \\c A backslash followed by d, D, s, S, w or W, becomes a
1428 character class (both inside and outside sets []).
1431 * D: any char except decimal digits
1432 * s: whitespace (space, \\t \\n \\r \\f \\v)
1433 * S: any char except whitespace (see above)
1434 * w: alphanumeric & underscore
1435 * W: any char except alphanumeric & underscore
1437 \\x This allows you to use a character x that would otherwise have
1438 a special meaning. For example, \\[ would be interpreted as [
1439 and not as the start of a character set. Use \\\\ for a literal
1442 [...] Matches one of the characters in the set. If the first
1443 character in the set is ^, it matches the characters NOT in
1444 the set, i.e. complements the set. A shorthand S-E (start
1445 dash end) is used to specify a set of characters S up to E,
1448 The special characters ] and - have no special
1449 meaning if they appear first in the set. - can also be last
1450 in the set. To include both, put ] first: []A-Z-].
1454 []|-] matches these 3 chars
1455 []-|] matches from ] to | chars
1456 [a-z] any lowercase alpha
1457 [^]-] any char except - and ]
1458 [^A-Z] any char except uppercase alpha
1461 ^ This matches the start of a line (unless used inside a set, see
1464 $ This matches the end of a line.
1466 \* This matches 0 or more times. For example, Sa*m matches Sm, Sam,
1467 Saam, Saaam and so on.
1469 \+ This matches 1 or more times. For example, Sa+m matches Sam,
1470 Saam, Saaam and so on.
1472 \? This matches 0 or 1 time(s). For example, Joh?n matches John, Jon.
1473 ======= ============================================================
1476 This table is adapted from Scintilla and SciTE documentation,
1477 distributed under the `License for Scintilla and SciTE`_.
1480 Multi-line regular expressions
1481 ``````````````````````````````
1484 The *Use multi-line matching* dialog option enables multi-line
1485 regular expressions.
1487 Multi-line regular expressions work just like single-line ones but a
1488 match can span several lines.
1490 While the syntax is the same, a few practical differences applies:
1492 ======= ============================================================
1493 . Matches any character but newlines. This behavior can be changed
1494 to also match newlines using the (?s) option, see
1495 https://www.geany.org/manual/gtk/glib/glib-regex-syntax.html#idp5671632
1497 [^...] A negative range (see above) *will* match newlines if they are
1498 not explicitly listed in that negative range. For example, range
1499 [^a-z] will match newlines, while range [^a-z\\r\\n] won't.
1500 While this is the expected behavior, it can lead to tricky
1501 problems if one doesn't think about it when writing an expression.
1502 ======= ============================================================
1507 The View menu allows various elements of the main window to be shown
1508 or hidden, and also provides various display-related editor options.
1510 Color schemes dialog
1511 ^^^^^^^^^^^^^^^^^^^^
1512 The Color Schemes dialog is available under the *View->Change Color Scheme*
1513 menu item. It lists various color schemes for editor highlighting
1514 styles, including the default scheme first. Other items are available
1515 based on what color scheme files Geany found at startup.
1517 Color scheme files are read from the `Configuration file paths`_ under
1518 the ``colorschemes`` subdirectory. They should have the extension
1519 ``.conf``. The default color scheme
1520 is read from ``filetypes.common``.
1522 The `[named_styles] section`_ and `[named_colors] section`_ are the
1523 same as for ``filetypes.common``.
1525 The ``[theme_info]`` section can contain information about the
1526 theme. The ``name`` and ``description`` keys are read to set the
1527 menu item text and tooltip, respectively. These keys can have
1528 translations, e.g.::
1534 Symbols and tags files
1535 ----------------------
1537 Upon opening, files of supported filetypes are parsed to extract the symbol
1538 information (aka "workspace symbols"). You can also have Geany automatically
1539 load external files containing the symbol information (aka "global
1540 tags files") upon startup, or manually using *Tools --> Load Tags File*.
1542 Geany uses its own tags file format, similar to what ``ctags`` uses
1543 (but is incompatible with ctags). You use Geany to generate global
1544 tags files, as described below.
1550 Each document is parsed for symbols whenever a file is loaded, saved or
1551 modified (see *Symbol list update frequency* preference in the `Editor
1552 Completions preferences`_). These are shown in the Symbol list in the
1553 Sidebar. These symbols are also used for autocompletion and calltips
1554 for all documents open in the current session that have the same filetype.
1556 The *Go to Symbol* commands can be used with all workspace symbols. See
1557 `Go to symbol definition`_.
1563 Global tags files are used to provide symbols for autocompletion and calltips
1564 without having to open the source files containing these symbols. This is intended
1565 for library APIs, as the tags file only has to be updated when you upgrade
1568 You can load a custom global tags file in two ways:
1570 * Using the *Load Tags File* command in the Tools menu.
1571 * By moving or symlinking tags files to the ``tags`` subdirectory of
1572 one of the `configuration file paths`_ before starting Geany.
1574 You can either download these files or generate your own. They have
1579 *lang_ext* is one of the extensions set for the filetype associated
1580 with the tags parser. See the section called `Filetype extensions`_ for
1584 Default global tags files
1585 `````````````````````````
1587 Some global tags files are distributed with Geany and will be loaded
1588 automatically when the corresponding filetype is first used. Currently
1589 this includes global tags files for these languages:
1594 * HTML -- &symbol; completion, e.g. for ampersand, copyright, etc.
1599 Global tags file format
1600 ```````````````````````
1602 Global tags files can have three different formats:
1605 * Pipe-separated format
1608 The first line of global tags files should be a comment, introduced
1609 by ``#`` followed by a space and a string like ``format=pipe``,
1610 ``format=ctags`` or ``format=tagmanager`` respectively, these are
1611 case-sensitive. This helps Geany to read the file properly. If this
1612 line is missing, Geany tries to auto-detect the used format but this
1616 The Tagmanager format is a bit more complex and is used for files
1617 created by the ``geany -g`` command. There is one symbol per line.
1618 Different symbol attributes like the return value or the argument list
1619 are separated with different characters indicating the type of the
1620 following argument. This is the more complete and recommended tags file
1623 Pipe-separated format
1624 *********************
1625 The Pipe-separated format is easier to read and write.
1626 There is one symbol per line and different symbol attributes are separated
1627 by the pipe character (``|``). A line looks like::
1629 basename|string|(string path [, string suffix])|
1631 | The first field is the symbol name (usually a function name).
1632 | The second field is the type of the return value.
1633 | The third field is the argument list for this symbol.
1634 | The fourth field is the description for this symbol but
1635 currently unused and should be left empty.
1637 Except for the first field (symbol name), all other field can be left
1638 empty but the pipe separator must appear for them.
1640 You can easily write your own global tags files using this format.
1641 Just save them in your tags directory, as described earlier in the
1642 section `Global tags files`_.
1646 This is the format that ctags generates, and that is used by Vim.
1647 This format is compatible with the format historically used by Vi.
1649 The format is described at http://ctags.sourceforge.net/FORMAT, but
1650 for the full list of existing extensions please refer to ctags.
1651 However, note that Geany may actually only honor a subset of the
1652 existing extensions.
1654 Generating a global tags file
1655 `````````````````````````````
1657 You can generate your own global tags files by parsing a list of
1658 source files. The command is::
1660 geany -g [-P] <Tags File> <File list>
1662 * Tags File filename should be in the format described earlier --
1663 see the section called `Global tags files`_.
1664 * File list is a list of filenames, each with a full path (unless
1665 you are generating C/C++ tags files and have set the CFLAGS environment
1666 variable appropriately).
1667 * ``-P`` or ``--no-preprocessing`` disables using the C pre-processor
1668 to process ``#include`` directives for C/C++ source files. Use this
1669 option if you want to specify each source file on the command-line
1670 instead of using a 'master' header file. Also can be useful if you
1671 don't want to specify the CFLAGS environment variable.
1673 Example for the wxD library for the D programming language::
1675 geany -g wxd.d.tags /home/username/wxd/wx/*.d
1678 Generating C/C++ tags files
1679 ***************************
1680 You may need to first setup the `C ignore.tags`_ file.
1682 For C/C++ tags files gcc is required by default, so that header files
1683 can be preprocessed to include any other headers they depend upon. If
1684 you do not want this, use the ``-P`` option described above.
1686 For preprocessing, the environment variable CFLAGS should be set with
1687 appropriate ``-I/path`` include paths. The following example works with
1688 the bash shell, generating a tags file for the GnomeUI library::
1690 CFLAGS=`pkg-config --cflags libgnomeui-2.0` geany -g gnomeui.c.tags \
1691 /usr/include/libgnomeui-2.0/gnome.h
1693 You can adapt this command to use CFLAGS and header files appropriate
1694 for whichever libraries you want.
1697 Generating tags files on Windows
1698 ********************************
1699 This works basically the same as on other platforms::
1701 "c:\program files\geany\bin\geany" -g c:\mytags.php.tags c:\code\somefile.php
1707 You can ignore certain symbols for C-based languages if they would lead
1708 to wrong parsing of the code. Use the *Tools->Configuration
1709 Files->ignore.tags* menu item to open the user ``ignore.tags`` file.
1710 See also `Configuration file paths`_.
1712 List all symbol names you want to ignore in this file, separated by spaces
1717 G_GNUC_NULL_TERMINATED
1719 G_GNUC_WARN_UNUSED_RESULT
1721 This will parse code like:
1723 ``gchar **utils_strv_new(const gchar *first, ...)
1724 G_GNUC_NULL_TERMINATED;``
1726 More detailed information about ignore.tags usage from the Exuberant Ctags
1729 Specifies a list of identifiers which are to be specially handled
1730 while parsing C and C++ source files. This option is specifically
1731 provided to handle special cases arising through the use of
1732 pre-processor macros. When the identifiers listed are simple identifiers,
1733 these identifiers will be ignored during parsing of the source files.
1734 If an identifier is suffixed with a '+' character, ctags will also
1735 ignore any parenthesis-enclosed argument list which may immediately
1736 follow the identifier in the source files.
1737 If two identifiers are separated with the '=' character, the first
1738 identifiers is replaced by the second identifiers for parsing purposes.
1740 For even more detailed information please read the manual page of
1743 Geany extends Ctags with a '*' character suffix - this means use
1744 prefix matching, e.g. G_GNUC_* will match G_GNUC_NULL_TERMINATED, etc.
1745 Note that prefix match items should be put after other items to ensure
1746 that items like G_GNUC_PRINTF+ get parsed correctly.
1752 You may adjust Geany's settings using the Edit --> Preferences
1753 dialog. Any changes you make there can be applied by hitting either
1754 the Apply or the OK button. These settings will persist between Geany
1755 sessions. Note that most settings here have descriptive popup bubble
1756 help -- just hover the mouse over the item in question to get help
1759 You may also adjust some View settings (under the View menu) that
1760 persist between Geany sessions. The settings under the Document menu,
1761 however, are only for the current document and revert to defaults
1762 when restarting Geany.
1765 In the paragraphs that follow, the text describing a dialog tab
1766 comes after the screenshot of that tab.
1769 General Startup preferences
1770 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
1772 .. image:: ./images/pref_dialog_gen_startup.png
1777 Load files from the last session
1778 On startup, load the same files you had open the last time you
1781 Load virtual terminal support
1782 Load the library for running a terminal in the message window area.
1784 Enable plugin support
1785 Allow plugins to be used in Geany.
1789 Save window position and geometry
1790 Save the current position and size of the main window so next time
1791 you open Geany it's in the same location.
1794 Have a dialog pop up to confirm that you really want to quit Geany.
1800 Path to start in when opening or saving files.
1801 It must be an absolute path.
1804 Path to start in when opening project files.
1807 By default Geany looks in the system installation and the user
1808 configuration - see `Plugins`_. In addition the path entered here will be
1810 Usually you do not need to set an additional path to search for
1811 plugins. It might be useful when Geany is installed on a multi-user machine
1812 and additional plugins are available in a common location for all users.
1813 Leave blank to not set an additional lookup path.
1816 General Miscellaneous preferences
1817 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1819 .. image:: ./images/pref_dialog_gen_misc.png
1824 Beep on errors when compilation has finished
1825 Have the computer make a beeping sound when compilation of your program
1826 has completed or any errors occurred.
1828 Switch status message list at new message
1829 Switch to the status message tab (in the notebook window at the bottom)
1830 once a new status message arrives.
1832 Suppress status messages in the status bar
1833 Remove all messages from the status bar. The messages are still displayed
1834 in the status messages window.
1837 Another option is to use the *Switch to Editor* keybinding - it
1838 reshows the document statistics on the status bar. See `Focus
1841 Use Windows File Open/Save dialogs
1842 Defines whether to use the native Windows File Open/Save dialogs or
1843 whether to use the GTK default dialogs.
1845 Auto-focus widgets (focus follows mouse)
1846 Give the focus automatically to widgets below the mouse cursor.
1847 This works for the main editor widget, the scribble, the toolbar search field
1848 goto line fields and the VTE.
1854 Always wrap search around the document when finding a match.
1856 Hide the Find dialog
1857 Hide the `Find`_ dialog after clicking Find Next/Previous.
1859 Use the current word under the cursor for Find dialogs
1860 Use current word under the cursor when opening the Find, Find in Files or Replace dialog and
1861 there is no selection. When this option is disabled, the search term last used in the
1862 appropriate Find dialog is used.
1864 Use the current file's directory for Find in Files
1865 When opening the Find in Files dialog, set the directory to search to the directory of the current
1866 active file. When this option is disabled, the directory of the last use of the Find in Files
1867 dialog is used. See `Find in Files`_ for details.
1872 Use project-based session files
1873 Save your current session when closing projects. You will be able to
1874 resume different project sessions, automatically opening the files
1875 you had open previously.
1877 Store project file inside the project base directory
1878 When creating new projects, the default path for the project file contains
1879 the project base path. Without this option enabled, the default project file
1880 path is one level above the project base path.
1881 In either case, you can easily set the final project file path in the
1882 *New Project* dialog. This option provides the more common
1883 defaults automatically for convenience.
1886 Interface preferences
1887 ^^^^^^^^^^^^^^^^^^^^^
1889 .. image:: ./images/pref_dialog_interface_interface.png
1895 Whether to show the sidebar at all.
1898 Show the list of functions, variables, and other information in the
1899 current document you are editing.
1902 Show all the documents you have open currently. This can be used to
1903 change between documents (see `Switching between documents`_) and
1904 to perform some common operations such as saving, closing and reloading.
1907 Whether to place the sidebar on the left or right of the editor window.
1913 Whether to place the message window on the bottom or right of the editor window.
1919 Change the font used to display documents.
1922 Change the font used for the Symbols sidebar tab.
1925 Change the font used for the message window area.
1931 Show the status bar at the bottom of the main window. It gives information about
1932 the file you are editing like the line and column you are on, whether any
1933 modifications were done, the file encoding, the filetype and other information.
1935 Interface Notebook tab preferences
1936 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1938 .. image:: ./images/pref_dialog_interface_notebook.png
1944 Show a notebook tab for all documents so you can switch between them
1945 using the mouse (instead of using the Documents window).
1948 Make each tab show a close button so you can easily close open
1951 Placement of new file tabs
1952 Whether to create a document with its notebook tab to the left or
1953 right of all existing tabs.
1956 Whether to place file tabs next to the current tab
1957 rather than at the edges of the notebook.
1959 Double-clicking hides all additional widgets
1960 Whether to call the View->Toggle All Additional Widgets command
1961 when double-clicking on a notebook tab.
1967 Set the positioning of the editor's notebook tabs to the right,
1968 left, top, or bottom of the editing window.
1971 Set the positioning of the sidebar's notebook tabs to the right,
1972 left, top, or bottom of the sidebar window.
1975 Set the positioning of the message window's notebook tabs to the
1976 right, left, top, or bottom of the message window.
1979 Interface Toolbar preferences
1980 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1982 Affects the main toolbar underneath the menu bar.
1984 .. image:: ./images/pref_dialog_interface_toolbar.png
1990 Whether to show the toolbar.
1992 Append Toolbar to the Menu
1993 Allows to append the toolbar to the main menu bar instead of placing it below.
1994 This is useful to save vertical space.
1997 See `Customizing the toolbar`_.
2003 Select the toolbar icon style to use - either icons and text, just
2005 The choice System default uses whatever icon style is set by GTK.
2008 Select the size of the icons you see (large, small or very small).
2009 The choice System default uses whatever icon size is set by GTK.
2012 Editor Features preferences
2013 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2015 .. image:: ./images/pref_dialog_edit_features.png
2021 Show long lines wrapped around to new display lines.
2026 Whether to move the cursor to the first non-whitespace character
2027 on the line when you hit the home key on your keyboard. Pressing it
2028 again will go to the very start of the line.
2030 Disable Drag and Drop
2031 Do not allow the dragging and dropping of selected text in documents.
2034 Allow groups of lines in a document to be collapsed for easier
2037 Fold/Unfold all children of a fold point
2038 Whether to fold/unfold all child fold points when a parent line
2041 Use indicators to show compile errors
2042 Underline lines with compile errors using red squiggles to indicate
2043 them in the editor area.
2045 Newline strips trailing spaces
2046 Remove any whitespace at the end of the line when you hit the
2047 Enter/Return key. See also `Strip trailing spaces`_. Note
2048 auto indentation is calculated before stripping, so although this
2049 setting will clear a blank line, it will not set the next line
2050 indentation back to zero.
2052 Line breaking column
2053 The editor column number to insert a newline at when Line Breaking
2054 is enabled for the current document.
2056 Comment toggle marker
2057 A string which is added when toggling a line comment in a source file.
2058 It is used to mark the comment as toggled.
2061 Editor Indentation preferences
2062 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2064 .. image:: ./images/pref_dialog_edit_indentation.png
2069 See `Indentation`_ for more information.
2072 The width of a single indent size in spaces. By default the indent
2073 size is equivalent to 4 spaces.
2075 Detect width from file
2076 Try to detect and set the indent width based on file content, when
2080 When Geany inserts indentation, whether to use:
2084 * Tabs and Spaces, depending on how much indentation is on a line
2086 The *Tabs and Spaces* indent type is also known as *Soft tab
2087 support* in some other editors.
2089 Detect type from file
2090 Try to detect and set the indent type based on file content, when
2094 The type of auto-indentation you wish to use after pressing Enter,
2098 Just add the indentation of the previous line.
2100 Add indentation based on the current filetype and any characters at
2101 the end of the line such as ``{``, ``}`` for C, ``:`` for Python.
2103 Like *Current chars* but for C-like languages, make a closing
2104 ``}`` brace line up with the matching opening brace.
2107 If set, pressing tab will indent the current line or selection, and
2108 unindent when pressing Shift-tab. Otherwise, the tab key will
2109 insert a tab character into the document (which can be different
2110 from indentation, depending on the indent type).
2113 There are also separate configurable keybindings for indent &
2114 unindent, but this preference allows the tab key to have different
2115 meanings in different contexts - e.g. for snippet completion.
2117 Editor Completions preferences
2118 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2120 .. image:: ./images/pref_dialog_edit_completions.png
2126 Whether to replace special keywords after typing Tab into a
2127 pre-defined text snippet.
2128 See `User-definable snippets`_.
2130 XML/HTML tag auto-closing
2131 When you open an XML/HTML tag automatically generate its
2134 Automatic continuation multi-line comments
2135 Continue automatically multi-line comments in languages like C, C++
2136 and Java when a new line is entered inside such a comment.
2137 With this option enabled, Geany will insert a ``*`` on every new line
2138 inside a multi-line comment, for example when you press return in the
2142 * This is a C multi-line comment, press <Return>
2144 then Geany would insert::
2148 on the next line with the correct indentation based on the previous line,
2149 as long as the multi-line is not closed by ``*/``.
2151 Autocomplete symbols
2152 When you start to type a symbol name, look for the full string to
2153 allow it to be completed for you.
2155 Autocomplete all words in document
2156 When you start to type a word, Geany will search the whole document for
2157 words starting with the typed part to complete it, assuming there
2158 are no symbol names to show.
2160 Drop rest of word on completion
2161 Remove any word part to the right of the cursor when choosing a
2162 completion list item.
2164 Characters to type for autocompletion
2165 Number of characters of a word to type before autocompletion is
2168 Completion list height
2169 The number of rows to display for the autocompletion window.
2171 Max. symbol name suggestions
2172 The maximum number of items in the autocompletion list.
2174 Symbol list update frequency
2175 The minimum delay (in milliseconds) between two symbol list updates.
2177 This option determines how frequently the symbol list is updated for the
2178 current document. The smaller the delay, the more up-to-date the symbol
2179 list (and then the completions); but rebuilding the symbol list has a
2180 cost in performance, especially with large files.
2182 The default value is 250ms, which means the symbol list will be updated
2183 at most four times per second, even if the document changes continuously.
2185 A value of 0 disables automatic updates, so the symbol list will only be
2186 updated upon document saving.
2189 Auto-close quotes and brackets
2190 ``````````````````````````````
2192 Geany can automatically insert a closing bracket and quote characters when
2193 you open them. For instance, you type a ``(`` and Geany will automatically
2194 insert ``)``. With the following options, you can define for which
2195 characters this should work.
2198 Auto-close parenthesis when typing an opening one
2201 Auto-close curly brackets (braces) when typing an opening one
2204 Auto-close square brackets when typing an opening one
2207 Auto-close single quotes when typing an opening one
2210 Auto-close double quotes when typing an opening one
2213 Editor Display preferences
2214 ^^^^^^^^^^^^^^^^^^^^^^^^^^
2216 This is for visual elements displayed in the editor window.
2218 .. image:: ./images/pref_dialog_edit_display.png
2223 Invert syntax highlighting colors
2224 Invert all colors, by default this makes white text on a black
2227 Show indendation guides
2228 Show vertical lines to help show how much leading indentation there
2232 Mark all tabs with an arrow "-->" symbol and spaces with dots to
2233 show which kinds of whitespace are used.
2236 Display a symbol everywhere that a carriage return or line feed
2240 Show or hide the Line Number margin.
2243 Show or hide the small margin right of the line numbers, which is used
2246 Stop scrolling at last line
2247 When enabled Geany stops scrolling when at the last line of the document.
2248 Otherwise you can scroll one more page even if there are no real lines.
2250 Lines visible around the cursor
2251 The number of lines to maintain between the cursor and the top and bottom
2252 edges of the view. This allows some lines of context around the cursor to
2253 always be visible. If *Stop scrolling at last line* is disabled, the cursor
2254 will never reach the bottom edge when this value is greater than 0.
2260 The long line marker helps to indicate overly-long lines, or as a hint
2261 to the user for when to break the line.
2265 Show a thin vertical line in the editor window at the given column
2268 Change the background color of characters after the given column
2269 position to the color set below. (This is recommended over the
2270 *Line* setting if you use proportional fonts).
2272 Don't mark long lines at all.
2275 Set this value to a value greater than zero to specify the column
2276 where it should appear.
2278 Long line marker color
2279 Set the color of the long line marker.
2285 Virtual space is space beyond the end of each line.
2286 The cursor may be moved into virtual space but no real space will be
2287 added to the document until there is some text typed or some other
2288 text insertion command is used.
2291 Do not show virtual spaces
2293 Only for rectangular selections
2294 Only show virtual spaces beyond the end of lines when drawing a rectangular selection
2297 Always show virtual spaces beyond the end of lines
2303 .. image:: ./images/pref_dialog_files.png
2308 Open new documents from the command-line
2309 Whether to create new documents when passing filenames that don't
2310 exist from the command-line.
2312 Default encoding (new files)
2313 The type of file encoding you wish to use when creating files.
2315 Used fixed encoding when opening files
2316 Assume all files you are opening are using the type of encoding specified below.
2318 Default encoding (existing files)
2319 Opens all files with the specified encoding instead of auto-detecting it.
2320 Use this option when it's not possible for Geany to detect the exact encoding.
2322 Default end of line characters
2323 The end of line characters to which should be used for new files.
2324 On Windows systems, you generally want to use CR/LF which are the common
2325 characters to mark line breaks.
2326 On Unix-like systems, LF is default and CR is used on MAC systems.
2330 Perform formatting operations when a document is saved. These
2331 can each be undone with the Undo command.
2333 Ensure newline at file end
2334 Add a newline at the end of the document if one is missing.
2336 Ensure consistent line endings
2337 Ensures that newline characters always get converted before
2338 saving, avoiding mixed line endings in the same file.
2340 .. _Strip trailing spaces:
2342 Strip trailing spaces
2343 Remove any whitespace at the end of each document line.
2346 This does not apply to Diff documents, e.g. patch files.
2348 Replace tabs with spaces
2349 Replace all tabs in the document with the equivalent number of spaces.
2352 It is better to use spaces to indent than use this preference - see
2358 Recent files list length
2359 The number of files to remember in the recently used files list.
2362 The number of seconds to periodically check the current document's
2363 file on disk in case it has changed. Setting it to 0 will disable
2367 These checks are only performed on local files. Remote files are
2368 not checked for changes due to performance issues
2369 (remote files are files in ``~/.gvfs/``).
2375 .. image:: ./images/pref_dialog_tools.png
2381 The command to execute a script in a terminal. Occurrences of %c
2382 in the command are substituted with the run script name, see
2383 `Terminal emulators`_.
2386 The location of your web browser executable.
2389 The location of the grep executable.
2392 For Windows users: at the time of writing it is recommended to use
2393 the grep.exe from the UnxUtils project
2394 (http://sourceforge.net/projects/unxutils). The grep.exe from the
2395 Mingw project for instance might not work with Geany at the moment.
2401 Set this to a command to execute on the current word.
2402 You can use the "%s" wildcard to pass the current word below the cursor
2403 to the specified command.
2406 Template preferences
2407 ^^^^^^^^^^^^^^^^^^^^
2409 This data is used as meta data for various template text to insert into
2410 a document, such as the file header. You only need to set fields that
2411 you want to use in your template files.
2413 .. image:: ./images/pref_dialog_templ.png
2419 The name of the developer who will be creating files.
2422 The initials of the developer.
2425 The email address of the developer.
2428 You may wish to add anti-spam markup, e.g. ``name<at>site<dot>ext``.
2431 The company the developer is working for.
2434 The initial version of files you will be creating.
2437 Specify a format for the {year} wildcard. You can use any conversion specifiers
2438 which can be used with the ANSI C strftime function. For details please see
2439 http://man.cx/strftime.
2442 Specify a format for the {date} wildcard. You can use any conversion specifiers
2443 which can be used with the ANSI C strftime function. For details please see
2444 http://man.cx/strftime.
2447 Specify a format for the {datetime} wildcard. You can use any conversion specifiers
2448 which can be used with the ANSI C strftime function. For details please see
2449 http://man.cx/strftime.
2452 Keybinding preferences
2453 ^^^^^^^^^^^^^^^^^^^^^^
2455 .. image:: ./images/pref_dialog_keys.png
2457 There are some commands listed in the keybinding dialog that are not, by default,
2458 bound to a key combination, and may not be available as a menu item.
2461 For more information see the section `Keybindings`_.
2464 Printing preferences
2465 ^^^^^^^^^^^^^^^^^^^^
2467 .. image:: ./images/pref_dialog_printing.png
2469 Use external command for printing
2470 Use a system command to print your file out.
2472 Use native GTK printing
2473 Let the GTK GUI toolkit handle your print request.
2476 Print the line numbers on the left of your paper.
2479 Print the page number on the bottom right of your paper.
2482 Print a header on every page that is sent to the printer.
2484 Use base name of the printed file
2485 Don't use the entire path for the header, only the filename.
2488 How the date should be printed. You can use the same format
2489 specifiers as in the ANSI C function strftime(). For details please
2490 see http://man.cx/strftime.
2496 .. image:: ./images/pref_dialog_various.png
2498 Rarely used preferences, explained in the table below. A few of them require
2499 restart to take effect, and a few other will only affect newly opened or created
2500 documents before restart.
2502 ================================ =========================================== ========== ===========
2503 Key Description Default Applies
2504 ================================ =========================================== ========== ===========
2505 **``editor`` group**
2506 use_gtk_word_boundaries Whether to look for the end of a word true to new
2507 when using word-boundary related documents
2508 Scintilla commands (see `Scintilla
2509 keyboard commands`_).
2510 brace_match_ltgt Whether to highlight <, > angle brackets. false immediately
2511 complete_snippets_whilst_editing Whether to allow completion of snippets false immediately
2512 when editing an existing line (i.e. there
2513 is some text after the current cursor
2514 position on the line). Only used when the
2515 keybinding `Complete snippet` is set to
2517 show_editor_scrollbars Whether to display scrollbars. If set to true immediately
2518 false, the horizontal and vertical
2519 scrollbars are hidden completely.
2520 indent_hard_tab_width The size of a tab character. Don't change 8 immediately
2521 it unless you really need to; use the
2522 indentation settings instead.
2523 editor_ime_interaction Input method editor (IME)'s candidate 0 to new
2524 window behaviour. May be 0 (windowed) or documents
2526 **``interface`` group**
2527 show_symbol_list_expanders Whether to show or hide the small true to new
2528 expander icons on the symbol list documents
2530 compiler_tab_autoscroll Whether to automatically scroll to the true immediately
2531 last line of the output in the Compiler
2533 statusbar_template The status bar statistics line format. See below. immediately
2534 (See `Statusbar Templates`_ for details).
2535 new_document_after_close Whether to open a new document after all false immediately
2536 documents have been closed.
2537 msgwin_status_visible Whether to show the Status tab in the true immediately
2539 msgwin_compiler_visible Whether to show the Compiler tab in the true immediately
2541 msgwin_messages_visible Whether to show the Messages tab in the true immediately
2543 msgwin_scribble_visible Whether to show the Scribble tab in the true immediately
2545 **``terminal`` group**
2546 send_selection_unsafe By default, Geany strips any trailing false immediately
2547 newline characters from the current
2548 selection before sending it to the terminal
2549 to not execute arbitrary code. This is
2550 mainly a security feature.
2551 If, for whatever reasons, you really want
2552 it to be executed directly, set this option
2554 send_cmd_prefix String with which prefix the commands sent Empty immediately
2555 to the shell. This may be used to tell
2556 some shells (BASH with ``HISTCONTROL`` set
2557 to ``ignorespace``, ZSH with
2558 ``HIST_IGNORE_SPACE`` enabled, etc.) from
2559 putting these commands in their history by
2560 setting this to a space. Note that leading
2561 spaces must be escaped using `\s` in the
2564 allow_always_save Whether files can be saved always, even false immediately
2565 if they don't have any changes.
2566 By default, the Save button and menu
2567 item are disabled when a file is
2568 unchanged. When setting this option to
2569 true, the Save button and menu item are
2570 always active and files can be saved.
2571 use_atomic_file_saving Defines the mode how Geany saves files to false immediately
2572 disk. If disabled, Geany directly writes
2573 the content of the document to disk. This
2574 might cause loss of data when there is
2575 no more free space on disk to save the
2576 file. When set to true, Geany first saves
2577 the contents into a temporary file and if
2578 this succeeded, the temporary file is
2579 moved to the real file to save.
2580 This gives better error checking in case of
2581 no more free disk space. But it also
2582 destroys hard links of the original file
2583 and its permissions (e.g. executable flags
2584 are reset). Use this with care as it can
2585 break things seriously.
2586 The better approach would be to ensure your
2587 disk won't run out of free space.
2588 use_gio_unsafe_file_saving Whether to use GIO as the unsafe file true immediately
2589 saving backend. It is better on most
2590 situations but is known not to work
2591 correctly on some complex setups.
2592 gio_unsafe_save_backup Make a backup when using GIO unsafe file false immediately
2593 saving. Backup is named `filename~`.
2594 keep_edit_history_on_reload Whether to maintain the edit history when true immediately
2595 reloading a file, and allow the operation
2597 reload_clean_doc_on_file_change Whether to automatically reload documents false immediately
2598 that have no changes but which have changed
2600 If unsaved changes exist then the user is
2601 prompted to reload manually.
2602 save_config_on_file_change Automatically save Geany's configuration true immediately
2603 to disk once the document list changes
2604 (i.e. new documents are opened, saved or
2605 closed). This helps to prevent accidentally
2606 losing the session file list or other
2607 changed settings when Geany is not shut
2608 down cleanly. Disable this option if your
2609 configuration directory is on a slow drive,
2610 network share or similar and you experience
2612 extract_filetype_regex Regex to extract filetype name from file See link immediately
2613 via capture group one.
2614 See `ft_regex`_ for default.
2615 **``search`` group**
2616 find_selection_type See `Find selection`_. 0 immediately
2617 replace_and_find_by_default Set ``Replace & Find`` button as default so true immediately
2618 it will be activated when the Enter key is
2619 pressed while one of the text fields has
2622 number_ft_menu_items The maximum number of menu items in the 2 on restart
2623 filetype build section of the Build menu.
2624 number_non_ft_menu_items The maximum number of menu items in the 3 on restart
2625 independent build section.
2626 number_exec_menu_items The maximum number of menu items in the 2 on restart
2627 execute section of the Build menu.
2628 **``socket`` group**
2629 socket_remote_cmd_port TCP port number to be used for inter 2 on restart
2630 process communication (i.e. with other
2631 Geany instances, e.g. "Open with Geany").
2632 Only available on Windows, valid port
2633 range: 1024 to 65535.
2634 ================================ =========================================== ========== ===========
2639 The default statusbar template is (note ``\t`` = tab):
2641 ``line: %l / %L\t col: %c\t sel: %s\t %w %t %mmode: %M encoding: %e filetype: %f scope: %S``
2643 Settings the preference to an empty string will also cause Geany to use this
2646 The following format characters are available for the statusbar template:
2648 ============ ===========================================================
2649 Placeholder Description
2650 ============ ===========================================================
2651 ``%l`` The current line number starting at 1
2652 ``%L`` The total number of lines
2653 ``%c`` The current column number starting at 0, including virtual
2655 ``%C`` The current column number starting at 1, including virtual
2657 ``%s`` The number of selected characters or if only whole lines
2658 selected, the number of selected lines.
2659 ``%n`` The number of selected characters, even if only whole lines
2661 ``%w`` Shows ``RO`` when the document is in read-only mode,
2662 otherwise shows whether the editor is in overtype (OVR)
2663 or insert (INS) mode.
2664 ``%t`` Shows the indentation mode, either tabs (TAB),
2665 spaces (SP) or both (T/S).
2666 ``%m`` Shows whether the document is modified (MOD) or nothing.
2667 ``%M`` The name of the document's line-endings (ex. ``Unix (LF)``)
2668 ``%e`` The name of the document's encoding (ex. UTF-8).
2669 ``%f`` The filetype of the document (ex. None, Python, C, etc).
2670 ``%S`` The name of the scope where the caret is located.
2671 ``%p`` The caret position in the entire document starting at 0.
2672 ``%r`` Shows whether the document is read-only (RO) or nothing.
2673 ``%Y`` The Scintilla style number at the caret position. This is
2674 useful if you're debugging color schemes or related code.
2675 ============ ===========================================================
2677 Terminal (VTE) preferences
2678 ^^^^^^^^^^^^^^^^^^^^^^^^^^
2680 See also: `Virtual terminal emulator widget (VTE)`_.
2682 .. image:: ./images/pref_dialog_vte.png
2688 Select the font that will be used in the terminal emulation control.
2691 Select the font color.
2694 Select the background color of the terminal.
2697 Select the background image to show behind the terminal's text.
2700 The number of lines buffered so that you can scroll though the history.
2703 The location of the shell on your system.
2706 Scroll the terminal to the prompt line when pressing a key.
2709 Scroll the output down.
2712 Let the terminal cursor blink.
2714 Override Geany keybindings
2715 Allow the VTE to receive keyboard shortcuts (apart from focus commands).
2717 Disable menu shortcut key (F10 by default)
2718 Disable the menu shortcut when you are in the virtual terminal.
2720 Follow path of the current file
2721 Make the path of the terminal change according to the path of the
2724 Execute programs in VTE
2725 Execute programs in the virtual terminal instead of using the external
2726 terminal tool. Note that if you run multiple execute commands at once
2727 the output may become mixed together in the VTE.
2729 Don't use run script
2730 Don't use the simple run script which is usually used to display
2731 the exit status of the executed program.
2732 This can be useful if you already have a program running in the VTE
2733 like a Python console (e.g. ipython). Use this with care.
2739 Project management is optional in Geany. Currently it can be used for:
2741 * Storing and opening session files on a project basis.
2742 * Overriding default settings with project equivalents.
2743 * Configuring the Build menu on a project basis.
2745 A list of session files can be stored and opened with the project
2746 when the *Use project-based session files* preference is enabled,
2747 in the `Projects`_ group of the `General Miscellaneous preferences`_ tab
2748 of the `Preferences`_ dialog.
2750 As long as a project is open, the Build menu will use
2751 the items defined in project's settings, instead of the defaults.
2752 See `Build Menu Configuration`_ for information on configuring the menu.
2754 The current project's settings are saved when it is closed, or when
2755 Geany is shutdown. When restarting Geany, the previously opened project
2756 file that was in use at the end of the last session will be reopened.
2758 The project menu items are detailed below.
2764 To create a new project, fill in the *Name* field. By default this
2765 will setup a new project file ``~/projects/name.geany``. Usually it's
2766 best to store all your project files in the same directory (they are
2767 independent of any source directory trees).
2769 The Base path text field is setup to use ``~/projects/name``. This
2770 can safely be set to any existing path -- it will not touch the file
2771 structure contained in it.
2777 You can set an optional description for the project. Currently it's
2778 only used for a template wildcard - see `Template wildcards`_.
2780 The *Base path* field is used as the directory to run the Build menu commands.
2781 The specified path can be an absolute path or it is considered to be
2782 relative to the project's file name.
2784 The *File patterns* field allows to specify a list of file patterns for the
2785 project, which can be used in the `Find in files`_ dialog.
2787 The *Indentation* tab allows you to override the default
2788 `Indentation`_ settings.
2794 The Open command displays a standard file chooser, starting in
2795 ``~/projects``. Choose a project file named with the ``.geany``
2798 When project session support is enabled, Geany will close the currently
2799 open files and open the session files associated with the project.
2805 Project file settings are saved when the project is closed.
2807 When project session support is enabled, Geany will close the project
2808 session files and open any previously closed default session files.
2813 After editing code with Geany, the next step is to compile, link, build,
2814 interpret, run etc. As Geany supports many languages each with a different
2815 approach to such operations, and as there are also many language independent
2816 software building systems, Geany does not have a built-in build system, nor
2817 does it limit which system you can use. Instead the build menu provides
2818 a configurable and flexible means of running any external commands to
2819 execute your preferred build system.
2821 This section provides a description of the default configuration of the
2822 build menu and then covers how to configure it, and where the defaults fit in.
2824 Running the commands from within Geany has two benefits:
2826 * The current file is automatically saved before the command is run.
2827 * The output is captured in the Compiler notebook tab and parsed for
2830 Warnings and errors that can be parsed for line numbers will be shown in
2831 red in the Compiler tab and you can click on them to switch to the relevant
2832 source file (or open it) and mark the line number. Also lines with
2833 warnings or errors are marked in the source, see `Indicators`_ below.
2836 If Geany's default error message parsing does not parse errors for
2837 the tool you're using, you can set a custom regex in the
2838 `Set Build Commands dialog`_, see `Build Menu Configuration`_.
2843 Indicators are red squiggly underlines which are used to highlight
2844 errors which occurred while compiling the current file. So you can
2845 easily see where your code failed to compile. You can remove them by
2846 selecting *Remove Error Indicators* in the Document menu.
2848 If you do not like this feature, you can disable it - see `Editor Features
2852 Default build menu items
2853 ^^^^^^^^^^^^^^^^^^^^^^^^
2854 Depending on the current file's filetype, the default Build menu will contain
2855 the following items:
2861 * Make Custom Target
2866 * Set Build Menu Commands
2872 The Compile command has different uses for different kinds of files.
2874 For compilable languages such as C and C++, the Compile command is
2875 set up to compile the current source file into a binary object file.
2877 Java source files will be compiled to class file bytecode.
2879 Interpreted languages such as Perl, Python, Ruby will compile to
2880 bytecode if the language supports it, or will run a syntax check,
2881 or if that is not available will run the file in its language interpreter.
2886 For compilable languages such as C and C++, the Build command will link
2887 the current source file's equivalent object file into an executable. If
2888 the object file does not exist, the source will be compiled and linked
2889 in one step, producing just the executable binary.
2891 Interpreted languages do not use the Build command.
2894 If you need complex settings for your build system, or several
2895 different settings, then writing a Makefile and using the Make
2896 commands is recommended; this will also make it easier for users to
2897 build your software.
2902 Source code linters are often used to find code that doesn't correspond to
2903 certain style guidelines: non-portable code, common or hard to find
2904 errors, code "smells", variables used before being set, unused functions,
2905 division by zero, constant conditions, etc. Linters inspect the code and
2906 issue warnings much like the compilers do. This is formally referred to as
2907 static code analysis.
2909 Some common linters are pre-configured for you in the Build menu (``pep8``
2910 for Python, ``cppcheck`` for C/C++, JSHint for JavaScript, ``xmllint`` for
2911 XML, ``hlint`` for Haskell, ``shellcheck`` for shell code, ...), but all
2912 these are standalone tools you need to obtain before using.
2917 This runs "make" in the same directory as the
2923 This is similar to running 'Make' but you will be prompted for
2924 the make target name to be passed to the Make tool. For example,
2925 typing 'clean' in the dialog prompt will run "make clean".
2931 Make object will run "make current_file.o" in the same directory as
2932 the current file, using the filename for 'current_file'. It is useful
2933 for building just the current file without building the whole project.
2938 The next error item will move to the next detected error in the file.
2942 The previous error item will move to the previous detected error in the file.
2947 Execute will run the corresponding executable file, shell script or
2948 interpreted script in a terminal window. The command set in the
2949 `Set Build Commands dialog`_ is run in a script to ensure the terminal
2950 stays open after execution completes. Note: see `Terminal emulators`_
2951 below for the command format. Alternatively the built-in VTE can be used
2952 if it is available - see `Virtual terminal emulator widget (VTE)`_.
2954 After your program or script has finished executing, the run script will
2955 prompt you to press the return key. This allows you to review any text
2956 output from the program before the terminal window is closed.
2959 The execute command output is not parsed for errors.
2962 Stopping running processes
2963 ``````````````````````````
2965 When there is a running program, the Execute menu item in the menu and
2966 the Run button in the toolbar
2967 each become a stop button so you can stop the current running program (and
2968 any child processes). This works by sending the SIGQUIT signal to the process.
2970 Depending on the process you started it is possible that the process
2971 cannot be stopped. For example this can happen when the process creates
2972 more than one child process.
2978 The Terminal field of the tools preferences tab requires a command to
2979 execute the terminal program and to pass it the name of the Geany run
2980 script that it should execute in a Bourne compatible shell (eg /bin/sh).
2981 The marker "%c" is substituted with the name of the Geany run script,
2982 which is created in the temporary directory and which changes the working
2983 directory to the directory set in the `Set Build Commands dialog`_.
2985 As an example the default (Linux) command is::
2987 xterm -e "/bin/sh %c"
2993 By default Compile, Build and Execute are fairly basic commands. You
2994 may wish to customise them using *Set Build Commands*.
2996 E.g. for C you can add any include paths and compile flags for the
2997 compiler, any library names and paths for the linker, and any
2998 arguments you want to use when running Execute.
3000 Build menu configuration
3001 ^^^^^^^^^^^^^^^^^^^^^^^^
3003 The build menu has considerable flexibility and configurability, allowing
3004 menu labels, the commands they execute and the directory they execute
3005 in to be configured. For example, if you change one of the default make
3006 commands to run say 'waf' you can also change the label to match.
3007 These settings are saved automatically when Geany is shut down.
3009 The build menu is divided into four groups of items each with different
3012 * Filetype build commands - are configurable and depend on the filetype of the
3013 current document; they capture output in the compiler tab and parse it for
3015 * Independent build commands - are configurable and mostly don't depend on the
3016 filetype of the current document; they also capture output in the
3017 compiler tab and parse it for errors.
3018 * Execute commands - are configurable and intended for executing your
3019 program or other long running programs. The output is not parsed for
3020 errors and is directed to the terminal command selected in `Tools
3022 * Fixed commands - these perform built-in actions:
3024 * Go to the next error.
3025 * Go to the previous error.
3026 * Show the build menu commands dialog.
3028 The maximum numbers of items in each of the configurable groups can be
3029 configured in `Various preferences`_. Even though the maximum number of
3030 items may have been increased, only those menu items that have commands
3031 configured are shown in the menu.
3033 The groups of menu items obtain their configuration from four potential
3034 sources. The highest priority source that has the menu item defined will
3035 be used. The sources in decreasing priority are:
3037 * A project file if open
3038 * The user preferences
3039 * The system filetype definitions
3042 The detailed relationships between sources and the configurable menu item groups
3043 is shown in the following table:
3045 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
3046 | Group | Project File | Preferences | System Filetype | Defaults |
3047 +==============+=====================+==========================+===================+===============================+
3048 | Filetype | Loads From: project | Loads From: | Loads From: | None |
3049 | Build | file | filetypes.xxx file in | filetypes.xxx in | |
3050 | | | ~/.config/geany/filedefs | Geany install | |
3051 | | Saves To: project | | | |
3052 | | file | Saves to: as above, | Saves to: as user | |
3053 | | | creating if needed. | preferences left. | |
3054 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
3055 | Independent | Loads From: project | Loads From: | Loads From: | 1: |
3056 | Build | file | geany.conf file in | filetypes.xxx in | Label: _Make |
3057 | | | ~/.config/geany | Geany install | Command: make |
3058 | | Saves To: project | | | |
3059 | | file | Saves to: as above, | Saves to: as user | 2: |
3060 | | | creating if needed. | preferences left. | Label: Make Custom _Target |
3061 | | | | | Command: make |
3064 | | | | | Label: Make _Object |
3065 | | | | | Command: make %e.o |
3066 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
3067 | Execute | Loads From: project | Loads From: | Loads From: | Label: _Execute |
3068 | | file or else | geany.conf file in | filetypes.xxx in | Command: ./%e |
3069 | | filetype defined in | ~/.config/geany or else | Geany install | |
3070 | | project file | filetypes.xxx file in | | |
3071 | | | ~/.config/geany/filedefs | Saves To: as user | |
3072 | | Saves To: | | preferences left. | |
3073 | | project file | Saves To: | | |
3074 | | | filetypes.xxx file in | | |
3075 | | | ~/.config/geany/filedefs | | |
3076 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
3078 The following notes on the table may reference cells by coordinate as *(group, source)*:
3080 * Filetype filenames - for filetypes.xxx substitute the appropriate extension for
3081 the filetype of the current document for xxx - see `filenames`_.
3083 * System Filetypes - Labels loaded from these sources are locale sensitive
3084 and can contain translations.
3086 * *(Filetype build, Project and Preferences)* - preferences use a full
3087 filetype file so that users can configure all other filetype preferences
3088 as well. Projects can only configure menu items per filetype. Saving
3089 in the project file means that there is only one file per project not
3092 * *(Filetype-Independent build, System Filetype)* - although conceptually strange, defining
3093 filetype-independent commands in a filetype file, this provides the ability to
3094 define filetype dependent default menu items.
3096 * *(Execute, Project and Preferences)* - the project independent
3097 execute and preferences independent execute commands can only be set by hand
3098 editing the appropriate file, see `Preferences file format`_ and `Project file
3101 Set Build Commands dialog
3102 ^^^^^^^^^^^^^^^^^^^^^^^^^
3104 Most of the configuration of the build menu is done through the `Set
3105 Build Commands dialog`_. When no project is open, you can edit the
3106 configuration sourced from user preferences using the *Build->Set Build
3107 Commands* menu item. You can edit the configuration sourced from a
3108 project in the *Build* tab of the `Project Properties`_ dialog. The
3109 former menu item also shows the project dialog when a project is open.
3110 Both use the same form shown below.
3112 .. image:: ./images/build_menu_commands_dialog.png
3114 The dialog is divided into three sections:
3116 * Filetype build commands (selected based on the current document's filetype).
3117 * Independent build commands (available regardless of filetype).
3118 * Filetype execute commands.
3120 The filetype and independent build sections also each contain a field for the regular
3121 expression used for parsing command output for error and warning messages.
3123 The columns in the first three sections allow setting of the label, command,
3124 and working directory to run the command in. An item with an empty
3125 label will not be shown in the menu. An empty working directory will
3126 default to the directory of the current document.
3128 If there is no current document then the command will not run.
3130 The dialog will always show the command selected by priority, not just the
3131 commands configured in this configuration source. This ensures that you always
3132 see what the menu item is going to do if activated.
3134 If the current source of the menu item is higher priority than the
3135 configuration source you are editing then the command will be shown
3136 in the dialog but will be insensitive (greyed out). This can't happen
3137 with the project source but can with the preferences source dialog.
3139 The clear buttons remove the definition from the configuration source you are editing.
3140 When you do this the command from the next lower priority source will be shown.
3141 To hide lower priority menu items without having anything show in the menu,
3142 configure with nothing in the label but at least one character in the command.
3144 Substitutions in commands and working directories
3145 `````````````````````````````````````````````````
3147 Before the command is run, the first occurrence of each of the following
3148 two character sequences in each of the command and working directory
3149 fields is substituted by the items specified below:
3151 * %d - the absolute path to the directory of the current file.
3152 * %e - the name of the current file without the extension or path.
3153 * %f - the name of the current file without the path.
3154 * %p - if a project is open, the base path from the project.
3155 * %l - the line number at the current cursor position.
3158 If the base path set in `Project Properties`_ is not an absolute path, then it is
3159 taken as relative to the directory of the project file. This allows a project file
3160 stored in the source tree to specify all commands and working directories relative
3161 to the tree itself, so that the whole tree including the project file, can be moved
3162 and even checked into and out of version control without having to re-configure the
3165 Build menu keyboard shortcuts
3166 `````````````````````````````
3168 Keyboard shortcuts can be defined for:
3170 * the first two filetype build menu items
3171 * the first three independent build menu items
3172 * the first execute menu item
3173 * the fixed menu items (Next/Previous Error, Set Commands)
3175 In the keybindings configuration dialog (see `Keybinding preferences`_)
3176 these items are identified by the default labels shown in the `Build Menu`_ section above.
3178 It is currently not possible to bind keyboard shortcuts to more than these menu items.
3179 You can also use underlines in the labels to set mnemonic characters.
3183 The configurable Build Menu capability was introduced in Geany 0.19 and
3184 required a new section to be added to the configuration files (See
3185 `Preferences file format`_). Geany will still load older format project,
3186 preferences and filetype file settings and will attempt to map them into the new
3187 configuration format. There is not a simple clean mapping between the formats.
3188 The mapping used produces the most sensible results for the majority of cases.
3189 However, if they do not map the way you want, you may have to manually
3190 configure some settings using the `Set Build Commands dialog`_.
3192 Any setting configured in either of these dialogs will override settings mapped from
3193 older format configuration files.
3198 Since Geany 0.13 there has been printing support using GTK's printing API.
3199 The printed page(s) will look nearly the same as on your screen in Geany.
3200 Additionally, there are some options to modify the printed page(s).
3203 The background text color is set to white, except for text with
3204 a white foreground. This allows dark color schemes to save ink
3207 You can define whether to print line numbers, page numbers at the bottom of
3208 each page and whether to print a page header on each page. This header
3209 contains the filename of the printed document, the current page number and
3210 the date and time of printing. By default, the file name of the document
3211 with full path information is added to the header. If you prefer to add
3212 only the basename of the file(without any path information) you can set it
3213 in the preferences dialog. You can also adjust the format of the date and
3214 time added to the page header. The available conversion specifiers are the
3215 same as the ones which can be used with the ANSI C strftime function.
3217 All of these settings can also be changed in the print dialog just before
3218 actual printing is done.
3219 On Unix-like systems the provided print dialog offers a print preview. The
3220 preview file is opened with a PDF viewer and by default GTK uses ``evince``
3221 for print preview. If you have not installed evince or just want to use
3222 another PDF viewer, you can change the program to use in the file
3223 ``settings.ini`` (usually found in ``~/.config/gtk-3.0``, see the
3224 `GTK documentation`_). For example, use::
3227 gtk-print-preview-command = epdfview %f
3229 Of course, you can also use xpdf, kpdf or whatever as the print preview
3230 command. That command should ideally delete the temporary file referenced by
3231 ``%f``. See the `GTK documentation for the setting`_ for more details.
3233 .. _GTK documentation: https://developer.gnome.org/gtk3/stable/GtkSettings.html#GtkSettings.description
3234 .. _GTK documentation for the setting: https://developer.gnome.org/gtk3/stable/GtkSettings.html#GtkSettings--gtk-print-preview-command
3237 Geany also provides an alternative basic printing support using a custom
3238 print command. However, the printed document contains no syntax highlighting.
3239 You can adjust the command to which the filename is passed in the preferences
3240 dialog. The default command is::
3244 ``%f`` will be substituted by the filename of the current file. Geany
3245 will not show errors from the command itself, so you should make
3246 sure that it works before(e.g. by trying to execute it from the
3249 A nicer example, which many prefer is::
3251 % a2ps -1 --medium=A4 -o - %f | xfprint4
3253 But this depends on a2ps and xfprint4. As a replacement for xfprint4,
3254 gtklp or similar programs can be used.
3261 Plugins are loaded at startup, if the *Enable plugin support*
3262 general preference is set. There is also a command-line option,
3263 ``-p``, which prevents plugins being loaded. Plugins are scanned in
3264 the following directories:
3266 * ``$prefix/lib/geany`` on Unix-like systems (see `Installation prefix`_)
3267 * The ``lib`` subfolder of the installation path on Windows.
3268 * The ``plugins`` subfolder of the user configuration directory - see
3269 `Configuration file paths`_.
3270 * The `Extra plugin path` preference (usually blank) - see `Paths`_.
3272 Most plugins add menu items to the *Tools* menu when they are loaded.
3274 See also `Plugin documentation`_ for information about single plugins
3275 which are included in Geany.
3279 The Plugin Manager dialog lets you choose which plugins
3280 should be loaded at startup. You can also load and unload plugins on the
3281 fly using this dialog. Once you click the checkbox for a specific plugin
3282 in the dialog, it is loaded or unloaded according to its previous state.
3283 By default, no plugins are loaded at startup until you select some.
3284 You can also configure some plugin specific options if the plugin
3291 Geany supports the default keyboard shortcuts for the Scintilla
3292 editing widget. For a list of these commands, see `Scintilla
3293 keyboard commands`_. The Scintilla keyboard shortcuts will be overridden
3294 by any custom keybindings with the same keyboard shortcut.
3300 There are some non-configurable bindings to switch between documents,
3301 listed below. These can also be overridden by custom keybindings.
3303 =============== ==================================
3305 =============== ==================================
3306 Alt-[1-9] Select left-most tab, from 1 to 9.
3307 Alt-0 Select right-most tab.
3308 =============== ==================================
3310 See also `Notebook tab keybindings`_.
3313 Configurable keybindings
3314 ^^^^^^^^^^^^^^^^^^^^^^^^
3316 For all actions listed below you can define your own keybindings. Open
3317 the Preferences dialog, select the desired action and click on
3318 change. In the resulting dialog you can press the key combination you
3319 want to assign to the action and it will be saved when you press OK.
3320 You can define only one key combination for each action and each key
3321 combination can only be defined for one action.
3323 The following tables list all customizable keyboard shortcuts, those
3324 which are common to many applications are marked with (C) after the
3329 =============================== ========================= ==================================================
3330 Action Default shortcut Description
3331 =============================== ========================= ==================================================
3332 New Ctrl-N (C) Creates a new file.
3334 Open Ctrl-O (C) Opens a file.
3336 Open selected file Ctrl-Shift-O Opens the selected filename.
3338 Re-open last closed tab Re-opens the last closed document tab.
3340 Save Ctrl-S (C) Saves the current file.
3342 Save As Saves the current file under a new name.
3344 Save all Ctrl-Shift-S Saves all open files.
3346 Close all Ctrl-Shift-W Closes all open files.
3348 Close Ctrl-W (C) Closes the current file.
3350 Reload file Ctrl-R (C) Reloads the current file.
3352 Reload all Reloads all open files. If the reload will not be 'undo'-able and changes that will be lost are detected (unsaved or saved) the reload will be confirmed, otherwise the reload will proceed without confirmation.
3354 Print Ctrl-P (C) Prints the current file.
3356 Quit Ctrl-Q (C) Quits Geany.
3357 =============================== ========================= ==================================================
3362 =============================== ========================= ==================================================
3363 Action Default shortcut Description
3364 =============================== ========================= ==================================================
3365 Undo Ctrl-Z (C) Un-does the last action.
3367 Redo Ctrl-Y Re-does the last action.
3369 Delete current line(s) Ctrl-K Deletes the current line (and any lines with a
3372 Delete to line end Ctrl-Shift-Delete Deletes from the current caret position to the
3373 end of the current line.
3375 Delete to line start Ctrl-Shift-BackSpace Deletes from the beginning of the line to the
3376 current caret position.
3378 Duplicate line or selection Ctrl-D Duplicates the current line or selection.
3380 Transpose current line Transposes the current line with the previous one.
3382 Scroll to current line Ctrl-Shift-L Scrolls the current line into the centre of the
3383 view. The cursor position and or an existing
3384 selection will not be changed.
3386 Scroll up by one line Alt-Up Scrolls the view.
3388 Scroll down by one line Alt-Down Scrolls the view.
3390 Complete word Ctrl-Space Shows the autocompletion list. If already showing
3391 symbol completion, it shows document word completion
3392 instead, even if it is not enabled for automatic
3393 completion. Likewise if no symbol suggestions are
3394 available, it shows document word completion.
3396 Show calltip Ctrl-Shift-Space Shows a calltip for the current function or
3399 Complete snippet Tab If you type a construct like if or for and press
3400 this key, it will be completed with a matching
3403 Suppress snippet completion If you type a construct like if or for and press
3404 this key, it will not be completed, and a space or
3405 tab will be inserted, depending on what the
3406 construct completion keybinding is set to. For
3407 example, if you have set the construct completion
3408 keybinding to space, then setting this to
3409 Shift+space will prevent construct completion and
3412 Context Action Executes a command and passes the current word
3413 (near the cursor position) or selection as an
3414 argument. See the section called `Context
3417 Move cursor in snippet Jumps to the next defined cursor positions in a
3418 completed snippets if multiple cursor positions
3421 Word part completion Tab When the autocompletion list is visible, complete
3422 the currently selected item up to the next word
3425 Move line(s) up Alt-PageUp Move the current line or selected lines up by
3428 Move line(s) down Alt-PageDown Move the current line or selected lines down by
3430 =============================== ========================= ==================================================
3433 Clipboard keybindings
3434 `````````````````````
3435 =============================== ========================= ==================================================
3436 Action Default shortcut Description
3437 =============================== ========================= ==================================================
3438 Cut Ctrl-X (C) Cut the current selection to the clipboard.
3440 Copy Ctrl-C (C) Copy the current selection to the clipboard.
3442 Paste Ctrl-V (C) Paste the clipboard text into the current document.
3444 Cut current line(s) Ctrl-Shift-X Cuts the current line (and any lines with a
3445 selection) to the clipboard.
3447 Copy current line(s) Ctrl-Shift-C Copies the current line (and any lines with a
3448 selection) to the clipboard.
3449 =============================== ========================= ==================================================
3454 =============================== ========================= ==================================================
3455 Action Default shortcut Description
3456 =============================== ========================= ==================================================
3457 Select all Ctrl-A (C) Makes a selection of all text in the current
3460 Select current word Alt-Shift-W Selects the current word under the cursor.
3462 Select current paragraph Alt-Shift-P Selects the current paragraph under the cursor
3463 which is defined by two empty lines around it.
3465 Select current line(s) Alt-Shift-L Selects the current line under the cursor (and any
3466 partially selected lines).
3468 Select to previous word part (Extend) selection to previous word part boundary.
3470 Select to next word part (Extend) selection to next word part boundary.
3471 =============================== ========================= ==================================================
3476 =============================== ========================= ==================================================
3477 Action Default shortcut Description
3478 =============================== ========================= ==================================================
3479 Insert date Shift-Alt-D Inserts a customisable date.
3481 Insert alternative whitespace Inserts a tab character when spaces should
3482 be used for indentation and inserts space
3483 characters of the amount of a tab width when
3484 tabs should be used for indentation.
3486 Insert New Line Before Current Inserts a new line with indentation.
3488 Insert New Line After Current Inserts a new line with indentation.
3489 =============================== ========================= ==================================================
3494 =============================== ========================= ==================================================
3495 Action Default shortcut Description
3496 =============================== ========================= ==================================================
3497 Toggle case of selection Ctrl-Alt-U Changes the case of the selection. A lowercase
3498 selection will be changed into uppercase and vice
3499 versa. If the selection contains lower- and
3500 uppercase characters, all will be converted to
3503 Comment line Comments current line or selection.
3505 Uncomment line Uncomments current line or selection.
3507 Toggle line commentation Ctrl-E Comments a line if it is not commented or removes
3508 a comment if the line is commented.
3510 Increase indent Ctrl-I Indents the current line or selection by one tab
3511 or with spaces in the amount of the tab width
3514 Decrease indent Ctrl-U Removes one tab or the amount of spaces of
3515 the tab width setting from the indentation of the
3516 current line or selection.
3518 Increase indent by one space Indents the current line or selection by one
3521 Decrease indent by one space Deindents the current line or selection by one
3524 Smart line indent Indents the current line or all selected lines
3525 with the same indentation as the previous line.
3527 Send to Custom Command 1 (2,3) Ctrl-1 (2,3) Passes the current selection to a configured
3528 external command (available for the first
3529 9 configured commands, see
3530 `Sending text through custom commands`_ for
3533 Send Selection to Terminal Sends the current selection or the current
3534 line (if there is no selection) to the
3535 embedded Terminal (VTE).
3537 Reflow lines/block Reformat selected lines or current
3538 (indented) text block,
3539 breaking lines at the long line marker or the
3540 line breaking column if line breaking is
3541 enabled for the current document.
3542 =============================== ========================= ==================================================
3545 Settings keybindings
3546 ````````````````````
3547 =============================== ========================= ==================================================
3548 Action Default shortcut Description
3549 =============================== ========================= ==================================================
3550 Preferences Ctrl-Alt-P Opens preferences dialog.
3552 Plugin Preferences Opens plugin preferences dialog.
3553 =============================== ========================= ==================================================
3558 =============================== ========================= ==================================================
3559 Action Default shortcut Description
3560 =============================== ========================= ==================================================
3561 Find Ctrl-F (C) Opens the Find dialog.
3563 Find Next Ctrl-G Finds next result.
3565 Find Previous Ctrl-Shift-G Finds previous result.
3567 Find Next Selection Finds next occurrence of selected text.
3569 Find Previous Selection Finds previous occurrence of selected text.
3571 Replace Ctrl-H (C) Opens the Replace dialog.
3573 Find in files Ctrl-Shift-F Opens the Find in files dialog.
3575 Next message Jumps to the line with the next message in
3576 the Messages window.
3578 Previous message Jumps to the line with the previous message
3579 in the Messages window.
3581 Find Usage Ctrl-Shift-E Finds all occurrences of the current word
3582 or selection (see note below) in all open
3583 documents and displays them in the messages
3586 Find Document Usage Ctrl-Shift-D Finds all occurrences of the current word
3587 or selection (see note below) in the current
3588 document and displays them in the messages
3591 Mark All Ctrl-Shift-M Highlight all matches of the current
3592 word/selection (see note below) in the current
3593 document with a colored box. If there's nothing
3594 to find, or the cursor is next to an existing
3595 match, the highlighted matches will be cleared.
3596 =============================== ========================= ==================================================
3599 The keybindings marked "see note below" work like this: if no text is
3600 selected, the word under cursor is used, and *it has to match fully*
3601 (like when `Match only a whole word` is enabled in the Search dialog).
3602 However if some text is selected, then it is matched regardless of
3608 =============================== ========================= ==================================================
3609 Action Default shortcut Description
3610 =============================== ========================= ==================================================
3611 Navigate forward a location Alt-Right (C) Switches to the next location in the navigation
3612 history. See the section called `Code Navigation
3615 Navigate back a location Alt-Left (C) Switches to the previous location in the
3616 navigation history. See the section called
3617 `Code navigation history`_.
3619 Go to line Ctrl-L Focuses the Go to Line entry (if visible) or
3620 shows the Go to line dialog.
3622 Goto matching brace Ctrl-B If the cursor is ahead or behind a brace, then it
3623 is moved to the brace which belongs to the current
3624 one. If this keyboard shortcut is pressed again,
3625 the cursor is moved back to the first brace.
3627 Toggle marker Ctrl-M Set a marker on the current line, or clear the
3628 marker if there already is one.
3630 Goto next marker Ctrl-. Goto the next marker in the current document.
3632 Goto previous marker Ctrl-, Goto the previous marker in the current document.
3634 Go to symbol definition Ctrl-T Jump to the definition of the current word or
3635 selection. See `Go to symbol definition`_.
3637 Go to symbol declaration Ctrl-Shift-T Jump to the declaration of the current word or
3638 selection. See `Go to symbol declaration`_.
3640 Go to Start of Line Home Move the caret to the start of the line.
3641 Behaves differently if smart_home_key_ is set.
3643 Go to End of Line End Move the caret to the end of the line.
3645 Go to Start of Display Line Alt-Home Move the caret to the start of the display line.
3646 This is useful when you use line wrapping and
3647 want to jump to the start of the wrapped, virtual
3648 line, not the real start of the whole line.
3649 If the line is not wrapped, it behaves like
3650 `Go to Start of Line`.
3652 Go to End of Display Line Alt-End Move the caret to the end of the display line.
3653 If the line is not wrapped, it behaves like
3654 `Go to End of Line`.
3656 Go to Previous Word Part Ctrl-/ Goto the previous part of the current word.
3658 Go to Next Word Part Ctrl-\\ Goto the next part of the current word.
3659 =============================== ========================= ==================================================
3663 =============================== ========================= ==================================================
3664 Action Default shortcut Description
3665 =============================== ========================= ==================================================
3666 Fullscreen F11 (C) Switches to fullscreen mode.
3668 Toggle Messages Window Toggles the message window (status and compiler
3669 messages) on and off.
3671 Toggle Sidebar Shows or hides the sidebar.
3673 Toggle all additional widgets Hide and show all additional widgets like the
3674 notebook tabs, the toolbar, the messages window
3677 Zoom In Ctrl-+ (C) Zooms in the text.
3679 Zoom Out Ctrl-- (C) Zooms out the text.
3681 Zoom Reset Ctrl-0 Reset any previous zoom on the text.
3682 =============================== ========================= ==================================================
3686 ================================ ========================= ==================================================
3687 Action Default shortcut Description
3688 ================================ ========================= ==================================================
3689 Switch to Editor F2 Switches to editor widget.
3690 Also reshows the document statistics line
3691 (after a short timeout).
3693 Switch to Search Bar F7 Switches to the search bar in the toolbar (if
3696 Switch to Message Window Focus the Message Window's current tab.
3698 Switch to Compiler Focus the Compiler message window tab.
3700 Switch to Messages Focus the Messages message window tab.
3702 Switch to Scribble F6 Switches to scribble widget.
3704 Switch to VTE F4 Switches to VTE widget.
3706 Switch to Sidebar Focus the Sidebar.
3708 Switch to Sidebar Symbol List Focus the Symbol list tab in the Sidebar
3711 Switch to Sidebar Document List Focus the Document list tab in the Sidebar
3713 ================================ ========================= ==================================================
3716 Notebook tab keybindings
3717 ````````````````````````
3718 =============================== ========================= ==================================================
3719 Action Default shortcut Description
3720 =============================== ========================= ==================================================
3721 Switch to left document Ctrl-PageUp (C) Switches to the previous open document.
3723 Switch to right document Ctrl-PageDown (C) Switches to the next open document.
3725 Switch to last used document Ctrl-Tab Switches to the previously shown document (if it's
3727 Holding Ctrl (or another modifier if the keybinding
3728 has been changed) will show a dialog, then repeated
3729 presses of the keybinding will switch to the 2nd-last
3730 used document, 3rd-last, etc. Also known as
3731 Most-Recently-Used documents switching.
3733 Move document left Ctrl-Shift-PageUp Changes the current document with the left hand
3736 Move document right Ctrl-Shift-PageDown Changes the current document with the right hand
3739 Move document first Moves the current document to the first position.
3741 Move document last Moves the current document to the last position.
3742 =============================== ========================= ==================================================
3745 Document keybindings
3746 ````````````````````
3747 ==================================== ==================== ==================================================
3748 Action Default shortcut Description
3749 ==================================== ==================== ==================================================
3750 Clone See `Cloning documents`_.
3752 Replace tabs with space Replaces all tabs with the right amount of spaces
3753 in the whole document, or the current selection.
3755 Replace spaces with tabs Replaces leading spaces with tab characters in the
3756 whole document, or the current selection.
3758 Toggle current fold Toggles the folding state of the current code block.
3760 Fold all Folds all contractible code blocks.
3762 Unfold all Unfolds all contracted code blocks.
3764 Reload symbol list Ctrl-Shift-R Reloads the symbol list.
3766 Toggle Line wrapping Enables or disables wrapping of long lines.
3768 Toggle Line breaking Enables or disables automatic breaking of long
3769 lines at a configurable column.
3771 Remove Markers Remove any markers on lines or words which
3772 were set by using 'Mark All' in the
3773 search dialog or by manually marking lines.
3775 Remove Error Indicators Remove any error indicators in the
3778 Remove Markers and Error Indicators Combines ``Remove Markers`` and
3779 ``Remove Error Indicators``.
3780 ==================================== ==================== ==================================================
3785 =============================== ========================= ==================================================
3786 Action Default shortcut Description
3787 =============================== ========================= ==================================================
3788 New Create a new project.
3789 Open Opens a project file.
3790 Properties Shows project properties.
3791 Close Close the current project.
3792 =============================== ========================= ==================================================
3797 =============================== ========================= ==================================================
3798 Action Default shortcut Description
3799 =============================== ========================= ==================================================
3800 Compile F8 Compiles the current file.
3802 Build F9 Builds (compiles if necessary and links) the
3805 Make all Shift-F9 Builds the current file with the Make tool.
3807 Make custom target Ctrl-Shift-F9 Builds the current file with the Make tool and a
3810 Make object Shift-F8 Compiles the current file with the Make tool.
3812 Next error Jumps to the line with the next error from the
3815 Previous error Jumps to the line with the previous error from
3816 the last build process.
3818 Run F5 Executes the current file in a terminal emulation.
3820 Set Build Commands Opens the build commands dialog.
3821 =============================== ========================= ==================================================
3826 =============================== ========================= ==================================================
3827 Action Default shortcut Description
3828 =============================== ========================= ==================================================
3829 Show Color Chooser Opens the Color Chooser dialog.
3830 =============================== ========================= ==================================================
3835 =============================== ========================= ==================================================
3836 Action Default shortcut Description
3837 =============================== ========================= ==================================================
3838 Help F1 (C) Opens the manual.
3839 =============================== ========================= ==================================================
3847 You must use UTF-8 encoding *without BOM* for configuration files.
3850 Configuration file paths
3851 ------------------------
3852 Geany has default configuration files installed for the system and
3853 also per-user configuration files.
3855 The system files should not normally be edited because they will be
3856 overwritten when upgrading Geany.
3858 The user configuration directory can be overridden with the ``-c``
3859 switch, but this is not normally done. See `Command line options`_.
3862 Any missing subdirectories in the user configuration directory
3863 will be created when Geany starts.
3865 You can check the paths Geany is using with *Help->Debug Messages*.
3866 Near the top there should be 2 lines with something like::
3868 Geany-INFO: System data dir: /usr/share/geany
3869 Geany-INFO: User config dir: /home/username/.config/geany
3872 Paths on Unix-like systems
3873 ^^^^^^^^^^^^^^^^^^^^^^^^^^
3874 The system path is ``$prefix/share/geany``, where ``$prefix`` is the
3875 path where Geany is installed (see `Installation prefix`_).
3877 The user configuration directory is normally:
3878 ``/home/username/.config/geany``
3882 The system path is the ``data`` subfolder of the installation path
3885 The user configuration directory might vary, but on Windows XP it's:
3886 ``C:\Documents and Settings\UserName\Application Data\geany``
3887 On Windows 7 and above you most likely will find it at:
3888 ``C:\users\UserName\Roaming\geany``
3893 There's a *Configuration files* submenu in the *Tools* menu that
3894 contains items for some of the available user configuration files.
3895 Clicking on one opens it in the editor for you to update. Geany will
3896 reload the file after you have saved it.
3899 Other configuration files not shown here will need to be opened
3900 manually, and will not be automatically reloaded when saved.
3901 (see *Reload Configuration* below).
3903 There's also a *Reload Configuration* item which can be used if you
3904 updated one of the other configuration files, or modified or added
3907 *Reload Configuration* is also necessary to update syntax highlighting colors.
3910 Syntax highlighting colors aren't updated in open documents after
3911 saving filetypes.common as this may take a significant
3915 Global configuration file
3916 -------------------------
3918 System administrators can add a global configuration file for Geany
3919 which will be used when starting Geany and a user configuration file
3922 The global configuration file is read from ``geany.conf`` in the
3923 system configuration path - see `Configuration file paths`_. It can
3924 contain any settings which are found in the usual configuration file
3925 created by Geany, but does not have to contain all settings.
3928 This feature is mainly intended for package maintainers or system
3929 admins who want to set up Geany in a multi user environment and
3930 set some sane default values for this environment. Usually users won't
3935 Filetype definition files
3936 -------------------------
3938 All color definitions and other filetype specific settings are
3939 stored in the filetype definition files. Those settings are colors
3940 for syntax highlighting, general settings like comment characters or
3941 word delimiter characters as well as compiler and linker settings.
3943 See also `Configuration file paths`_.
3947 Each filetype has a corresponding filetype definition file. The format
3948 for built-in filetype `Foo` is::
3952 The extension is normally just the filetype name in lower case.
3954 However there are some exceptions:
3956 =============== =========
3958 =============== =========
3962 Matlab/Octave matlab
3963 =============== =========
3965 There is also the `special file filetypes.common`_.
3967 For `custom filetypes`_, the filename for `Foo` is different::
3971 See the link for details.
3975 The system-wide filetype configuration files can be found in the
3976 system configuration path and are called ``filetypes.$ext``,
3977 where $ext is the name of the filetype. For every
3978 filetype there is a corresponding definition file. There is one
3979 exception: ``filetypes.common`` -- this file is for general settings,
3980 which are not specific to a certain filetype.
3983 It is not recommended that users edit the system-wide files,
3984 because they will be overridden when Geany is updated.
3988 To change the settings, copy a file from the system configuration
3989 path to the subdirectory ``filedefs`` in your user configuration
3990 directory. Then you can edit the file and the changes will still be
3991 available after an update of Geany.
3993 Alternatively, you can create the file yourself and add only the
3994 settings you want to change. All missing settings will be read from
3995 the corresponding system configuration file.
3999 At startup Geany looks for ``filetypes.*.conf`` files in the system and
4000 user filetype paths, adding any filetypes found with the name matching
4001 the '``*``' wildcard - e.g. ``filetypes.Bar.conf``.
4003 Custom filetypes are not as powerful as built-in filetypes, but
4004 support for the following has been implemented:
4006 * Recognizing and setting the filetype (after the user has manually updated
4007 the `filetype extensions`_ file).
4008 * `Filetype group membership`_.
4009 * Reading filetype settings in the ``[settings]`` section, including:
4010 * Using an existing syntax highlighting lexer (`lexer_filetype`_ key).
4011 * Using an existing tags parser (`tag_parser`_ key).
4012 * Build commands (``[build-menu]`` section).
4013 * Loading global tags files (sharing the ``tag_parser`` filetype's namespace).
4015 See `Filetype configuration`_ for details on each setting.
4017 Creating a custom filetype from an existing filetype
4018 ````````````````````````````````````````````````````
4019 Because most filetype settings will relate to the syntax
4020 highlighting (e.g. styling, keywords, ``lexer_properties``
4021 sections), it is best to copy an existing filetype file that uses
4022 the lexer you wish to use as the basis of a custom filetype, using
4023 the correct filename extension format shown above, e.g.::
4025 cp filetypes.foo filetypes.Bar.conf
4027 Then add the ``lexer_filetype=Foo`` setting (if not already present)
4028 and add/adjust other settings.
4031 The ``[styling]`` and ``[keywords]`` sections have key names
4032 specific to each filetype/lexer. You must follow the same
4033 names - in particular, some lexers only support one keyword
4037 Filetype configuration
4038 ^^^^^^^^^^^^^^^^^^^^^^
4040 As well as the sections listed below, each filetype file can contain
4041 a [build-menu] section as described in `[build-menu] section`_.
4046 In this section the colors for syntax highlighting are defined. The
4049 * ``key=foreground_color;background_color;bold_flag;italic_flag``
4051 Colors have to be specified as RGB hex values prefixed by
4052 0x or # similar to HTML/CSS hex triplets. For example, all of the following
4053 are valid values for pure red; 0xff0000, 0xf00, #ff0000, or #f00. The
4054 values are case-insensitive but it is a good idea to use lower-case.
4055 Note that you can also use *named colors* as well by substituting the
4056 color value with the name of a color as defined in the ``[named_colors]``
4057 section, see the `[named_colors] Section`_ for more information.
4059 Bold and italic are flags and should only be "true" or "false". If their
4060 value is something other than "true" or "false", "false" is assumed.
4062 You can omit fields to use the values from the style named ``"default"``.
4064 E.g. ``key=0xff0000;;true``
4066 This makes the key style have red foreground text, default background
4067 color text and bold emphasis.
4071 The second format uses a *named style* name to reference a style
4072 defined in filetypes.common.
4074 * ``key=named_style``
4075 * ``key2=named_style2,bold,italic``
4077 The bold and italic parts are optional, and if present are used to
4078 toggle the bold or italic flags to the opposite of the named style's
4079 flags. In contrast to style definition booleans, they are a literal
4080 ",bold,italic" and commas are used instead of semi-colons.
4082 E.g. ``key=comment,italic``
4084 This makes the key style match the ``"comment"`` named style, but with
4087 To define named styles, see the filetypes.common `[named_styles]
4090 Reading styles from another filetype
4091 ************************************
4092 You can automatically copy all of the styles from another filetype
4093 definition file by using the following syntax for the ``[styling]``
4098 Where Foo is a filetype name. The corresponding ``[styling]``
4099 section from ``filetypes.foo`` will be read.
4101 This is useful when the same lexer is being used for multiple
4102 filetypes (e.g. C/C++/C#/Java/etc). For example, to make the C++
4103 styling the same as the C styling, you would put the following in
4112 This section contains keys for different keyword lists specific to
4113 the filetype. Some filetypes do not support keywords, so adding a
4114 new key will not work. You can only add or remove keywords to/from
4118 The keywords list must be in one line without line ending characters.
4121 [lexer_properties] section
4122 ``````````````````````````
4123 Here any special properties for the Scintilla lexer can be set in the
4124 format ``key.name.field=some.value``.
4126 Properties Geany uses are listed in the system filetype files. To find
4127 other properties you need Geany's source code::
4129 egrep -o 'GetProperty\w*\("([^"]+)"[^)]+\)' scintilla/Lex*.cxx
4136 This is the default file extension used when saving files, not
4137 including the period character (``.``). The extension used should
4138 match one of the patterns associated with that filetype (see
4139 `Filetype extensions`_).
4141 *Example:* ``extension=cxx``
4144 These characters define word boundaries when making selections
4145 and searching using word matching options.
4147 *Example:* (look at system filetypes.\* files)
4150 This overrides the *wordchars* filetypes.common setting, and
4151 has precedence over the *whitespace_chars* setting.
4154 A character or string which is used to comment code. If you want to use
4155 multiline comments only, don't set this but rather comment_open and
4158 Single-line comments are used in priority over multiline comments to
4159 comment a line, e.g. with the `Comment/Uncomment line` command.
4161 *Example:* ``comment_single=//``
4164 A character or string which is used to comment code. You need to also
4165 set comment_close to really use multiline comments. If you want to use
4166 single-line comments, prefer setting comment_single.
4168 Multiline comments are used in priority over single-line comments to
4169 comment a block, e.g. template comments.
4171 *Example:* ``comment_open=/*``
4174 If multiline comments are used, this is the character or string to
4177 *Example:* ``comment_close=*/``
4180 Set this to false if a comment character or string should start at
4181 column 0 of a line. If set to true it uses any indentation of the
4184 Note: Comment indentation
4186 ``comment_use_indent=true`` would generate this if a line is
4187 commented (e.g. with Ctrl-D)::
4191 ``comment_use_indent=false`` would generate this if a line is
4192 commented (e.g. with Ctrl-D)::
4194 # command_example();
4197 Note: This setting only works for single line comments (like '//',
4200 *Example:* ``comment_use_indent=true``
4203 A command which can be executed on the current word or the current
4206 Example usage: Open the API documentation for the
4207 current function call at the cursor position.
4210 be set for every filetype or if not set, a global command will
4211 be used. The command itself can be specified without the full
4212 path, then it is searched in $PATH. But for security reasons,
4213 it is recommended to specify the full path to the command. The
4214 wildcard %s will be replaced by the current word at the cursor
4215 position or by the current selection.
4217 Hint: for PHP files the following could be quite useful:
4218 context_action_cmd=firefox "http://www.php.net/%s"
4220 *Example:* ``context_action_cmd=devhelp -s "%s"``
4225 The TagManager language name, e.g. "C". Usually the same as the
4231 A filetype name to setup syntax highlighting from another filetype.
4232 This must not be recursive, i.e. it should be a filetype name that
4233 doesn't use the *lexer_filetype* key itself, e.g.::
4238 The second line is wrong, because ``filetypes.cpp`` itself uses
4239 ``lexer_filetype=C``, which would be recursive.
4241 symbol_list_sort_mode
4242 What the default symbol list sort order should be.
4244 ===== ========================================
4246 ===== ========================================
4247 0 Sort symbols by name
4248 1 Sort symbols by appearance (line number)
4249 ===== ========================================
4251 .. _xml_indent_tags:
4254 If this setting is set to *true*, a new line after a line ending with an
4255 unclosed XML/HTML tag will be automatically indented. This only applies
4256 to filetypes for which the HTML or XML lexer is used. Such filetypes have
4257 this setting in their system configuration files.
4260 The MIME type for this file type, e.g. "text/x-csrc". This is used
4261 for example to chose the icon to display for this file type.
4264 [indentation] section
4265 `````````````````````
4267 This section allows definition of default indentation settings specific to
4268 the file type, overriding the ones configured in the preferences. This can
4269 be useful for file types requiring specific indentation settings (e.g. tabs
4270 only for Makefile). These settings don't override auto-detection if activated.
4273 The forced indentation width.
4276 The forced indentation type.
4278 ===== =======================
4279 Value Indentation type
4280 ===== =======================
4283 2 Mixed (tabs and spaces)
4284 ===== =======================
4287 [build-menu] filetype section
4288 `````````````````````````````
4289 This supports the same keys as the ``geany.conf`` `[build-menu] section`_.
4294 FT_00_CM=gcc -c "%f"
4297 FT_01_CM=gcc -o "%e" "%f"
4302 error_regex=^([^:]+):([0-9]+):
4304 [build_settings] section
4305 ````````````````````````
4306 As of Geany 0.19 this section is for legacy support.
4307 Values that are set in the [build-menu] section will override those in this section.
4309 If any build menu item settings have been configured in the
4310 `Set Build Commands dialog`_ (or the *Build* tab of the
4311 `Project Properties`_ dialog), then these settings are stored in the
4312 [build-menu] section and will override the settings in this section for
4316 See the [build-menu] section for details.
4321 This item specifies the command to compile source code files. But
4322 it is also possible to use it with interpreted languages like Perl
4323 or Python. With these filetypes you can use this option as a kind of
4324 syntax parser, which sends output to the compiler message window.
4326 You should quote the filename to also support filenames with
4327 spaces. The following wildcards for filenames are available:
4329 * %f -- complete filename without path
4330 * %e -- filename without path and without extension
4332 *Example:* ``compiler=gcc -Wall -c "%f"``
4335 This item specifies the command to link the file. If the file is not
4336 already compiled, it will be compiled while linking. The -o option
4337 is automatically added by Geany. This item works well with GNU gcc,
4338 but may be problematic with other compilers (esp. with the linker).
4340 *Example:* ``linker=gcc -Wall "%f"``
4343 Use this item to execute your file. It has to have been built
4344 already. Use the %e wildcard to have only the name of the executable
4345 (i.e. without extension) or use the %f wildcard if you need the
4346 complete filename, e.g. for shell scripts.
4348 *Example:* ``run_cmd="./%e"``
4351 Special file filetypes.common
4352 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4354 There is a special filetype definition file called
4355 filetypes.common. This file defines some general non-filetype-specific
4358 You can open the user filetypes.common with the
4359 *Tools->Configuration Files->filetypes.common* menu item. This adds
4360 the default settings to the user file if the file doesn't exist.
4361 Alternatively the file can be created manually, adding only the
4362 settings you want to change. All missing settings will be read from
4366 See the `Filetype configuration`_ section for how to define styles.
4369 [named_styles] section
4370 ``````````````````````
4371 Named styles declared here can be used in the [styling] section of any
4376 *In filetypes.common*::
4379 foo=0xc00000;0xffffff;false;true
4387 This saves copying and pasting the whole style definition into several
4391 You can define aliases for named styles, as shown with the ``bar``
4392 entry in the above example, but they must be declared after the
4396 [named_colors] section
4397 ``````````````````````
4398 Named colors declared here can be used in the ``[styling]`` or
4399 ``[named_styles]`` section of any filetypes.* file or color scheme.
4404 my_red_color=#FF0000
4405 my_blue_color=#0000FF
4408 foo=my_red_color;my_blue_color;false;true
4410 This allows to define a color palette by name so that to change a color
4411 scheme-wide only involves changing the hex value in a single location.
4416 This is the default style. It is used for styling files without a
4419 *Example:* ``default=0x000000;0xffffff;false;false``
4422 The style for coloring selected text. The format is:
4426 * Use foreground color
4427 * Use background color
4429 The colors are only set if the 3rd or 4th argument is true. When
4430 the colors are not overridden, the default is a dark grey
4431 background with syntax highlighted foreground text.
4433 *Example:* ``selection=0xc0c0c0;0x00007F;true;true``
4436 The style for brace highlighting when a matching brace was found.
4438 *Example:* ``brace_good=0xff0000;0xFFFFFF;true;false``
4441 The style for brace highlighting when no matching brace was found.
4443 *Example:* ``brace_bad=0x0000ff;0xFFFFFF;true;false``
4446 The style for coloring the caret(the blinking cursor). Only first
4447 and third argument is interpreted.
4448 Set the third argument to true to change the caret into a block caret.
4450 *Example:* ``caret=0x000000;0x0;false;false``
4453 The width for the caret(the blinking cursor). Only the first
4454 argument is interpreted. The width is specified in pixels with
4455 a maximum of three pixel. Use the width 0 to make the caret
4458 *Example:* ``caret_width=3``
4461 The style for coloring the background of the current line. Only
4462 the second and third arguments are interpreted. The second argument
4463 is the background color. Use the third argument to enable or
4464 disable background highlighting for the current line (has to be
4467 *Example:* ``current_line=0x0;0xe5e5e5;true;false``
4470 The style for coloring the indentation guides. Only the first and
4471 second arguments are interpreted.
4473 *Example:* ``indent_guide=0xc0c0c0;0xffffff;false;false``
4476 The style for coloring the white space if it is shown. The first
4477 both arguments define the foreground and background colors, the
4478 third argument sets whether to use the defined foreground color
4479 or to use the color defined by each filetype for the white space.
4480 The fourth argument defines whether to use the background color.
4482 *Example:* ``white_space=0xc0c0c0;0xffffff;true;true``
4485 Line number margin foreground and background colors.
4487 .. _Folding Settings:
4490 Fold margin foreground and background colors.
4492 fold_symbol_highlight
4493 Highlight color of folding symbols.
4496 The style of folding icons. Only first and second arguments are
4499 Valid values for the first argument are:
4506 Valid values for the second argument are:
4509 * 1 -- for straight lines
4510 * 2 -- for curved lines
4512 *Default:* ``folding_style=1;1;``
4514 *Arrows:* ``folding_style=3;0;``
4517 Draw a thin horizontal line at the line where text is folded. Only
4518 first argument is used.
4520 Valid values for the first argument are:
4522 * 0 -- disable, do not draw a line
4523 * 1 -- draw the line above folded text
4524 * 2 -- draw the line below folded text
4526 *Example:* ``folding_horiz_line=0;0;false;false``
4529 First argument: drawing of visual flags to indicate a line is wrapped.
4530 This is a bitmask of the values:
4532 * 0 -- No visual flags
4533 * 1 -- Visual flag at end of subline of a wrapped line
4534 * 2 -- Visual flag at begin of subline of a wrapped line. Subline is
4535 indented by at least 1 to make room for the flag.
4537 Second argument: wether the visual flags to indicate a line is wrapped
4538 are drawn near the border or near the text. This is a bitmask of the values:
4540 * 0 -- Visual flags drawn near border
4541 * 1 -- Visual flag at end of subline drawn near text
4542 * 2 -- Visual flag at begin of subline drawn near text
4544 Only first and second arguments are interpreted.
4546 *Example:* ``line_wrap_visuals=3;0;false;false``
4549 First argument: sets the size of indentation of sublines for wrapped lines
4550 in terms of the width of a space, only used when the second argument is ``0``.
4552 Second argument: wrapped sublines can be indented to the position of their
4553 first subline or one more indent level. Possible values:
4555 * 0 - Wrapped sublines aligned to left of window plus amount set by the first argument
4556 * 1 - Wrapped sublines are aligned to first subline indent (use the same indentation)
4557 * 2 - Wrapped sublines are aligned to first subline indent plus one more level of indentation
4559 Only first and second arguments are interpreted.
4561 *Example:* ``line_wrap_indent=0;1;false;false``
4564 Translucency for the current line (first argument) and the selection
4565 (second argument). Values between 0 and 256 are accepted.
4567 Note for Windows 95, 98 and ME users:
4568 keep this value at 256 to disable translucency otherwise Geany might crash.
4570 Only the first and second arguments are interpreted.
4572 *Example:* ``translucency=256;256;false;false``
4575 The style for a highlighted line (e.g when using Goto line or goto symbol).
4576 The foreground color (first argument) is only used when the Markers margin
4577 is enabled (see View menu).
4579 Only the first and second arguments are interpreted.
4581 *Example:* ``marker_line=0x000000;0xffff00;false;false``
4584 The style for a marked search results (when using "Mark" in Search dialogs).
4585 The second argument sets the background color for the drawn rectangle.
4587 Only the second argument is interpreted.
4589 *Example:* ``marker_search=0x000000;0xb8f4b8;false;false``
4592 The style for a marked line (e.g when using the "Toggle Marker" keybinding
4593 (Ctrl-M)). The foreground color (first argument) is only used
4594 when the Markers margin is enabled (see View menu).
4596 Only the first and second arguments are interpreted.
4598 *Example:* ``marker_mark=0x000000;0xb8f4b8;false;false``
4601 Translucency for the line marker (first argument) and the search marker
4602 (second argument). Values between 0 and 256 are accepted.
4604 Note for Windows 95, 98 and ME users:
4605 keep this value at 256 to disable translucency otherwise Geany might crash.
4607 Only the first and second arguments are interpreted.
4609 *Example:* ``marker_translucency=256;256;false;false``
4612 Amount of space to be drawn above and below the line's baseline.
4613 The first argument defines the amount of space to be drawn above the line, the second
4614 argument defines the amount of space to be drawn below.
4616 Only the first and second arguments are interpreted.
4618 *Example:* ``line_height=0;0;false;false``
4621 The style for coloring the calltips. The first two arguments
4622 define the foreground and background colors, the third and fourth
4623 arguments set whether to use the defined colors.
4625 *Example:* ``calltips=0xc0c0c0;0xffffff;false;false``
4628 The color of the error indicator.
4630 Only the first argument (foreground color) is used.
4632 *Example:* ``indicator_error=0xff0000``
4638 Characters to treat as whitespace. These characters are ignored
4639 when moving, selecting and deleting across word boundaries
4640 (see `Scintilla keyboard commands`_).
4642 This should include space (\\s) and tab (\\t).
4644 *Example:* ``whitespace_chars=\s\t!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~``
4647 These characters define word boundaries when making selections
4648 and searching using word matching options.
4650 *Example:* ``wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789``
4653 This has precedence over the *whitespace_chars* setting.
4661 To change the default filetype extension used when saving a new file,
4662 see `Filetype definition files`_.
4664 You can override the list of file extensions that Geany uses to detect
4665 filetypes using the user ``filetype_extensions.conf`` file. Use the
4666 *Tools->Configuration Files->filetype_extensions.conf* menu item. See
4667 also `Configuration file paths`_.
4669 You should only list lines for filetype extensions that you want to
4670 override in the user configuration file and remove or comment out
4671 others. The patterns are listed after the ``=`` sign, using a
4672 semi-colon separated list of patterns which should be matched for
4675 For example, to override the filetype extensions for Make, the file
4679 Make=Makefile*;*.mk;Buildfile;
4681 Filetype group membership
4682 ^^^^^^^^^^^^^^^^^^^^^^^^^
4683 Filetype groups are used in the `Document->Set Filetype` menu.
4685 Group membership is also stored in ``filetype_extensions.conf``. This
4686 file is used to store information Geany needs at startup, whereas the
4687 separate filetype definition files hold information only needed when
4688 a document with their filetype is used.
4690 The format looks like::
4699 The key names cannot be configured.
4702 Group membership is only read at startup.
4705 You can make commonly used filetypes appear in the top-level of the
4706 filetype menu by adding them to the `None` group, e.g.
4709 Preferences file format
4710 -----------------------
4712 The user preferences file ``geany.conf`` holds settings for all the items configured
4713 in the preferences dialog. This file should not be edited while Geany is running
4714 as the file will be overwritten when the preferences in Geany are changed or Geany
4718 [build-menu] section
4719 ^^^^^^^^^^^^^^^^^^^^
4721 The [build-menu] section contains the configuration of the build menu.
4722 This section can occur in filetype, preferences and project files and
4723 always has the format described here. Different menu items are loaded
4724 from different files, see the table in the `Build Menu Configuration`_
4725 section for details. All the settings can be configured from the dialogs
4726 except the execute command in filetype files and filetype definitions in
4727 the project file, so these are the only ones which need hand editing.
4731 The build-menu section stores one entry for each setting for each menu item that
4732 is configured. The keys for these settings have the format:
4738 * GG - is the menu item group,
4740 - FT for filetype build
4741 - NF for independent (non-filetype) build
4744 * NN - is a two decimal digit number of the item within the group,
4746 * FF - is the field,
4750 - WD for working directory
4752 See `[build-menu] filetype section`_ for an example.
4754 Error regular expression
4755 ````````````````````````
4757 This is a Perl-compatible regular expression (PCRE) to parse a filename
4758 (absolute or relative) and line number from the build output.
4759 If undefined, Geany will fall back to its default error message parsing.
4761 Only the first two match groups will be read by Geany. These groups can
4762 occur in any order: the match group consisting of only digits will be used
4763 as the line number, and the other group as the filename. In no group
4764 consists of only digits, the match will fail.
4766 *Example:* ``error_regex=^(.+):([0-9]+):[0-9]+``
4768 This will parse a message such as:
4769 ``test.py:7:24: E202 whitespace before ']'``
4775 The project file contains project related settings and possibly a
4776 record of the current session files.
4779 [build-menu] additions
4780 ^^^^^^^^^^^^^^^^^^^^^^
4782 The project file also can have extra fields in the [build-menu] section
4783 in addition to those listed in `[build-menu] section`_ above.
4785 When filetype menu items are configured for the project they are stored
4786 in the project file.
4788 The ``filetypes`` entry is a list of the filetypes which exist in the
4791 For each filetype the entries for that filetype have the format defined in
4792 `[build-menu] section`_ but the key is prefixed by the name of the filetype
4793 as it appears in the ``filetypes`` entry, eg the entry for the label of
4794 filetype menu item 0 for the C filetype would be
4802 Geany supports the following templates:
4806 * Function description
4811 To use these templates, just open the Edit menu or open the popup menu
4812 by right-clicking in the editor widget, and choose "Insert Comments"
4813 and insert templates as you want.
4815 Some templates (like File header or ChangeLog entry) will always be
4816 inserted at the top of the file.
4818 To insert a function description, the cursor must be inside
4819 of the function, so that the function name can be determined
4820 automatically. The description will be positioned correctly one line
4821 above the function, just check it out. If the cursor is not inside
4822 of a function or the function name cannot be determined, the inserted
4823 function description won't contain the correct function name but "unknown"
4827 Geany automatically reloads template information when it notices you
4828 save a file in the user's template configuration directory. You can
4829 also force this by selecting *Tools->Reload Configuration*.
4835 Meta data can be used with all templates, but by default user set
4836 meta data is only used for the ChangeLog and File header templates.
4838 In the configuration dialog you can find a tab "Templates" (see
4839 `Template preferences`_). You can define the default values
4840 which will be inserted in the templates.
4846 File templates are templates used as the basis of a new file. To
4847 use them, choose the *New (with Template)* menu item from the *File*
4850 By default, file templates are installed for some filetypes. Custom
4851 file templates can be added by creating the appropriate template file. You can
4852 also edit the default file templates.
4854 The file's contents are just the text to place in the document, with
4855 optional template wildcards like ``{fileheader}``. The fileheader
4856 wildcard can be placed anywhere, but it's usually put on the first
4857 line of the file, followed by a blank line.
4859 Adding file templates
4860 `````````````````````
4862 File templates are read from ``templates/files`` under the
4863 `Configuration file paths`_.
4865 The filetype to use is detected from the template file's extension, if
4866 any. For example, creating a file ``module.c`` would add a menu item
4867 which created a new document with the filetype set to 'C'.
4869 The template file is read from disk when the corresponding menu item is
4873 Customizing templates
4874 ^^^^^^^^^^^^^^^^^^^^^
4876 Each template can be customized to your needs. The templates are
4877 stored in the ``~/.config/geany/templates/`` directory (see the section called
4878 `Command line options`_ for further information about the configuration
4879 directory). Just open the desired template with an editor (ideally,
4880 Geany ;-) ) and edit the template to your needs. There are some
4881 wildcards which will be automatically replaced by Geany at startup.
4887 All wildcards must be enclosed by "{" and "}", e.g. {date}.
4889 **Wildcards for character escaping**
4891 ============== ============================================= =======================================
4892 Wildcard Description Available in
4893 ============== ============================================= =======================================
4894 ob { Opening Brace (used to prevent other file templates, file header, snippets.
4895 wildcards being expanded).
4896 cb } Closing Brace. file templates, file header, snippets.
4897 pc \% Percent (used to escape e.g. %block% in
4898 snippets). snippets.
4899 ============== ============================================= =======================================
4901 **Global wildcards**
4903 These are configurable, see `Template preferences`_.
4905 ============== ============================================= =======================================
4906 Wildcard Description Available in
4907 ============== ============================================= =======================================
4908 developer The name of the developer. file templates, file header,
4909 function description, ChangeLog entry,
4912 initial The developer's initials, e.g. "ET" for file templates, file header,
4913 Enrico Tröger or "JFD" for John Foobar Doe. function description, ChangeLog entry,
4916 mail The email address of the developer. file templates, file header,
4917 function description, ChangeLog entry,
4920 company The company the developer is working for. file templates, file header,
4921 function description, ChangeLog entry,
4924 version The initial version of a new file. file templates, file header,
4925 function description, ChangeLog entry,
4927 ============== ============================================= =======================================
4929 **Date & time wildcards**
4931 The format for these wildcards can be changed in the preferences
4932 dialog, see `Template preferences`_. You can use any conversion
4933 specifiers which can be used with the ANSI C strftime function.
4934 For details please see http://man.cx/strftime.
4936 ============== ============================================= =======================================
4937 Wildcard Description Available in
4938 ============== ============================================= =======================================
4939 year The current year. Default format is: YYYY. file templates, file header,
4940 function description, ChangeLog entry,
4943 date The current date. Default format: file templates, file header,
4944 YYYY-MM-DD. function description, ChangeLog entry,
4947 datetime The current date and time. Default format: file templates, file header,
4948 DD.MM.YYYY HH:mm:ss ZZZZ. function description, ChangeLog entry,
4950 ============== ============================================= =======================================
4952 **Dynamic wildcards**
4954 ============== ============================================= =======================================
4955 Wildcard Description Available in
4956 ============== ============================================= =======================================
4957 untitled The string "untitled" (this will be file templates, file header,
4958 translated to your locale), used in function description, ChangeLog entry,
4959 file templates. bsd, gpl, snippets.
4961 geanyversion The actual Geany version, e.g. file templates, file header,
4962 "Geany |(version)|". function description, ChangeLog entry,
4965 filename The filename of the current file. file header, snippets, file
4966 For new files, it's only replaced when templates.
4967 first saving if found on the first 4 lines
4970 project The current project's name, if any. file header, snippets, file templates.
4972 description The current project's description, if any. file header, snippets, file templates.
4974 functionname The function name of the function at the function description.
4975 cursor position. This wildcard will only be
4976 replaced in the function description
4979 command:path Executes the specified command and replace file templates, file header,
4980 the wildcard with the command's standard function description, ChangeLog entry,
4981 output. See `Special {command:} wildcard`_ bsd, gpl, snippets.
4983 ============== ============================================= =======================================
4985 **Template insertion wildcards**
4987 ============== ============================================= =======================================
4988 Wildcard Description Available in
4989 ============== ============================================= =======================================
4990 gpl This wildcard inserts a short GPL notice. file header.
4992 bsd This wildcard inserts a BSD licence notice. file header.
4994 fileheader The file header template. This wildcard snippets, file templates.
4995 will only be replaced in file templates.
4996 ============== ============================================= =======================================
4999 Special {command:} wildcard
5000 ***************************
5002 The {command:} wildcard is a special one because it can execute
5003 a specified command and put the command's output (stdout) into
5012 Linux localhost 2.6.9-023stab046.2-smp #1 SMP Mon Dec 10 15:04:55 MSK 2007 x86_64 GNU/Linux
5014 Using this wildcard you can insert nearly any arbitrary text into the
5017 In the environment of the executed command the variables
5018 ``GEANY_FILENAME``, ``GEANY_FILETYPE`` and ``GEANY_FUNCNAME`` are set.
5019 The value of these variables is filled in only if Geany knows about it.
5020 For example, ``GEANY_FUNCNAME`` is only filled within the function
5021 description template. However, these variables are ``always`` set,
5022 just maybe with an empty value.
5023 You can easily access them e.g. within an executed shell script using::
5029 If the specified command could not be found or not executed, the wildcard is substituted
5030 by an empty string. In such cases, you can find the occurred error message on Geany's
5031 standard error and in the Help->Debug Messages dialog.
5034 Customizing the toolbar
5035 -----------------------
5037 You can add, remove and reorder the elements in the toolbar by using
5038 the toolbar editor, or by manually editing the configuration file
5041 The toolbar editor can be opened from the preferences editor on the Toolbar tab or
5042 by right-clicking on the toolbar itself and choosing it from the menu.
5044 Manually editing the toolbar layout
5045 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5047 To override the system-wide configuration file, copy it to your user
5048 configuration directory (see `Configuration file paths`_).
5052 % cp /usr/local/share/geany/ui_toolbar.xml /home/username/.config/geany/
5054 Then edit it and add any of the available elements listed in the file or remove
5055 any of the existing elements. Of course, you can also reorder the elements as
5056 you wish and add or remove additional separators.
5057 This file must be valid XML, otherwise the global toolbar UI definition
5058 will be used instead.
5060 Your changes are applied once you save the file.
5063 (1) You cannot add new actions which are not listed below.
5064 (2) Everything you add or change must be inside the /ui/toolbar/ path.
5067 Available toolbar elements
5068 ^^^^^^^^^^^^^^^^^^^^^^^^^^
5070 ================== ==============================================================================
5071 Element name Description
5072 ================== ==============================================================================
5073 New Create a new file
5074 Open Open an existing file
5075 Save Save the current file
5076 SaveAll Save all open files
5077 Reload Reload the current file from disk
5078 Close Close the current file
5079 CloseAll Close all open files
5080 Print Print the current file
5081 Cut Cut the current selection
5082 Copy Copy the current selection
5083 Paste Paste the contents of the clipboard
5084 Delete Delete the current selection
5085 Undo Undo the last modification
5086 Redo Redo the last modification
5087 NavBack Navigate back a location
5088 NavFor Navigate forward a location
5089 Compile Compile the current file
5090 Build Build the current file, includes a submenu for Make commands. Geany
5091 remembers the last chosen action from the submenu and uses this as default
5092 action when the button itself is clicked.
5093 Run Run or view the current file
5094 Color Open a color chooser dialog, to interactively pick colors from a palette
5095 ZoomIn Zoom in the text
5096 ZoomOut Zoom out the text
5097 UnIndent Decrease indentation
5098 Indent Increase indentation
5099 Replace Replace text in the current document
5100 SearchEntry The search field belonging to the 'Search' element (can be used alone)
5101 Search Find the entered text in the current file (only useful if you also
5103 GotoEntry The goto field belonging to the 'Goto' element (can be used alone)
5104 Goto Jump to the entered line number (only useful if you also use 'GotoEntry')
5105 Preferences Show the preferences dialog
5107 ================== ==============================================================================
5111 Plugin documentation
5112 ====================
5117 The HTML Characters plugin helps when working with special
5118 characters in XML/HTML, e.g. German Umlauts ü and ä.
5121 Insert entity dialog
5122 ^^^^^^^^^^^^^^^^^^^^
5124 When the plugin is enabled, you can insert special character
5125 entities using *Tools->Insert Special HTML Characters*.
5127 This opens up a dialog where you can find a huge amount of special
5128 characters sorted by category that you might like to use inside your
5129 document. You can expand and collapse the categories by clicking on
5130 the little arrow on the left hand side. Once you have found the
5131 desired character click on it and choose "Insert". This will insert
5132 the entity for the character at the current cursor position. You
5133 might also like to double click the chosen entity instead.
5136 Replace special chars by its entity
5137 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5139 To help make a XML/HTML document valid the plugin supports
5140 replacement of special chars known by the plugin. Both bulk
5141 replacement and immediate replacement during typing are supported.
5143 A few characters will not be replaced. These are
5154 You can activate/deactivate this feature using the *Tools->HTML
5155 Replacement->Auto-replace Special Characters* menu item. If it's
5156 activated, all special characters (beside the given exceptions from
5157 above) known by the plugin will be replaced by their entities.
5159 You could also set a keybinding for the plugin to toggle the status
5166 After inserting a huge amount of text, e.g. by using copy & paste, the
5167 plugin allows bulk replacement of all known characters (beside the
5168 mentioned exceptions). You can find the function under the same
5169 menu at *Tools->HTML Replacement->Replace Characters in Selection*, or
5170 configure a keybinding for the plugin.
5179 This plugin provides an option to automatically save documents.
5180 You can choose to save the current document, or all of your documents, at
5187 You can save the current document when the editor's focus goes out.
5188 Every pop-up, menu dialogs, or anything else that can make the editor lose the focus,
5189 will make the current document to be saved.
5194 This plugin sets on every new file (*File->New* or *File->New (with template)*)
5195 a randomly chosen filename and set its filetype appropriate to the used template
5196 or when no template was used, to a configurable default filetype.
5197 This enables you to quickly compile, build and/or run the new file without the
5198 need to give it an explicit filename using the Save As dialog. This might be
5199 useful when you often create new files just for testing some code or something
5206 This plugin creates a backup copy of the current file in Geany when it is
5207 saved. You can specify the directory where the backup copy is saved and
5208 you can configure the automatically added extension in the configure dialog
5209 in Geany's plugin manager.
5211 After the plugin was loaded in Geany's plugin manager, every file is
5212 copied into the configured backup directory *after* the file has been saved
5215 The created backup copy file permissions are set to read-write only for
5216 the user. This should help to not create world-readable files on possibly
5217 unsecure destination directories like /tmp (especially useful
5218 on multi-user systems).
5219 This applies only to non-Windows systems. On Windows, no explicit file
5220 permissions are set.
5223 Additionally, you can define how many levels of the original file's
5224 directory structure should be replicated in the backup copy path.
5225 For example, setting the option
5226 *Directory levels to include in the backup destination* to *2*
5227 cause the plugin to create the last two components of the original
5228 file's path in the backup copy path and place the new file there.
5231 Contributing to this document
5232 =============================
5234 This document (``geany.txt``) is written in `reStructuredText`__
5235 (or "reST"). The source file for it is located in Geany's ``doc``
5236 subdirectory. If you intend on making changes, you should grab the
5237 source right from Git to make sure you've got the newest version.
5238 First, you need to configure the build system to generate the HTML
5239 documentation passing the *--enable-html-docs* option to the *configure*
5240 script. Then after editing the file, run ``make`` (from the root build
5241 directory or from the *doc* subdirectory) to build the HTML documentation
5242 and see how your changes look. This regenerates the ``geany.html`` file
5243 inside the *doc* subdirectory. To generate a PDF file, configure with
5244 *--enable-pdf-docs* and run ``make`` as for the HTML version. The generated
5245 PDF file is named geany-|(version)|.pdf and is located inside the *doc*
5248 __ http://docutils.sourceforge.net/rst.html
5250 After you are happy with your changes, create a patch e.g. by using::
5252 % git diff geany.txt > foo.patch
5254 or even better, by creating a Git-formatted patch which will keep authoring
5255 and description data, by first committing your changes (doing so in a fresh
5256 new branch is recommended for `master` not to diverge from upstream) and then
5257 using git format-patch::
5259 % git checkout -b my-documentation-changes # create a fresh branch
5260 % git commit geany.txt
5261 Write a good commit message...
5262 % git format-patch HEAD^
5263 % git checkout master # go back to master
5265 and then submit that file to the mailing list for review.
5267 Also you can clone the Geany repository at GitHub and send a pull request.
5269 Note, you will need the Python docutils software package installed
5270 to build the docs. The package is named ``python-docutils`` on Debian
5276 Scintilla keyboard commands
5277 ===========================
5279 Copyright © 1998, 2006 Neil Hodgson <neilh(at)scintilla(dot)org>
5281 This appendix is distributed under the terms of the License for
5282 Scintilla and SciTE. A copy of this license can be found in the file
5283 ``scintilla/License.txt`` included with the source code of this
5284 program and in the appendix of this document. See `License for
5285 Scintilla and SciTE`_.
5294 Keyboard commands for Scintilla mostly follow common Windows and GTK+
5295 conventions. All move keys (arrows, page up/down, home and end)
5296 allows to extend or reduce the stream selection when holding the
5297 Shift key, and the rectangular selection when holding the
5298 appropriate keys (see `Column mode editing (rectangular selections)`_).
5300 Some keys may not be available with some national keyboards
5301 or because they are taken by the system such as by a window manager
5302 or GTK. Keyboard equivalents of menu commands are listed in the
5303 menus. Some less common commands with no menu equivalent are:
5305 ============================================= ======================
5307 ============================================= ======================
5308 Magnify text size. Ctrl-Keypad+
5309 Reduce text size. Ctrl-Keypad-
5310 Restore text size to normal. Ctrl-Keypad/
5312 Dedent block. Shift-Tab
5313 Delete to start of word. Ctrl-BackSpace
5314 Delete to end of word. Ctrl-Delete
5315 Delete to start of line. Ctrl-Shift-BackSpace
5316 Go to start of document. Ctrl-Home
5317 Extend selection to start of document. Ctrl-Shift-Home
5318 Go to start of display line. Alt-Home
5319 Extend selection to start of display line. Alt-Shift-Home
5320 Go to end of document. Ctrl-End
5321 Extend selection to end of document. Ctrl-Shift-End
5322 Extend selection to end of display line. Alt-Shift-End
5323 Previous paragraph. Shift extends selection. Ctrl-Up
5324 Next paragraph. Shift extends selection. Ctrl-Down
5325 Previous word. Shift extends selection. Ctrl-Left
5326 Next word. Shift extends selection. Ctrl-Right
5327 ============================================= ======================
5338 * Double-click on empty space in the notebook tab bar to open a
5340 * Middle-click on a document's notebook tab to close the document.
5341 * Hold `Ctrl` and click on any notebook tab to switch to the last used
5343 * Double-click on a document's notebook tab to toggle all additional
5344 widgets (to show them again use the View menu or the keyboard
5345 shortcut). The interface pref must be enabled for this to work.
5350 * Alt-scroll wheel moves up/down a page.
5351 * Ctrl-scroll wheel zooms in/out.
5352 * Shift-scroll wheel scrolls 8 characters right/left.
5353 * Ctrl-click on a word in a document to perform *Go to Symbol Definition*.
5354 * Ctrl-click on a bracket/brace to perform *Go to Matching Brace*.
5359 * Double-click on a symbol-list group to expand or compact it.
5364 * Scrolling the mouse wheel over a notebook tab bar will switch
5367 The following are derived from X-Windows features (but GTK still supports
5370 * Middle-click pastes the last selected text.
5371 * Middle-click on a scrollbar moves the scrollbar to that
5372 position without having to drag it.
5376 Compile-time options
5377 ====================
5379 There are some options which can only be changed at compile time,
5380 and some options which are used as the default for configurable
5381 options. To change these options, edit the appropriate source file
5382 in the ``src`` subdirectory. Look for a block of lines starting with
5383 ``#define GEANY_*``. Any definitions which are not listed here should
5387 Most users should not need to change these options.
5392 ============================== ============================================ ==================
5393 Option Description Default
5394 ============================== ============================================ ==================
5395 GEANY_STRING_UNTITLED A string used as the default name for new untitled
5396 files. Be aware that the string can be
5397 translated, so change it only if you know
5399 GEANY_WINDOW_MINIMAL_WIDTH The minimal width of the main window. 620
5400 GEANY_WINDOW_MINIMAL_HEIGHT The minimal height of the main window. 440
5401 GEANY_WINDOW_DEFAULT_WIDTH The default width of the main window at the 900
5403 GEANY_WINDOW_DEFAULT_HEIGHT The default height of the main window at the 600
5405 **Windows specific**
5406 GEANY_USE_WIN32_DIALOG Set this to 1 if you want to use the default 0
5407 Windows file open and save dialogs instead
5408 GTK's file open and save dialogs. The
5409 default Windows file dialogs are missing
5410 some nice features like choosing a filetype
5411 or an encoding. *Do not touch this setting
5412 when building on a non-Win32 system.*
5413 ============================== ============================================ ==================
5418 ============================== ============================================ ==================
5419 Option Description Default
5420 ============================== ============================================ ==================
5421 GEANY_PROJECT_EXT The default filename extension for Geany geany
5422 project files. It is used when creating new
5423 projects and as filter mask for the project
5425 ============================== ============================================ ==================
5430 ============================== ============================================ ==================
5431 Option Description Default
5432 ============================== ============================================ ==================
5433 GEANY_FILETYPE_SEARCH_LINES The number of lines to search for the 2
5434 filetype with the extract filetype regex.
5435 ============================== ============================================ ==================
5440 ============================== ============================================ ==================
5441 Option Description Default
5442 ============================== ============================================ ==================
5443 GEANY_WORDCHARS These characters define word boundaries when a string with:
5444 making selections and searching using word a-z, A-Z, 0-9 and
5445 matching options. underscore.
5446 ============================== ============================================ ==================
5451 These are default settings that can be overridden in the `Preferences`_ dialog.
5453 ============================== ============================================ ==================
5454 Option Description Default
5455 ============================== ============================================ ==================
5456 GEANY_MIN_SYMBOLLIST_CHARS How many characters you need to type to 4
5457 trigger the autocompletion list.
5458 GEANY_DISK_CHECK_TIMEOUT Time in seconds between checking a file for 30
5460 GEANY_DEFAULT_TOOLS_MAKE The make tool. This can also include a path. "make"
5461 GEANY_DEFAULT_TOOLS_TERMINAL A terminal emulator command, see See below.
5462 `Terminal emulators`_.
5463 GEANY_DEFAULT_TOOLS_BROWSER A web browser. This can also include a path. "firefox"
5464 GEANY_DEFAULT_TOOLS_PRINTCMD A printing tool. It should be able to accept "lpr"
5465 and process plain text files. This can also
5467 GEANY_DEFAULT_TOOLS_GREP A grep tool. It should be compatible with "grep"
5468 GNU grep. This can also include a path.
5469 GEANY_DEFAULT_MRU_LENGTH The length of the "Recent files" list. 10
5470 GEANY_DEFAULT_FONT_SYMBOL_LIST The font used in sidebar to show symbols and "Sans 9"
5472 GEANY_DEFAULT_FONT_MSG_WINDOW The font used in the messages window. "Sans 9"
5473 GEANY_DEFAULT_FONT_EDITOR The font used in the editor window. "Monospace 10"
5474 GEANY_TOGGLE_MARK A string which is used to mark a toggled "~ "
5476 GEANY_MAX_AUTOCOMPLETE_WORDS How many autocompletion suggestions should 30
5478 GEANY_DEFAULT_FILETYPE_REGEX The default regex to extract filetypes from See below.
5480 ============================== ============================================ ==================
5484 The GEANY_DEFAULT_FILETYPE_REGEX default value is -\\*-\\s*([^\\s]+)\\s*-\\*- which finds Emacs filetypes.
5486 The GEANY_DEFAULT_TOOLS_TERMINAL default value on Windows is::
5490 and on any non-Windows system is::
5492 xterm -e "/bin/sh %c"
5498 ============================== ============================================ ==================
5499 Option Description Default
5500 ============================== ============================================ ==================
5501 GEANY_BUILD_ERR_HIGHLIGHT_MAX Amount of build error indicators to 50
5502 be shown in the editor window.
5503 This affects the special coloring
5504 when Geany detects a compiler output line as
5505 an error message and then highlights the
5506 corresponding line in the source code.
5507 Usually only the first few messages are
5508 interesting because following errors are
5510 All errors in the Compiler window are parsed
5511 and unaffected by this value.
5512 PRINTBUILDCMDS Every time a build menu item priority FALSE
5513 calculation is run, print the state of the
5514 menu item table in the form of the table
5515 in `Build Menu Configuration`_. May be
5516 useful to debug configuration file
5517 overloading. Warning produces a lot of
5518 output. Can also be enabled/disabled by the
5519 debugger by setting printbuildcmds to 1/0
5520 overriding the compile setting.
5521 ============================== ============================================ ==================
5525 GNU General Public License
5526 ==========================
5530 GNU GENERAL PUBLIC LICENSE
5531 Version 2, June 1991
5533 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5534 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
5535 Everyone is permitted to copy and distribute verbatim copies
5536 of this license document, but changing it is not allowed.
5540 The licenses for most software are designed to take away your
5541 freedom to share and change it. By contrast, the GNU General Public
5542 License is intended to guarantee your freedom to share and change free
5543 software--to make sure the software is free for all its users. This
5544 General Public License applies to most of the Free Software
5545 Foundation's software and to any other program whose authors commit to
5546 using it. (Some other Free Software Foundation software is covered by
5547 the GNU Library General Public License instead.) You can apply it to
5550 When we speak of free software, we are referring to freedom, not
5551 price. Our General Public Licenses are designed to make sure that you
5552 have the freedom to distribute copies of free software (and charge for
5553 this service if you wish), that you receive source code or can get it
5554 if you want it, that you can change the software or use pieces of it
5555 in new free programs; and that you know you can do these things.
5557 To protect your rights, we need to make restrictions that forbid
5558 anyone to deny you these rights or to ask you to surrender the rights.
5559 These restrictions translate to certain responsibilities for you if you
5560 distribute copies of the software, or if you modify it.
5562 For example, if you distribute copies of such a program, whether
5563 gratis or for a fee, you must give the recipients all the rights that
5564 you have. You must make sure that they, too, receive or can get the
5565 source code. And you must show them these terms so they know their
5568 We protect your rights with two steps: (1) copyright the software, and
5569 (2) offer you this license which gives you legal permission to copy,
5570 distribute and/or modify the software.
5572 Also, for each author's protection and ours, we want to make certain
5573 that everyone understands that there is no warranty for this free
5574 software. If the software is modified by someone else and passed on, we
5575 want its recipients to know that what they have is not the original, so
5576 that any problems introduced by others will not reflect on the original
5577 authors' reputations.
5579 Finally, any free program is threatened constantly by software
5580 patents. We wish to avoid the danger that redistributors of a free
5581 program will individually obtain patent licenses, in effect making the
5582 program proprietary. To prevent this, we have made it clear that any
5583 patent must be licensed for everyone's free use or not licensed at all.
5585 The precise terms and conditions for copying, distribution and
5586 modification follow.
5588 GNU GENERAL PUBLIC LICENSE
5589 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
5591 0. This License applies to any program or other work which contains
5592 a notice placed by the copyright holder saying it may be distributed
5593 under the terms of this General Public License. The "Program", below,
5594 refers to any such program or work, and a "work based on the Program"
5595 means either the Program or any derivative work under copyright law:
5596 that is to say, a work containing the Program or a portion of it,
5597 either verbatim or with modifications and/or translated into another
5598 language. (Hereinafter, translation is included without limitation in
5599 the term "modification".) Each licensee is addressed as "you".
5601 Activities other than copying, distribution and modification are not
5602 covered by this License; they are outside its scope. The act of
5603 running the Program is not restricted, and the output from the Program
5604 is covered only if its contents constitute a work based on the
5605 Program (independent of having been made by running the Program).
5606 Whether that is true depends on what the Program does.
5608 1. You may copy and distribute verbatim copies of the Program's
5609 source code as you receive it, in any medium, provided that you
5610 conspicuously and appropriately publish on each copy an appropriate
5611 copyright notice and disclaimer of warranty; keep intact all the
5612 notices that refer to this License and to the absence of any warranty;
5613 and give any other recipients of the Program a copy of this License
5614 along with the Program.
5616 You may charge a fee for the physical act of transferring a copy, and
5617 you may at your option offer warranty protection in exchange for a fee.
5619 2. You may modify your copy or copies of the Program or any portion
5620 of it, thus forming a work based on the Program, and copy and
5621 distribute such modifications or work under the terms of Section 1
5622 above, provided that you also meet all of these conditions:
5624 a) You must cause the modified files to carry prominent notices
5625 stating that you changed the files and the date of any change.
5627 b) You must cause any work that you distribute or publish, that in
5628 whole or in part contains or is derived from the Program or any
5629 part thereof, to be licensed as a whole at no charge to all third
5630 parties under the terms of this License.
5632 c) If the modified program normally reads commands interactively
5633 when run, you must cause it, when started running for such
5634 interactive use in the most ordinary way, to print or display an
5635 announcement including an appropriate copyright notice and a
5636 notice that there is no warranty (or else, saying that you provide
5637 a warranty) and that users may redistribute the program under
5638 these conditions, and telling the user how to view a copy of this
5639 License. (Exception: if the Program itself is interactive but
5640 does not normally print such an announcement, your work based on
5641 the Program is not required to print an announcement.)
5643 These requirements apply to the modified work as a whole. If
5644 identifiable sections of that work are not derived from the Program,
5645 and can be reasonably considered independent and separate works in
5646 themselves, then this License, and its terms, do not apply to those
5647 sections when you distribute them as separate works. But when you
5648 distribute the same sections as part of a whole which is a work based
5649 on the Program, the distribution of the whole must be on the terms of
5650 this License, whose permissions for other licensees extend to the
5651 entire whole, and thus to each and every part regardless of who wrote it.
5653 Thus, it is not the intent of this section to claim rights or contest
5654 your rights to work written entirely by you; rather, the intent is to
5655 exercise the right to control the distribution of derivative or
5656 collective works based on the Program.
5658 In addition, mere aggregation of another work not based on the Program
5659 with the Program (or with a work based on the Program) on a volume of
5660 a storage or distribution medium does not bring the other work under
5661 the scope of this License.
5663 3. You may copy and distribute the Program (or a work based on it,
5664 under Section 2) in object code or executable form under the terms of
5665 Sections 1 and 2 above provided that you also do one of the following:
5667 a) Accompany it with the complete corresponding machine-readable
5668 source code, which must be distributed under the terms of Sections
5669 1 and 2 above on a medium customarily used for software interchange; or,
5671 b) Accompany it with a written offer, valid for at least three
5672 years, to give any third party, for a charge no more than your
5673 cost of physically performing source distribution, a complete
5674 machine-readable copy of the corresponding source code, to be
5675 distributed under the terms of Sections 1 and 2 above on a medium
5676 customarily used for software interchange; or,
5678 c) Accompany it with the information you received as to the offer
5679 to distribute corresponding source code. (This alternative is
5680 allowed only for noncommercial distribution and only if you
5681 received the program in object code or executable form with such
5682 an offer, in accord with Subsection b above.)
5684 The source code for a work means the preferred form of the work for
5685 making modifications to it. For an executable work, complete source
5686 code means all the source code for all modules it contains, plus any
5687 associated interface definition files, plus the scripts used to
5688 control compilation and installation of the executable. However, as a
5689 special exception, the source code distributed need not include
5690 anything that is normally distributed (in either source or binary
5691 form) with the major components (compiler, kernel, and so on) of the
5692 operating system on which the executable runs, unless that component
5693 itself accompanies the executable.
5695 If distribution of executable or object code is made by offering
5696 access to copy from a designated place, then offering equivalent
5697 access to copy the source code from the same place counts as
5698 distribution of the source code, even though third parties are not
5699 compelled to copy the source along with the object code.
5701 4. You may not copy, modify, sublicense, or distribute the Program
5702 except as expressly provided under this License. Any attempt
5703 otherwise to copy, modify, sublicense or distribute the Program is
5704 void, and will automatically terminate your rights under this License.
5705 However, parties who have received copies, or rights, from you under
5706 this License will not have their licenses terminated so long as such
5707 parties remain in full compliance.
5709 5. You are not required to accept this License, since you have not
5710 signed it. However, nothing else grants you permission to modify or
5711 distribute the Program or its derivative works. These actions are
5712 prohibited by law if you do not accept this License. Therefore, by
5713 modifying or distributing the Program (or any work based on the
5714 Program), you indicate your acceptance of this License to do so, and
5715 all its terms and conditions for copying, distributing or modifying
5716 the Program or works based on it.
5718 6. Each time you redistribute the Program (or any work based on the
5719 Program), the recipient automatically receives a license from the
5720 original licensor to copy, distribute or modify the Program subject to
5721 these terms and conditions. You may not impose any further
5722 restrictions on the recipients' exercise of the rights granted herein.
5723 You are not responsible for enforcing compliance by third parties to
5726 7. If, as a consequence of a court judgment or allegation of patent
5727 infringement or for any other reason (not limited to patent issues),
5728 conditions are imposed on you (whether by court order, agreement or
5729 otherwise) that contradict the conditions of this License, they do not
5730 excuse you from the conditions of this License. If you cannot
5731 distribute so as to satisfy simultaneously your obligations under this
5732 License and any other pertinent obligations, then as a consequence you
5733 may not distribute the Program at all. For example, if a patent
5734 license would not permit royalty-free redistribution of the Program by
5735 all those who receive copies directly or indirectly through you, then
5736 the only way you could satisfy both it and this License would be to
5737 refrain entirely from distribution of the Program.
5739 If any portion of this section is held invalid or unenforceable under
5740 any particular circumstance, the balance of the section is intended to
5741 apply and the section as a whole is intended to apply in other
5744 It is not the purpose of this section to induce you to infringe any
5745 patents or other property right claims or to contest validity of any
5746 such claims; this section has the sole purpose of protecting the
5747 integrity of the free software distribution system, which is
5748 implemented by public license practices. Many people have made
5749 generous contributions to the wide range of software distributed
5750 through that system in reliance on consistent application of that
5751 system; it is up to the author/donor to decide if he or she is willing
5752 to distribute software through any other system and a licensee cannot
5755 This section is intended to make thoroughly clear what is believed to
5756 be a consequence of the rest of this License.
5758 8. If the distribution and/or use of the Program is restricted in
5759 certain countries either by patents or by copyrighted interfaces, the
5760 original copyright holder who places the Program under this License
5761 may add an explicit geographical distribution limitation excluding
5762 those countries, so that distribution is permitted only in or among
5763 countries not thus excluded. In such case, this License incorporates
5764 the limitation as if written in the body of this License.
5766 9. The Free Software Foundation may publish revised and/or new versions
5767 of the General Public License from time to time. Such new versions will
5768 be similar in spirit to the present version, but may differ in detail to
5769 address new problems or concerns.
5771 Each version is given a distinguishing version number. If the Program
5772 specifies a version number of this License which applies to it and "any
5773 later version", you have the option of following the terms and conditions
5774 either of that version or of any later version published by the Free
5775 Software Foundation. If the Program does not specify a version number of
5776 this License, you may choose any version ever published by the Free Software
5779 10. If you wish to incorporate parts of the Program into other free
5780 programs whose distribution conditions are different, write to the author
5781 to ask for permission. For software which is copyrighted by the Free
5782 Software Foundation, write to the Free Software Foundation; we sometimes
5783 make exceptions for this. Our decision will be guided by the two goals
5784 of preserving the free status of all derivatives of our free software and
5785 of promoting the sharing and reuse of software generally.
5789 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
5790 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
5791 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
5792 PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
5793 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
5794 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
5795 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
5796 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
5797 REPAIR OR CORRECTION.
5799 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
5800 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
5801 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
5802 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
5803 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
5804 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
5805 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
5806 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
5807 POSSIBILITY OF SUCH DAMAGES.
5809 END OF TERMS AND CONDITIONS
5811 How to Apply These Terms to Your New Programs
5813 If you develop a new program, and you want it to be of the greatest
5814 possible use to the public, the best way to achieve this is to make it
5815 free software which everyone can redistribute and change under these terms.
5817 To do so, attach the following notices to the program. It is safest
5818 to attach them to the start of each source file to most effectively
5819 convey the exclusion of warranty; and each file should have at least
5820 the "copyright" line and a pointer to where the full notice is found.
5822 <one line to give the program's name and a brief idea of what it does.>
5823 Copyright (C) <year> <name of author>
5825 This program is free software; you can redistribute it and/or modify
5826 it under the terms of the GNU General Public License as published by
5827 the Free Software Foundation; either version 2 of the License, or
5828 (at your option) any later version.
5830 This program is distributed in the hope that it will be useful,
5831 but WITHOUT ANY WARRANTY; without even the implied warranty of
5832 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5833 GNU General Public License for more details.
5835 You should have received a copy of the GNU General Public License along
5836 with this program; if not, write to the Free Software Foundation, Inc.,
5837 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
5840 Also add information on how to contact you by electronic and paper mail.
5842 If the program is interactive, make it output a short notice like this
5843 when it starts in an interactive mode:
5845 Gnomovision version 69, Copyright (C) year name of author
5846 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
5847 This is free software, and you are welcome to redistribute it
5848 under certain conditions; type `show c' for details.
5850 The hypothetical commands `show w' and `show c' should show the appropriate
5851 parts of the General Public License. Of course, the commands you use may
5852 be called something other than `show w' and `show c'; they could even be
5853 mouse-clicks or menu items--whatever suits your program.
5855 You should also get your employer (if you work as a programmer) or your
5856 school, if any, to sign a "copyright disclaimer" for the program, if
5857 necessary. Here is a sample; alter the names:
5859 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
5860 `Gnomovision' (which makes passes at compilers) written by James Hacker.
5862 <signature of Ty Coon>, 1 April 1989
5863 Ty Coon, President of Vice
5865 This General Public License does not permit incorporating your program into
5866 proprietary programs. If your program is a subroutine library, you may
5867 consider it more useful to permit linking proprietary applications with the
5868 library. If this is what you want to do, use the GNU Library General
5869 Public License instead of this License.
5874 License for Scintilla and SciTE
5875 ===============================
5877 Copyright 1998-2003 by Neil Hodgson <neilh(at)scintilla(dot)org>
5881 Permission to use, copy, modify, and distribute this software and
5882 its documentation for any purpose and without fee is hereby granted,
5883 provided that the above copyright notice appear in all copies and
5884 that both that copyright notice and this permission notice appear in
5885 supporting documentation.
5887 NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
5888 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
5889 NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
5890 CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
5891 OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
5892 OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
5893 USE OR PERFORMANCE OF THIS SOFTWARE.