1 .. |(version)| replace:: 0.20
7 -------------------------
8 A fast, light, GTK+ IDE
9 -------------------------
11 :Authors: Enrico Tröger,
19 This document is distributed under the terms of the GNU General Public
20 License as published by the Free Software Foundation; either version 2
21 of the License, or (at your option) any later version. A copy of this
22 license can be found in the file COPYING included with the source code
23 of this program, and also in the chapter `GNU General Public License`_.
37 Geany is a small and lightweight Integrated Development Environment. It
38 was developed to provide a small and fast IDE, which has only a few
39 dependencies on other packages. Another goal was to be as independent
40 as possible from a particular Desktop Environment like KDE or GNOME -
41 Geany only requires the GTK2 runtime libraries.
43 Some basic features of Geany:
47 * Autocompletion of symbols/words
48 * Construct completion/snippets
49 * Auto-closing of XML and HTML tags
51 * Many supported filetypes including C, Java, PHP, HTML, Python, Perl,
55 * Build system to compile and execute your code
56 * Simple project management
64 You can obtain Geany from http://www.geany.org/ or perhaps also from
65 your distribution. For a list of available packages, please see
66 http://www.geany.org/Download/ThirdPartyPackages.
73 Geany is distributed under the terms of the GNU General Public License
74 as published by the Free Software Foundation; either version 2 of
75 the License, or (at your option) any later version. A copy of this
76 license can be found in the file COPYING included with the source
77 code of this program and in the chapter, `GNU General Public License`_.
79 The included Scintilla library (found in the subdirectory
80 ``scintilla/``) has its own license, which can be found in the chapter,
81 `License for Scintilla and SciTE`_.
88 This documentation is available in HTML and text formats.
89 The latest version can always be found at http://www.geany.org/.
91 If you want to contribute to it, see `Contributing to this document`_.
103 You will need the GTK (>= 2.8.0) libraries and their dependencies
104 (Pango, GLib and ATK). Your distro should provide packages for these,
105 usually installed by default. For Windows, you can download an installer
106 from the website which bundles these libraries.
112 There are many binary packages available. For an up-to-date but maybe
113 incomplete list see http://www.geany.org/Download/ThirdPartyPackages.
119 Compiling Geany is quite easy.
120 To do so, you need the GTK (>= 2.8.0) libraries and header files.
121 You also need the Pango, GLib and ATK libraries and header files.
122 All these files are available at http://www.gtk.org, but very often
123 your distro will provide development packages to save the trouble of
124 building these yourself.
126 Furthermore you need, of course, a C and C++ compiler. The GNU versions
127 of these tools are recommended.
129 Autotools based build system
130 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
132 The Autotools based build system is very mature and has been well tested.
133 To use it, you just need the Make tool, preferably GNU Make.
135 Then run the following commands::
144 Waf based build system
145 ^^^^^^^^^^^^^^^^^^^^^^
147 The Waf build system is still quite young and under heavy development but already in a
148 usable state. In contrast to the Autotools system, Waf needs Python. So before using Waf, you need
149 to install Python on your system.
150 The advantage of the Waf build system over the Autotools based build system is that the whole
151 build process might be a bit faster. Especially when you use the Waf
152 cache feature for repetitive builds (e.g. when changing only a few source files
153 to test something) will become much faster since Waf will cache and re-use the
154 unchanged built files and only compile the changed code again. See `Waf Cache`_ for details.
155 To build Geany with Waf as run::
167 The Waf build system has a nice and interesting feature which can help to avoid
168 a lot of unnecessary rebuilding of unchanged code. This often happens when developing new features
169 or trying to debug something in Geany.
170 Waf is able to store and retrieve the object files from a cache. This cache is declared
171 using the environment variable ``WAFCACHE``.
172 A possible location of the cache directory could be ``~/.cache/waf``. In order to make use of
173 this, you first need to create this directory::
175 $ mkdir -p ~/.cache/waf
177 then add the environment variable to your shell configuration (the following example is for
178 Bash and should be adjusted to your used shell)::
180 export WAFCACHE=/home/username/.cache/waf
182 Remember to replace ``username`` with your actual username.
184 More information about the Waf cache feature are available at
185 http://code.google.com/p/waf/wiki/CacheObjectFiles.
189 You should be careful about the size of the cache directory as it may
190 grow rapidly over time.
191 Waf doesn't do any cleaning or other house-keeping of the cache yet, so you need to keep it
193 An easy way to keep it clean is to run the following command regularly to remove old
196 $ find /home/username/.cache/waf -mtime +14 -exec rm {} \;
198 This will delete all files in the cache directory which are older than 14 days.
200 For details about the ``find`` command and its options, check its manual page.
205 The configure script supports several common options, for a detailed
213 (depending on which build system you use).
215 You may also want to read the INSTALL file for advanced installation
218 * See also `Compile-time options`_.
220 Dynamic linking loader support and VTE
221 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
222 In the case that your system lacks dynamic linking loader support, you
223 probably want to pass the option ``--disable-vte`` to the ``configure``
224 script. This prevents compiling Geany with dynamic linking loader
225 support for automatically loading ``libvte.so.4`` if available.
229 If there are any errors during compilation, check your build
230 environment and try to find the error, otherwise contact the mailing
231 list or one the authors. Sometimes you might need to ask for specific
232 help from your distribution.
237 If you want to edit any of Geany's system configuration files after
238 installation you will need to know the installation prefix. Usually this
239 is not necessary as you can just use per user configuration files and
240 you will not need root permissions.
242 Use the ``--print-prefix`` option to Geany to check - see `Command line
243 options`_. The first path is the prefix.
245 This is commonly ``/usr`` if you installed from a binary package, or
246 ``/usr/local`` if you build from source.
257 You can start Geany in the following ways:
259 * From the Desktop Environment menu:
261 Choose in your application menu of your used Desktop Environment:
262 Development --> Geany.
264 * From the command line:
266 To start Geany from a command line, type the following and press
274 The Geany window is shown in the following figure:
276 .. image:: ./images/main_window.png
278 The workspace has the following parts:
281 * An optional toolbar.
282 * An optional sidebar that can show the following tabs:
284 * Documents - A document list, and
285 * Symbols - A list of symbols in your code.
287 * The main editor window.
288 * An optional message window which can show the following tabs:
290 * Status - A list of status messages.
291 * Compiler - The output of compiling or building programs.
292 * Messages - Results of 'Find Usage', 'Find Usage' 'Find in Files' and other actions
293 * Scribble - A text scratchpad for any use.
294 * Terminal - An optional terminal window.
298 Additional tabs may be added to the sidebar and message window by plugins.
300 The position of the tabs can be selected in the interface preferences.
302 The sizes of the sidebar and message window can be adjusted by
303 dragging the dividers.
308 ============ ======================= =================================================
309 Short option Long option Function
310 ============ ======================= =================================================
311 *none* +number Set initial line number for the first opened file
312 (same as --line, do not put a space between the + sign
313 and the number). E.g. "geany +7 foo.bar" will open the
314 file foo.bar and place the cursor in line 7.
316 *none* --column Set initial column number for the first opened file.
318 -c dir_name --config=directory_name Use an alternate configuration directory. The default
319 configuration directory is ``~/.config/geany/`` and that
320 is where ``geany.conf`` and other configuration files
323 *none* --ft-names Print a list of Geany's internal filetype names (useful
324 for snippets configuration).
326 -g --generate-tags Generate a global tags file (see
327 `Generating a global tags file`_).
329 -P --no-preprocessing Don't preprocess C/C++ files when generating tags.
331 -i --new-instance Do not open files in a running instance, force opening
332 a new instance. Only available if Geany was compiled
333 with support for Sockets.
335 -l --line Set initial line number for the first opened file.
337 *none* --list-documents Return a list of open documents in a running Geany
339 This can be used to read the currently opened documents in
340 Geany from an external script or tool. The returned list
341 is separated by newlines (LF) and consists of the full,
342 UTF-8 encoded filenames of the documents.
343 Only available if Geany was compiled with support for
346 -m --no-msgwin Do not show the message window. Use this option if you
347 do not need compiler messages or VTE support.
349 -n --no-ctags Do not load symbol completion and call tip data. Use this
350 option if you do not want to use them.
352 -p --no-plugins Do not load plugins or plugin support.
354 *none* --print-prefix Print installation prefix, the data directory, the lib
355 directory and the locale directory (in this order) to
356 stdout, one line each. This is mainly intended for plugin
357 authors to detect installation paths.
359 -s --no-session Do not load the previous session's files.
361 -t --no-terminal Do not load terminal support. Use this option if you do
362 not want to load the virtual terminal emulator widget
363 at startup. If you do not have ``libvte.so.4`` installed,
364 then terminal-support is automatically disabled. Only
365 available if Geany was compiled with support for VTE.
367 *none* --socket-file Use this socket filename for communication with a
368 running Geany instance. This can be used with the following
369 command to execute Geany on the current workspace::
371 geany --socket-file=/tmp/geany-sock-$(xprop -root _NET_CURRENT_DESKTOP | awk '{print $3}')
373 *none* --vte-lib Specify explicitly the path including filename or only
374 the filename to the VTE library, e.g.
375 ``/usr/lib/libvte.so`` or ``libvte.so``. This option is
376 only needed when the auto-detection does not work. Only
377 available if Geany was compiled with support for VTE.
379 -v --verbose Be verbose (print useful status messages).
381 -V --version Show version information and exit.
383 -? --help Show help information and exit.
385 *none* [files ...] Open all given files at startup. This option causes
386 Geany to ignore loading stored files from the last
387 session (if enabled).
388 Geany also recognizes line and column information when
389 appended to the filename with colons, e.g.
390 "geany foo.bar:10:5" will open the file foo.bar and
391 place the cursor in line 10 at column 5.
393 Projects can also be opened but a project file (\*.geany)
394 must be the first non-option argument. All additionally
395 given files are ignored.
396 ============ ======================= =================================================
398 You can also pass line number and column number information, e.g.::
400 geany some_file.foo:55:4
402 Geany supports all generic GTK options, a list is available on the
414 At startup, Geany loads all files from the last time Geany was
415 launched. You can disable this feature in the preferences dialog
416 (see `General Startup preferences`_). If you specify some
417 files on the command line, only these files will be opened, but you
418 can find the files from the last session in the file menu under the
419 "Recent files" item. By default this contains the last 10 recently
420 opened files. You can change the number of recently opened files in
421 the preferences dialog.
423 You can start several instances of Geany, but only the first will
424 load files from the last session. To run a second instance of Geany,
425 do not specify any filenames on the command-line, or disable opening
426 files in a running instance using the appropriate command line option.
429 Opening files from the command-line in a running instance
430 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
432 Geany detects if there is an an instance of itself already running and opens files
433 from the command-line in that instance. So, Geany can
434 be used to view and edit files by opening them from other programs
435 such as a file manager.
437 You can also pass line number and column number information, e.g.::
439 geany some_file.foo:55:4
441 This would open the file ``some_file.foo`` with the cursor on line 55,
444 If you do not like this for some reason, you can disable using the first
445 instance by using the appropriate command line option -- see the section
446 called `Command line options`_.
449 Virtual terminal emulator widget (VTE)
450 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
452 If you have installed ``libvte.so`` on your system, it is loaded
453 automatically by Geany, and you will have a terminal widget in the
454 notebook at the bottom.
456 If Geany cannot find any ``libvte.so`` at startup, the terminal widget
457 will not be loaded. So there is no need to install the package containing
458 this file in order to run Geany. Additionally, you can disable the use
459 of the terminal widget by command line option, for more information
460 see the section called `Command line options`_.
462 You can use this terminal (from now on called VTE) much as you would
463 a terminal program like xterm. There is basic clipboard support. You
464 can paste the contents of the clipboard by pressing the right mouse
465 button to open the popup menu, and choosing Paste. To copy text from
466 the VTE, just select the desired text and then press the right mouse
467 button and choose Copy from the popup menu. On systems running the
468 X Window System you can paste the last selected text by pressing the
469 middle mouse button in the VTE (on 2-button mice, the middle button
470 can often be simulated by pressing both mouse buttons together).
472 In the preferences dialog you can specify a shell which should be
473 started in the VTE. To make the specified shell a login shell just
474 use the appropriate command line options for the shell. These options
475 should be found in the manual page of the shell. For zsh and bash
476 you can use the argument ``--login``.
479 Geany tries to load ``libvte.so``. If this fails, it tries to load
480 some other filenames. If this fails too, you should check whether you
481 installed libvte correctly. Again note, Geany will run without this
484 It could be, that the library is called something else than
485 ``libvte.so`` (e.g. on FreeBSD 6.0 it is called ``libvte.so.8``). If so
486 please set a link to the correct file (as root)::
488 # ln -s /usr/lib/libvte.so.X /usr/lib/libvte.so
490 Obviously, you have to adjust the paths and set X to the number of your
493 You can also specify the filename of the VTE library to use on the command
494 line (see the section called `Command line options`_) or at compile time
495 by specifying the command line option ``--with-vte-module-path`` to
499 Defining own widget styles using .gtkrc-2.0
500 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
502 You can define your widget style for many of Geany's GUI parts. To
503 do this, just edit your ``.gtkrc-2.0`` (usually found in your home
504 directory on UNIX-like systems and in the etc subdirectory of your
505 Geany installation on Windows).
507 To have a defined style used by Geany you must assign it to
508 at least one of Geany's widgets. For example use the following line::
510 widget "Geany*" style "geanyStyle"
512 This would assign your style "geany_style" to all Geany
513 widgets. You can also assign styles only to specific widgets. At the
514 moment you can use the following widgets:
526 An example of a simple ``.gtkrc-2.0``::
532 widget "GeanyMainWindow" style "geanyStyle"
538 widget "GeanyPrefsDialog" style "geanyStyle"
544 Switching between documents
545 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
547 The documents list and the editor tabs are two different ways
548 to switch between documents using the mouse. When you hit the key
549 combination to move between tabs, the order is determined by the tab
550 order. Its is not alphabetical as shown in the documents list
551 (regardless of whether or not editor tabs are visible).
553 The tabs can be positioned at the top, bottom, left, or right of the
554 main editing window, by a selection in the interface preferences.
556 See the `Notebook tab keybindings`_ section for useful
557 shortcuts including for Most-Recently-Used document switching.
560 Character sets and Unicode Byte-Order-Mark (BOM)
561 ------------------------------------------------
567 Geany provides support for detecting and converting character sets. So
568 you can open and save files in different character sets, and even
569 convert a file from one character set to another. To do this,
570 Geany uses the character conversion capabilities of the GLib library.
572 Only text files are supported, i.e. opening files which contain
573 NULL-bytes may fail. Geany will try to open the file anyway but it is
574 likely that the file will be truncated because it can only be read up
575 to the first occurrence of a NULL-byte. All characters after this
576 position are lost and are not written when you save the file.
578 Geany tries to detect the encoding of a file while opening it, but
579 auto-detecting the encoding of a file is not easy and sometimes an
580 encoding might not be detected correctly. In this case you have to
581 set the encoding of the file manually in order to display it
582 correctly. You can this in the file open dialog by selecting an
583 encoding in the drop down box or by reloading the file with the
584 file menu item "Reload as". The auto-detection works well for most
585 encodings but there are also some encodings where it is known that
586 auto-detection has problems.
588 There are different ways to set different encodings in Geany:
590 * Using the file open dialog
592 This opens the file with the encoding specified in the encoding drop
593 down box. If the encoding is set to "Detect from file" auto-detection
594 will be used. If the encoding is set to "Without encoding (None)" the
595 file will be opened without any character conversion and Geany will
596 not try to auto-detect the encoding (see below for more information).
598 * Using the "Reload as" menu item
600 This item reloads the current file with the specified encoding. It can
601 help if you opened a file and found out that the wrong encoding was used.
603 * Using the "Set encoding" menu item
605 Contrary to the above two options, this will not change or reload
606 the current file unless you save it. It is useful when you want to
607 change the encoding of the file.
609 * Specifying the encoding in the file itself
611 As mentioned above, auto-detecting the encoding of a file may fail on
612 some encodings. If you know that Geany doesn't open a certain file,
613 you can add the specification line, described in the next section,
614 to the beginning of the file to force Geany to use a specific
615 encoding when opening the file.
618 In-file encoding specification
619 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
621 Geany detects meta tags of HTML files which contain charset information
624 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-15" />
626 and the specified charset is used when opening the file. This is useful if the
627 encoding of the file cannot be detected properly.
628 For non-HTML files you can also define a line like::
630 /* geany_encoding=ISO-8859-15 */
634 # geany_encoding=ISO-8859-15 #
636 to force an encoding to be used. The #, /\* and \*/ are examples
637 of filetype-specific comment characters. It doesn't matter which
638 characters are around the string " geany_encoding=ISO-8859-15 " as long
639 as there is at least one whitespace character before and after this
640 string. Whitespace characters are in this case a space or tab character.
641 An example to use this could be you have a file with ISO-8859-15
642 encoding but Geany constantly detects the file encoding as ISO-8859-1.
643 Then you simply add such a line to the file and Geany will open it
644 correctly the next time.
646 Since Geany 0.15 you can also use lines which match the
647 regular expression used to find the encoding string:
648 ``coding[\t ]*[:=][\t ]*([a-z0-9-]+)[\t ]*``
651 These specifications must be in the first 512 bytes of the file.
652 Anything after the first 512 bytes will not be recognized.
656 # encoding = ISO-8859-15
660 # coding: ISO-8859-15
662 Special encoding "None"
663 ^^^^^^^^^^^^^^^^^^^^^^^
665 There is a special encoding "None" which uses no
666 encoding. It is useful when you know that Geany cannot auto-detect
667 the encoding of a file and it is not displayed correctly. Especially
668 when the file contains NULL-bytes this can be useful to skip auto
669 detection and open the file properly at least until the occurrence
670 of the first NULL-byte. Using this encoding opens the file as it is
671 without any character conversion.
674 Unicode Byte-Order-Mark (BOM)
675 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
677 Furthermore, Geany detects a Unicode Byte Order Mark (see
678 http://en.wikipedia.org/wiki/Byte_Order_Mark for details). Of course,
679 this feature is only available if the opened file is in a Unicode
680 encoding. The Byte Order Mark helps to detect the encoding of a file,
681 e.g. whether it is UTF-16LE or UTF-16BE and so on. On Unix-like systems
682 using a Byte Order Mark could cause some problems for programs not
683 expecting it, e.g. the compiler gcc stops
684 with stray errors, PHP does not parse a script containing a BOM and
685 script files starting with a she-bang maybe cannot be started. In the
686 status bar you can easily see whether the file starts with a BOM or
689 If you want to set a BOM for a file or if you want to remove it
690 from a file, just use the document menu and toggle the checkbox.
693 If you are unsure what a BOM is or if you do not understand where
694 to use it, then it is probably not important for you and you can
706 Geany provides basic code folding support. Folding means the ability to
707 show and hide parts of the text in the current file. You can hide
708 unimportant code sections and concentrate on the parts you are working on
709 and later you can show hidden sections again. In the editor window there is
710 a small grey margin on the left side with [+] and [-] symbols which
711 show hidden parts and hide parts of the file respectively. By
712 clicking on these icons you can simply show and hide sections which are
713 marked by vertical lines within this margin. For many filetypes nested
714 folding is supported, so there may be several fold points within other
718 You can customize the folding icon and line styles - see the
719 filetypes.common `Folding Settings`_.
721 If you don't like it or don't need it at all, you can simply disable
722 folding support completely in the preferences dialog.
724 The folding behaviour can be changed with the "Fold/Unfold all children of
725 a fold point" option in the preference dialog. If activated, Geany will
726 unfold all nested fold points below the current one if they are already
727 folded (when clicking on a [+] symbol).
728 When clicking on a [-] symbol, Geany will fold all nested fold points
729 below the current one if they are unfolded.
731 This option can be inverted by pressing the Shift
732 key while clicking on a fold symbol. That means, if the "Fold/Unfold all
733 children of a fold point" option is enabled, pressing Shift will disable
734 it for this click and vice versa.
737 Column mode editing (rectangular selections)
738 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
740 There is basic support for column mode editing. To use it, create a
741 rectangular selection by holding down the Control and Shift keys
742 (or Control and Alt if it doesn't work) while
743 selecting some text. It is also possible to create a zero-column selection.
744 Once a rectangular selection exists you can start editing the text within
745 this selection and the modifications will be done for every line in the
749 Drag and drop of text
750 ^^^^^^^^^^^^^^^^^^^^^
752 If you drag selected text in the editor widget of Geany the text is
753 moved to the position where the mouse pointer is when releasing the
754 mouse button. Holding Control when releasing the mouse button will
755 copy the text instead. This behaviour was changed in Geany 0.11 -
756 before the selected text was copied to the new position.
762 Geany allows each document to indent either with a tab character,
763 multiple spaces or a combination of both. The default indent
764 settings are set in `Editor Indentation preferences`_ (see the link
765 for more information).
767 The default settings can be overridden per-document using the
768 Document menu. They can also be overridden by projects - see
769 `Project Management`_.
771 The indent mode for the current document is shown on the status bar
775 Indent with Tab characters.
779 Indent with tabs and spaces, depending on how much indentation is
782 Applying new indentation settings
783 `````````````````````````````````
784 After changing the default settings you may wish to apply the new
785 settings to every document in the current session. To do this use the
786 *Project->Apply Default Indentation* menu item.
788 Detecting indent type
789 `````````````````````
790 The *Detect from file* indentation preference can be used to
791 scan each file as it's opened and set the indent type based on
792 how many lines start with a tab vs. 2 or more spaces.
798 When enabled, auto-indentation happens when pressing *Enter* in the
799 Editor. It adds a certain amount of indentation to the new line so the
800 user doesn't always have to indent each line manually.
802 Geany has four types of auto-indentation:
805 Disables auto-indentation completely.
807 Adds the same amount of whitespace on a new line as on the last line.
809 Does the same as *Basic* but also indents a new line after an opening
810 brace '{', and de-indents when typing a closing brace '}'. For Python,
811 a new line will be indented after typing ':' at the end of the
814 Similar to *Current chars* but the closing brace will be aligned to
815 match the indentation of the line with the opening brace.
817 There is also XML-tag auto-indentation. This is enabled when the
818 mode is more than just Basic, and is also controlled by a filetype
819 setting - see `xml_indent_tags`_.
825 Geany provides a handy bookmarking feature that lets you mark one
826 or more lines in a document, and return the cursor to them using a
829 To place a mark on a line, either left-mouse-click in the left margin
830 of the editor window, or else use Ctrl-m. This will
831 produce a small green plus symbol in the margin. You can have as many
832 marks in a document as you like. Click again (or use Ctrl-m again)
833 to remove the bookmark. To remove all the marks in a given document,
834 use "Remove Markers" in the Document menu.
836 To navigate down your document, jumping from one mark to the next,
837 use Ctrl-. (control period). To go in the opposite direction on
838 the page, use Ctrl-, (control comma). Using the bookmarking feature
839 together with the commands to switch from one editor tab to another
840 (Ctrl-PgUp/PgDn and Ctrl-Tab) provides a particularly fast way to
841 navigate around multiple files.
844 Code navigation history
845 ^^^^^^^^^^^^^^^^^^^^^^^
847 To ease navigation in source files and especially between
848 different files, Geany lets you jump between different navigation
849 points. Currently, this works for the following:
851 * `Go to tag declaration`_
852 * `Go to tag definition`_
857 When using one of these actions, Geany remembers your current position
858 and jumps to the new one. If you decide to go back to your previous
859 position in the file, just use "Navigate back a location". To
860 get back to the new position again, just use "Navigate forward a
861 location". This makes it easier to navigate in e.g. foreign code
862 and between different files.
865 Sending text through custom commands
866 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
868 You can define several custom commands in Geany and send the current
869 selection to one of these commands using the *Edit->Format->Send
870 Selection to* menu or keybindings. The output of the command will be
871 used to replace the current selection. This makes it possible to use
872 text formatting tools with Geany in a general way.
874 The selected text will be sent to the standard input of the executed
875 command, so the command should be able to read from it and it should
876 print all results to its standard output which will be read by
877 Geany. To help finding errors in executing the command, the output
878 of the program's standard error will be printed on Geany's standard
881 To add a custom command, use the *Send Selection to->Set Custom
882 Commands* menu item. Click on *Add* to get a new text entry and type
883 the command. You can also specify some command line options. To
884 delete a command, just clear the text entry and press OK. It will be
885 deleted automatically.
887 Normal shell quoting is supported, so you can do things like:
889 * ``sed 's/\./(dot)/g'``
891 The above example would normally be done with the `Replace all`_
892 function, but it can be handy to have common commands already set up.
898 You can execute the context action command on the current word at the
899 cursor position or the available selection. This word or selection
900 can be used as an argument to the command.
901 The context action is invoked by a menu entry in the popup menu of the
902 editor and also a keyboard shortcut (see the section called
905 The command can be specified in the preferences dialog and also for
906 each filetype (see "context_action_cmd" in the section called
907 `Filetype configuration`_). When the context action is invoked, the filetype
908 specific command is used if available, otherwise the command
909 specified in the preferences dialog is executed.
911 The current word or selection can be referred with the wildcard "%s"
912 in the command, it will be replaced by the current word or
913 selection before the command is executed.
915 For example a context action can be used to open API documentation
916 in a browser window, the command to open the PHP API documentation
919 firefox "http://www.php.net/%s"
921 when executing the command, the %s is substituted by the word near
922 the cursor position or by the current selection. If the cursor is at
923 the word "echo", a browser window will open(assumed your browser is
924 called firefox) and it will open the address: http://www.php.net/echo.
930 Geany can offer a list of possible completions for symbols defined in the
931 tags and for all words in a document.
933 The autocompletion list for symbols is presented when the first few
934 characters of the symbol are typed (configurable, see `Editor Completions
935 preferences`_, default 4) or when the *Complete word*
936 keybinding is pressed (configurable, see `Editor keybindings`_,
939 When the defined keybinding is typed and the *Autocomplete all words in
940 document* preference (in `Editor Completions preferences`_)
941 is selected then the autocompletion list will show all matching words
942 in the document, if there are no matching symbols.
944 If you don't want to use autocompletion it can be dismissed until
945 the next symbol by pressing Escape. The autocompletion list is updated
946 as more characters are typed so that it only shows completions that start
947 with the characters typed so far. If no symbols begin with the sequence,
948 the autocompletion window is closed.
950 The up and down arrows will move the selected item. The highlighted
951 item on the autocompletion list can be chosen from the list by pressing
952 Enter/Return. You can also double-click to select an item. The sequence
953 will be completed to match the chosen item, and if the *Drop rest of
954 word on completion* preference is set (in `Editor Completions
955 preferences`_) then any characters after the cursor that match
956 a symbol or word are deleted.
960 By default, pressing Tab will complete the selected item by word part;
961 useful e.g. for adding the prefix ``gtk_combo_box_entry_`` without typing it
966 * gtk_combo_box_<e><TAB>
967 * gtk_combo_box_entry_<s><ENTER>
968 * gtk_combo_box_entry_set_text_column
970 The key combination can be changed from Tab - See `Editor keybindings`_.
971 If you clear/change the key combination for word part completion, Tab
972 will complete the whole word instead, like Enter.
984 When you type ``foo.`` it will show an autocompletion list with 'i' and
987 It only works for languages that set parent scope names for e.g. struct
988 members. Currently this means C-like languages. The C tag parser only
989 parses global scopes, so this won't work for structs or objects declared
993 User-definable snippets
994 ^^^^^^^^^^^^^^^^^^^^^^^
996 Snippets are small strings or code constructs which can be replaced or
997 completed to a more complex string. So you can save a lot of time when
998 typing common strings and letting Geany do the work for you.
999 To know what to complete or replace Geany reads a configuration file
1000 called ``snippets.conf`` at startup.
1002 Maybe you need to often type your name, so define a snippet like this::
1005 myname=Enrico Tröger
1007 Every time you write ``myname`` <TAB> in Geany, it will replace "myname"
1008 with "Enrico Tröger". The key to start autocompletion can be changed
1009 in the preferences dialog, by default it is TAB. The corresponding keybinding
1010 is called ``Complete snippet``.
1014 The system-wide configuration file can be found in
1015 ``$prefix/share/geany``, where ``$prefix`` is the path where Geany is
1016 installed (see `Installation prefix`_). It is not recommended to edit the
1017 system-wide file, because it will be overridden when Geany is updated.
1019 To change the settings, copy the file from ``$prefix/share/geany``
1020 in your configuration directory (usually ``~/.config/geany/``).
1024 % cp /usr/local/share/geany/snippets.conf /home/username/.config/geany/
1026 Then you can edit the file and the changes will remain available
1027 after an update of Geany because the file resides in your
1028 configuration directory. Alternatively, you can create a file
1029 ``~/.config/geany/snippets.conf`` and add only these settings you want
1030 to change. All missing settings will be read from the global snippets
1031 file in ``$prefix/share/geany``.
1035 The file ``snippets.conf`` contains sections defining snippets that
1036 are available for particular filetypes and in general.
1038 The two sections "Default" and "Special" apply to all filetypes.
1039 "Default" contains all snippets which are available for every
1040 filetype and "Special" contains snippets which can only be used in
1041 other snippets. So you can define often used parts of snippets and
1042 just use the special snippet as a placeholder (see the
1043 ``snippets.conf`` for details).
1045 You can define sections with the name of a filetype eg "C++". The
1046 snippets in that section are only available for use in files with that
1047 filetype. Snippets in filetype sections will hide snippets with the
1048 same name in the "Default" section when used in a file of that
1051 **Substitution sequences for snippets**
1053 To define snippets you can use several special character sequences which
1054 will be replaced when using the snippet:
1056 ================ =========================================================
1057 \\n or %newline% Insert a new line (it will be replaced by the used EOL
1058 char(s): LF, CR/LF, or CR).
1060 \\t or %ws% Insert an indentation step, it will be replaced according
1061 to the current document's indent mode.
1063 \\s \\s to force whitespace at beginning or end of a value
1064 ('key= value' won't work, use 'key=\\svalue')
1066 %cursor% Place the cursor at this position after completion has
1067 been done. You can define multiple %cursor% wildcards
1068 and use the keybinding ``Move cursor in snippet`` to jump
1069 to the next defined cursor position in the completed
1072 %...% "..." means the name of a key in the "Special" section.
1073 If you have defined a key "brace_open" in the "Special"
1074 section you can use %brace_open% in any other snippet.
1075 ================ =========================================================
1077 Snippet names must not contain spaces otherwise they won't
1078 work correctly. But beside that you can define almost any
1079 string as a snippet and use it later in Geany. It is not limited
1080 to existing contructs of certain programming languages(like ``if``,
1081 ``for``, ``switch``). Define whatever you need.
1083 **Template wildcards**
1085 Since Geany 0.15 you can also use most of the available templates wildcards
1086 listed in `Template wildcards`_. All wildcards which are listed as
1087 `available in snippets` can be used. For instance to improve the above example::
1090 myname=My name is {developer}
1091 mysystem=My system: {command:uname -a}
1093 this will replace ``myname`` with "My name is " and the value of the template
1094 preference ``developer``.
1098 You can change the way Geany recognizes the word to complete,
1099 that is how the start and end of a word is recognised when the
1100 snippet completion is requested. The section "Special" may
1101 contain a key "wordchars" which lists all characters a string may contain
1102 to be recognized as a word for completion. Leave it commented to use
1103 default characters or define it to add or remove characters to fit your
1109 Normally you would type the snippet name and press Tab. However, you
1110 can define keybindings for snippets under the *Keybindings* group in
1115 block_cursor=<Ctrl>8
1118 Snippet keybindings may be overridden by Geany's configurable
1122 Inserting Unicode characters
1123 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1125 With GTK 2.10 and above, you can insert Unicode code points by hitting
1126 Ctrl-Shift-u, then still holding Ctrl-Shift, type some hex digits representing
1127 the code point for the character you want and hit Enter or Return (still
1128 holding Ctrl-Shift). If you release Ctrl-Shift before hitting Enter or Return
1129 (or any other character), the code insertion is completed, but the typed
1130 character is also entered. In the case of Enter/Return, it is a newline, as
1134 In some earlier versions of Geany, you might need to first unbind Ctrl-Shift-u
1135 in the `keybinding preferences`_, then select *Tools->Reload Configuration*
1136 or restart Geany. Note that it works slightly differently from other GTK
1137 applications, in that you'll need to continue to hold down the Ctrl and Shift
1138 keys while typing the code point hex digits (and the Enter or Return to finish the code point).
1140 For GTK < 2.10, it is also possible, but typing the first Ctrl-Shift-u
1141 is not necessary. One problem is that you may find the alphabetic
1142 keys conflict with other Geany keybindings.
1146 Search, replace and go to
1147 -------------------------
1149 This section describes search-related commands from the Search menu
1150 and the editor window's popup menu:
1157 * Go to tag definition
1158 * Go to tag declaration
1163 There are also two toolbar entries:
1168 There are keybindings to focus each of these - see `Focus
1169 keybindings`_. Pressing Escape will then focus the editor.
1173 The quickest way to find some text is to use the search bar entry in
1174 the toolbar. This performs a case-insensitive search in the current
1175 document whilst you type. Pressing Enter will search again.
1180 The Find dialog is used for finding text in one or more open documents.
1182 .. image:: ./images/find_dialog.png
1188 The syntax for the *Use regular expressions* option is shown in
1189 `Regular expressions`_.
1192 *Use escape sequences* is implied for regular expressions.
1194 The *Use escape sequences* option will transform any escaped characters
1195 into their UTF-8 equivalent. For example, \\t will be transformed into
1196 a tab character. Other recognized symbols are: \\\\, \\n, \\r, \\uXXXX
1197 (Unicode characters).
1203 To find all matches, click on the Find All expander. This will reveal
1210 Find All In Document will show a list of matching lines in the
1211 current document in the Messages tab of the Message Window. *Find All
1212 In Session* does the same for all open documents.
1214 Mark will highlight all matches in the current document with a
1215 colored box. These markers can be removed by selecting the
1216 Remove Markers command from the Document menu.
1219 Change font in search dialog text fields
1220 ````````````````````````````````````````
1222 All search related dialogs use a Monospace for the text input fields to
1223 increase the readability of input text. This is useful when you are
1224 typing input such as regular expressions with spaces, periods and commas which
1225 might it hard to read with a proportional font.
1227 If you want to change the font, you can do this easily
1228 by inserting the following style into your ``.gtkrc-2.0``
1229 (usually found in your home directory on UNIX-like systems and in the
1230 etc subdirectory of your Geany installation on Windows)::
1232 style "search_style"
1234 font_name="Monospace 8"
1236 widget "GeanyDialogSearch.*.GtkEntry" style:highest "search_style"
1238 Please note the addition of ":highest" in the last line which sets the priority
1239 of this style to the highest available. Otherwise, the style is ignored
1240 for the search dialogs.
1245 The *Find Next/Previous Selection* commands perform a search for the
1246 current selected text. If nothing is selected, by default the current
1247 word is used instead. This can be customized by the
1248 *find_selection_type* hidden pref - see `Hidden preferences`_.
1250 ===== =============================================
1251 Value *find_selection_type* behaviour
1252 ===== =============================================
1253 0 Use the current word (default).
1254 1 Try the X selection first, then current word.
1255 2 Repeat last search.
1256 ===== =============================================
1262 Find usage searches all open files. It is similar to the Find All In
1263 Session option in the Find dialog.
1265 If there is a selection, then it is used as the search text; otherwise
1266 the current word is used. The current word is either taken from the
1267 word nearest the edit cursor, or the word underneath the popup menu
1268 click position when the popup menu is used. The search results are
1269 shown in the Messages tab of the Message Window.
1275 Find in files is a more powerful version of Find usage that searches
1276 all files in a certain directory using the Grep tool. The Grep tool
1277 must be correctly set in Preferences to the path of the system's Grep
1278 utility. GNU Grep is recommended (see note below).
1280 .. image:: ./images/find_in_files_dialog.png
1282 The *Files* field optionally searches only files matching the
1283 patterns listed. Patterns are basic and shell-like, separated by a
1284 space. To search all ``.c`` and ``.h`` files, use: ``*.c *.h``.
1286 The *Encoding* field can be used to define the encoding of the files
1287 to be searched. The entered search text is converted to the chosen encoding
1288 and the search results are converted back to UTF-8.
1290 The *Extra options* field is used to pass any additional arguments to
1294 The *Files* setting uses ``--include=``, *Recurse in subfolders*
1295 uses ``-r``; both are GNU Grep options and may not work with other
1296 Grep implementations.
1299 Filtering out version control files
1300 ```````````````````````````````````
1302 When using the *Recurse in subfolders* option with a directory that's
1303 under version control, you can set the *Extra options* field to filter
1304 out version control files.
1306 If you have GNU Grep >= 2.5.2 you can use the ``--exclude-dir``
1307 argument to filter out CVS and hidden directories like ``.svn``.
1309 Example: ``--exclude-dir=.svn --exclude-dir=CVS``
1311 If you have an older Grep, you can try using the ``--exclude`` flag
1312 to filter out filenames.
1314 SVN Example: ``--exclude=*.svn-base``
1316 The --exclude argument only matches the file name part, not the path.
1322 The Replace dialog is used for replacing text in one or more open
1325 .. image:: ./images/replace_dialog.png
1327 The Replace dialog has the same options for matching text as the Find
1328 dialog. See the section `Matching options`_.
1330 The *Use regular expressions* option allows regular expressions to
1331 be used in the search string and back references in the replacement
1332 text -- see the entry for '\\n' in `Regular expressions`_.
1337 To replace several matches, click on the *Replace All* expander. This
1338 will reveal several options:
1344 *Replace All In Document* will replace all matching text in the
1345 current document. *Replace All In Session* does the same for all open
1346 documents. *Replace All In Selection* will replace all matching text
1347 in the current selection of the current document.
1350 Go to tag definition
1351 ^^^^^^^^^^^^^^^^^^^^
1353 If the current word is the name of a tag definition (like a function
1354 body) and the file containing the tag definition is open, this command
1355 will switch to that file and go to the corresponding line number. The
1356 current word is either the word nearest the edit cursor,
1357 or the word underneath the popup menu click position when the popup
1361 Go to tag declaration
1362 ^^^^^^^^^^^^^^^^^^^^^
1364 Like Go to tag definition, but for a forward declaration such as a
1365 C function prototype or ``extern`` declaration instead of a function
1372 Go to a particular line number in the current file.
1378 You can use regular expressions in the Find and Replace dialogs
1379 by selecting the *Use regular expressions* check box (see `Matching
1380 options`_). The syntax is POSIX compatible, as described in the table
1384 1. The *Use escape sequences* dialog option always applies for regular
1386 2. Searching backwards with regular expressions is not supported.
1387 3. \\b, \\d, \\s, \\w are GNU extensions and may not be available
1388 on non-GNU POSIX systems unless you built Geany with the
1389 ``--enable-gnu-regex`` option (this is always used on Windows).
1391 **In a regular expression, the following characters are interpreted:**
1393 ======= ============================================================
1394 . Matches any character.
1396 ( This marks the start of a region for tagging a match.
1398 ) This marks the end of a tagged region.
1400 \\n Where n is 1 through 9 refers to the first through ninth tagged
1401 region when searching or replacing.
1403 Searching for (Wiki)\\1 matches WikiWiki.
1405 If the search string was Fred([1-9])XXX and the
1406 replace string was Sam\\1YYY, when applied to Fred2XXX this
1407 would generate Sam2YYY.
1409 \\0 When replacing, the whole matching text.
1411 \\b This matches a word boundary.
1413 \\c A backslash followed by d, D, s, S, w or W, becomes a
1414 character class (both inside and outside sets []).
1417 * D: any char except decimal digits
1418 * s: whitespace (space, \\t \\n \\r \\f \\v)
1419 * S: any char except whitespace (see above)
1420 * w: alphanumeric & underscore
1421 * W: any char except alphanumeric & underscore
1423 \\x This allows you to use a character x that would otherwise have
1424 a special meaning. For example, \\[ would be interpreted as [
1425 and not as the start of a character set. Use \\\\ for a literal
1428 [...] Matches one of the characters in the set. If the first
1429 character in the set is ^, it matches the characters NOT in
1430 the set, i.e. complements the set. A shorthand S-E (start
1431 dash end) is used to specify a set of characters S up to E,
1434 The special characters ] and - have no special
1435 meaning if they appear first in the set. - can also be last
1436 in the set. To include both, put ] first: []A-Z-].
1440 []|-] matches these 3 chars
1441 []-|] matches from ] to | chars
1442 [a-z] any lowercase alpha
1443 [^]-] any char except - and ]
1444 [^A-Z] any char except uppercase alpha
1447 ^ This matches the start of a line (unless used inside a set, see
1450 $ This matches the end of a line.
1452 \* This matches 0 or more times. For example, Sa*m matches Sm, Sam,
1453 Saam, Saaam and so on.
1455 \+ This matches 1 or more times. For example, Sa+m matches Sam,
1456 Saam, Saaam and so on.
1458 \? This matches 0 or 1 time(s). For example, Joh?n matches John, Jon.
1459 ======= ============================================================
1462 This table is adapted from Scintilla and SciTE documentation,
1463 distributed under the `License for Scintilla and SciTE`_.
1470 Tags are information that relates symbols in a program with the
1471 source file location of the declaration and definition.
1473 Geany has built-in functionality for generating tag information (aka
1474 "workspace tags") for supported filetypes when you open a file. You
1475 can also have Geany automatically load external tag files (aka "global
1476 tags files") upon startup, or manually using *Tools --> Load Tags*.
1478 Geany uses its own tag file format, similar to what ``ctags`` uses
1479 (but is incompatible with ctags). You use Geany to generate global
1480 tags files, as described below.
1486 Tags for each document are parsed whenever a file is loaded or
1487 saved. These are shown in the Symbol list in the Sidebar. These tags
1488 are also used for autocompletion of symbols and calltips for all documents
1489 open in the current session that have the same filetype.
1491 The *Go to Tag* commands can be used with all workspace tags. See
1492 `Go to tag definition`_.
1498 Global tags are used to provide autocompletion of symbols and calltips
1499 without having to open the corresponding source files. This is intended
1500 for library APIs, as the tags file only has to be updated when you upgrade
1503 You can load a custom global tags file in two ways:
1505 * Using the *Load Tags* command in the Tools menu.
1506 * By creating a directory ``~/.config/geany/tags``, and moving or symlinking
1507 the tags files there before starting Geany.
1508 * By creating a directory ``$prefix/share/geany/tags``, and moving
1509 or symlinking the tags files there before starting Geany.
1510 ``$prefix`` is the installation prefix (see `Installation prefix`_).
1512 You can either download these files or generate your own. They have
1517 *lang_ext* is one of the extensions set for the filetype associated
1518 with the tags. See the section called `Filetype extensions`_ for
1522 Default global tags files
1523 `````````````````````````
1525 For some languages, a list of global tags is loaded when the
1526 corresponding filetype is first used. Currently these are for:
1528 * C -- GTK+ and GLib
1531 * HTML -- &symbol; completion, e.g. for ampersand, copyright, etc.
1536 Global tags file format
1537 ```````````````````````
1539 Global tags files can have two different formats:
1542 * Pipe-separated format
1544 The first line of global tags files should be a comment, introduced
1545 by ``#`` followed by a space and a string like ``format=pipe``
1546 or ``format=tagmanager`` respectively, these are case-sensitive.
1547 This helps Geany to read the file properly. If this line
1548 is missing, Geany tries to auto-detect the used format but this
1552 The Tagmanager format is a bit more complex and is used for files
1553 created by the ``geany -g`` command. There is one tag per line.
1554 Different tag attributes like the return value or the argument list
1555 are separated with different characters indicating the type of the
1558 The Pipe-separated format is easier to read and write.
1559 There is one tag per line and different tag attributes are separated
1560 by the pipe character (``|``). A line looks like::
1562 basename|string|(string path [, string suffix])|
1564 | The first field is the tag name (usually a function name).
1565 | The second field is the type of the return value.
1566 | The third field is the argument list for this tag.
1567 | The fourth field is the description for this tag but
1568 currently unused and should be left empty.
1570 Except for the first field (tag name), all other field can be left
1571 empty but the pipe separator must appear for them.
1573 You can easily write your own global tag files using this format.
1574 Just save them in your tags directory, as described earlier in the
1575 section `Global tags`_.
1578 Generating a global tags file
1579 `````````````````````````````
1581 You can generate your own global tags files by parsing a list of
1582 source files. The command is::
1584 geany -g [-P] <Tag File> <File list>
1586 * Tag File filename should be in the format described earlier --
1587 see the section called `Global tags`_.
1588 * File list is a list of filenames, each with a full path (unless
1589 you are generating C/C++ tags and have set the CFLAGS environment
1590 variable appropriately).
1591 * ``-P`` or ``--no-preprocessing`` disables using the C pre-processor
1592 to process ``#include`` directives for C/C++ source files. Use this
1593 option if you want to specify each source file on the command-line
1594 instead of using a 'master' header file. Also can be useful if you
1595 don't want to specify the CFLAGS environment variable.
1597 Example for the wxD library for the D programming language::
1599 geany -g wxd.d.tags /home/username/wxd/wx/*.d
1602 *Generating C/C++ tag files:*
1604 For C/C++ tag files, gcc and grep are required, so that header files
1605 can be preprocessed to include any other headers they depend upon.
1607 For C/C++ files, the environment variable CFLAGS should be set with
1608 appropriate ``-I/path`` include paths. The following example works with
1609 the bash shell, generating tags for the GnomeUI library::
1611 CFLAGS=`pkg-config --cflags libgnomeui-2.0` geany -g gnomeui.c.tags \
1612 /usr/include/libgnomeui-2.0/gnome.h
1614 You can adapt this command to use CFLAGS and header files appropriate
1615 for whichever libraries you want.
1618 *Replacing the default C/C++ tags file:*
1620 Geany currently uses a default global tags file c99.tags for
1621 C and C++, commonly installed in /usr/share/geany. This file can
1622 be replaced with one containing tags parsed from a different set
1623 of header files. When Geany is next started, your custom tags file
1624 will be loaded instead of the default c99.tags. You should keep a
1625 copy of the generated tags file because it will get overwritten when
1632 You can also ignore certain tags if they would lead to wrong parsing of
1633 the code. Simply create a file called "ignore.tags" in your Geany
1634 configuration directory (usually ``~/.config/geany/``). Then list all tags
1635 you want to ignore in this file, separated by spaces and/or newlines.
1637 More detailed information about the usage from the Exuberant Ctags
1640 Specifies a list of identifiers which are to be specially handled
1641 while parsing C and C++ source files. This option is specifically
1642 provided to handle special cases arising through the use of
1643 pre-processor macros. When the identifiers listed are simple identifiers,
1644 these identifiers will be ignored during parsing of the source files.
1645 If an identifier is suffixed with a '+' character, ctags will also
1646 ignore any parenthesis-enclosed argument list which may immediately
1647 follow the identifier in the source files.
1648 If two identifiers are separated with the '=' character, the first
1649 identifiers is replaced by the second identifiers for parsing purposes.
1651 For even more detailed information please read the manual page of
1658 You may adjust Geany's settings using the Edit --> Preferences
1659 dialog. Any changes you make there can be applied by hitting either
1660 the Apply or the OK button. These settings will persist between Geany
1661 sessions. Note that most settings here have descriptive popup bubble
1662 help -- just hover the mouse over the item in question to get help
1665 You may also adjust some View settings (under the View menu) that
1666 persist between Geany sessions. The settings under the Document menu,
1667 however, are only for the current document and revert to defaults
1668 when restarting Geany.
1670 There are also some rarer `Hidden preferences`_.
1673 In the paragraphs that follow, the text describing a dialog tab
1674 comes after the screenshot of that tab.
1677 General Startup preferences
1678 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
1680 .. image:: ./images/pref_dialog_gen_startup.png
1685 Load files from the last session
1686 On startup, load the same files you had open the last time you
1689 Load virtual terminal support
1690 Load the library for running a terminal in the message window area.
1692 Enable plugin support
1693 Allow plugins to be used in Geany.
1697 Save window position and geometry
1698 Save the current position and size of the main window so next time
1699 you open Geany it's in the same location.
1702 Have a dialog pop up to confirm that you really want to quit Geany.
1708 Path to start in when opening or saving files.
1709 It must be an absolute path.
1710 Leave it blank to use the current working directory.
1713 Path to start in when opening project files.
1716 By default Geany looks in the global installation path and in the
1717 configuration directory. In addition the path entered here will be searched
1718 for plugins. Usually you do not need to set an additional path to search for
1719 plugins. It might be useful when Geany is installed on a multi-user machine
1720 and additional plugins are available in a common location for all users.
1721 Leave blank to not set an additional lookup path.
1724 General Miscellaneous preferences
1725 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1727 .. image:: ./images/pref_dialog_gen_misc.png
1732 Beep on errors when compilation has finished
1733 Have the computer make a beeping sound when compilation of your program
1734 has completed or any errors occurred.
1736 Switch status message list at new message
1737 Switch to the status message tab (in the notebook window at the bottom)
1738 once a new status message arrives.
1740 Suppress status messages in the status bar
1741 Remove all messages from the status bar. The messages are still displayed
1742 in the status messages window.
1745 Another option is to use the *Switch to Editor* keybinding - it
1746 reshows the document statistics on the status bar. See `Focus
1749 Use Windows File Open/Save dialogs
1750 Defines whether to use the native Windows File Open/Save dialogs or
1751 whether to use the GTK default dialogs.
1753 Auto-focus widgets (focus follows mouse)
1754 Give the focus automatically to widgets below the mouse cursor.
1755 This works for the main editor widget, the scribble, the toolbar search field
1756 goto line fields and the VTE.
1761 Always wrap search and hide the Find dialog
1762 Always wrap search around the document and hide the Find dialog after clicking
1765 Use the current word under the cursor for Find dialogs
1766 Use current word under the cursor when opening the Find, Find in Files or Replace dialog and
1767 there is no selection. When this option is disabled, the search term last used in the
1768 appropriate Find dialog is used.
1770 Use the current file's directory for Find in Files
1771 When opening the Find in Files dialog, set the directory to search to the directory of the current
1772 active file. When this option is disabled, the directory of the last use of the Find in Files
1778 Use project-based session files
1779 Save your current session when closing projects. You will be able to
1780 resume different project sessions, automatically opening the files
1781 you had open previously.
1783 Store project file inside the project base directory
1784 When creating new projects, the default path for the project file contains
1785 the project base path. Without this option enabled, the default project file
1786 path is one level above the project base path.
1787 In either case, you can easily set the final project file path in the
1788 *New Project* dialog. This option provides the more common
1789 defaults automatically for convenience.
1792 Interface preferences
1793 ^^^^^^^^^^^^^^^^^^^^^
1795 .. image:: ./images/pref_dialog_interface.png
1801 Whether to show the sidebar at all.
1804 Show the list of functions, variables, and other information in the
1805 current document you are editing.
1808 Show all the documents you have open currently. This can be used to
1809 change between documents (see `Switching between documents`_) and
1810 to perform some common operations such as saving, closing and reloading.
1813 Whether to place the sidebar on the left or right of the editor window.
1819 Change the font used to display documents.
1822 Change the font used for the Symbols sidebar tab.
1825 Change the font used for the message window area.
1831 Show a notebook tab for all documents so you can switch between them
1832 using the mouse (instead of using the Documents window).
1835 Make each tab show a close button so you can easily close open
1838 Placement of new file tabs
1839 Whether to create a document with its notebook tab to the left or
1840 right of all existing tabs.
1843 Whether to place file tabs next to the current tab
1844 rather than at the edges of the notebook.
1846 Double-clicking hides all additional widgets
1847 Whether to call the View->Toggle All Additional Widgets command
1848 when double-clicking on a notebook tab.
1854 Set the positioning of the editor's notebook tabs to the right,
1855 left, top, or bottom of the editing window.
1858 Set the positioning of the sidebar's notebook tabs to the right,
1859 left, top, or bottom of the sidebar window.
1862 Set the positioning of the message window's notebook tabs to the
1863 right, left, top, or bottom of the message window.
1869 Show the status bar at the bottom of the main window. It gives information about
1870 the file you are editing like the line and column you are on, whether any
1871 modifications were done, the file encoding, the filetype and other information.
1877 Affects the main toolbar underneath the menu bar.
1879 .. image:: ./images/pref_dialog_toolbar.png
1885 Whether to show the toolbar.
1887 Append Toolbar to the Menu
1888 Allows to append the toolbar to the main menu bar instead of placing it below.
1889 This is useful to save vertical space.
1892 See `Customizing the toolbar`_.
1898 Select the toolbar icon style to use - either icons and text, just
1900 The choice System default uses whatever icon style is set by GTK.
1903 Select the size of the icons you see (large, small or very small).
1904 The choice System default uses whatever icon size is set by GTK.
1907 Editor Features preferences
1908 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
1910 .. image:: ./images/pref_dialog_edit_features.png
1916 Show long lines wrapped around to new display lines.
1918 Enable "smart" home key
1919 Whether to move the cursor to the first non-whitespace character
1920 on the line when you hit the home key on your keyboard. Pressing it
1921 again will go to the very start of the line.
1923 Disable Drag and Drop
1924 Do not allow the dragging and dropping of selected text in documents.
1927 Allow groups of lines in a document to be collapsed for easier
1930 Fold/Unfold all children of a fold point
1931 Whether to fold/unfold all child fold points when a parent line
1934 Use indicators to show compile errors
1935 Underline lines with compile errors using red squiggles to indicate
1936 them in the editor area.
1938 Newline strip trailing spaces
1939 Remove any white space at the end of the line when you hit the
1942 Line breaking column
1943 The editor column number to insert a newline at when Line Breaking
1944 is enabled for the current document.
1946 Comment toggle marker
1947 A string which is added when toggling a line comment in a source file.
1948 It is used to mark the comment as toggled.
1951 Editor Indentation preferences
1952 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1954 .. image:: ./images/pref_dialog_edit_indentation.png
1959 See `Indentation`_ for more information.
1962 When Geany inserts indentation, whether to use:
1966 * Tabs and Spaces, depending on how much indentation is on a line
1968 The *Tabs and Spaces* indent type is also known as *Soft tab
1969 support* in some other editors.
1972 The width of a single indent size in spaces. By default the indent
1973 size is equivalent to 4 spaces.
1976 Try to detect and set the indent type based on file content, when
1980 The type of auto-indentation you wish to use after pressing Enter,
1984 Just add the indentation of the previous line.
1986 Add indentation based on the current filetype and any characters at
1987 the end of the line such as ``{``, ``}`` for C, ``:`` for Python.
1989 Like *Current chars* but for C-like languages, make a closing
1990 ``}`` brace line up with the matching opening brace.
1993 If set, pressing tab will indent the current line or selection, and
1994 unindent when pressing Shift-tab. Otherwise, the tab key will
1995 insert a tab character into the document (which can be different
1996 from indentation, depending on the indent type).
1999 There are also separate configurable keybindings for indent &
2000 unindent, but this preference allows the tab key to have different
2001 meanings in different contexts - e.g. for snippet completion.
2003 Editor Completions preferences
2004 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2006 .. image:: ./images/pref_dialog_edit_completions.png
2012 Whether to replace special keywords after typing Tab into a
2013 pre-defined text snippet.
2014 See `User-definable snippets`_.
2016 XML/HTML tag autocompletion
2017 When you open an XML tag automatically generate its completion tag.
2019 Automatic continuation multi-line comments
2020 Continue automatically multi-line comments in languages like C, C++
2021 and Java when a new line is entered inside such a comment.
2022 With this option enabled, Geany will insert a ``*`` on every new line
2023 inside a multi-line comment, for example when you press return in the
2027 * This is a C multi-line comment, press <Return>
2029 then Geany would insert::
2033 on the next line with the correct indentation based on the previous line,
2034 as long as the multi-line is not closed by ``*/``.
2036 Autocomplete symbols
2037 When you start to type a symbol name, look for the full string to
2038 allow it to be completed for you.
2040 Autocomplete all words in document
2041 When you start to type a word, Geany will search the whole document for
2042 words starting with the typed part to complete it, assuming there
2043 are no tag names to show.
2045 Drop rest of word on completion
2046 Remove any word part to the right of the cursor when choosing a
2047 completion list item.
2049 Characters to type for autocompletion
2050 Number of characters of a word to type before autocompletion is
2053 Completion list height
2054 The number of rows to display for the autocompletion window.
2056 Max. symbol name suggestions
2057 The maximum number of items in the autocompletion list.
2060 Auto-close quotes and brackets
2061 ``````````````````````````````
2063 Geany can automatically insert a closing bracket and quote characters when
2064 you open them. For instance, you type a ``(`` and Geany will automatically
2065 insert ``)``. With the following options, you can define for which
2066 characters this should work.
2069 Auto-close parenthesis when typing an opening one
2072 Auto-close curly brackets (braces) when typing an opening one
2075 Auto-close square brackets when typing an opening one
2078 Auto-close single quotes when typing an opening one
2081 Auto-close double quotes when typing an opening one
2084 Editor Display preferences
2085 ^^^^^^^^^^^^^^^^^^^^^^^^^^
2087 This is for visual elements displayed in the editor window.
2089 .. image:: ./images/pref_dialog_edit_display.png
2094 Invert syntax highlighting colors
2095 Invert all colors, by default this makes white text on a black
2098 Show indendation guides
2099 Show vertical lines to help show how much leading indentation there
2103 Mark all tabs with an arrow "-->" symbol and spaces with dots to
2104 show which kinds of whitespace are used.
2107 Display a symbol everywhere that a carriage return or line feed
2111 Show or hide the Line Number margin.
2114 Show or hide the small margin right of the line numbers, which is used
2117 Stop scrolling at last line
2118 When enabled Geany stops scrolling when at the last line of the document.
2119 Otherwise you can scroll one more page even if there are no real lines.
2125 The long line marker helps to indicate overly-long lines, or as a hint
2126 to the user for when to break the line.
2130 Show a thin vertical line in the editor window at the given column
2133 Change the background color of characters after the given column
2134 position to the color set below. (This is recommended over the
2135 *Line* setting if you use proportional fonts).
2137 Don't mark long lines at all.
2140 Set this value to a value greater than zero to specify the column
2141 where it should appear.
2143 Long line marker color
2144 Set the color of the long line marker.
2150 Virtual space is space beyond the end of each line.
2151 The cursor may be moved into virtual space but no real space will be
2152 added to the document until there is some text typed or some other
2153 text insertion command is used.
2156 Do not show virtual spaces
2158 Only for rectangular selections
2159 Only show virtual spaces beyond the end of lines when drawing a rectangular selection
2162 Always show virtual spaces beyond the end of lines
2168 .. image:: ./images/pref_dialog_files.png
2173 Open new documents from the command-line
2174 Whether to create new documents when passing filenames that don't
2175 exist from the command-line.
2177 Default encoding (new files)
2178 The type of file encoding you wish to use when creating files.
2180 Used fixed encoding when opening files
2181 Assume all files you are opening are using the type of encoding specified below.
2183 Default encoding (existing files)
2184 Opens all files with the specified encoding instead of auto-detecting it.
2185 Use this option when it's not possible for Geany to detect the exact encoding.
2187 Default end of line characters
2188 The end of line characters to which should be used for new files.
2189 On Windows systems, you generally want to use CR/LF which are the common
2190 characters to mark line breaks.
2191 On Unix-like systems, LF is default and CR is used on MAC systems.
2195 Perform formatting operations when a document is saved. These
2196 can each be undone with the Undo command.
2198 Ensure newline at file end
2199 Add a newline at the end of the document if one is missing.
2201 Ensure consistent line endings
2202 Ensures that newline characters always get converted before
2203 saving, avoiding mixed line endings in the same file.
2205 Strip trailing spaces
2206 Remove the trailing spaces on each line of the document.
2208 Replace tabs by space
2209 Replace all tabs in the document with the equivalent number of spaces.
2212 It is better to use spaces to indent than use this preference - see
2218 Recent files list length
2219 The number of files to remember in the recently used files list.
2222 The number of seconds to periodically check the current document's
2223 file on disk in case it has changed. Setting it to 0 will disable
2227 These checks are only performed on local files. Remote files are
2228 not checked for changes due to performance issues
2229 (remote files are files in ``~/.gvfs/``).
2235 .. image:: ./images/pref_dialog_tools.png
2241 The location of your terminal executable.
2244 The location of your web browser executable.
2247 The location of the grep executable.
2250 For Windows users: at the time of writing it is recommended to use
2251 the grep.exe from the UnxUtils project
2252 (http://sourceforge.net/projects/unxutils). The grep.exe from the
2253 Mingw project for instance might not work with Geany at the moment.
2259 Set this to a command to execute on the current word.
2260 You can use the "%s" wildcard to pass the current word below the cursor
2261 to the specified command.
2264 Template preferences
2265 ^^^^^^^^^^^^^^^^^^^^
2267 This data is used as meta data for various template text to insert into
2268 a document, such as the file header. You only need to set fields that
2269 you want to use in your template files.
2272 For changes made here to take effect, you must either select
2273 *Tools->Reload Configuration* or restart Geany.
2275 .. image:: ./images/pref_dialog_templ.png
2281 The name of the developer who will be creating files.
2284 The initials of the developer.
2287 The email address of the developer.
2290 You may wish to add anti-spam markup, e.g. ``name<at>site<dot>ext``.
2293 The company the developer is working for.
2296 The initial version of files you will be creating.
2299 Specify a format for the the {year} wildcard. You can use any conversion specifiers
2300 which can be used with the ANSI C strftime function. For details please see
2301 http://man.cx/strftime.
2304 Specify a format for the the {date} wildcard. You can use any conversion specifiers
2305 which can be used with the ANSI C strftime function. For details please see
2306 http://man.cx/strftime.
2309 Specify a format for the the {datetime} wildcard. You can use any conversion specifiers
2310 which can be used with the ANSI C strftime function. For details please see
2311 http://man.cx/strftime.
2314 Keybinding preferences
2315 ^^^^^^^^^^^^^^^^^^^^^^
2317 .. image:: ./images/pref_dialog_keys.png
2319 There are some commands listed in the keybinding dialog that are not, by default,
2320 bound to a key combination, and may not be available as a menu item.
2323 For more information see the section `Keybindings`_.
2326 Printing preferences
2327 ^^^^^^^^^^^^^^^^^^^^
2329 .. image:: ./images/pref_dialog_printing.png
2331 Use external command for printing
2332 Use a system command to print your file out.
2334 Use native GTK printing
2335 Let the GTK GUI toolkit handle your print request.
2338 Print the line numbers on the left of your paper.
2341 Print the page number on the bottom right of your paper.
2344 Print a header on every page that is sent to the printer.
2346 Use base name of the printed file
2347 Don't use the entire path for the header, only the filename.
2350 How the date should be printed. You can use the same format
2351 specifiers as in the ANSI C function strftime(). For details please
2352 see http://man.cx/strftime.
2355 Terminal (VTE) preferences
2356 ^^^^^^^^^^^^^^^^^^^^^^^^^^
2358 See also: `Virtual terminal emulator widget (VTE)`_.
2360 .. image:: ./images/pref_dialog_vte.png
2366 Select the font that will be used in the terminal emulation control.
2369 Select the font color.
2372 Select the background color of the terminal.
2375 The number of lines buffered so that you can scroll though the history.
2378 The location of the shell on your system.
2381 Scroll the terminal to the prompt line when pressing a key.
2384 Scroll the output down.
2387 Let the terminal cursor blink.
2389 Override Geany keybindings
2390 Allow the VTE to receive keyboard shortcuts (apart from focus commands).
2392 Disable menu shortcut key (F10 by default)
2393 Disable the menu shortcut when you are in the virtual terminal.
2395 Follow path of the current file
2396 Make the path of the terminal change according to the path of the
2399 Execute programs in VTE
2400 Execute programs in the virtual terminal instead of using the external
2401 terminal tool. Note that if you run multiple execute commands at once
2402 the output may become mixed together in the VTE.
2404 Don't use run script
2405 Don't use the simple run script which is usually used to display
2406 the exit status of the executed program.
2407 This can be useful if you already have a program running in the VTE
2408 like a Python console (e.g. ipython). Use this with care.
2414 Project Management is optional in Geany. Currently it can be used for:
2416 * Storing and opening session files on a project basis.
2417 * Overriding default settings with project equivalents.
2418 * Configuring the Build menu on a project basis.
2420 A list of session files can be stored and opened with the project
2421 when the *Use project-based session files* preference is enabled,
2422 in the *Project* group of the `Preferences`_ dialog.
2424 As long as a project is open, the Build menu will use
2425 the items defined in project's settings, instead of the defaults.
2426 See `Build Menu Configuration`_ for information on configuring the menu.
2428 The current project's settings are saved when it is closed, or when
2429 Geany is shutdown. When restarting Geany, the previously opened project
2430 file that was in use at the end of the last session will be reopened.
2432 The project menu items are detailed below.
2438 To create a new project, fill in the *Name* field. By default this
2439 will setup a new project file ``~/projects/name.geany``. Usually it's
2440 best to store all your project files in the same directory (they are
2441 independent of any source directory trees).
2443 The Base path text field is setup to use ``~/projects/name``. This
2444 can safely be set to any existing path -- it will not touch the file
2445 structure contained in it.
2451 You can set an optional description for the project. Currently it's
2452 only used for a template wildcard - see `Template wildcards`_.
2454 The *Base path* field is used as the directory to run the Build menu commands.
2455 The specified path can be an absolute path or it is considered to be
2456 relative to the project's file name.
2458 The *Indentation* tab allows you to override the default
2459 `Indentation`_ settings.
2465 The Open command displays a standard file chooser, starting in
2466 ``~/projects``. Choose a project file named with the ``.geany``
2469 When project session support is enabled, Geany will close the currently
2470 open files and open the session files associated with the project.
2476 Project file settings are saved when the project is closed.
2478 When project session support is enabled, Geany will close the project
2479 session files and open any previously closed default session files.
2484 After editing code with Geany, the next step is to compile, link, build,
2485 interpret, run etc. As Geany supports many languages each with a different
2486 approach to such operations, and as there are also many language independent
2487 software building systems, Geany does not have a built-in build system, nor
2488 does it limit which system you can use. Instead the build menu provides
2489 a configurable and flexible means of running any external commands to
2490 execute your preferred build system.
2492 This section provides a description of the default configuration of the
2493 build menu and then covers how to configure it, and where the defaults fit in.
2495 Running the commands from within Geany has two benefits:
2497 * The current file is automatically saved before the command is run.
2498 * The output is captured in the Compiler notebook tab and parsed for
2501 Warnings and errors that can be parsed for line numbers will be shown in
2502 red in the Compiler tab and you can click on them to switch to the relevant
2503 source file (or open it) and mark the line number. Also lines with
2504 warnings or errors are marked in the source, see `Indicators`_ below.
2507 If Geany's default error message parsing does not parse errors for
2508 the tool you're using, you can set a custom regex in the Build Commands
2509 Dialog, see `Build Menu Configuration`_.
2514 Indicators are red squiggly underlines which are used to highlight
2515 errors which occurred while compiling the current file. So you can
2516 easily see where your code failed to compile. You can remove them by
2517 selecting *Remove Error Indicators* in the Document menu.
2519 If you do not like this feature, you can disable it - see `Editor Features
2523 Default Build Menu Items
2524 ^^^^^^^^^^^^^^^^^^^^^^^^
2525 Depending on the current file's filetype, the default Build menu will contain
2526 the following items:
2531 * Make Custom Target
2536 * Set Build Menu Commands
2542 The Compile command has different uses for different kinds of files.
2544 For compilable languages such as C and C++, the Compile command is
2545 set up to compile the current source file into a binary object file.
2547 Java source files will be compiled to class file bytecode.
2549 Interpreted languages such as Perl, Python, Ruby will compile to
2550 bytecode if the language supports it, or will run a syntax check,
2551 or if that is not available will run the file in its language interpreter.
2556 For compilable languages such as C and C++, the Build command will link
2557 the current source file's equivalent object file into an executable. If
2558 the object file does not exist, the source will be compiled and linked
2559 in one step, producing just the executable binary.
2561 Interpreted languages do not use the Build command.
2564 If you need complex settings for your build system, or several
2565 different settings, then writing a Makefile and using the Make
2566 commands is recommended; this will also make it easier for users to
2567 build your software.
2573 This runs "make" in the same directory as the
2579 This is similar to running 'Make' but you will be prompted for
2580 the make target name to be passed to the Make tool. For example,
2581 typing 'clean' in the dialog prompt will run "make clean".
2587 Make object will run "make current_file.o" in the same directory as
2588 the current file, using the filename for 'current_file'. It is useful
2589 for building just the current file without building the whole project.
2594 The next error item will move to the next detected error in the file.
2598 The previous error item will move to the previous detected error in the file.
2603 Execute will run the corresponding executable file, shell script or
2604 interpreted script in a terminal window. Note that the Terminal tool
2605 path must be correctly set in the Tools tab of the Preferences dialog -
2606 you can use any terminal program that runs a Bourne compatible shell
2607 and accept the "-e" command line argument to start a command or can be
2608 selected to use the built-in VTE if it is available - see
2609 `Virtual terminal emulator widget (VTE)`_.
2611 After your program or script has finished executing, you will be
2612 prompted to press the return key. This allows you to review any text
2613 output from the program before the terminal window is closed.
2616 The execute command output is not parsed for errors.
2619 Stopping running processes
2620 ``````````````````````````
2622 When there is a running program, the Execute menu item in the menu and
2623 the Run button in the toolbar
2624 each become a stop button so you can stop the current running program (and
2625 any child processes). This works by sending the SIGQUIT signal to the process.
2627 Depending on the process you started it is possible that the process
2628 cannot be stopped. For example this can happen when the process creates
2629 more than one child process.
2635 Xterm is known to work properly. If you are using "Terminal"
2636 (the terminal program of Xfce), you should add the command line
2637 option ``--disable-server`` otherwise the started process cannot be
2638 stopped. Just add this option in the preferences dialog on the Tools
2639 tab in the terminal field.
2645 By default the Compile and Build commands invoke the GCC compiler and
2646 linker with only the basic arguments needed by all programs. Using
2647 *Set Build Commands* you can add any include paths and compile
2648 flags for the compiler, any library names and paths for the linker,
2649 and any arguments you want to use when running Execute.
2651 Build Menu Configuration
2652 ^^^^^^^^^^^^^^^^^^^^^^^^
2654 The build menu has considerable flexibility and configurability, allowing
2655 both menu labels the commands they execute and the directory they execute
2656 in to be configured.
2658 For example, if you change one of the default make commands to run say 'waf'
2659 you can also change the label to match.
2661 These settings are saved automatically when Geany is shut down.
2663 The build menu is divided into four groups of items each with different
2666 * Filetype build commands - are configurable and depend on the filetype of the
2667 current document; they capture output in the compiler tab and parse it for
2669 * Independent build commands - are configurable and mostly don't depend on the
2670 filetype of the current document; they also capture output in the
2671 compiler tab and parse it for errors.
2672 * Execute commands - are configurable and intended for executing your
2673 program or other long running programs. The output is not parsed for errors
2674 and is directed to the terminal selected in preferences.
2675 * Fixed commands - these perform built-in actions:
2677 * Go to the next error.
2678 * Go to the previous error.
2679 * Show the build menu commands dialog.
2681 The maximum numbers of items in each of the configurable groups can be
2682 configured when Geany starts using hidden settings (see `Preferences File Format`_).
2683 Even though the maximum number of items may have been increased, only
2684 those menu items that have values configured are shown in the menu.
2686 The groups of menu items obtain their configuration from four potential
2687 sources. The highest priority source that has the menu item defined will
2688 be used. The sources in decreasing priority are:
2690 * A project file if open
2691 * The user preferences
2692 * The system filetype definitions
2695 The detailed relationships between sources and the configurable menu item groups
2696 is shown in the following table.
2698 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
2699 | Group | Project File | Preferences | System Filetype | Defaults |
2700 +==============+=====================+==========================+===================+===============================+
2701 | Filetype | Loads From: project | Loads From: | Loads From: | None |
2702 | | file | filetype.xxx file in | filetype.xxx in | |
2703 | | | ~/.config/geany/filedefs | Geany install | |
2704 | | Saves To: project | | | |
2705 | | file | Saves to: as above, | Saves to: as user | |
2706 | | | creating if needed. | preferences left. | |
2707 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
2708 | Filetype | Loads From: project | Loads From: | Loads From: | 1: |
2709 | Independent | file | geany.conf file in | filetype.xxx in | Label: _Make |
2710 | | | ~/.config/geany | Geany install | Command: make |
2711 | | Saves To: project | | | |
2712 | | file | Saves to: as above, | Saves to: as user | 2: |
2713 | | | creating if needed. | preferences left. | Label: Make Custom _Target |
2714 | | | | | Command: make |
2717 | | | | | Label: Make _Object |
2718 | | | | | Command: make %e.o |
2719 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
2720 | Execute | Loads From: project | Loads From: | Loads From: | Label: _Execute |
2721 | | file or else | geany.conf file in | filetype.xxx in | Command: ./%e |
2722 | | filetype defined in | ~/.config/geany or else | Geany install | |
2723 | | project file | filetype.xxx file in | | |
2724 | | | ~/.config/geany/filedefs | Saves To: as user | |
2725 | | Saves To: | | preferences left. | |
2726 | | project file | Saves To: | | |
2727 | | | filetype.xxx file in | | |
2728 | | | ~/.config/geany/filedefs | | |
2729 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
2731 The following notes on the table reference cells by coordinate as (group,source):
2733 * General - for filetype.xxx substitute the filetype name of the
2734 current document for xxx.
2736 * System Filetypes - Labels loaded from these sources are locale sensitive
2737 and can contain translations.
2739 * (Filetype, Project File) and (Filetype, Preferences) - preferences use a full
2740 filetype file so that users can configure all other filetype preferences
2741 as well. Projects can only configure menu items per filetype. Saving
2742 in the project file means that there is only one file per project not
2745 * (Filetype-Independent, System Filetype) - although conceptually strange, defining
2746 filetype-independent commands in a filetype file, this provides the ability to
2747 define filetype dependent default menu items.
2749 * (Execute, Project File) and (Execute, Preferences) - the project independent
2750 execute and preferences independent execute commands can only be set by hand
2751 editing the appropriate file, see `Preferences File Format`_ and `Project File
2754 Build Menu Commands Dialog
2755 ^^^^^^^^^^^^^^^^^^^^^^^^^^
2757 Most of the configuration of the build menu is done through the Build Menu
2758 Commands Dialog. You edit the configuration sourced from preferences in the
2759 dialog opened from the Build->Build Menu Commands item and you edit the
2760 configuration from the project in the build tab of the project preferences
2761 dialog. Both use the same form shown below.
2763 .. image:: ./images/build_menu_commands_dialog.png
2765 The dialog is divided into three sections:
2767 * Filetype build commands (selected based on the current document's filetype).
2768 * Independent build commands (available regardless of filetype).
2769 * Filetype execute commands.
2771 The filetype and independent sections also each contain a field for the regular
2772 expression used for parsing command output for error and warning messages.
2774 The columns in the first three sections allow setting of the label, command,
2775 and working directory to run the command in.
2777 An item with an empty label will not be shown in the menu.
2779 An empty working directory will default to the directory of the current document.
2780 If there is no current document then the command will not run.
2782 The dialog will always show the command selected by priority, not just the
2783 commands configured in this configuration source. This ensures that you always
2784 see what the menu item is going to do if activated.
2786 If the current source of the menu item is higher priority than the
2787 configuration source you are editing then the command will be shown
2788 in the dialog but will be insensitive (greyed out). This can't happen
2789 with the project source but can with the preferences source dialog.
2791 The clear buttons remove the definition from the configuration source you are editing.
2792 When you do this the command from the next lower priority source will be shown.
2793 To hide lower priority menu items without having anything show in the menu
2794 configure with a nothing in the label but at least one character in the command.
2796 Substitutions in Commands and Working Directories
2797 `````````````````````````````````````````````````
2799 The first occurence of each of the following character sequences in each of the
2800 command and working directory fields is substituted by the items specified below
2801 before the command is run.
2803 * %d - substituted by the absolute path to the directory of the current file.
2804 * %e - substituted by the name of the current file without the extension or path.
2805 * %f - substituted by the name of the current file without the path.
2806 * %p - if a project is open, substituted by the base path from the project.
2809 If the basepath set in the project preferences is not an absolute path , then it is
2810 taken as relative to the directory of the project file. This allows a project file
2811 stored in the source tree to specify all commands and working directories relative
2812 to the tree itself, so that the whole tree including the project file, can be moved
2813 and even checked into and out of version control without having to re-configure the
2816 Build Menu Keyboard Shortcuts
2817 `````````````````````````````
2819 Keyboard shortcuts can be defined for the first two filetype menu items, the first three
2820 independent menu items, the first two execute menu items and the fixed menu items.
2821 In the keybindings configuration dialog (see `Keybinding preferences`_)
2822 these items are identified by the default labels shown in the `Build Menu`_ section above.
2824 It is currently not possible to bind keyboard shortcuts to more than these menu items.
2826 You can also use underlines in the labels to set mnemonic characters.
2831 The configurable Build Menu capability was introduced in Geany 0.19 and
2832 required a new section to be added to the configuration files (See
2833 `Preferences File Format`_). Geany will still load older format project,
2834 preferences and filetype file settings and will attempt to map them into the new
2835 configuration format. There is not a simple clean mapping between the formats.
2836 The mapping used produces the most sensible results for the majority of cases.
2837 However, if they do not map the way you want, you may have to manually
2838 configure some settings using the Build Commands
2839 Dialog or the Build tab of the project preferences dialog.
2841 Any setting configured in either of these dialogs will override settings mapped from
2842 older format configuration files.
2847 Since Geany 0.13 there has been printing support using GTK's printing API.
2848 The printed page(s) will look nearly the same as on your screen in Geany.
2849 Additionally, there are some options to modify the printed page(s).
2852 The background text color is set to white, except for text with
2853 a white foreground. This allows dark color schemes to save ink
2856 You can define whether to print line numbers, page numbers at the bottom of
2857 each page and whether to print a page header on each page. This header
2858 contains the filename of the printed document, the current page number and
2859 the date and time of printing. By default, the file name of the document
2860 with full path information is added to the header. If you prefer to add
2861 only the basename of the file(without any path information) you can set it
2862 in the preferences dialog. You can also adjust the format of the date and
2863 time added to the page header. The available conversion specifiers are the
2864 same as the ones which can be used with the ANSI C strftime function.
2866 All of these settings can also be changed in the print dialog just before
2867 actual printing is done.
2868 On Unix-like systems the provided print dialog offers a print preview. The
2869 preview file is opened with a PDF viewer and by default GTK uses ``evince``
2870 for print preview. If you have not installed evince or just want to use
2871 another PDF viewer, you can change the program to use in the file
2872 ``.gtkrc-2.0`` (usually found in your home directory). Simply add a line
2875 gtk-print-preview-command = "epdfview %f"
2877 at the end of the file. Of course, you can also use xpdf, kpdf or whatever
2878 as the print preview command.
2880 Unfortunately, native GTK printing support is only available if Geany was
2881 built against GTK 2.10 (or above) **and** is running with GTK 2.10 (or above).
2882 If not, Geany provides basic printing support. This means you can print a
2883 file by passing the filename of the current file to a command which
2884 actually prints the file. However, the printed document contains no syntax
2885 highlighting. You can adjust the command to which the filename is
2886 passed in the preferences dialog. The default command is::
2890 ``%f`` will be substituted by the filename of the current file. Geany
2891 will not show errors from the command itself, so you should make
2892 sure that it works before(e.g. by trying to execute it from the
2895 A nicer example, which many prefer is::
2897 % a2ps -1 --medium=A4 -o - %f | xfprint4
2899 But this depends on a2ps and xfprint4. As a replacement for xfprint4,
2900 gtklp or similar programs can be used.
2907 Plugins are loaded at startup, if the *Enable plugin support*
2908 general preference is set. There is also a command-line option,
2909 ``-p``, which prevents plugins being loaded. Plugins are scanned in
2910 the following directories:
2912 * ``$prefix/lib/geany`` (see `Installation prefix`_)
2913 * ``~/.config/geany/plugins``
2915 Most plugins add menu items to the *Tools* menu when they are loaded.
2917 Since Geany 0.13, there is a Plugin Manager to let you choose which plugins
2918 should be loaded at startup. You can also load and unload plugins on the
2919 fly using this dialog. Once you click the checkbox for a specific plugin
2920 in the dialog, it is loaded or unloaded according to its previous state.
2921 By default, no plugins are loaded at startup until you select some.
2922 You can also configure some plugin specific options when the plugin
2925 See also `Plugin documentation`_ for information about single plugins
2926 which are included in Geany.
2932 Geany supports the default keyboard shortcuts for the Scintilla
2933 editing widget. For a list of these commands, see `Scintilla
2934 keyboard commands`_. The Scintilla keyboard shortcuts will be overridden
2935 by any custom keybindings with the same keyboard shortcut.
2941 There are a few non-configurable bindings to switch between documents,
2942 listed below. These can also be overridden by custom keybindings.
2944 =============== ==================================
2946 =============== ==================================
2947 Alt-[1-9] Select left-most tab, from 1 to 9.
2948 Alt-0 Select right-most tab.
2949 Ctrl-Shift-PgUp Select left-most tab.
2950 Ctrl-Shift-PgDn Select right-most tab.
2951 =============== ==================================
2954 Configurable keybindings
2955 ^^^^^^^^^^^^^^^^^^^^^^^^
2957 For all actions listed below you can define your own keybindings. Open
2958 the Preferences dialog, select the desired action and click on
2959 change. In the resulting dialog you can press the key combination you
2960 want to assign to the action and it will be saved when you press OK.
2961 You can define only one key combination for each action and each key
2962 combination can only be defined for one action.
2964 Some of the default key combinations are common across many
2965 applications, for example *Ctrl-N* for New and *Ctrl-O* for Open.
2966 Because they are so common it is not advisable to change these, but
2967 you can add other key combinations for these actions. For example
2968 *Ctrl-O* is set to execute menu_open by default, but you can also
2969 define *Alt-O*, so that the file open dialog is shown by pressing
2970 either *Ctrl-O* or *Alt-O*.
2972 The following tables list all customizable keyboard shortcuts, those
2973 which are common to many applications are marked with (C) after the
2978 =============================== ========================= ==================================================
2979 Action Default shortcut Description
2980 =============================== ========================= ==================================================
2981 New Ctrl-N (C) Creates a new file.
2983 Open Ctrl-O (C) Opens a file.
2985 Open selected file Ctrl-Shift-O Opens the selected filename.
2987 Re-open last closed tab Re-opens the last closed document tab.
2989 Save Ctrl-S (C) Saves the current file.
2991 Save As Saves the current file under a new name.
2993 Save all Ctrl-Shift-S Saves all open files.
2995 Close all Ctrl-Shift-W Closes all open files.
2997 Close Ctrl-W (C) Closes the current file.
2999 Reload file Ctrl-R (C) Reloads the current file. All unsaved changes
3002 Print Ctrl-P (C) Prints the current file.
3003 =============================== ========================= ==================================================
3008 =============================== ========================= ==================================================
3009 Action Default shortcut Description
3010 =============================== ========================= ==================================================
3011 Undo Ctrl-Z (C) Un-does the last action.
3013 Redo Ctrl-Y Re-does the last action.
3015 Delete current line(s) Ctrl-K Deletes the current line (and any lines with a
3018 Delete to line end Ctrl-Shift-Delete Deletes from the current caret position to the
3019 end of the current line.
3021 Duplicate line or selection Ctrl-D Duplicates the current line or selection.
3023 Transpose current line Ctrl-T Transposes the current line with the previous one.
3025 Scroll to current line Ctrl-Shift-L Scrolls the current line into the centre of the
3026 view. The cursor position and or an existing
3027 selection will not be changed.
3029 Scroll up by one line Alt-Up Scrolls the view.
3031 Scroll down by one line Alt-Down Scrolls the view.
3033 Complete word Ctrl-Space Shows the autocompletion list. If already showing
3034 tag completion, it shows document word completion
3035 instead, even if it is not enabled for automatic
3036 completion. Likewise if no tag suggestions are
3037 available, it shows document word completion.
3039 Show calltip Ctrl-Shift-Space Shows a calltip for the current function or
3042 Show macro list Ctrl-Return Shows a list of available macros and variables in
3045 Complete snippet Tab If you type a construct like if or for and press
3046 this key, it will be completed with a matching
3049 Suppress snippet completion If you type a construct like if or for and press
3050 this key, it will not be completed, and a space or
3051 tab will be inserted, depending on what the
3052 construct completion keybinding is set to. For
3053 example, if you have set the construct completion
3054 keybinding to space, then setting this to
3055 Shift+space will prevent construct completion and
3058 Context Action Executes a command and passes the current word
3059 (near the cursor position) or selection as an
3060 argument. See the section called `Context
3063 Move cursor in snippet Jumps to the next defined cursor positions in a
3064 completed snippets if multiple cursor positions
3067 Word part completion Tab When the autocompletion list is visible, complete
3068 the currently selected item up to the next word
3071 Move line(s) up Move the current line or selected lines up by
3074 Move line(s) down Move the current line or selected lines down by
3076 =============================== ========================= ==================================================
3079 Clipboard keybindings
3080 `````````````````````
3081 =============================== ========================= ==================================================
3082 Action Default shortcut Description
3083 =============================== ========================= ==================================================
3084 Cut Ctrl-X (C) Cut the current selection to the clipboard.
3086 Copy Ctrl-C (C) Copy the current selection to the clipboard.
3088 Paste Ctrl-V (C) Paste the clipboard text into the current document.
3090 Cut current line(s) Ctrl-Shift-X Cuts the current line (and any lines with a
3091 selection) to the clipboard.
3093 Copy current line(s) Ctrl-Shift-C Copies the current line (and any lines with a
3094 selection) to the clipboard.
3095 =============================== ========================= ==================================================
3100 =============================== ========================= ==================================================
3101 Action Default shortcut Description
3102 =============================== ========================= ==================================================
3103 Select all Ctrl-A (C) Makes a selection of all text in the current
3106 Select current word Alt-Shift-W Selects the current word under the cursor.
3108 Select current paragraph Alt-Shift-P Selects the current paragraph under the cursor
3109 which is defined by two empty lines around it.
3111 Select current line(s) Alt-Shift-L Selects the current line under the cursor (and any
3112 partially selected lines).
3114 Select to previous word part (Extend) selection to previous word part boundary.
3116 Select to next word part (Extend) selection to next word part boundary.
3117 =============================== ========================= ==================================================
3122 =============================== ========================= ==================================================
3123 Action Default shortcut Description
3124 =============================== ========================= ==================================================
3125 Insert date Shift-Alt-D Inserts a customisable date.
3127 Insert alternative whitespace Inserts a tab character when spaces should
3128 be used for indentation and inserts space
3129 characters of the amount of a tab width when
3130 tabs should be used for indentation.
3132 Insert New Line Before Current Inserts a new line with indentation.
3134 Insert New Line After Current Inserts a new line with indentation.
3135 =============================== ========================= ==================================================
3140 =============================== ========================= ==================================================
3141 Action Default shortcut Description
3142 =============================== ========================= ==================================================
3143 Toggle case of selection Ctrl-Alt-U Changes the case of the selection. A lowercase
3144 selection will be changed into uppercase and vice
3145 versa. If the selection contains lower- and
3146 uppercase characters, all will be converted to
3149 Comment line Comments current line or selection.
3151 Uncomment line Uncomments current line or selection.
3153 Toggle line commentation Ctrl-E Comments a line if it is not commented or removes
3154 a comment if the line is commented.
3156 Increase indent Ctrl-I Indents the current line or selection by one tab
3157 or by spaces in the amount of the tab width
3160 Decrease indent Ctrl-U Removes one tab or the amount of spaces of
3161 the tab width setting from the indentation of the
3162 current line or selection.
3164 Increase indent by one space Indents the current line or selection by one
3167 Decrease indent by one space Deindents the current line or selection by one
3170 Smart line indent Indents the current line or all selected lines
3171 with the same indentation as the previous line.
3173 Send to Custom Command 1 (2,3) Ctrl-1 (2,3) Passes the current selection to a configured
3174 external command (available for the first
3175 three configured commands, see
3176 `Sending text through custom commands`_ for
3179 Send Selection to Terminal Sends the current selection or the current
3180 line (if there is no selection) to the
3181 embedded Terminal (VTE).
3183 Reflow lines/block Reformat selected lines or current
3184 (indented) text block,
3185 breaking lines at the long line marker or the
3186 line breaking column if line breaking is
3187 enabled for the current document.
3188 =============================== ========================= ==================================================
3191 Settings keybindings
3192 ````````````````````
3193 =============================== ========================= ==================================================
3194 Action Default shortcut Description
3195 =============================== ========================= ==================================================
3196 Preferences Ctrl-Alt-P Opens preferences dialog.
3198 Plugin Preferences Opens plugin preferences dialog.
3199 =============================== ========================= ==================================================
3204 =============================== ========================= ==================================================
3205 Action Default shortcut Description
3206 =============================== ========================= ==================================================
3207 Find Ctrl-F (C) Opens the Find dialog.
3209 Find Next Ctrl-G Finds next result.
3211 Find Previous Ctrl-Shift-G Finds previous result.
3213 Find Next Selection Finds next occurence of selected text.
3215 Find Previous Selection Finds previous occurence of selected text.
3217 Replace Ctrl-H (C) Opens the Replace dialog.
3219 Find in files Ctrl-Shift-F Opens the Find in files dialog.
3221 Next message Jumps to the line with the next message in
3222 the Messages window.
3224 Previous message Jumps to the line with the previous message
3225 in the Messages window.
3227 Find Usage Finds all occurrences of the current word (near
3228 the keyboard cursor) or selection in all open
3229 documents and displays them in the messages
3232 Find Document Usage Finds all occurrences of the current word (near
3233 the keyboard cursor) or selection in the current
3234 document and displays them in the messages
3237 Mark All Ctrl-Shift-M Highlight all matches of the current
3238 word/selection in the current document
3239 with a colored box. If there's nothing to
3240 find, highlighted matches will be cleared.
3241 =============================== ========================= ==================================================
3246 =============================== ========================= ==================================================
3247 Action Default shortcut Description
3248 =============================== ========================= ==================================================
3249 Navigate forward a location Switches to the next location in the navigation
3250 history. See the section called `Code Navigation
3253 Navigate back a location Switches to the previous location in the
3254 navigation history. See the section called
3255 `Code navigation history`_.
3257 Go to line Ctrl-L Focuses the Go to Line entry (if visible) or
3258 shows the Go to line dialog.
3260 Goto matching brace Ctrl-B If the cursor is ahead or behind a brace, then it
3261 is moved to the brace which belongs to the current
3262 one. If this keyboard shortcut is pressed again,
3263 the cursor is moved back to the first brace.
3265 Toggle marker Ctrl-M Set a marker on the current line, or clear the
3266 marker if there already is one.
3268 Goto next marker Ctrl-. Goto the next marker in the current document.
3270 Goto previous marker Ctrl-, Goto the previous marker in the current document.
3272 Go to tag definition Jump to the definition of the current word (near
3273 the keyboard cursor). If the definition cannot be
3274 found (e.g. the relevant file is not open) Geany
3275 will beep and do nothing. See the section called
3276 `Go to tag definition`_.
3278 Go to tag declaration Jump to the declaration of the current word (near
3279 the keyboard cursor). If the declaration cannot be
3280 found (e.g. the relevant file is not open) Geany
3281 will beep and do nothing. See the section called
3282 `Go to tag declaration`_.
3284 Go to Start of Line Home Move the caret to the end of the line indentation
3285 unless it is already there, in which case it moves
3286 it to the start of the line.
3288 Go to End of Line End Move the caret to the end of the line.
3290 Go to End of Display Line Alt-End Move the caret to the end of the display line.
3291 This is useful when you use line wrapping and
3292 want to jump to the end of the wrapped, virtual
3293 line, not the real end of the whole line.
3294 If the line is not wrapped, it behaves like
3295 `Go to End of Line`, see above.
3297 Go to Previous Word Part Ctrl-/ Goto the previous part of the current word.
3299 Go to Next Word Part Ctrl-\ Goto the next part of the current word.
3300 =============================== ========================= ==================================================
3304 =============================== ========================= ==================================================
3305 Action Default shortcut Description
3306 =============================== ========================= ==================================================
3307 Fullscreen F11 (C) Switches to fullscreen mode.
3309 Toggle Messages Window Toggles the message window (status and compiler
3310 messages) on and off.
3312 Toggle Sidebar Shows or hides the sidebar.
3314 Toggle all additional widgets Hide and show all additional widgets like the
3315 notebook tabs, the toolbar, the messages window
3318 Zoom In Ctrl-+ (C) Zooms in the text.
3320 Zoom Out Ctrl-- (C) Zooms out the text.
3322 Zoom Reset Ctrl-0 Reset any previous zoom on the text.
3323 =============================== ========================= ==================================================
3327 ================================ ========================= ==================================================
3328 Action Default shortcut Description
3329 ================================ ========================= ==================================================
3330 Switch to Editor F2 Switches to editor widget.
3331 Also reshows the document statistics line
3332 (after a short timeout).
3334 Switch to Search Bar F7 Switches to the search bar in the toolbar (if
3337 Switch to Message Window Focus the Message Window's current tab.
3339 Switch to Compiler Focus the Compiler message window tab.
3341 Switch to Messages Focus the Messages message window tab.
3343 Switch to Scribble F6 Switches to scribble widget.
3345 Switch to VTE F4 Switches to VTE widget.
3347 Switch to Sidebar Focus the Sidebar.
3349 Switch to Sidebar Symbol List Focus the Symbol list tab in the Sidebar
3352 Switch to Sidebar Document List Focus the Document list tab in the Sidebar
3354 ================================ ========================= ==================================================
3357 Notebook tab keybindings
3358 ````````````````````````
3359 =============================== ========================= ==================================================
3360 Action Default shortcut Description
3361 =============================== ========================= ==================================================
3362 Switch to left document Ctrl-PageUp (C) Switches to the previous open document.
3364 Switch to right document Ctrl-PageDown (C) Switches to the next open document.
3366 Switch to last used document Ctrl-Tab Switches to the previously shown document (if it's
3368 Holding Ctrl (or another modifier if the keybinding
3369 has been changed) will show a dialog, then repeated
3370 presses of the keybinding will switch to the 2nd-last
3371 used document, 3rd-last, etc. Also known as
3372 Most-Recently-Used documents switching.
3374 Move document left Alt-PageUp Changes the current document with the left hand
3377 Move document right Alt-PageDown Changes the current document with the right hand
3380 Move document first Moves the current document to the first position.
3382 Move document last Moves the current document to the last position.
3383 =============================== ========================= ==================================================
3386 Document keybindings
3387 ````````````````````
3388 =============================== ========================= ==================================================
3389 Action Default shortcut Description
3390 =============================== ========================= ==================================================
3391 Replace tabs by space Replaces all tabs with the right amount of spaces.
3393 Replace spaces by tabs Replaces all spaces with tab characters.
3395 Toggle current fold Toggles the folding state of the current code block.
3397 Fold all Folds all contractible code blocks.
3399 Unfold all Unfolds all contracted code blocks.
3401 Reload symbol list Ctrl-Shift-R Reloads the tag/symbol list.
3403 Toggle Line wrapping Enables or disables wrapping of long lines.
3405 Toggle Line breaking Enables or disables automatic breaking of long
3406 lines at a configurable column.
3408 Remove Markers Remove any markers on lines or words which
3409 were set by using 'Mark All' in the
3410 search dialog or by manually marking lines.
3412 Remove Error Indicators Remove any error indicators in the
3414 =============================== ========================= ==================================================
3419 =============================== ========================= ==================================================
3420 Action Default shortcut Description
3421 =============================== ========================= ==================================================
3422 Compile F8 Compiles the current file.
3424 Build F9 Builds (compiles if necessary and links) the
3427 Make all Shift-F9 Builds the current file with the Make tool.
3429 Make custom target Ctrl-Shift-F9 Builds the current file with the Make tool and a
3432 Make object Compiles the current file with the Make tool.
3434 Next error Jumps to the line with the next error from the
3437 Previous error Jumps to the line with the previous error from
3438 the last build process.
3440 Run F5 Executes the current file in a terminal emulation.
3442 Set Build Commands Opens the build commands dialog.
3443 =============================== ========================= ==================================================
3448 =============================== ========================= ==================================================
3449 Action Default shortcut Description
3450 =============================== ========================= ==================================================
3451 Show Color Chooser Opens the Color Chooser dialog.
3452 =============================== ========================= ==================================================
3457 =============================== ========================= ==================================================
3458 Action Default shortcut Description
3459 =============================== ========================= ==================================================
3460 Help F1 (C) Opens the manual.
3461 =============================== ========================= ==================================================
3469 You must use UTF-8 encoding *without BOM* for configuration files.
3474 There's a *Configuration files* submenu in the *Tools* menu that
3475 contains items for some of the available user configuration files.
3476 Clicking on one opens it in the editor for you to update. Geany will
3477 reload the file after you have saved it.
3480 Other configuration files not shown here will need to be opened
3481 manually, and will not be automatically reloaded when saved.
3482 (see *Reload Configuration* below).
3484 There's also a *Reload Configuration* item which can be used if you
3485 updated one of the other configuration files, or modified or added
3488 *Reload Configuration* is also necessary to update syntax highlighting colors.
3491 Syntax highlighting colors aren't updated in open documents after
3492 saving filetypes.common as this may take a significant
3496 Global configuration file
3497 -------------------------
3499 There is a global configuration file for Geany which will be used for
3500 any settings not defined in the users local configuration file.
3501 Settings present in the local configuration file override those in the global
3504 The global configuration file is read from
3505 ``$prefix/share/geany/geany.conf`` (where ``$prefix`` is the path where
3506 Geany is installed, see `Installation prefix`_) when starting Geany and
3507 an user configuration file does not exist. It can contain any settings
3508 which are found in the usual configuration file created by Geany but
3509 does not have to contain all settings.
3512 This feature is mainly intended for package maintainers or system
3513 admins who want to set up Geany in a multi user environment and
3514 set some sane default values for this environment. Usually users won't
3519 Filetype definition files
3520 -------------------------
3522 All color definitions and other filetype specific settings are
3523 stored in the filetype definition files. Those settings are colors
3524 for syntax highlighting, general settings like comment characters or
3525 word delimiter characters as well as compiler and linker settings.
3529 At startup Geany looks for ``filetypes.*.conf`` files in the system and
3530 user filetype paths, adding any filetypes found with the name matching
3531 the '``*``' wildcard.
3533 Custom filetypes are not as powerful as built-in filetypes, but the following
3534 have been implemented:
3536 * Recognizing and setting the filetype (after the user has manually edited
3537 ``filetype_extensions.conf``).
3538 * Filetype settings in the [settings] section (see `Filetype configuration`_).
3539 * Using existing tag parsing (``tag_parser`` key).
3540 * Using existing syntax highlighting (``lexer_filetype`` key).
3542 * Loading global tags files (namespace will be shared with tag_parser
3547 The system-wide configuration files can be found in
3548 ``$prefix/share/geany`` and are called ``filetypes.$ext``,
3549 where ``$prefix`` is the path where Geany is installed (see
3550 `Installation prefix`_) and $ext is the name of the filetype. For every
3551 filetype there is a corresponding definition file. There is one
3552 exception: ``filetypes.common`` -- this file is for general settings,
3553 which are not specific to a certain filetype.
3556 It is not recommended that users edit the system-wide files,
3557 because they will be overridden when Geany is updated.
3561 To change the settings, copy a file from ``$prefix/share/geany`` to
3562 the subdirectory filedefs in your configuration directory (usually
3563 ``~/.config/geany/``).
3567 % cp /usr/local/share/geany/filetypes.c /home/username/.config/geany/filedefs/
3569 Then you can edit the file and the changes are also
3570 available after an update of Geany because they reside in your
3571 configuration directory. Alternatively, you can create a file
3572 ``~/.config/geany/filedefs/filetypes.X`` and add only these settings you want
3573 to change. All missing settings will be read from the corresponding
3574 global definition file in ``$prefix/share/geany``.
3578 Filetype configuration
3579 ^^^^^^^^^^^^^^^^^^^^^^
3581 As well as the sections listed below, each filetype file can contain
3582 a [build-menu] section as described in `[build-menu] Section`_.
3587 In this section the colors for syntax highlighting are defined. The
3590 * ``key=foreground_color;background_color;bold_flag;italic_flag``
3592 Colors have to be specified as RGB hex values prefixed by
3593 0x. For example red is 0xff0000, blue is 0x0000ff. The values are
3594 case-insensitive, but it is a good idea to use small letters. Bold
3595 and italic are flags and should only be "true" or "false". If their
3596 value is something other than "true" or "false", "false" is assumed.
3598 You can omit fields to use the values from the style named ``"default"``.
3600 E.g. ``key=0xff0000;;true``
3602 This makes the key style have red foreground text, default background
3603 color text and bold emphasis.
3607 The second format uses a *named style* name to reference a style
3608 defined in filetypes.common.
3610 * ``key=named_style``
3611 * ``key2=named_style2,bold,italic``
3613 The bold and italic parts are optional, and if present are used to
3614 toggle the bold or italic flags to the opposite of the named style's
3615 flags. In contrast to style definition booleans, they are a literal
3616 ",bold,italic" and commas are used instead of semi-colons.
3618 E.g. ``key=comment,italic``
3620 This makes the key style match the ``"comment"`` named style, but with
3623 To define named styles, see the filetypes.common `[named_styles]
3630 This section contains keys for different keyword lists specific to
3631 the filetype. Some filetypes do not support keywords, so adding a
3632 new key will not work. You can only add or remove keywords to/from
3636 The keywords list must be in one line without line ending characters.
3639 [lexer_properties] Section
3640 ``````````````````````````
3641 Here any special properties for the Scintilla lexer can be set in the
3642 format ``key.name.field=some.value``.
3649 This is the default file extension used when saving files, not
3650 including the period character (``.``). The extension used should
3651 match one of the patterns associated with that filetype (see
3652 `Filetype extensions`_).
3654 *Example:* ``extension=cxx``
3657 These characters define word boundaries when making selections
3658 and searching using word matching options.
3660 *Example:* (look at system filetypes.\* files)
3663 This can be overridden by the *whitespace_chars*
3664 filetypes.common setting.
3667 A character or string which is used to comment code. If you want to
3668 use multiline comments, also set comment_close, otherwise leave it
3671 *Example:* ``comment_open=/*``
3674 If multiline comments are used, this is the character or string to
3677 *Example:* ``comment_close=*/``
3680 Set this to false if a comment character or string should start at
3681 column 0 of a line. If set to true it uses any indentation of the
3684 Note: Comment indentation
3686 ``comment_use_indent=true`` would generate this if a line is
3687 commented (e.g. with Ctrl-D)::
3691 ``comment_use_indent=false`` would generate this if a line is
3692 commented (e.g. with Ctrl-D)::
3694 # command_example();
3697 Note: This setting only works for single line comments (like '//',
3700 *Example:* ``comment_use_indent=true``
3703 A command which can be executed on the current word or the current
3706 Example usage: Open the API documentation for the
3707 current function call at the cursor position.
3710 be set for every filetype or if not set, a global command will
3711 be used. The command itself can be specified without the full
3712 path, then it is searched in $PATH. But for security reasons,
3713 it is recommended to specify the full path to the command. The
3714 wildcard %s will be replaced by the current word at the cursor
3715 position or by the current selection.
3717 Hint: for PHP files the following could be quite useful:
3718 context_action_cmd=firefox "http://www.php.net/%s"
3720 *Example:* ``context_action_cmd=devhelp -s "%s"``
3723 The TagManager language name, e.g. "C".
3726 A filetype name to setup syntax highlighting from another filetype.
3727 This must not be recursive, i.e. it should be a filetype name that
3728 doesn't use the lexer_filetype key itself.
3730 symbol_list_sort_mode
3731 What the default symbol list sort order should be.
3733 ===== =====================================
3735 ===== =====================================
3737 1 Sort tags by appearance (line number)
3738 ===== =====================================
3740 .. _xml_indent_tags:
3743 If this setting is set to *true*, a new line after a line ending with an
3744 unclosed XML/HTML tag will be automatically indented. This only applies
3745 to filetypes for which the HTML or XML lexer is used. Such filetypes have
3746 this setting in their system configuration files.
3749 [build_settings] Section
3750 ````````````````````````
3752 As of Geany 0.19 this section is supplemented by the `[build-menu] Section`_.
3753 Values that are set in the [build-menu] section will override those in this section.
3756 This is a GNU-style extended regular expression to parse a filename
3757 and line number from build output. If undefined, Geany will fall
3758 back to its default error message parsing.
3760 Only the first two matches will be read by Geany. Geany will look for
3761 a match that is purely digits, and use this for the line number. The
3762 remaining match will be used as the filename.
3764 *Example:* ``error_regex=(.+):([0-9]+):[0-9]+``
3766 This will parse a message such as:
3767 ``test.py:7:24: E202 whitespace before ']'``
3771 If any build menu item settings have been configured in the Build Menu Commands
3772 dialog or the Build tab of the project preferences dialog then these
3773 settings are stored in the [build-menu] section and override the settings in
3774 this section for that item.
3777 This item specifies the command to compile source code files. But
3778 it is also possible to use it with interpreted languages like Perl
3779 or Python. With these filetypes you can use this option as a kind of
3780 syntax parser, which sends output to the compiler message window.
3782 You should quote the filename to also support filenames with
3783 spaces. The following wildcards for filenames are available:
3785 * %f -- complete filename without path
3786 * %e -- filename without path and without extension
3788 *Example:* ``compiler=gcc -Wall -c "%f"``
3791 This item specifies the command to link the file. If the file is not
3792 already compiled, it will be compiled while linking. The -o option
3793 is automatically added by Geany. This item works well with GNU gcc,
3794 but may be problematic with other compilers (esp. with the linker).
3796 *Example:* ``linker=gcc -Wall "%f"``
3799 Use this item to execute your file. It has to have been built
3800 already. Use the %e wildcard to have only the name of the executable
3801 (i.e. without extension) or use the %f wildcard if you need the
3802 complete filename, e.g. for shell scripts.
3804 *Example:* ``run_cmd="./%e"``
3807 Special file filetypes.common
3808 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3810 There is a special filetype definition file called
3811 filetypes.common. This file defines some general non-filetype-specific
3815 See the `Filetype configuration`_ section for how to define styles.
3818 [named_styles] Section
3819 ``````````````````````
3820 Named styles declared here can be used in the [styling] section of any
3825 *In filetypes.common*::
3828 foo=0xc00000;0xffffff;false;true
3836 This saves copying and pasting the whole style definition into several
3840 You can define aliases for named styles, as shown with the ``bar``
3841 entry in the above example, but they must be declared after the
3848 This is the default style. It is used for styling files without a
3851 *Example:* ``default=0x000000;0xffffff;false;false``
3854 The style for coloring selected text. The format is:
3858 * Use foreground color
3859 * Use background color
3861 The colors are only set if the 3rd or 4th argument is true. When
3862 the colors are not overridden, the default is a dark grey
3863 background with syntax highlighted foreground text.
3865 *Example:* ``selection=0xc0c0c0;0x00007F;true;true``
3868 The style for brace highlighting when a matching brace was found.
3870 *Example:* ``brace_good=0xff0000;0xFFFFFF;true;false``
3873 The style for brace highlighting when no matching brace was found.
3875 *Example:* ``brace_bad=0x0000ff;0xFFFFFF;true;false``
3878 The style for coloring the caret(the blinking cursor). Only first
3879 and third argument is interpreted.
3880 Set the third argument to true to change the caret into a block caret.
3882 *Example:* ``caret=0x000000;0x0;false;false``
3885 The width for the caret(the blinking cursor). Only the first
3886 argument is interpreted. The width is specified in pixels with
3887 a maximum of three pixel. Use the width 0 to make the caret
3890 *Example:* ``caret=1;0;false;false``
3893 The style for coloring the background of the current line. Only
3894 the second and third arguments are interpreted. The second argument
3895 is the background color. Use the third argument to enable or
3896 disable background highlighting for the current line (has to be
3899 *Example:* ``current_line=0x0;0xe5e5e5;true;false``
3902 The style for coloring the indentation guides. Only the first and
3903 second arguments are interpreted.
3905 *Example:* ``indent_guide=0xc0c0c0;0xffffff;false;false``
3908 The style for coloring the white space if it is shown. The first
3909 both arguments define the foreground and background colors, the
3910 third argument sets whether to use the defined foreground color
3911 or to use the color defined by each filetype for the white space.
3912 The fourth argument defines whether to use the background color.
3914 *Example:* ``white_space=0xc0c0c0;0xffffff;true;true``
3917 Line number margin foreground and background colors.
3919 .. _Folding Settings:
3922 Fold margin foreground and background colors.
3924 fold_symbol_highlight
3925 Highlight color of folding symbols.
3928 The style of folding icons. Only first and second arguments are
3931 Valid values for the first argument are:
3938 Valid values for the second argument are:
3941 * 1 -- for straight lines
3942 * 2 -- for curved lines
3944 *Default:* ``folding_style=1;1;``
3946 *Arrows:* ``folding_style=3;0;``
3949 Draw a thin horizontal line at the line where text is folded. Only
3950 first argument is used.
3952 Valid values for the first argument are:
3954 * 0 -- disable, do not draw a line
3955 * 1 -- draw the line above folded text
3956 * 2 -- draw the line below folded text
3958 *Example:* ``folding_horiz_line=0;0;false;false``
3961 First argument: drawing of visual flags to indicate a line is wrapped.
3962 This is a bitmask of the values:
3964 * 0 -- No visual flags
3965 * 1 -- Visual flag at end of subline of a wrapped line
3966 * 2 -- Visual flag at begin of subline of a wrapped line. Subline is
3967 indented by at least 1 to make room for the flag.
3969 Second argument: wether the visual flags to indicate a line is wrapped
3970 are drawn near the border or near the text. This is a bitmask of the values:
3972 * 0 -- Visual flags drawn near border
3973 * 1 -- Visual flag at end of subline drawn near text
3974 * 2 -- Visual flag at begin of subline drawn near text
3976 Only first and second argument is interpreted.
3978 *Example:* ``line_wrap_visuals=3;0;false;false``
3981 First argument: sets the size of indentation of sublines for wrapped lines
3982 in terms of the width of a space, only used when the second argument is ``0``.
3984 Second argument: wrapped sublines can be indented to the position of their
3985 first subline or one more indent level. Possible values:
3987 * 0 - Wrapped sublines aligned to left of window plus amount set by the first argument
3988 * 1 - Wrapped sublines are aligned to first subline indent (use the same indentation)
3989 * 2 - Wrapped sublines are aligned to first subline indent plus one more level of indentation
3991 Only first and second argument is interpreted.
3993 *Example:* ``line_wrap_indent=0;1;false;false``
3996 Translucency for the current line (first argument) and the selection
3997 (second argument). Values between 0 and 256 are accepted.
3999 Note for Windows 95, 98 and ME users:
4000 keep this value at 256 to disable translucency otherwise Geany might crash.
4002 Only the first and second argument is interpreted.
4004 *Example:* ``translucency=256;256;false;false``
4007 The style for a highlighted line (e.g when using Goto line or goto tag).
4008 The foreground color (first argument) is only used when the Markers margin
4009 is enabled (see View menu).
4011 Only the first and second argument is interpreted.
4013 *Example:* ``marker_line=0x000000;0xffff00;false;false``
4016 The style for a marked search results (when using "Mark" in Search dialogs).
4017 The second argument sets the background colour for the drawn rectangle.
4019 Only the second argument is interpreted.
4021 *Example:* ``marker_search=0x000000;0xb8f4b8;false;false``
4024 The style for a marked line (e.g when using the "Toggle Marker" keybinding
4025 (Ctrl-M)). The foreground color (first argument) is only used
4026 when the Markers margin is enabled (see View menu).
4028 Only the first and second argument is interpreted.
4030 *Example:* ``marker_mark=0x000000;0xb8f4b8;false;false``
4033 Translucency for the line marker (first argument) and the search marker
4034 (second argument). Values between 0 and 256 are accepted.
4036 Note for Windows 95, 98 and ME users:
4037 keep this value at 256 to disable translucency otherwise Geany might crash.
4039 Only the first and second argument is interpreted.
4041 *Example:* ``marker_translucency=256;256;false;false``
4044 Amount of space to be drawn above and below the line's baseline.
4045 The first argument defines the amount of space to be drawn above the line, the second
4046 argument defines the amount of space to be drawn below.
4048 Only the first and second argument is interpreted.
4050 *Example:* ``line_height=0;0;false;false``
4053 The style for coloring the calltips. The first two arguments
4054 define the foreground and background colors, the third and fourth
4055 arguments set whether to use the defined colors.
4057 *Example:* ``calltips=0xc0c0c0;0xffffff;false;false``
4063 Characters to treat as whitespace. These characters are ignored
4064 when moving, selecting and deleting across word boundaries
4065 (see `Scintilla keyboard commands`_).
4067 This should include space (\\s) and tab (\\t).
4069 *Example:* ``whitespace_chars=\s\t!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~``
4076 To change the default filetype extension used when saving a new file,
4077 see `Filetype definition files`_.
4079 You can override the list of file extensions that Geany uses for each
4080 filetype using the ``filetype_extensions.conf`` file.
4082 To override the system-wide configuration file, copy it from
4083 ``$prefix/share/geany`` to your configuration directory, usually
4084 ``~/.config/geany/``. ``$prefix`` is the path where Geany is installed
4085 (see `Installation prefix`_).
4089 % cp /usr/local/share/geany/filetype_extensions.conf /home/username/.config/geany/
4091 Then edit it and remove all the lines for filetype extensions that
4092 you do not want to override. The remaining lines can be edited after
4093 the ``=`` sign, using a semi-colon separated list of patterns which
4094 should be matched for that filetype.
4096 For example, to set the filetype extensions for Make, the
4097 ``/home/username/.config/geany/filetype_extensions.conf`` file should
4101 Make=Makefile*;*.mk;Buildfile;
4103 Preferences File Format
4104 -----------------------
4106 The preferences file ``~/.config/geany/geany.conf`` holds settings for all the items configured
4107 in the preferences dialog. This file should not be edited while Geany is running
4108 as the file will be overwritten when the preferences in Geany are changed or Geany
4115 There are some rarely used preferences that are not shown in the Preferences
4116 dialog. These can be set by editing the preferences file, then
4117 restarting Geany. Search for the key name, then edit the value. Example:
4119 ``brace_match_ltgt=true``
4122 If you just installed or updated Geany, you should restart it
4123 first so Geany can write/update the config file and you can find
4126 The table below show the key names of hidden preferences in the
4129 ================================ =========================================== ==================
4130 Key Description Default
4131 ================================ =========================================== ==================
4133 brace_match_ltgt Whether to highlight <, > angle brackets. false
4134 use_gtk_word_boundaries Whether to look for the end of a word when true
4135 using word-boundary related Scintilla
4136 commands (see `Scintilla keyboard
4138 complete_snippets_whilst_editing Whether to allow completion of snippets false
4139 when editing an existing line (i.e. there
4140 is some text after the current cursor
4141 position on the line). Only used when the
4142 keybinding ``Complete snippet`` is set to
4144 show_editor_scrollbars Whether to display scrollbars. If set to true
4145 false, the horizontal and vertical
4146 scrollbars are hidden completely.
4147 **Interface related**
4148 show_symbol_list_expanders Whether to show or hide the small expander true
4149 icons on the symbol list treeview (only
4150 available with GTK 2.12 or above).
4151 allow_always_save Whether files can be saved always, even if false
4152 they don't have any changes. By default,
4153 the Save buttons and menu items are
4154 disabled when a file is unchanged. When
4155 setting this option to true, the Save
4156 buttons and menu items are always active
4157 and files can be saved.
4158 compiler_tab_autoscroll Whether to automatically scroll to the true
4159 last line of the output in the Compiler
4161 statusbar_template The status bar statistics line format. See below.
4162 (Search in src/ui_utils.c for details).
4163 new_document_after_close Whether to open a new document after all false
4164 documents have been closed.
4165 msgwin_status_visible Whether to show the Status tab in the true
4167 msgwin_compiler_visible Whether to show the Compiler tab in the true
4169 msgwin_messages_visible Whether to show the Messages tab in the true
4171 msgwin_scribble_visible Whether to show the Scribble tab in the true
4173 ================================ =========================================== ==================
4175 By default, statusbar_template is empty. This tells Geany to use its
4176 internal default, which is currently:
4178 ``line: %l / %L\t col: %c\t sel: %s\t %w %t %mmode: %M encoding: %e filetype: %f scope: %S``
4180 Note that ``\t`` = tab.
4182 ================================ =========================================== ==================
4183 Key Description Default
4184 ================================ =========================================== ==================
4186 emulation Terminal emulation mode. Only change this xterm
4187 if you have VTE termcap files other than
4188 ``vte/termcap/xterm``.
4189 send_selection_unsafe By default, Geany strips any trailing false
4190 newline characters from the current
4191 selection before sending it to the terminal
4192 to not execute arbitrary code. This is
4193 mainly a security feature.
4194 If, for whatever reasons, you really want
4195 it to be executed directly, set this option
4198 use_safe_file_saving Defines the mode how Geany saves files to false
4199 disk. If disabled, Geany directly writes
4200 the content of the document to disk. This
4201 might cause in loss of data when there is
4202 no more free space on disk to save the
4203 file. When set to true, Geany first saves
4204 the contents into a temporary file and if
4205 this succeeded, the temporary file is
4206 moved to the real file to save.
4207 This gives better error checking in case of
4208 no more free disk space. But it also
4209 destroys hard links of the original file
4210 and its permissions (e.g. executable flags
4211 are reset). Use this with care as it can
4212 break things seriously.
4213 The better approach would be to ensure your
4214 disk won't run out of free space.
4216 find_selection_type See `Find selection`_. 0
4217 **Build Menu related**
4218 number_ft_menu_items The maximum number of menu items in the 2
4219 filetype section of the Build menu.
4220 number_non_ft_menu_items The maximum number of menu items in the 3
4221 independent section of the Build menu.
4222 number_exec_menu_items The maximum number of menu items in the 2
4223 execute section of the Build menu.
4224 ================================ =========================================== ==================
4226 [build-menu] Section
4227 ^^^^^^^^^^^^^^^^^^^^
4229 The [build-menu] section contains the configuration of the build menu.
4230 This section can occur in filetype, preferences and project files and
4231 always has the format described here. Different menu items are loaded
4232 from different files, see the table in the `Build Menu Configuration`_
4233 section for details. All the settings can be configured from the dialogs
4234 except the execute command in filetype files and filetype definitions in
4235 the project file, so these are the only ones which need hand editing.
4237 The build-menu section stores one entry for each setting for each menu item that
4238 is configured. The keys for these settings have the format:
4244 * GG - is the menu item group,
4247 - NF for independent (non-filetype)
4250 * NN - is a two decimal digit number of the item within the group,
4252 * FF - is the field,
4256 - WD for working directory
4262 The project file contains project related settings and possibly a
4263 record of the current session files.
4266 [build-menu] Additions
4267 ^^^^^^^^^^^^^^^^^^^^^^
4269 The project file also can have extra fields in the [build-menu] section
4270 in addition to those listed in `[build-menu] Section`_ above.
4272 When filetype menu items are configured for the project they are stored
4273 in the project file.
4275 The ``filetypes`` entry is a list of the filetypes which exist in the
4278 For each filetype the entries for that filetype have the format defined in
4279 `[build-menu] Section`_ but the key is prefixed by the name of the filetype
4280 as it appears in the ``filetypes`` entry, eg the entry for the label of
4281 filetype menu item 0 for the C filetype would be
4289 Geany supports the following templates:
4293 * Function description
4298 To use these templates, just open the Edit menu or open the popup menu
4299 by right-clicking in the editor widget, and choose "Insert Comments"
4300 and insert templates as you want.
4302 Some templates (like File header or ChangeLog entry) will always be
4303 inserted at the top of the file.
4305 To insert a function description, the cursor must be inside
4306 of the function, so that the function name can be determined
4307 automatically. The description will be positioned correctly one line
4308 above the function, just check it out. If the cursor is not inside
4309 of a function or the function name cannot be determined, the inserted
4310 function description won't contain the correct function name but "unknown"
4314 Geany automatically reloads template information when it notices you
4315 save a file in the user's template configuration directory. You can
4316 also force this by selecting *Tools->Reload Configuration*.
4322 Meta data can be used with all templates, but by default user set
4323 meta data is only used for the ChangeLog and File header templates.
4325 In the configuration dialog you can find a tab "Templates" (see
4326 `Template preferences`_). You can define the default values
4327 which will be inserted in the templates. You should select
4328 *Tools->Reload Configuration* or restart Geany after making changes.
4334 File templates are templates used as the basis of a new file. To
4335 use them, choose the *New (with Template)* menu item from the *File*
4338 By default, file templates are installed for some filetypes. Custom
4339 file templates can be added by creating the appropriate template file. You can
4340 also edit the default file templates.
4342 The file's contents are just the text to place in the document, with
4343 optional template wildcards like ``{fileheader}``. The fileheader
4344 wildcard can be placed anywhere, but it's usually put on the first
4345 line of the file, followed by a blank line.
4347 Custom file templates
4348 `````````````````````
4350 These are read from the following directories:
4352 * ``$prefix/share/geany/templates/files`` (see `Installation prefix`_)
4353 * ``~/.config/geany/templates/files`` (created the first time
4356 The filetype to use is detected from the template file's extension, if
4357 any. For example, creating a file ``module.c`` would add a menu item
4358 which created a new document with the filetype set to 'C'.
4360 The template file is read from disk when the corresponding menu item is
4367 It's recommended to use custom file templates instead.
4369 Filetype template files are read from the ``~/.config/geany/templates``
4370 directory, and are named "filetype." followed by the filetype
4371 name, e.g. "filetype.python", "filetype.sh", etc. If you are
4372 unsure about the filetype name extensions, they are the same as
4373 the filetype configuration file extensions, commonly installed in
4374 ``/usr/share/geany``, with the prefix "filetypes.".
4376 There is also a template file ``filetype.none`` which is used when
4377 the New command is used without a filetype. This is empty by default.
4380 Customizing templates
4381 ^^^^^^^^^^^^^^^^^^^^^
4383 Each template can be customized to your needs. The templates are
4384 stored in the ``~/.config/geany/templates/`` directory (see the section called
4385 `Command line options`_ for further information about the configuration
4386 directory). Just open the desired template with an editor (ideally,
4387 Geany ;-) ) and edit the template to your needs. There are some
4388 wildcards which will be automatically replaced by Geany at startup.
4394 All wildcards must be enclosed by "{" and "}", e.g. {date}.
4396 **Wildcards for character escaping**
4398 ============== ============================================= =======================================
4399 Wildcard Description Available in
4400 ============== ============================================= =======================================
4401 ob { Opening Brace (used to prevent other file templates, file header, snippets.
4402 wildcards being expanded).
4403 cb } Closing Brace. file templates, file header, snippets.
4404 pc \% Percent (used to escape e.g. %block% in
4405 snippets). snippets.
4406 ============== ============================================= =======================================
4408 **Global wildcards**
4410 These are configurable, see `Template preferences`_.
4412 ============== ============================================= =======================================
4413 Wildcard Description Available in
4414 ============== ============================================= =======================================
4415 developer The name of the developer. file templates, file header,
4416 function description, ChangeLog entry,
4419 initial The developer's initials, e.g. "ET" for file templates, file header,
4420 Enrico Tröger or "JFD" for John Foobar Doe. function description, ChangeLog entry,
4423 mail The email address of the developer. file templates, file header,
4424 function description, ChangeLog entry,
4427 company The company the developer is working for. file templates, file header,
4428 function description, ChangeLog entry,
4431 version The initial version of a new file. file templates, file header,
4432 function description, ChangeLog entry,
4434 ============== ============================================= =======================================
4436 **Date & time wildcards**
4438 The format for these wildcards can be changed in the preferences
4439 dialog, see `Template preferences`_. You can use any conversion
4440 specifiers which can be used with the ANSI C strftime function.
4441 For details please see http://man.cx/strftime.
4443 ============== ============================================= =======================================
4444 Wildcard Description Available in
4445 ============== ============================================= =======================================
4446 year The current year. Default format is: YYYY. file templates, file header,
4447 function description, ChangeLog entry,
4450 date The current date. Default format: file templates, file header,
4451 YYYY-MM-DD. function description, ChangeLog entry,
4454 datetime The current date and time. Default format: file templates, file header,
4455 DD.MM.YYYY HH:mm:ss ZZZZ. function description, ChangeLog entry,
4457 ============== ============================================= =======================================
4459 **Dynamic wildcards**
4461 ============== ============================================= =======================================
4462 Wildcard Description Available in
4463 ============== ============================================= =======================================
4464 untitled The string "untitled" (this will be file templates, file header,
4465 translated to your locale), used in function description, ChangeLog entry,
4466 file templates. bsd, gpl, snippets.
4468 geanyversion The actual Geany version, e.g. file templates, file header,
4469 "Geany |(version)|". function description, ChangeLog entry,
4472 filename The filename of the current file. file header, snippets, file
4473 For new files, it's only replaced when templates.
4474 first saving if found on the first 3 lines
4477 project The current project's name, if any. file header, snippets, file templates.
4479 description The current project's description, if any. file header, snippets, file templates.
4481 functionname The function name of the function at the function description.
4482 cursor position. This wildcard will only be
4483 replaced in the function description
4486 command:path Executes the specified command and replace file templates, file header,
4487 the wildcard with the command's standard function description, ChangeLog entry,
4488 output. See `Special {command:} wildcard`_ bsd, gpl, snippets.
4490 ============== ============================================= =======================================
4492 **Template insertion wildcards**
4494 ============== ============================================= =======================================
4495 Wildcard Description Available in
4496 ============== ============================================= =======================================
4497 gpl This wildcard inserts a short GPL notice. file header.
4499 bsd This wildcard inserts a BSD licence notice. file header.
4501 fileheader The file header template. This wildcard snippets, file templates.
4502 will only be replaced in filetype
4504 ============== ============================================= =======================================
4507 Special {command:} wildcard
4508 ***************************
4510 The {command:} wildcard is a special one because it can execute
4511 a specified command and put the command's output (stdout) into
4520 Linux localhost 2.6.9-023stab046.2-smp #1 SMP Mon Dec 10 15:04:55 MSK 2007 x86_64 GNU/Linux
4522 Using this wildcard you can insert nearly any arbitrary text into the
4525 In the environment of the executed command the variables
4526 ``GEANY_FILENAME``, ``GEANY_FILETYPE`` and ``GEANY_FUNCNAME`` are set.
4527 The value of these variables is filled in only if Geany knows about it.
4528 For example, ``GEANY_FUNCNAME`` is only filled within the function
4529 description template. However, these variables are ``always`` set,
4530 just maybe with an empty value.
4531 You can easily access them e.g. within an executed shell script using::
4537 If the specified command could not be found or not executed, the wildcard is substituted
4538 by an empty string. In such cases, you can find the occurred error message on Geany's
4539 standard error and in the Help->Debug Messages dialog.
4542 Customizing the toolbar
4543 -----------------------
4545 You can add, remove and reorder the elements in the toolbar by using the toolbar editor
4546 by manually editing the file ``ui_toolbar.xml``.
4548 The toolbar editor can be opened from the preferences editor on the Toolbar tab or
4549 by right-clicking on the toolbar itself and choosing it from the menu.
4551 Manually editing of the toolbar layout
4552 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4554 To override the system-wide configuration file, copy it from
4555 ``$prefix/share/geany`` to your configuration directory, usually
4556 ``~/.config/geany/``. ``$prefix`` is the path where Geany is installed
4557 (see `Installation prefix`_).
4561 % cp /usr/local/share/geany/ui_toolbar.xml /home/username/.config/geany/
4563 Then edit it and add any of the available elements listed in the file or remove
4564 any of the existing elements. Of course, you can also reorder the elements as
4565 you wish and add or remove additional separators.
4566 This file must be valid XML, otherwise the global toolbar UI definition
4567 will be used instead.
4569 Your changes are applied once you save the file.
4572 (1) You cannot add new actions which are not listed below.
4573 (2) Everything you add or change must be inside the /ui/toolbar/ path.
4576 Available toolbar elements
4577 ^^^^^^^^^^^^^^^^^^^^^^^^^^
4579 ================== ==============================================================================
4580 Element name Description
4581 ================== ==============================================================================
4582 New Create a new file
4583 Open Open an existing file
4584 Save Save the current file
4585 SaveAll Save all open files
4586 Reload Reload the current file from disk
4587 Close Close the current file
4588 CloseAll Close all open files
4589 Print Print the current file
4590 Cut Cut the current selection
4591 Copy Copy the current selection
4592 Paste Paste the contents of the clipboard
4593 Delete Delete the current selection
4594 Undo Undo the last modification
4595 Redo Redo the last modification
4596 NavBack Navigate back a location
4597 NavFor Navigate forward a location
4598 Compile Compile the current file
4599 Build Build the current file, includes a submenu for Make commands. Geany
4600 remembers the last chosen action from the submenu and uses this as default
4601 action when the button itself is clicked.
4602 Run Run or view the current file
4603 Color Open a color chooser dialog, to interactively pick colors from a palette
4604 ZoomIn Zoom in the text
4605 ZoomOut Zoom out the text
4606 UnIndent Decrease indentation
4607 Indent Increase indentation
4608 Replace Replace text in the current document
4609 SearchEntry The search field belonging to the 'Search' element (can be used alone)
4610 Search Find the entered text in the current file (only useful if you also
4612 GotoEntry The goto field belonging to the 'Goto' element (can be used alone)
4613 Goto Jump to the entered line number (only useful if you also use 'GotoEntry')
4614 Preferences Show the preferences dialog
4616 ================== ==============================================================================
4620 Plugin documentation
4621 ====================
4626 The HTMLChars plugin helps when working with special characters in
4627 XML/HTML, e.g. German Umlauts ü and ä.
4630 Insert entity dialog
4631 ^^^^^^^^^^^^^^^^^^^^
4633 When the plugin is enabled, you can insert special character
4634 entities using *Tools->Insert Special HTML Characters*.
4636 This opens up a dialog where you can find a huge amount of special
4637 characters sorted by category that you might like to use inside your
4638 document. You can expand and collapse the categories by clicking on
4639 the little arrow on the left hand side. Once you have found the
4640 desired character click on it and choose "Insert". This will insert
4641 the entity for the character at the current cursor position. You
4642 might also like to double click the chosen entity instead.
4645 Replace special chars by its entity
4646 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4648 To help make a XML/HTML document valid the plugin supports
4649 replacement of special chars known by the plugin. Both bulk
4650 replacement and immediate replacement during typing are supported.
4652 A few characters will not be replaced. These are
4663 You can activate/deactivate this feature using the *Tools->HTML
4664 Replacement->Auto-replace Special Characters* menu item. If it's
4665 activated, all special characters (beside the given exceptions from
4666 above) known by the plugin will be replaced by their entities.
4668 You could also set a keybinding for the plugin to toggle the status
4675 After inserting a huge amount of text, e.g. by using copy & paste, the
4676 plugin allows bulk replacement of all known characters (beside the
4677 mentioned exceptions). You can find the function under the same
4678 menu at *Tools->HTML Replacement->Replace Characters in Selection*, or
4679 configure a keybinding for the plugin.
4687 This plugin sets on every new file (*File->New* or *File->New (with template)*)
4688 a randomly chosen filename and set its filetype appropriate to the used template
4689 or when no template was used, to a configurable default filetype.
4690 This enables you to quickly compile, build and/or run the new file without the
4691 need to give it an explicit filename using the Save As dialog. This might be
4692 useful when you often create new files just for testing some code or something
4699 This plugin creates a backup copy of the current file in Geany when it is
4700 saved. You can specify the directory where the backup copy is saved and
4701 you can configure the automatically added extension in the configure dialog
4702 in Geany's plugin manager.
4704 After the plugin was loaded in Geany's plugin manager, every file is
4705 copied into the configured backup directory when the file is saved in Geany.
4709 Contributing to this document
4710 =============================
4712 This document (``geany.txt``) is written in `reStructuredText`__
4713 (or "reST"). The source file for it is located in Geany's ``doc``
4714 subdirectory. If you intend on making changes, you should grab the
4715 source right from SVN to make sure you've got the newest version. After
4716 editing the file, to build the HTML document to see how your changes
4717 look, run "``make doc``" in the subdirectory ``doc`` of Geany's source
4718 directory. This regenerates the ``geany.html`` file. To generate a PDF
4719 file, use the command "``make pdf``" which should generate a file called
4720 geany-|(version)|.pdf.
4722 __ http://docutils.sourceforge.net/rst.html
4724 After you are happy with your changes, create a patch::
4726 % svn diff geany.txt > foo.patch
4728 and then submit that file to the mailing list for review.
4730 Note, you will need the Python docutils software package installed
4731 to build the docs. The package is named ``python-docutils`` on Debian
4737 Scintilla keyboard commands
4738 ===========================
4740 Copyright © 1998, 2006 Neil Hodgson <neilh(at)scintilla(dot)org>
4742 This appendix is distributed under the terms of the License for
4743 Scintilla and SciTE. A copy of this license can be found in the file
4744 ``scintilla/License.txt`` included with the source code of this
4745 program and in the appendix of this document. See `License for
4746 Scintilla and SciTE`_.
4755 Keyboard commands for Scintilla mostly follow common Windows and GTK+
4756 conventions. All move keys (arrows, page up/down, home and end)
4757 allows to extend or reduce the stream selection when holding the
4758 Shift key, and the rectangular selection when holding the Shift and
4759 Ctrl keys. Some keys may not be available with some national keyboards
4760 or because they are taken by the system such as by a window manager
4761 or GTK. Keyboard equivalents of menu commands are listed in the
4762 menus. Some less common commands with no menu equivalent are:
4764 ============================================= ======================
4766 ============================================= ======================
4767 Magnify text size. Ctrl+Keypad+
4768 Reduce text size. Ctrl+Keypad-
4769 Restore text size to normal. Ctrl+Keypad/
4771 Dedent block. Shift+Tab
4772 Delete to start of word. Ctrl+BackSpace
4773 Delete to end of word. Ctrl+Delete
4774 Delete to start of line. Ctrl+Shift+BackSpace
4775 Go to start of document. Ctrl+Home
4776 Extend selection to start of document. Ctrl+Shift+Home
4777 Go to start of display line. Alt+Home
4778 Extend selection to start of display line. Alt+Shift+Home
4779 Go to end of document. Ctrl+End
4780 Extend selection to end of document. Ctrl+Shift+End
4781 Extend selection to end of display line. Alt+Shift+End
4782 Previous paragraph. Shift extends selection. Ctrl+Up
4783 Next paragraph. Shift extends selection. Ctrl+Down
4784 Previous word. Shift extends selection. Ctrl+Left
4785 Next word. Shift extends selection. Ctrl+Right
4786 ============================================= ======================
4797 * Double-click on empty space in the notebook tab bar to open a
4799 * Middle-click on a document's notebook tab to close the document.
4800 * Hold `Ctrl` and click on any notebook tab to switch to the last used
4802 * Double-click on a document's notebook tab to toggle all additional
4803 widgets (to show them again use the View menu or the keyboard
4804 shortcut). The interface pref must be enabled for this to work.
4809 * Alt-scroll wheel moves up/down a page.
4810 * Ctrl-scroll wheel zooms in/out.
4811 * Shift-scroll wheel scrolls 8 characters right/left.
4812 * Ctrl-click on a word in a document to perform *Go to Tag Definition*.
4813 * Ctrl-click on a bracket/brace to perform *Go to Matching Brace*.
4818 * Double-click on a symbol-list group to expand or compact it.
4823 * Scrolling the mouse wheel over a notebook tab bar will switch
4826 The following are derived from X-Windows features (but GTK still supports
4829 * Middle-click pastes the last selected text.
4830 * Middle-click on a scrollbar moves the scrollbar to that
4831 position without having to drag it.
4835 Compile-time options
4836 ====================
4838 There are some options which can only be changed at compile time,
4839 and some options which are used as the default for configurable
4840 options. To change these options, edit the appropriate source file
4841 in the ``src`` subdirectory. Look for a block of lines starting with
4842 ``#define GEANY_*``. Any definitions which are not listed here should
4846 Most users should not need to change these options.
4851 ============================== ============================================ ==================
4852 Option Description Default
4853 ============================== ============================================ ==================
4854 GEANY_STRING_UNTITLED A string used as the default name for new untitled
4855 files. Be aware that the string can be
4856 translated, so change it only if you know
4858 GEANY_WINDOW_MINIMAL_WIDTH The minimal width of the main window. 620
4859 GEANY_WINDOW_MINIMAL_HEIGHT The minimal height of the main window. 440
4860 GEANY_WINDOW_DEFAULT_WIDTH The default width of the main window at the 900
4862 GEANY_WINDOW_DEFAULT_HEIGHT The default height of the main window at the 600
4864 **Windows specific**
4865 GEANY_USE_WIN32_DIALOG Set this to 1 if you want to use the default 0
4866 Windows file open and save dialogs instead
4867 GTK's file open and save dialogs. The
4868 default Windows file dialogs are missing
4869 some nice features like choosing a filetype
4870 or an encoding. *Do not touch this setting
4871 when building on a non-Win32 system.*
4872 ============================== ============================================ ==================
4877 ============================== ============================================ ==================
4878 Option Description Default
4879 ============================== ============================================ ==================
4880 GEANY_PROJECT_EXT The default filename extension for Geany geany
4881 project files. It is used when creating new
4882 projects and as filter mask for the project
4884 ============================== ============================================ ==================
4889 ============================== ============================================ ==================
4890 Option Description Default
4891 ============================== ============================================ ==================
4892 GEANY_WORDCHARS These characters define word boundaries when a string with:
4893 making selections and searching using word a-z, A-Z, 0-9 and
4894 matching options. underscore.
4895 ============================== ============================================ ==================
4900 These are default settings that can be overridden in the `Preferences`_ dialog.
4902 ============================== ============================================ ==================
4903 Option Description Default
4904 ============================== ============================================ ==================
4905 GEANY_MIN_SYMBOLLIST_CHARS How many characters you need to type to 4
4906 trigger the autocompletion list.
4907 GEANY_DISK_CHECK_TIMEOUT Time in seconds between checking a file for 30
4909 GEANY_DEFAULT_TOOLS_MAKE The make tool. This can also include a path. "make"
4910 GEANY_DEFAULT_TOOLS_TERMINAL A terminal emulator. It has to accept the "xterm"
4911 command line option "-e". This can also
4913 GEANY_DEFAULT_TOOLS_BROWSER A web browser. This can also include a path. "firefox"
4914 GEANY_DEFAULT_TOOLS_PRINTCMD A printing tool. It should be able to accept "lpr"
4915 and process plain text files. This can also
4917 GEANY_DEFAULT_TOOLS_GREP A grep tool. It should be compatible with "grep"
4918 GNU grep. This can also include a path.
4919 GEANY_DEFAULT_MRU_LENGTH The length of the "Recent files" list. 10
4920 GEANY_DEFAULT_FONT_SYMBOL_LIST The font used in sidebar to show symbols and "Sans 9"
4922 GEANY_DEFAULT_FONT_MSG_WINDOW The font used in the messages window. "Sans 9"
4923 GEANY_DEFAULT_FONT_EDITOR The font used in the editor window. "Monospace 10"
4924 GEANY_TOGGLE_MARK A string which is used to mark a toggled "~ "
4926 GEANY_MAX_AUTOCOMPLETE_WORDS How many autocompletion suggestions should 30
4928 ============================== ============================================ ==================
4933 ============================== ============================================ ==================
4934 Option Description Default
4935 ============================== ============================================ ==================
4936 GEANY_BUILD_ERR_HIGHLIGHT_MAX Amount of build error indicators to 50
4937 be shown in the editor window.
4938 This affects the special coloring
4939 when Geany detects a compiler output line as
4940 an error message and then highlights the
4941 corresponding line in the source code.
4942 Usually only the first few messages are
4943 interesting because following errors are
4945 All errors in the Compiler window are parsed
4946 and unaffected by this value.
4947 PRINTBUILDCMDS Every time a build menu item priority FALSE
4948 calculation is run, print the state of the
4949 menu item table in the form of the table
4950 in `Build Menu Configuration`_. May be
4951 useful to debug configuration file
4952 overloading. Warning produces a lot of
4953 output. Can also be enabled/disabled by the
4954 debugger by setting printbuildcmds to 1/0
4955 overriding the compile setting.
4956 ============================== ============================================ ==================
4960 GNU General Public License
4961 ==========================
4965 GNU GENERAL PUBLIC LICENSE
4966 Version 2, June 1991
4968 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
4969 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
4970 Everyone is permitted to copy and distribute verbatim copies
4971 of this license document, but changing it is not allowed.
4975 The licenses for most software are designed to take away your
4976 freedom to share and change it. By contrast, the GNU General Public
4977 License is intended to guarantee your freedom to share and change free
4978 software--to make sure the software is free for all its users. This
4979 General Public License applies to most of the Free Software
4980 Foundation's software and to any other program whose authors commit to
4981 using it. (Some other Free Software Foundation software is covered by
4982 the GNU Library General Public License instead.) You can apply it to
4985 When we speak of free software, we are referring to freedom, not
4986 price. Our General Public Licenses are designed to make sure that you
4987 have the freedom to distribute copies of free software (and charge for
4988 this service if you wish), that you receive source code or can get it
4989 if you want it, that you can change the software or use pieces of it
4990 in new free programs; and that you know you can do these things.
4992 To protect your rights, we need to make restrictions that forbid
4993 anyone to deny you these rights or to ask you to surrender the rights.
4994 These restrictions translate to certain responsibilities for you if you
4995 distribute copies of the software, or if you modify it.
4997 For example, if you distribute copies of such a program, whether
4998 gratis or for a fee, you must give the recipients all the rights that
4999 you have. You must make sure that they, too, receive or can get the
5000 source code. And you must show them these terms so they know their
5003 We protect your rights with two steps: (1) copyright the software, and
5004 (2) offer you this license which gives you legal permission to copy,
5005 distribute and/or modify the software.
5007 Also, for each author's protection and ours, we want to make certain
5008 that everyone understands that there is no warranty for this free
5009 software. If the software is modified by someone else and passed on, we
5010 want its recipients to know that what they have is not the original, so
5011 that any problems introduced by others will not reflect on the original
5012 authors' reputations.
5014 Finally, any free program is threatened constantly by software
5015 patents. We wish to avoid the danger that redistributors of a free
5016 program will individually obtain patent licenses, in effect making the
5017 program proprietary. To prevent this, we have made it clear that any
5018 patent must be licensed for everyone's free use or not licensed at all.
5020 The precise terms and conditions for copying, distribution and
5021 modification follow.
5023 GNU GENERAL PUBLIC LICENSE
5024 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
5026 0. This License applies to any program or other work which contains
5027 a notice placed by the copyright holder saying it may be distributed
5028 under the terms of this General Public License. The "Program", below,
5029 refers to any such program or work, and a "work based on the Program"
5030 means either the Program or any derivative work under copyright law:
5031 that is to say, a work containing the Program or a portion of it,
5032 either verbatim or with modifications and/or translated into another
5033 language. (Hereinafter, translation is included without limitation in
5034 the term "modification".) Each licensee is addressed as "you".
5036 Activities other than copying, distribution and modification are not
5037 covered by this License; they are outside its scope. The act of
5038 running the Program is not restricted, and the output from the Program
5039 is covered only if its contents constitute a work based on the
5040 Program (independent of having been made by running the Program).
5041 Whether that is true depends on what the Program does.
5043 1. You may copy and distribute verbatim copies of the Program's
5044 source code as you receive it, in any medium, provided that you
5045 conspicuously and appropriately publish on each copy an appropriate
5046 copyright notice and disclaimer of warranty; keep intact all the
5047 notices that refer to this License and to the absence of any warranty;
5048 and give any other recipients of the Program a copy of this License
5049 along with the Program.
5051 You may charge a fee for the physical act of transferring a copy, and
5052 you may at your option offer warranty protection in exchange for a fee.
5054 2. You may modify your copy or copies of the Program or any portion
5055 of it, thus forming a work based on the Program, and copy and
5056 distribute such modifications or work under the terms of Section 1
5057 above, provided that you also meet all of these conditions:
5059 a) You must cause the modified files to carry prominent notices
5060 stating that you changed the files and the date of any change.
5062 b) You must cause any work that you distribute or publish, that in
5063 whole or in part contains or is derived from the Program or any
5064 part thereof, to be licensed as a whole at no charge to all third
5065 parties under the terms of this License.
5067 c) If the modified program normally reads commands interactively
5068 when run, you must cause it, when started running for such
5069 interactive use in the most ordinary way, to print or display an
5070 announcement including an appropriate copyright notice and a
5071 notice that there is no warranty (or else, saying that you provide
5072 a warranty) and that users may redistribute the program under
5073 these conditions, and telling the user how to view a copy of this
5074 License. (Exception: if the Program itself is interactive but
5075 does not normally print such an announcement, your work based on
5076 the Program is not required to print an announcement.)
5078 These requirements apply to the modified work as a whole. If
5079 identifiable sections of that work are not derived from the Program,
5080 and can be reasonably considered independent and separate works in
5081 themselves, then this License, and its terms, do not apply to those
5082 sections when you distribute them as separate works. But when you
5083 distribute the same sections as part of a whole which is a work based
5084 on the Program, the distribution of the whole must be on the terms of
5085 this License, whose permissions for other licensees extend to the
5086 entire whole, and thus to each and every part regardless of who wrote it.
5088 Thus, it is not the intent of this section to claim rights or contest
5089 your rights to work written entirely by you; rather, the intent is to
5090 exercise the right to control the distribution of derivative or
5091 collective works based on the Program.
5093 In addition, mere aggregation of another work not based on the Program
5094 with the Program (or with a work based on the Program) on a volume of
5095 a storage or distribution medium does not bring the other work under
5096 the scope of this License.
5098 3. You may copy and distribute the Program (or a work based on it,
5099 under Section 2) in object code or executable form under the terms of
5100 Sections 1 and 2 above provided that you also do one of the following:
5102 a) Accompany it with the complete corresponding machine-readable
5103 source code, which must be distributed under the terms of Sections
5104 1 and 2 above on a medium customarily used for software interchange; or,
5106 b) Accompany it with a written offer, valid for at least three
5107 years, to give any third party, for a charge no more than your
5108 cost of physically performing source distribution, a complete
5109 machine-readable copy of the corresponding source code, to be
5110 distributed under the terms of Sections 1 and 2 above on a medium
5111 customarily used for software interchange; or,
5113 c) Accompany it with the information you received as to the offer
5114 to distribute corresponding source code. (This alternative is
5115 allowed only for noncommercial distribution and only if you
5116 received the program in object code or executable form with such
5117 an offer, in accord with Subsection b above.)
5119 The source code for a work means the preferred form of the work for
5120 making modifications to it. For an executable work, complete source
5121 code means all the source code for all modules it contains, plus any
5122 associated interface definition files, plus the scripts used to
5123 control compilation and installation of the executable. However, as a
5124 special exception, the source code distributed need not include
5125 anything that is normally distributed (in either source or binary
5126 form) with the major components (compiler, kernel, and so on) of the
5127 operating system on which the executable runs, unless that component
5128 itself accompanies the executable.
5130 If distribution of executable or object code is made by offering
5131 access to copy from a designated place, then offering equivalent
5132 access to copy the source code from the same place counts as
5133 distribution of the source code, even though third parties are not
5134 compelled to copy the source along with the object code.
5136 4. You may not copy, modify, sublicense, or distribute the Program
5137 except as expressly provided under this License. Any attempt
5138 otherwise to copy, modify, sublicense or distribute the Program is
5139 void, and will automatically terminate your rights under this License.
5140 However, parties who have received copies, or rights, from you under
5141 this License will not have their licenses terminated so long as such
5142 parties remain in full compliance.
5144 5. You are not required to accept this License, since you have not
5145 signed it. However, nothing else grants you permission to modify or
5146 distribute the Program or its derivative works. These actions are
5147 prohibited by law if you do not accept this License. Therefore, by
5148 modifying or distributing the Program (or any work based on the
5149 Program), you indicate your acceptance of this License to do so, and
5150 all its terms and conditions for copying, distributing or modifying
5151 the Program or works based on it.
5153 6. Each time you redistribute the Program (or any work based on the
5154 Program), the recipient automatically receives a license from the
5155 original licensor to copy, distribute or modify the Program subject to
5156 these terms and conditions. You may not impose any further
5157 restrictions on the recipients' exercise of the rights granted herein.
5158 You are not responsible for enforcing compliance by third parties to
5161 7. If, as a consequence of a court judgment or allegation of patent
5162 infringement or for any other reason (not limited to patent issues),
5163 conditions are imposed on you (whether by court order, agreement or
5164 otherwise) that contradict the conditions of this License, they do not
5165 excuse you from the conditions of this License. If you cannot
5166 distribute so as to satisfy simultaneously your obligations under this
5167 License and any other pertinent obligations, then as a consequence you
5168 may not distribute the Program at all. For example, if a patent
5169 license would not permit royalty-free redistribution of the Program by
5170 all those who receive copies directly or indirectly through you, then
5171 the only way you could satisfy both it and this License would be to
5172 refrain entirely from distribution of the Program.
5174 If any portion of this section is held invalid or unenforceable under
5175 any particular circumstance, the balance of the section is intended to
5176 apply and the section as a whole is intended to apply in other
5179 It is not the purpose of this section to induce you to infringe any
5180 patents or other property right claims or to contest validity of any
5181 such claims; this section has the sole purpose of protecting the
5182 integrity of the free software distribution system, which is
5183 implemented by public license practices. Many people have made
5184 generous contributions to the wide range of software distributed
5185 through that system in reliance on consistent application of that
5186 system; it is up to the author/donor to decide if he or she is willing
5187 to distribute software through any other system and a licensee cannot
5190 This section is intended to make thoroughly clear what is believed to
5191 be a consequence of the rest of this License.
5193 8. If the distribution and/or use of the Program is restricted in
5194 certain countries either by patents or by copyrighted interfaces, the
5195 original copyright holder who places the Program under this License
5196 may add an explicit geographical distribution limitation excluding
5197 those countries, so that distribution is permitted only in or among
5198 countries not thus excluded. In such case, this License incorporates
5199 the limitation as if written in the body of this License.
5201 9. The Free Software Foundation may publish revised and/or new versions
5202 of the General Public License from time to time. Such new versions will
5203 be similar in spirit to the present version, but may differ in detail to
5204 address new problems or concerns.
5206 Each version is given a distinguishing version number. If the Program
5207 specifies a version number of this License which applies to it and "any
5208 later version", you have the option of following the terms and conditions
5209 either of that version or of any later version published by the Free
5210 Software Foundation. If the Program does not specify a version number of
5211 this License, you may choose any version ever published by the Free Software
5214 10. If you wish to incorporate parts of the Program into other free
5215 programs whose distribution conditions are different, write to the author
5216 to ask for permission. For software which is copyrighted by the Free
5217 Software Foundation, write to the Free Software Foundation; we sometimes
5218 make exceptions for this. Our decision will be guided by the two goals
5219 of preserving the free status of all derivatives of our free software and
5220 of promoting the sharing and reuse of software generally.
5224 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
5225 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
5226 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
5227 PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
5228 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
5229 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
5230 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
5231 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
5232 REPAIR OR CORRECTION.
5234 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
5235 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
5236 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
5237 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
5238 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
5239 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
5240 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
5241 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
5242 POSSIBILITY OF SUCH DAMAGES.
5244 END OF TERMS AND CONDITIONS
5246 How to Apply These Terms to Your New Programs
5248 If you develop a new program, and you want it to be of the greatest
5249 possible use to the public, the best way to achieve this is to make it
5250 free software which everyone can redistribute and change under these terms.
5252 To do so, attach the following notices to the program. It is safest
5253 to attach them to the start of each source file to most effectively
5254 convey the exclusion of warranty; and each file should have at least
5255 the "copyright" line and a pointer to where the full notice is found.
5257 <one line to give the program's name and a brief idea of what it does.>
5258 Copyright (C) <year> <name of author>
5260 This program is free software; you can redistribute it and/or modify
5261 it under the terms of the GNU General Public License as published by
5262 the Free Software Foundation; either version 2 of the License, or
5263 (at your option) any later version.
5265 This program is distributed in the hope that it will be useful,
5266 but WITHOUT ANY WARRANTY; without even the implied warranty of
5267 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5268 GNU General Public License for more details.
5270 You should have received a copy of the GNU General Public License
5271 along with this program; if not, write to the Free Software
5272 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
5275 Also add information on how to contact you by electronic and paper mail.
5277 If the program is interactive, make it output a short notice like this
5278 when it starts in an interactive mode:
5280 Gnomovision version 69, Copyright (C) year name of author
5281 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
5282 This is free software, and you are welcome to redistribute it
5283 under certain conditions; type `show c' for details.
5285 The hypothetical commands `show w' and `show c' should show the appropriate
5286 parts of the General Public License. Of course, the commands you use may
5287 be called something other than `show w' and `show c'; they could even be
5288 mouse-clicks or menu items--whatever suits your program.
5290 You should also get your employer (if you work as a programmer) or your
5291 school, if any, to sign a "copyright disclaimer" for the program, if
5292 necessary. Here is a sample; alter the names:
5294 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
5295 `Gnomovision' (which makes passes at compilers) written by James Hacker.
5297 <signature of Ty Coon>, 1 April 1989
5298 Ty Coon, President of Vice
5300 This General Public License does not permit incorporating your program into
5301 proprietary programs. If your program is a subroutine library, you may
5302 consider it more useful to permit linking proprietary applications with the
5303 library. If this is what you want to do, use the GNU Library General
5304 Public License instead of this License.
5309 License for Scintilla and SciTE
5310 ===============================
5312 Copyright 1998-2003 by Neil Hodgson <neilh(at)scintilla(dot)org>
5316 Permission to use, copy, modify, and distribute this software and
5317 its documentation for any purpose and without fee is hereby granted,
5318 provided that the above copyright notice appear in all copies and
5319 that both that copyright notice and this permission notice appear in
5320 supporting documentation.
5322 NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
5323 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
5324 NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
5325 CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
5326 OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
5327 OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
5328 USE OR PERFORMANCE OF THIS SOFTWARE.