1 .. |(version)| replace:: 1.24
2 .. -*- reStructuredText -*-
8 -------------------------
9 A fast, light, GTK+ IDE
10 -------------------------
12 :Authors: Enrico Tröger,
22 This document is distributed under the terms of the GNU General Public
23 License as published by the Free Software Foundation; either version 2
24 of the License, or (at your option) any later version. A copy of this
25 license can be found in the file COPYING included with the source code
26 of this program, and also in the chapter `GNU General Public License`_.
40 Geany is a small and lightweight Integrated Development Environment. It
41 was developed to provide a small and fast IDE, which has only a few
42 dependencies on other packages. Another goal was to be as independent
43 as possible from a particular Desktop Environment like KDE or GNOME -
44 Geany only requires the GTK2 runtime libraries.
46 Some basic features of Geany:
50 * Autocompletion of symbols/words
51 * Construct completion/snippets
52 * Auto-closing of XML and HTML tags
54 * Many supported filetypes including C, Java, PHP, HTML, Python, Perl,
58 * Build system to compile and execute your code
59 * Simple project management
67 You can obtain Geany from http://www.geany.org/ or perhaps also from
68 your distribution. For a list of available packages, please see
69 http://www.geany.org/Download/ThirdPartyPackages.
76 Geany is distributed under the terms of the GNU General Public License
77 as published by the Free Software Foundation; either version 2 of
78 the License, or (at your option) any later version. A copy of this
79 license can be found in the file COPYING included with the source
80 code of this program and in the chapter, `GNU General Public License`_.
82 The included Scintilla library (found in the subdirectory
83 ``scintilla/``) has its own license, which can be found in the chapter,
84 `License for Scintilla and SciTE`_.
91 This documentation is available in HTML and text formats.
92 The latest version can always be found at http://www.geany.org/.
94 If you want to contribute to it, see `Contributing to this document`_.
106 You will need the GTK (>= 2.16.0) libraries and their dependencies
107 (Pango, GLib and ATK). Your distro should provide packages for these,
108 usually installed by default. For Windows, you can download an installer
109 from the website which bundles these libraries.
115 There are many binary packages available. For an up-to-date but maybe
116 incomplete list see http://www.geany.org/Download/ThirdPartyPackages.
122 Compiling Geany is quite easy.
123 To do so, you need the GTK (>= 2.16.0) libraries and header files.
124 You also need the Pango, GLib and ATK libraries and header files.
125 All these files are available at http://www.gtk.org, but very often
126 your distro will provide development packages to save the trouble of
127 building these yourself.
129 Furthermore you need, of course, a C and C++ compiler. The GNU versions
130 of these tools are recommended.
132 Autotools based build system
133 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
135 The Autotools based build system is very mature and has been well tested.
136 To use it, you just need the Make tool, preferably GNU Make.
138 Then run the following commands::
151 Waf based build system
152 ^^^^^^^^^^^^^^^^^^^^^^
154 The Waf build system is still quite young and under heavy development but already in a
155 usable state. In contrast to the Autotools system, Waf needs Python. So before using Waf, you need
156 to install Python on your system.
157 The advantage of the Waf build system over the Autotools based build system is that the whole
158 build process might be a bit faster. Especially when you use the Waf
159 cache feature for repetitive builds (e.g. when changing only a few source files
160 to test something) will become much faster since Waf will cache and re-use the
161 unchanged built files and only compile the changed code again. See `Waf Cache`_ for details.
162 To build Geany with Waf as run::
174 The Waf build system has a nice and interesting feature which can help to avoid
175 a lot of unnecessary rebuilding of unchanged code. This often happens when developing new features
176 or trying to debug something in Geany.
177 Waf is able to store and retrieve the object files from a cache. This cache is declared
178 using the environment variable ``WAFCACHE``.
179 A possible location of the cache directory could be ``~/.cache/waf``. In order to make use of
180 this, you first need to create this directory::
182 $ mkdir -p ~/.cache/waf
184 then add the environment variable to your shell configuration (the following example is for
185 Bash and should be adjusted to your used shell)::
187 export WAFCACHE=/home/username/.cache/waf
189 Remember to replace ``username`` with your actual username.
191 More information about the Waf cache feature are available at
192 http://code.google.com/p/waf/wiki/CacheObjectFiles.
196 You should be careful about the size of the cache directory as it may
197 grow rapidly over time.
198 Waf doesn't do any cleaning or other house-keeping of the cache yet, so you need to keep it
200 An easy way to keep it clean is to run the following command regularly to remove old
203 $ find /home/username/.cache/waf -mtime +14 -exec rm {} \;
205 This will delete all files in the cache directory which are older than 14 days.
207 For details about the ``find`` command and its options, check its manual page.
212 The configure script supports several common options, for a detailed
220 (depending on which build system you use).
222 You may also want to read the INSTALL file for advanced installation
225 * See also `Compile-time options`_.
227 Dynamic linking loader support and VTE
228 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
229 In the case that your system lacks dynamic linking loader support, you
230 probably want to pass the option ``--disable-vte`` to the ``configure``
231 script. This prevents compiling Geany with dynamic linking loader
232 support for automatically loading ``libvte.so.4`` if available.
236 If there are any errors during compilation, check your build
237 environment and try to find the error, otherwise contact the mailing
238 list or one the authors. Sometimes you might need to ask for specific
239 help from your distribution.
244 If you want to find Geany's system files after installation you may
245 want to know the installation prefix.
247 Pass the ``--print-prefix`` option to Geany to check this - see
248 `Command line options`_. The first path is the prefix.
250 On Unix-like systems this is commonly ``/usr`` if you installed from
251 a binary package, or ``/usr/local`` if you build from source.
254 Editing system files is not necessary as you should use the
255 per-user configuration files instead, which don't need root
256 permissions. See `Configuration files`_.
266 You can start Geany in the following ways:
268 * From the Desktop Environment menu:
270 Choose in your application menu of your used Desktop Environment:
271 Development --> Geany.
273 At Windows-systems you will find Geany after installation inside
274 the application menu within its special folder.
276 * From the command line:
278 To start Geany from a command line, type the following and press
286 The Geany window is shown in the following figure:
288 .. image:: ./images/main_window.png
290 The workspace has the following parts:
293 * An optional toolbar.
294 * An optional sidebar that can show the following tabs:
296 * Documents - A document list, and
297 * Symbols - A list of symbols in your code.
299 * The main editor window.
300 * An optional message window which can show the following tabs:
302 * Status - A list of status messages.
303 * Compiler - The output of compiling or building programs.
304 * Messages - Results of 'Find Usage', 'Find in Files' and other actions
305 * Scribble - A text scratchpad for any use.
306 * Terminal - An optional terminal window.
310 Most of these can be configured in the `Interface preferences`_, the
311 `View menu`_, or the popup menu for the relevant area.
313 Additional tabs may be added to the sidebar and message window by plugins.
315 The position of the tabs can be selected in the interface preferences.
317 The sizes of the sidebar and message window can be adjusted by
318 dragging the dividers.
323 ============ ======================= =================================================
324 Short option Long option Function
325 ============ ======================= =================================================
326 *none* +number Set initial line number for the first opened file
327 (same as --line, do not put a space between the + sign
328 and the number). E.g. "geany +7 foo.bar" will open the
329 file foo.bar and place the cursor in line 7.
331 *none* --column Set initial column number for the first opened file.
333 -c dir_name --config=directory_name Use an alternate configuration directory. The default
334 configuration directory is ``~/.config/geany/`` and that
335 is where ``geany.conf`` and other configuration files
338 *none* --ft-names Print a list of Geany's internal filetype names (useful
339 for snippets configuration).
341 -g --generate-tags Generate a global tags file (see
342 `Generating a global tags file`_).
344 -P --no-preprocessing Don't preprocess C/C++ files when generating tags.
346 -i --new-instance Do not open files in a running instance, force opening
347 a new instance. Only available if Geany was compiled
348 with support for Sockets.
350 -l --line Set initial line number for the first opened file.
352 *none* --list-documents Return a list of open documents in a running Geany
354 This can be used to read the currently opened documents in
355 Geany from an external script or tool. The returned list
356 is separated by newlines (LF) and consists of the full,
357 UTF-8 encoded filenames of the documents.
358 Only available if Geany was compiled with support for
361 -m --no-msgwin Do not show the message window. Use this option if you
362 do not need compiler messages or VTE support.
364 -n --no-ctags Do not load symbol completion and call tip data. Use this
365 option if you do not want to use them.
367 -p --no-plugins Do not load plugins or plugin support.
369 *none* --print-prefix Print installation prefix, the data directory, the lib
370 directory and the locale directory (in that order) to
371 stdout, one line each. This is mainly intended for plugin
372 authors to detect installation paths.
374 -r --read-only Open all files given on the command line in read-only mode.
375 This only applies to files opened explicitly from the command
376 line, so files from previous sessions or project files are
379 -s --no-session Do not load the previous session's files.
381 -t --no-terminal Do not load terminal support. Use this option if you do
382 not want to load the virtual terminal emulator widget
383 at startup. If you do not have ``libvte.so.4`` installed,
384 then terminal-support is automatically disabled. Only
385 available if Geany was compiled with support for VTE.
387 *none* --socket-file Use this socket filename for communication with a
388 running Geany instance. This can be used with the following
389 command to execute Geany on the current workspace::
391 geany --socket-file=/tmp/geany-sock-$(xprop -root _NET_CURRENT_DESKTOP | awk '{print $3}')
393 *none* --vte-lib Specify explicitly the path including filename or only
394 the filename to the VTE library, e.g.
395 ``/usr/lib/libvte.so`` or ``libvte.so``. This option is
396 only needed when the auto-detection does not work. Only
397 available if Geany was compiled with support for VTE.
399 -v --verbose Be verbose (print useful status messages).
401 -V --version Show version information and exit.
403 -? --help Show help information and exit.
405 *none* [files ...] Open all given files at startup. This option causes
406 Geany to ignore loading stored files from the last
407 session (if enabled).
408 Geany also recognizes line and column information when
409 appended to the filename with colons, e.g.
410 "geany foo.bar:10:5" will open the file foo.bar and
411 place the cursor in line 10 at column 5.
413 Projects can also be opened but a project file (\*.geany)
414 must be the first non-option argument. All additionally
415 given files are ignored.
416 ============ ======================= =================================================
418 You can also pass line number and column number information, e.g.::
420 geany some_file.foo:55:4
422 Geany supports all generic GTK options, a list is available on the
434 At startup, Geany loads all files from the last time Geany was
435 launched. You can disable this feature in the preferences dialog
436 (see `General Startup preferences`_).
438 You can start several instances of Geany, but only the first will
439 load files from the last session. In the subsequent instances, you
440 can find these files in the file menu under the "Recent files" item.
441 By default this contains the last 10 recently opened files. You can
442 change the number of recently opened files in the preferences dialog.
444 To run a second instance of Geany, do not specify any filenames on
445 the command-line, or disable opening files in a running instance
446 using the appropriate command line option.
449 Opening files from the command-line in a running instance
450 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
452 Geany detects if there is an an instance of itself already running and opens files
453 from the command-line in that instance. So, Geany can
454 be used to view and edit files by opening them from other programs
455 such as a file manager.
457 You can also pass line number and column number information, e.g.::
459 geany some_file.foo:55:4
461 This would open the file ``some_file.foo`` with the cursor on line 55,
464 If you do not like this for some reason, you can disable using the first
465 instance by using the appropriate command line option -- see the section
466 called `Command line options`_.
469 Virtual terminal emulator widget (VTE)
470 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
472 If you have installed ``libvte.so`` on your system, it is loaded
473 automatically by Geany, and you will have a terminal widget in the
474 notebook at the bottom.
476 If Geany cannot find any ``libvte.so`` at startup, the terminal widget
477 will not be loaded. So there is no need to install the package containing
478 this file in order to run Geany. Additionally, you can disable the use
479 of the terminal widget by command line option, for more information
480 see the section called `Command line options`_.
482 You can use this terminal (from now on called VTE) much as you would
483 a terminal program like xterm. There is basic clipboard support. You
484 can paste the contents of the clipboard by pressing the right mouse
485 button to open the popup menu, and choosing Paste. To copy text from
486 the VTE, just select the desired text and then press the right mouse
487 button and choose Copy from the popup menu. On systems running the
488 X Window System you can paste the last selected text by pressing the
489 middle mouse button in the VTE (on 2-button mice, the middle button
490 can often be simulated by pressing both mouse buttons together).
492 In the preferences dialog you can specify a shell which should be
493 started in the VTE. To make the specified shell a login shell just
494 use the appropriate command line options for the shell. These options
495 should be found in the manual page of the shell. For zsh and bash
496 you can use the argument ``--login``.
499 Geany tries to load ``libvte.so``. If this fails, it tries to load
500 some other filenames. If this fails too, you should check whether you
501 installed libvte correctly. Again note, Geany will run without this
504 It could be, that the library is called something else than
505 ``libvte.so`` (e.g. on FreeBSD 6.0 it is called ``libvte.so.8``). If so
506 please set a link to the correct file (as root)::
508 # ln -s /usr/lib/libvte.so.X /usr/lib/libvte.so
510 Obviously, you have to adjust the paths and set X to the number of your
513 You can also specify the filename of the VTE library to use on the command
514 line (see the section called `Command line options`_) or at compile time
515 by specifying the command line option ``--with-vte-module-path`` to
519 Defining own widget styles using .gtkrc-2.0
520 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
522 You can define your widget style for many of Geany's GUI parts. To
523 do this, just edit your ``.gtkrc-2.0`` (usually found in your home
524 directory on UNIX-like systems and in the etc subdirectory of your
525 Geany installation on Windows).
527 To have a defined style used by Geany you must assign it to
528 at least one of Geany's widgets. For example use the following line::
530 widget "Geany*" style "geanyStyle"
532 This would assign your style "geany_style" to all Geany
533 widgets. You can also assign styles only to specific widgets. At the
534 moment you can use the following widgets:
546 An example of a simple ``.gtkrc-2.0``::
552 widget "GeanyMainWindow" style "geanyStyle"
558 widget "GeanyPrefsDialog" style "geanyStyle"
564 Switching between documents
565 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
567 The documents list and the editor tabs are two different ways
568 to switch between documents using the mouse. When you hit the key
569 combination to move between tabs, the order is determined by the tab
570 order. It is not alphabetical as shown in the documents list
571 (regardless of whether or not editor tabs are visible).
573 See the `Notebook tab keybindings`_ section for useful
574 shortcuts including for Most-Recently-Used document switching.
578 The `Document->Clone` menu item copies the current document's text,
579 cursor position and properties into a new untitled document. If
580 there is a selection, only the selected text is copied. This can be
581 useful when making temporary copies of text or for creating
582 documents with similar or identical contents.
585 Character sets and Unicode Byte-Order-Mark (BOM)
586 ------------------------------------------------
592 Geany provides support for detecting and converting character sets. So
593 you can open and save files in different character sets, and even
594 convert a file from one character set to another. To do this,
595 Geany uses the character conversion capabilities of the GLib library.
597 Only text files are supported, i.e. opening files which contain
598 NULL-bytes may fail. Geany will try to open the file anyway but it is
599 likely that the file will be truncated because it can only be read up
600 to the first occurrence of a NULL-byte. All characters after this
601 position are lost and are not written when you save the file.
603 Geany tries to detect the encoding of a file while opening it, but
604 auto-detecting the encoding of a file is not easy and sometimes an
605 encoding might not be detected correctly. In this case you have to
606 set the encoding of the file manually in order to display it
607 correctly. You can this in the file open dialog by selecting an
608 encoding in the drop down box or by reloading the file with the
609 file menu item "Reload as". The auto-detection works well for most
610 encodings but there are also some encodings where it is known that
611 auto-detection has problems.
613 There are different ways to set different encodings in Geany:
615 * Using the file open dialog
617 This opens the file with the encoding specified in the encoding drop
618 down box. If the encoding is set to "Detect from file" auto-detection
619 will be used. If the encoding is set to "Without encoding (None)" the
620 file will be opened without any character conversion and Geany will
621 not try to auto-detect the encoding (see below for more information).
623 * Using the "Reload as" menu item
625 This item reloads the current file with the specified encoding. It can
626 help if you opened a file and found out that the wrong encoding was used.
628 * Using the "Set encoding" menu item
630 Contrary to the above two options, this will not change or reload
631 the current file unless you save it. It is useful when you want to
632 change the encoding of the file.
634 * Specifying the encoding in the file itself
636 As mentioned above, auto-detecting the encoding of a file may fail on
637 some encodings. If you know that Geany doesn't open a certain file,
638 you can add the specification line, described in the next section,
639 to the beginning of the file to force Geany to use a specific
640 encoding when opening the file.
643 In-file encoding specification
644 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
646 Geany detects meta tags of HTML files which contain charset information
649 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-15" />
651 and the specified charset is used when opening the file. This is useful if the
652 encoding of the file cannot be detected properly.
653 For non-HTML files you can also define a line like::
655 /* geany_encoding=ISO-8859-15 */
659 # geany_encoding=ISO-8859-15 #
661 to force an encoding to be used. The #, /\* and \*/ are examples
662 of filetype-specific comment characters. It doesn't matter which
663 characters are around the string " geany_encoding=ISO-8859-15 " as long
664 as there is at least one whitespace character before and after this
665 string. Whitespace characters are in this case a space or tab character.
666 An example to use this could be you have a file with ISO-8859-15
667 encoding but Geany constantly detects the file encoding as ISO-8859-1.
668 Then you simply add such a line to the file and Geany will open it
669 correctly the next time.
671 Since Geany 0.15 you can also use lines which match the
672 regular expression used to find the encoding string:
673 ``coding[\t ]*[:=][\t ]*([a-z0-9-]+)[\t ]*``
676 These specifications must be in the first 512 bytes of the file.
677 Anything after the first 512 bytes will not be recognized.
681 # encoding = ISO-8859-15
685 # coding: ISO-8859-15
687 Special encoding "None"
688 ^^^^^^^^^^^^^^^^^^^^^^^
690 There is a special encoding "None" which uses no
691 encoding. It is useful when you know that Geany cannot auto-detect
692 the encoding of a file and it is not displayed correctly. Especially
693 when the file contains NULL-bytes this can be useful to skip auto
694 detection and open the file properly at least until the occurrence
695 of the first NULL-byte. Using this encoding opens the file as it is
696 without any character conversion.
699 Unicode Byte-Order-Mark (BOM)
700 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
702 Furthermore, Geany detects a Unicode Byte Order Mark (see
703 http://en.wikipedia.org/wiki/Byte_Order_Mark for details). Of course,
704 this feature is only available if the opened file is in a Unicode
705 encoding. The Byte Order Mark helps to detect the encoding of a file,
706 e.g. whether it is UTF-16LE or UTF-16BE and so on. On Unix-like systems
707 using a Byte Order Mark could cause some problems for programs not
708 expecting it, e.g. the compiler gcc stops
709 with stray errors, PHP does not parse a script containing a BOM and
710 script files starting with a she-bang maybe cannot be started. In the
711 status bar you can easily see whether the file starts with a BOM or
714 If you want to set a BOM for a file or if you want to remove it
715 from a file, just use the document menu and toggle the checkbox.
718 If you are unsure what a BOM is or if you do not understand where
719 to use it, then it is probably not important for you and you can
731 Geany provides basic code folding support. Folding means the ability to
732 show and hide parts of the text in the current file. You can hide
733 unimportant code sections and concentrate on the parts you are working on
734 and later you can show hidden sections again. In the editor window there is
735 a small grey margin on the left side with [+] and [-] symbols which
736 show hidden parts and hide parts of the file respectively. By
737 clicking on these icons you can simply show and hide sections which are
738 marked by vertical lines within this margin. For many filetypes nested
739 folding is supported, so there may be several fold points within other
743 You can customize the folding icon and line styles - see the
744 filetypes.common `Folding Settings`_.
746 If you don't like it or don't need it at all, you can simply disable
747 folding support completely in the preferences dialog.
749 The folding behaviour can be changed with the "Fold/Unfold all children of
750 a fold point" option in the preference dialog. If activated, Geany will
751 unfold all nested fold points below the current one if they are already
752 folded (when clicking on a [+] symbol).
753 When clicking on a [-] symbol, Geany will fold all nested fold points
754 below the current one if they are unfolded.
756 This option can be inverted by pressing the Shift
757 key while clicking on a fold symbol. That means, if the "Fold/Unfold all
758 children of a fold point" option is enabled, pressing Shift will disable
759 it for this click and vice versa.
762 Column mode editing (rectangular selections)
763 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
765 There is basic support for column mode editing. To use it, create a
766 rectangular selection by holding down the Control and Shift keys
767 (or Alt and Shift on Windows) while selecting some text.
768 Once a rectangular selection exists you can start editing the text within
769 this selection and the modifications will be done for every line in the
772 It is also possible to create a zero-column selection - this is
773 useful to insert text on multiple lines.
775 Drag and drop of text
776 ^^^^^^^^^^^^^^^^^^^^^
778 If you drag selected text in the editor widget of Geany the text is
779 moved to the position where the mouse pointer is when releasing the
780 mouse button. Holding Control when releasing the mouse button will
781 copy the text instead. This behaviour was changed in Geany 0.11 -
782 before the selected text was copied to the new position.
788 Geany allows each document to indent either with a tab character,
789 multiple spaces or a combination of both.
791 The *Tabs* setting indents with one tab character per indent level, and
792 displays tabs as the indent width.
794 The *Spaces* setting indents with the number of spaces set in the indent
795 width for each level.
797 The *Tabs and Spaces* setting indents with spaces as above, then converts
798 as many spaces as it can to tab characters at the rate of one tab for
799 each multiple of the `Various preference` setting
800 *indent_hard_tab_width* (default 8) and displays tabs as the
801 *indent_hard_tab_width* value.
803 The default indent settings are set in `Editor Indentation
804 preferences`_ (see the link for more information).
806 The default settings can be overridden per-document using the
807 Document menu. They can also be overridden by projects - see
808 `Project management`_.
810 The indent mode for the current document is shown on the status bar
814 Indent with Tab characters.
818 Indent with tabs and spaces, depending on how much indentation is
821 Applying new indentation settings
822 `````````````````````````````````
823 After changing the default settings you may wish to apply the new
824 settings to every document in the current session. To do this use the
825 *Project->Apply Default Indentation* menu item.
827 Detecting indent type
828 `````````````````````
829 The *Detect from file* indentation preference can be used to
830 scan each file as it's opened and set the indent type based on
831 how many lines start with a tab vs. 2 or more spaces.
837 When enabled, auto-indentation happens when pressing *Enter* in the
838 Editor. It adds a certain amount of indentation to the new line so the
839 user doesn't always have to indent each line manually.
841 Geany has four types of auto-indentation:
844 Disables auto-indentation completely.
846 Adds the same amount of whitespace on a new line as on the previous line.
847 For the *Tabs* and the *Spaces* indent types the indentation will use the
848 same combination of characters as the previous line. The
849 *Tabs and Spaces* indentation type converts as explained above.
851 Does the same as *Basic* but also indents a new line after an opening
852 brace '{', and de-indents when typing a closing brace '}'. For Python,
853 a new line will be indented after typing ':' at the end of the
856 Similar to *Current chars* but the closing brace will be aligned to
857 match the indentation of the line with the opening brace. This
858 requires the filetype to be one where Geany knows that the Scintilla
859 lexer understands matching braces (C, C++, D, HTML, Pascal, Bash,
862 There is also XML-tag auto-indentation. This is enabled when the
863 mode is more than just Basic, and is also controlled by a filetype
864 setting - see `xml_indent_tags`_.
870 Geany provides a handy bookmarking feature that lets you mark one
871 or more lines in a document, and return the cursor to them using a
874 To place a mark on a line, either left-mouse-click in the left margin
875 of the editor window, or else use Ctrl-m. This will
876 produce a small green plus symbol in the margin. You can have as many
877 marks in a document as you like. Click again (or use Ctrl-m again)
878 to remove the bookmark. To remove all the marks in a given document,
879 use "Remove Markers" in the Document menu.
881 To navigate down your document, jumping from one mark to the next,
882 use Ctrl-. (control period). To go in the opposite direction on
883 the page, use Ctrl-, (control comma). Using the bookmarking feature
884 together with the commands to switch from one editor tab to another
885 (Ctrl-PgUp/PgDn and Ctrl-Tab) provides a particularly fast way to
886 navigate around multiple files.
889 Code navigation history
890 ^^^^^^^^^^^^^^^^^^^^^^^
892 To ease navigation in source files and especially between
893 different files, Geany lets you jump between different navigation
894 points. Currently, this works for the following:
896 * `Go to tag declaration`_
897 * `Go to tag definition`_
902 When using one of these actions, Geany remembers your current position
903 and jumps to the new one. If you decide to go back to your previous
904 position in the file, just use "Navigate back a location". To
905 get back to the new position again, just use "Navigate forward a
906 location". This makes it easier to navigate in e.g. foreign code
907 and between different files.
910 Sending text through custom commands
911 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
913 You can define several custom commands in Geany and send the current
914 selection to one of these commands using the *Edit->Format->Send
915 Selection to* menu or keybindings. The output of the command will be
916 used to replace the current selection. This makes it possible to use
917 text formatting tools with Geany in a general way.
919 The selected text will be sent to the standard input of the executed
920 command, so the command should be able to read from it and it should
921 print all results to its standard output which will be read by
922 Geany. To help finding errors in executing the command, the output
923 of the program's standard error will be printed on Geany's standard
926 If there is no selection, the whole current line is used instead.
928 To add a custom command, use the *Send Selection to->Set Custom
929 Commands* menu item. Click on *Add* to get a new item and type the
930 command. You can also specify some command line options. Empty
931 commands are not saved.
933 Normal shell quoting is supported, so you can do things like:
935 * ``sed 's/\./(dot)/g'``
937 The above example would normally be done with the `Replace all`_
938 function, but it can be handy to have common commands already set up.
944 You can execute the context action command on the current word at the
945 cursor position or the available selection. This word or selection
946 can be used as an argument to the command.
947 The context action is invoked by a menu entry in the popup menu of the
948 editor and also a keyboard shortcut (see the section called
951 The command can be specified in the preferences dialog and also for
952 each filetype (see "context_action_cmd" in the section called
953 `Filetype configuration`_). When the context action is invoked, the filetype
954 specific command is used if available, otherwise the command
955 specified in the preferences dialog is executed.
957 The current word or selection can be referred with the wildcard "%s"
958 in the command, it will be replaced by the current word or
959 selection before the command is executed.
961 For example a context action can be used to open API documentation
962 in a browser window, the command to open the PHP API documentation
965 firefox "http://www.php.net/%s"
967 when executing the command, the %s is substituted by the word near
968 the cursor position or by the current selection. If the cursor is at
969 the word "echo", a browser window will open(assumed your browser is
970 called firefox) and it will open the address: http://www.php.net/echo.
976 Geany can offer a list of possible completions for symbols defined in the
977 tags and for all words in a document.
979 The autocompletion list for symbols is presented when the first few
980 characters of the symbol are typed (configurable, see `Editor Completions
981 preferences`_, default 4) or when the *Complete word*
982 keybinding is pressed (configurable, see `Editor keybindings`_,
985 When the defined keybinding is typed and the *Autocomplete all words in
986 document* preference (in `Editor Completions preferences`_)
987 is selected then the autocompletion list will show all matching words
988 in the document, if there are no matching symbols.
990 If you don't want to use autocompletion it can be dismissed until
991 the next symbol by pressing Escape. The autocompletion list is updated
992 as more characters are typed so that it only shows completions that start
993 with the characters typed so far. If no symbols begin with the sequence,
994 the autocompletion window is closed.
996 The up and down arrows will move the selected item. The highlighted
997 item on the autocompletion list can be chosen from the list by pressing
998 Enter/Return. You can also double-click to select an item. The sequence
999 will be completed to match the chosen item, and if the *Drop rest of
1000 word on completion* preference is set (in `Editor Completions
1001 preferences`_) then any characters after the cursor that match
1002 a symbol or word are deleted.
1004 Word part completion
1005 ````````````````````
1006 By default, pressing Tab will complete the selected item by word part;
1007 useful e.g. for adding the prefix ``gtk_combo_box_entry_`` without typing it
1012 * gtk_combo_box_<e><TAB>
1013 * gtk_combo_box_entry_<s><ENTER>
1014 * gtk_combo_box_entry_set_text_column
1016 The key combination can be changed from Tab - See `Editor keybindings`_.
1017 If you clear/change the key combination for word part completion, Tab
1018 will complete the whole word instead, like Enter.
1020 Scope autocompletion
1021 ````````````````````
1030 When you type ``foo.`` it will show an autocompletion list with 'i' and
1033 It only works for languages that set parent scope names for e.g. struct
1034 members. Currently this means C-like languages. The C tag parser only
1035 parses global scopes, so this won't work for structs or objects declared
1039 User-definable snippets
1040 ^^^^^^^^^^^^^^^^^^^^^^^
1042 Snippets are small strings or code constructs which can be replaced or
1043 completed to a more complex string. So you can save a lot of time when
1044 typing common strings and letting Geany do the work for you.
1045 To know what to complete or replace Geany reads a configuration file
1046 called ``snippets.conf`` at startup.
1048 Maybe you need to often type your name, so define a snippet like this::
1051 myname=Enrico Tröger
1053 Every time you write ``myname`` <TAB> in Geany, it will replace "myname"
1054 with "Enrico Tröger". The key to start autocompletion can be changed
1055 in the preferences dialog, by default it is TAB. The corresponding keybinding
1056 is called `Complete snippet`.
1060 You can override the default snippets using the user
1061 ``snippets.conf`` file. Use the *Tools->Configuration
1062 Files->snippets.conf* menu item. See also `Configuration file paths`_.
1064 This adds the default settings to the user file if the file doesn't
1065 exist. Alternatively the file can be created manually, adding only
1066 the settings you want to change. All missing settings will be read
1067 from the system snippets file.
1071 The file ``snippets.conf`` contains sections defining snippets that
1072 are available for particular filetypes and in general.
1074 The two sections "Default" and "Special" apply to all filetypes.
1075 "Default" contains all snippets which are available for every
1076 filetype and "Special" contains snippets which can only be used in
1077 other snippets. So you can define often used parts of snippets and
1078 just use the special snippet as a placeholder (see the
1079 ``snippets.conf`` for details).
1081 You can define sections with the name of a filetype eg "C++". The
1082 snippets in that section are only available for use in files with that
1083 filetype. Snippets in filetype sections will hide snippets with the
1084 same name in the "Default" section when used in a file of that
1087 **Substitution sequences for snippets**
1089 To define snippets you can use several special character sequences which
1090 will be replaced when using the snippet:
1092 ================ =========================================================
1093 \\n or %newline% Insert a new line (it will be replaced by the used EOL
1094 char(s): LF, CR/LF, or CR).
1096 \\t or %ws% Insert an indentation step, it will be replaced according
1097 to the current document's indent mode.
1099 \\s \\s to force whitespace at beginning or end of a value
1100 ('key= value' won't work, use 'key=\\svalue')
1102 %cursor% Place the cursor at this position after completion has
1103 been done. You can define multiple %cursor% wildcards
1104 and use the keybinding `Move cursor in snippet` to jump
1105 to the next defined cursor position in the completed
1108 %...% "..." means the name of a key in the "Special" section.
1109 If you have defined a key "brace_open" in the "Special"
1110 section you can use %brace_open% in any other snippet.
1111 ================ =========================================================
1113 Snippet names must not contain spaces otherwise they won't
1114 work correctly. But beside that you can define almost any
1115 string as a snippet and use it later in Geany. It is not limited
1116 to existing contructs of certain programming languages(like ``if``,
1117 ``for``, ``switch``). Define whatever you need.
1119 **Template wildcards**
1121 Since Geany 0.15 you can also use most of the available templates wildcards
1122 listed in `Template wildcards`_. All wildcards which are listed as
1123 `available in snippets` can be used. For instance to improve the above example::
1126 myname=My name is {developer}
1127 mysystem=My system: {command:uname -a}
1129 this will replace ``myname`` with "My name is " and the value of the template
1130 preference ``developer``.
1134 You can change the way Geany recognizes the word to complete,
1135 that is how the start and end of a word is recognised when the
1136 snippet completion is requested. The section "Special" may
1137 contain a key "wordchars" which lists all characters a string may contain
1138 to be recognized as a word for completion. Leave it commented to use
1139 default characters or define it to add or remove characters to fit your
1145 Normally you would type the snippet name and press Tab. However, you
1146 can define keybindings for snippets under the *Keybindings* group in
1151 block_cursor=<Ctrl>8
1154 Snippet keybindings may be overridden by Geany's configurable
1158 Inserting Unicode characters
1159 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1161 You can insert Unicode code points by hitting Ctrl-Shift-u, then still holding
1162 Ctrl-Shift, type some hex digits representing the code point for the character
1163 you want and hit Enter or Return (still holding Ctrl-Shift). If you release
1164 Ctrl-Shift before hitting Enter or Return (or any other character), the code
1165 insertion is completed, but the typed character is also entered. In the case
1166 of Enter/Return, it is a newline, as you might expect.
1169 In some earlier versions of Geany, you might need to first unbind Ctrl-Shift-u
1170 in the `keybinding preferences`_, then select *Tools->Reload Configuration*
1171 or restart Geany. Note that it works slightly differently from other GTK
1172 applications, in that you'll need to continue to hold down the Ctrl and Shift
1173 keys while typing the code point hex digits (and the Enter or Return to finish the code point).
1176 Search, replace and go to
1177 -------------------------
1179 This section describes search-related commands from the Search menu
1180 and the editor window's popup menu:
1187 * Go to tag definition
1188 * Go to tag declaration
1191 See also `Search`_ preferences.
1195 There are also two toolbar entries:
1200 There are keybindings to focus each of these - see `Focus
1201 keybindings`_. Pressing Escape will then focus the editor.
1205 The quickest way to find some text is to use the search bar entry in
1206 the toolbar. This performs a case-insensitive search in the current
1207 document whilst you type. Pressing Enter will search again, and pressing
1208 Shift-Enter will search backwards.
1213 The Find dialog is used for finding text in one or more open documents.
1215 .. image:: ./images/find_dialog.png
1221 The syntax for the *Use regular expressions* option is shown in
1222 `Regular expressions`_.
1225 *Use escape sequences* is implied for regular expressions.
1227 The *Use escape sequences* option will transform any escaped characters
1228 into their UTF-8 equivalent. For example, \\t will be transformed into
1229 a tab character. Other recognized symbols are: \\\\, \\n, \\r, \\uXXXX
1230 (Unicode characters).
1236 To find all matches, click on the Find All expander. This will reveal
1243 Find All In Document will show a list of matching lines in the
1244 current document in the Messages tab of the Message Window. *Find All
1245 In Session* does the same for all open documents.
1247 Mark will highlight all matches in the current document with a
1248 colored box. These markers can be removed by selecting the
1249 Remove Markers command from the Document menu.
1252 Change font in search dialog text fields
1253 ````````````````````````````````````````
1255 All search related dialogs use a Monospace for the text input fields to
1256 increase the readability of input text. This is useful when you are
1257 typing input such as regular expressions with spaces, periods and commas which
1258 might it hard to read with a proportional font.
1260 If you want to change the font, you can do this easily
1261 by inserting the following style into your ``.gtkrc-2.0``
1262 (usually found in your home directory on UNIX-like systems and in the
1263 etc subdirectory of your Geany installation on Windows)::
1265 style "search_style"
1267 font_name="Monospace 8"
1269 widget "GeanyDialogSearch.*.GtkEntry" style:highest "search_style"
1271 Please note the addition of ":highest" in the last line which sets the priority
1272 of this style to the highest available. Otherwise, the style is ignored
1273 for the search dialogs.
1278 The *Find Next/Previous Selection* commands perform a search for the
1279 current selected text. If nothing is selected, by default the current
1280 word is used instead. This can be customized by the
1281 *find_selection_type* preference - see `Various preferences`_.
1283 ===== =============================================
1284 Value *find_selection_type* behaviour
1285 ===== =============================================
1286 0 Use the current word (default).
1287 1 Try the X selection first, then current word.
1288 2 Repeat last search.
1289 ===== =============================================
1295 *Find Usage* searches all open files. It is similar to the *Find All In
1296 Session* option in the Find dialog.
1298 If there is a selection, then it is used as the search text; otherwise
1299 the current word is used. The current word is either taken from the
1300 word nearest the edit cursor, or the word underneath the popup menu
1301 click position when the popup menu is used. The search results are
1302 shown in the Messages tab of the Message Window.
1305 You can also use Find Usage for symbol list items from the popup
1312 *Find in Files* is a more powerful version of *Find Usage* that searches
1313 all files in a certain directory using the Grep tool. The Grep tool
1314 must be correctly set in Preferences to the path of the system's Grep
1315 utility. GNU Grep is recommended (see note below).
1317 .. image:: ./images/find_in_files_dialog.png
1319 The *Search* field is initially set to the current word in the editor
1320 (depending on `Search`_ preferences).
1322 The *Files* setting allows to choose which files are included in the
1323 search, depending on the mode:
1326 Search in all files;
1328 Use the current project's patterns, see `Project properties`_;
1330 Use custom patterns.
1332 Both project and custom patterns use a glob-style syntax, each
1333 pattern separated by a space. To search all ``.c`` and ``.h`` files,
1335 Note that an empty pattern list searches in all files rather
1338 The *Directory* field is initially set to the current document's directory,
1339 unless this field has already been edited and the current document has
1340 not changed. Otherwise, the current document's directory is prepended to
1341 the drop-down history. This can be disabled - see `Search`_ preferences.
1343 The *Encoding* field can be used to define the encoding of the files
1344 to be searched. The entered search text is converted to the chosen encoding
1345 and the search results are converted back to UTF-8.
1347 The *Extra options* field is used to pass any additional arguments to
1351 The *Files* setting uses ``--include=`` when searching recursively,
1352 *Recurse in subfolders* uses ``-r``; both are GNU Grep options and may
1353 not work with other Grep implementations.
1356 Filtering out version control files
1357 ```````````````````````````````````
1359 When using the *Recurse in subfolders* option with a directory that's
1360 under version control, you can set the *Extra options* field to filter
1361 out version control files.
1363 If you have GNU Grep >= 2.5.2 you can use the ``--exclude-dir``
1364 argument to filter out CVS and hidden directories like ``.svn``.
1366 Example: ``--exclude-dir=.svn --exclude-dir=CVS``
1368 If you have an older Grep, you can try using the ``--exclude`` flag
1369 to filter out filenames.
1371 SVN Example: ``--exclude=*.svn-base``
1373 The --exclude argument only matches the file name part, not the path.
1379 The Replace dialog is used for replacing text in one or more open
1382 .. image:: ./images/replace_dialog.png
1384 The Replace dialog has the same options for matching text as the Find
1385 dialog. See the section `Matching options`_.
1387 The *Use regular expressions* option allows regular expressions to
1388 be used in the search string and back references in the replacement
1389 text -- see the entry for '\\n' in `Regular expressions`_.
1394 To replace several matches, click on the *Replace All* expander. This
1395 will reveal several options:
1401 *Replace All In Document* will replace all matching text in the
1402 current document. *Replace All In Session* does the same for all open
1403 documents. *Replace All In Selection* will replace all matching text
1404 in the current selection of the current document.
1407 Go to tag definition
1408 ^^^^^^^^^^^^^^^^^^^^
1410 If the current word or selection is the name of a tag definition
1411 (e.g. a function name) and the file containing the tag definition is
1412 open, this command will switch to that file and go to the
1413 corresponding line number. The current word is either the word
1414 nearest the edit cursor, or the word underneath the popup menu click
1415 position when the popup menu is used.
1418 If the corresponding tag is on the current line, Geany will first
1419 look for a tag declaration instead, as this is more useful.
1420 Likewise *Go to tag declaration* will search for a tag definition
1421 first in this case also.
1424 Go to tag declaration
1425 ^^^^^^^^^^^^^^^^^^^^^
1427 Like *Go to tag definition*, but for a forward declaration such as a
1428 C function prototype or ``extern`` declaration instead of a function
1435 Go to a particular line number in the current file.
1441 You can use regular expressions in the Find and Replace dialogs
1442 by selecting the *Use regular expressions* check box (see `Matching
1443 options`_). The syntax is Perl compatible. Basic syntax is described
1444 in the table below. For full details, see
1445 http://www.geany.org/manual/gtk/glib/glib-regex-syntax.html.
1448 1. The *Use escape sequences* dialog option always applies for regular
1450 2. Searching backwards with regular expressions is not supported.
1452 **In a regular expression, the following characters are interpreted:**
1454 ======= ============================================================
1455 . Matches any character.
1457 ( This marks the start of a region for tagging a match.
1459 ) This marks the end of a tagged region.
1461 \\n Where n is 1 through 9 refers to the first through ninth tagged
1462 region when searching or replacing.
1464 Searching for (Wiki)\\1 matches WikiWiki.
1466 If the search string was Fred([1-9])XXX and the
1467 replace string was Sam\\1YYY, when applied to Fred2XXX this
1468 would generate Sam2YYY.
1470 \\0 When replacing, the whole matching text.
1472 \\b This matches a word boundary.
1474 \\c A backslash followed by d, D, s, S, w or W, becomes a
1475 character class (both inside and outside sets []).
1478 * D: any char except decimal digits
1479 * s: whitespace (space, \\t \\n \\r \\f \\v)
1480 * S: any char except whitespace (see above)
1481 * w: alphanumeric & underscore
1482 * W: any char except alphanumeric & underscore
1484 \\x This allows you to use a character x that would otherwise have
1485 a special meaning. For example, \\[ would be interpreted as [
1486 and not as the start of a character set. Use \\\\ for a literal
1489 [...] Matches one of the characters in the set. If the first
1490 character in the set is ^, it matches the characters NOT in
1491 the set, i.e. complements the set. A shorthand S-E (start
1492 dash end) is used to specify a set of characters S up to E,
1495 The special characters ] and - have no special
1496 meaning if they appear first in the set. - can also be last
1497 in the set. To include both, put ] first: []A-Z-].
1501 []|-] matches these 3 chars
1502 []-|] matches from ] to | chars
1503 [a-z] any lowercase alpha
1504 [^]-] any char except - and ]
1505 [^A-Z] any char except uppercase alpha
1508 ^ This matches the start of a line (unless used inside a set, see
1511 $ This matches the end of a line.
1513 \* This matches 0 or more times. For example, Sa*m matches Sm, Sam,
1514 Saam, Saaam and so on.
1516 \+ This matches 1 or more times. For example, Sa+m matches Sam,
1517 Saam, Saaam and so on.
1519 \? This matches 0 or 1 time(s). For example, Joh?n matches John, Jon.
1520 ======= ============================================================
1523 This table is adapted from Scintilla and SciTE documentation,
1524 distributed under the `License for Scintilla and SciTE`_.
1530 The View menu allows various elements of the main window to be shown
1531 or hidden, and also provides various display-related editor options.
1535 The Color schemes menu is available under the *View->Editor* submenu.
1536 It lists various color schemes for editor highlighting styles,
1537 including the default scheme first. Other items are available based
1538 on what color scheme files Geany found at startup.
1540 Color scheme files are read from the `Configuration file paths`_ under
1541 the ``colorschemes`` subdirectory. They should have the extension
1542 ``.conf``. The default color scheme
1543 is read from ``filetypes.common``.
1545 The `[named_styles] section`_ and `[named_colors] section`_ are the
1546 same as for ``filetypes.common``.
1548 The ``[theme_info]`` section can contain information about the
1549 theme. The ``name`` and ``description`` keys are read to set the
1550 menu item text and tooltip, respectively. These keys can have
1551 translations, e.g.::
1560 Tags are information that relates symbols in a program with the
1561 source file location of the declaration and definition.
1563 Geany has built-in functionality for generating tag information (aka
1564 "workspace tags") for supported filetypes when you open a file. You
1565 can also have Geany automatically load external tag files (aka "global
1566 tags files") upon startup, or manually using *Tools --> Load Tags*.
1568 Geany uses its own tag file format, similar to what ``ctags`` uses
1569 (but is incompatible with ctags). You use Geany to generate global
1570 tags files, as described below.
1576 Tags for each document are parsed whenever a file is loaded, saved or
1577 modified (see *Symbol list update frequency* preference in the `Editor
1578 Completions preferences`_). These are shown in the Symbol list in the
1579 Sidebar. These tags are also used for autocompletion of symbols and calltips
1580 for all documents open in the current session that have the same filetype.
1582 The *Go to Tag* commands can be used with all workspace tags. See
1583 `Go to tag definition`_.
1589 Global tags are used to provide autocompletion of symbols and calltips
1590 without having to open the corresponding source files. This is intended
1591 for library APIs, as the tags file only has to be updated when you upgrade
1594 You can load a custom global tags file in two ways:
1596 * Using the *Load Tags* command in the Tools menu.
1597 * By moving or symlinking tags files to the ``tags`` subdirectory of
1598 one of the `configuration file paths`_ before starting Geany.
1600 You can either download these files or generate your own. They have
1605 *lang_ext* is one of the extensions set for the filetype associated
1606 with the tags. See the section called `Filetype extensions`_ for
1610 Default global tags files
1611 `````````````````````````
1613 For some languages, a list of global tags is loaded when the
1614 corresponding filetype is first used. Currently these are for:
1619 * HTML -- &symbol; completion, e.g. for ampersand, copyright, etc.
1624 Global tags file format
1625 ```````````````````````
1627 Global tags files can have three different formats:
1630 * Pipe-separated format
1633 The first line of global tags files should be a comment, introduced
1634 by ``#`` followed by a space and a string like ``format=pipe``,
1635 ``format=ctags`` or ``format=tagmanager`` respectively, these are
1636 case-sensitive. This helps Geany to read the file properly. If this
1637 line is missing, Geany tries to auto-detect the used format but this
1641 The Tagmanager format is a bit more complex and is used for files
1642 created by the ``geany -g`` command. There is one tag per line.
1643 Different tag attributes like the return value or the argument list
1644 are separated with different characters indicating the type of the
1645 following argument. This is the more complete and recommended tag
1648 Pipe-separated format
1649 *********************
1650 The Pipe-separated format is easier to read and write.
1651 There is one tag per line and different tag attributes are separated
1652 by the pipe character (``|``). A line looks like::
1654 basename|string|(string path [, string suffix])|
1656 | The first field is the tag name (usually a function name).
1657 | The second field is the type of the return value.
1658 | The third field is the argument list for this tag.
1659 | The fourth field is the description for this tag but
1660 currently unused and should be left empty.
1662 Except for the first field (tag name), all other field can be left
1663 empty but the pipe separator must appear for them.
1665 You can easily write your own global tag files using this format.
1666 Just save them in your tags directory, as described earlier in the
1667 section `Global tags`_.
1671 This is the format that ctags generates, and that is used by Vim.
1672 This format is compatible with the format historically used by Vi.
1674 The format is described at http://ctags.sourceforge.net/FORMAT, but
1675 for the full list of existing extensions please refer to ctags.
1676 However, note that Geany may actually only honor a subset of the
1677 existing extensions.
1679 Generating a global tags file
1680 `````````````````````````````
1682 You can generate your own global tags files by parsing a list of
1683 source files. The command is::
1685 geany -g [-P] <Tag File> <File list>
1687 * Tag File filename should be in the format described earlier --
1688 see the section called `Global tags`_.
1689 * File list is a list of filenames, each with a full path (unless
1690 you are generating C/C++ tags and have set the CFLAGS environment
1691 variable appropriately).
1692 * ``-P`` or ``--no-preprocessing`` disables using the C pre-processor
1693 to process ``#include`` directives for C/C++ source files. Use this
1694 option if you want to specify each source file on the command-line
1695 instead of using a 'master' header file. Also can be useful if you
1696 don't want to specify the CFLAGS environment variable.
1698 Example for the wxD library for the D programming language::
1700 geany -g wxd.d.tags /home/username/wxd/wx/*.d
1703 Generating C/C++ tag files
1704 **************************
1705 You may need to first setup the `C ignore.tags`_ file.
1707 For C/C++ tag files gcc is required by default, so that header files
1708 can be preprocessed to include any other headers they depend upon. If
1709 you do not want this, use the ``-P`` option described above.
1711 For preprocessing, the environment variable CFLAGS should be set with
1712 appropriate ``-I/path`` include paths. The following example works with
1713 the bash shell, generating tags for the GnomeUI library::
1715 CFLAGS=`pkg-config --cflags libgnomeui-2.0` geany -g gnomeui.c.tags \
1716 /usr/include/libgnomeui-2.0/gnome.h
1718 You can adapt this command to use CFLAGS and header files appropriate
1719 for whichever libraries you want.
1722 Generating tag files on Windows
1723 *******************************
1724 This works basically the same as on other platforms::
1726 "c:\program files\geany\bin\geany" -g c:\mytags.php.tags c:\code\somefile.php
1732 You can ignore certain tags for C-based languages if they would lead
1733 to wrong parsing of the code. Use the *Tools->Configuration
1734 Files->ignore.tags* menu item to open the user ``ignore.tags`` file.
1735 See also `Configuration file paths`_.
1737 List all tag names you want to ignore in this file, separated by spaces
1742 G_GNUC_NULL_TERMINATED
1744 G_GNUC_WARN_UNUSED_RESULT
1746 This will parse code like:
1748 ``gchar **utils_strv_new(const gchar *first, ...)
1749 G_GNUC_NULL_TERMINATED;``
1751 More detailed information about ignore tags usage from the Exuberant Ctags
1754 Specifies a list of identifiers which are to be specially handled
1755 while parsing C and C++ source files. This option is specifically
1756 provided to handle special cases arising through the use of
1757 pre-processor macros. When the identifiers listed are simple identifiers,
1758 these identifiers will be ignored during parsing of the source files.
1759 If an identifier is suffixed with a '+' character, ctags will also
1760 ignore any parenthesis-enclosed argument list which may immediately
1761 follow the identifier in the source files.
1762 If two identifiers are separated with the '=' character, the first
1763 identifiers is replaced by the second identifiers for parsing purposes.
1765 For even more detailed information please read the manual page of
1768 Geany extends Ctags with a '*' character suffix - this means use
1769 prefix matching, e.g. G_GNUC_* will match G_GNUC_NULL_TERMINATED, etc.
1770 Note that prefix match items should be put after other items to ensure
1771 that items like G_GNUC_PRINTF+ get parsed correctly.
1777 You may adjust Geany's settings using the Edit --> Preferences
1778 dialog. Any changes you make there can be applied by hitting either
1779 the Apply or the OK button. These settings will persist between Geany
1780 sessions. Note that most settings here have descriptive popup bubble
1781 help -- just hover the mouse over the item in question to get help
1784 You may also adjust some View settings (under the View menu) that
1785 persist between Geany sessions. The settings under the Document menu,
1786 however, are only for the current document and revert to defaults
1787 when restarting Geany.
1790 In the paragraphs that follow, the text describing a dialog tab
1791 comes after the screenshot of that tab.
1794 General Startup preferences
1795 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
1797 .. image:: ./images/pref_dialog_gen_startup.png
1802 Load files from the last session
1803 On startup, load the same files you had open the last time you
1806 Load virtual terminal support
1807 Load the library for running a terminal in the message window area.
1809 Enable plugin support
1810 Allow plugins to be used in Geany.
1814 Save window position and geometry
1815 Save the current position and size of the main window so next time
1816 you open Geany it's in the same location.
1819 Have a dialog pop up to confirm that you really want to quit Geany.
1825 Path to start in when opening or saving files.
1826 It must be an absolute path.
1829 Path to start in when opening project files.
1832 By default Geany looks in the system installation and the user
1833 configuration - see `Plugins`_. In addition the path entered here will be
1835 Usually you do not need to set an additional path to search for
1836 plugins. It might be useful when Geany is installed on a multi-user machine
1837 and additional plugins are available in a common location for all users.
1838 Leave blank to not set an additional lookup path.
1841 General Miscellaneous preferences
1842 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1844 .. image:: ./images/pref_dialog_gen_misc.png
1849 Beep on errors when compilation has finished
1850 Have the computer make a beeping sound when compilation of your program
1851 has completed or any errors occurred.
1853 Switch status message list at new message
1854 Switch to the status message tab (in the notebook window at the bottom)
1855 once a new status message arrives.
1857 Suppress status messages in the status bar
1858 Remove all messages from the status bar. The messages are still displayed
1859 in the status messages window.
1862 Another option is to use the *Switch to Editor* keybinding - it
1863 reshows the document statistics on the status bar. See `Focus
1866 Use Windows File Open/Save dialogs
1867 Defines whether to use the native Windows File Open/Save dialogs or
1868 whether to use the GTK default dialogs.
1870 Auto-focus widgets (focus follows mouse)
1871 Give the focus automatically to widgets below the mouse cursor.
1872 This works for the main editor widget, the scribble, the toolbar search field
1873 goto line fields and the VTE.
1879 Always wrap search around the document when finding a match.
1881 Hide the Find dialog
1882 Hide the `Find`_ dialog after clicking Find Next/Previous.
1884 Use the current word under the cursor for Find dialogs
1885 Use current word under the cursor when opening the Find, Find in Files or Replace dialog and
1886 there is no selection. When this option is disabled, the search term last used in the
1887 appropriate Find dialog is used.
1889 Use the current file's directory for Find in Files
1890 When opening the Find in Files dialog, set the directory to search to the directory of the current
1891 active file. When this option is disabled, the directory of the last use of the Find in Files
1892 dialog is used. See `Find in Files`_ for details.
1897 Use project-based session files
1898 Save your current session when closing projects. You will be able to
1899 resume different project sessions, automatically opening the files
1900 you had open previously.
1902 Store project file inside the project base directory
1903 When creating new projects, the default path for the project file contains
1904 the project base path. Without this option enabled, the default project file
1905 path is one level above the project base path.
1906 In either case, you can easily set the final project file path in the
1907 *New Project* dialog. This option provides the more common
1908 defaults automatically for convenience.
1911 Interface preferences
1912 ^^^^^^^^^^^^^^^^^^^^^
1914 .. image:: ./images/pref_dialog_interface_interface.png
1920 Whether to show the sidebar at all.
1923 Show the list of functions, variables, and other information in the
1924 current document you are editing.
1927 Show all the documents you have open currently. This can be used to
1928 change between documents (see `Switching between documents`_) and
1929 to perform some common operations such as saving, closing and reloading.
1932 Whether to place the sidebar on the left or right of the editor window.
1938 Change the font used to display documents.
1941 Change the font used for the Symbols sidebar tab.
1944 Change the font used for the message window area.
1950 Show the status bar at the bottom of the main window. It gives information about
1951 the file you are editing like the line and column you are on, whether any
1952 modifications were done, the file encoding, the filetype and other information.
1954 Interface Notebook tab preferences
1955 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1957 .. image:: ./images/pref_dialog_interface_notebook.png
1963 Show a notebook tab for all documents so you can switch between them
1964 using the mouse (instead of using the Documents window).
1967 Make each tab show a close button so you can easily close open
1970 Placement of new file tabs
1971 Whether to create a document with its notebook tab to the left or
1972 right of all existing tabs.
1975 Whether to place file tabs next to the current tab
1976 rather than at the edges of the notebook.
1978 Double-clicking hides all additional widgets
1979 Whether to call the View->Toggle All Additional Widgets command
1980 when double-clicking on a notebook tab.
1986 Set the positioning of the editor's notebook tabs to the right,
1987 left, top, or bottom of the editing window.
1990 Set the positioning of the sidebar's notebook tabs to the right,
1991 left, top, or bottom of the sidebar window.
1994 Set the positioning of the message window's notebook tabs to the
1995 right, left, top, or bottom of the message window.
1998 Interface Toolbar preferences
1999 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2001 Affects the main toolbar underneath the menu bar.
2003 .. image:: ./images/pref_dialog_interface_toolbar.png
2009 Whether to show the toolbar.
2011 Append Toolbar to the Menu
2012 Allows to append the toolbar to the main menu bar instead of placing it below.
2013 This is useful to save vertical space.
2016 See `Customizing the toolbar`_.
2022 Select the toolbar icon style to use - either icons and text, just
2024 The choice System default uses whatever icon style is set by GTK.
2027 Select the size of the icons you see (large, small or very small).
2028 The choice System default uses whatever icon size is set by GTK.
2031 Editor Features preferences
2032 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2034 .. image:: ./images/pref_dialog_edit_features.png
2040 Show long lines wrapped around to new display lines.
2045 Whether to move the cursor to the first non-whitespace character
2046 on the line when you hit the home key on your keyboard. Pressing it
2047 again will go to the very start of the line.
2049 Disable Drag and Drop
2050 Do not allow the dragging and dropping of selected text in documents.
2053 Allow groups of lines in a document to be collapsed for easier
2056 Fold/Unfold all children of a fold point
2057 Whether to fold/unfold all child fold points when a parent line
2060 Use indicators to show compile errors
2061 Underline lines with compile errors using red squiggles to indicate
2062 them in the editor area.
2064 Newline strips trailing spaces
2065 Remove any whitespace at the end of the line when you hit the
2066 Enter/Return key. See also `Strip trailing spaces`_. Note
2067 auto indentation is calculated before stripping, so although this
2068 setting will clear a blank line, it will not set the next line
2069 indentation back to zero.
2071 Line breaking column
2072 The editor column number to insert a newline at when Line Breaking
2073 is enabled for the current document.
2075 Comment toggle marker
2076 A string which is added when toggling a line comment in a source file.
2077 It is used to mark the comment as toggled.
2080 Editor Indentation preferences
2081 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2083 .. image:: ./images/pref_dialog_edit_indentation.png
2088 See `Indentation`_ for more information.
2091 The width of a single indent size in spaces. By default the indent
2092 size is equivalent to 4 spaces.
2094 Detect width from file
2095 Try to detect and set the indent width based on file content, when
2099 When Geany inserts indentation, whether to use:
2103 * Tabs and Spaces, depending on how much indentation is on a line
2105 The *Tabs and Spaces* indent type is also known as *Soft tab
2106 support* in some other editors.
2108 Detect type from file
2109 Try to detect and set the indent type based on file content, when
2113 The type of auto-indentation you wish to use after pressing Enter,
2117 Just add the indentation of the previous line.
2119 Add indentation based on the current filetype and any characters at
2120 the end of the line such as ``{``, ``}`` for C, ``:`` for Python.
2122 Like *Current chars* but for C-like languages, make a closing
2123 ``}`` brace line up with the matching opening brace.
2126 If set, pressing tab will indent the current line or selection, and
2127 unindent when pressing Shift-tab. Otherwise, the tab key will
2128 insert a tab character into the document (which can be different
2129 from indentation, depending on the indent type).
2132 There are also separate configurable keybindings for indent &
2133 unindent, but this preference allows the tab key to have different
2134 meanings in different contexts - e.g. for snippet completion.
2136 Editor Completions preferences
2137 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2139 .. image:: ./images/pref_dialog_edit_completions.png
2145 Whether to replace special keywords after typing Tab into a
2146 pre-defined text snippet.
2147 See `User-definable snippets`_.
2149 XML/HTML tag auto-closing
2150 When you open an XML/HTML tag automatically generate its
2153 Automatic continuation multi-line comments
2154 Continue automatically multi-line comments in languages like C, C++
2155 and Java when a new line is entered inside such a comment.
2156 With this option enabled, Geany will insert a ``*`` on every new line
2157 inside a multi-line comment, for example when you press return in the
2161 * This is a C multi-line comment, press <Return>
2163 then Geany would insert::
2167 on the next line with the correct indentation based on the previous line,
2168 as long as the multi-line is not closed by ``*/``.
2170 Autocomplete symbols
2171 When you start to type a symbol name, look for the full string to
2172 allow it to be completed for you.
2174 Autocomplete all words in document
2175 When you start to type a word, Geany will search the whole document for
2176 words starting with the typed part to complete it, assuming there
2177 are no tag names to show.
2179 Drop rest of word on completion
2180 Remove any word part to the right of the cursor when choosing a
2181 completion list item.
2183 Characters to type for autocompletion
2184 Number of characters of a word to type before autocompletion is
2187 Completion list height
2188 The number of rows to display for the autocompletion window.
2190 Max. symbol name suggestions
2191 The maximum number of items in the autocompletion list.
2193 Symbol list update frequency
2194 The minimum delay (in milliseconds) between two symbol list updates.
2196 This option determines how frequently the tag list is updated for the
2197 current document. The smaller the delay, the more up-to-date the symbol
2198 list (and then the completions); but rebuilding the symbol list has a
2199 cost in performance, especially with large files.
2201 The default value is 250ms, which means the symbol list will be updated
2202 at most four times per second, even if the document changes continuously.
2204 A value of 0 disables automatic updates, so the symbol list will only be
2205 updated upon document saving.
2208 Auto-close quotes and brackets
2209 ``````````````````````````````
2211 Geany can automatically insert a closing bracket and quote characters when
2212 you open them. For instance, you type a ``(`` and Geany will automatically
2213 insert ``)``. With the following options, you can define for which
2214 characters this should work.
2217 Auto-close parenthesis when typing an opening one
2220 Auto-close curly brackets (braces) when typing an opening one
2223 Auto-close square brackets when typing an opening one
2226 Auto-close single quotes when typing an opening one
2229 Auto-close double quotes when typing an opening one
2232 Editor Display preferences
2233 ^^^^^^^^^^^^^^^^^^^^^^^^^^
2235 This is for visual elements displayed in the editor window.
2237 .. image:: ./images/pref_dialog_edit_display.png
2242 Invert syntax highlighting colors
2243 Invert all colors, by default this makes white text on a black
2246 Show indendation guides
2247 Show vertical lines to help show how much leading indentation there
2251 Mark all tabs with an arrow "-->" symbol and spaces with dots to
2252 show which kinds of whitespace are used.
2255 Display a symbol everywhere that a carriage return or line feed
2259 Show or hide the Line Number margin.
2262 Show or hide the small margin right of the line numbers, which is used
2265 Stop scrolling at last line
2266 When enabled Geany stops scrolling when at the last line of the document.
2267 Otherwise you can scroll one more page even if there are no real lines.
2273 The long line marker helps to indicate overly-long lines, or as a hint
2274 to the user for when to break the line.
2278 Show a thin vertical line in the editor window at the given column
2281 Change the background color of characters after the given column
2282 position to the color set below. (This is recommended over the
2283 *Line* setting if you use proportional fonts).
2285 Don't mark long lines at all.
2288 Set this value to a value greater than zero to specify the column
2289 where it should appear.
2291 Long line marker color
2292 Set the color of the long line marker.
2298 Virtual space is space beyond the end of each line.
2299 The cursor may be moved into virtual space but no real space will be
2300 added to the document until there is some text typed or some other
2301 text insertion command is used.
2304 Do not show virtual spaces
2306 Only for rectangular selections
2307 Only show virtual spaces beyond the end of lines when drawing a rectangular selection
2310 Always show virtual spaces beyond the end of lines
2316 .. image:: ./images/pref_dialog_files.png
2321 Open new documents from the command-line
2322 Whether to create new documents when passing filenames that don't
2323 exist from the command-line.
2325 Default encoding (new files)
2326 The type of file encoding you wish to use when creating files.
2328 Used fixed encoding when opening files
2329 Assume all files you are opening are using the type of encoding specified below.
2331 Default encoding (existing files)
2332 Opens all files with the specified encoding instead of auto-detecting it.
2333 Use this option when it's not possible for Geany to detect the exact encoding.
2335 Default end of line characters
2336 The end of line characters to which should be used for new files.
2337 On Windows systems, you generally want to use CR/LF which are the common
2338 characters to mark line breaks.
2339 On Unix-like systems, LF is default and CR is used on MAC systems.
2343 Perform formatting operations when a document is saved. These
2344 can each be undone with the Undo command.
2346 Ensure newline at file end
2347 Add a newline at the end of the document if one is missing.
2349 Ensure consistent line endings
2350 Ensures that newline characters always get converted before
2351 saving, avoiding mixed line endings in the same file.
2353 .. _Strip trailing spaces:
2355 Strip trailing spaces
2356 Remove any whitespace at the end of each document line.
2359 This does not apply to Diff documents, e.g. patch files.
2361 Replace tabs by space
2362 Replace all tabs in the document with the equivalent number of spaces.
2365 It is better to use spaces to indent than use this preference - see
2371 Recent files list length
2372 The number of files to remember in the recently used files list.
2375 The number of seconds to periodically check the current document's
2376 file on disk in case it has changed. Setting it to 0 will disable
2380 These checks are only performed on local files. Remote files are
2381 not checked for changes due to performance issues
2382 (remote files are files in ``~/.gvfs/``).
2388 .. image:: ./images/pref_dialog_tools.png
2394 The command to execute a script in a terminal. Occurrences of %c
2395 in the command are substituted with the run script name, see
2396 `Terminal emulators`_.
2399 The location of your web browser executable.
2402 The location of the grep executable.
2405 For Windows users: at the time of writing it is recommended to use
2406 the grep.exe from the UnxUtils project
2407 (http://sourceforge.net/projects/unxutils). The grep.exe from the
2408 Mingw project for instance might not work with Geany at the moment.
2414 Set this to a command to execute on the current word.
2415 You can use the "%s" wildcard to pass the current word below the cursor
2416 to the specified command.
2419 Template preferences
2420 ^^^^^^^^^^^^^^^^^^^^
2422 This data is used as meta data for various template text to insert into
2423 a document, such as the file header. You only need to set fields that
2424 you want to use in your template files.
2426 .. image:: ./images/pref_dialog_templ.png
2432 The name of the developer who will be creating files.
2435 The initials of the developer.
2438 The email address of the developer.
2441 You may wish to add anti-spam markup, e.g. ``name<at>site<dot>ext``.
2444 The company the developer is working for.
2447 The initial version of files you will be creating.
2450 Specify a format for the the {year} wildcard. You can use any conversion specifiers
2451 which can be used with the ANSI C strftime function. For details please see
2452 http://man.cx/strftime.
2455 Specify a format for the the {date} wildcard. You can use any conversion specifiers
2456 which can be used with the ANSI C strftime function. For details please see
2457 http://man.cx/strftime.
2460 Specify a format for the the {datetime} wildcard. You can use any conversion specifiers
2461 which can be used with the ANSI C strftime function. For details please see
2462 http://man.cx/strftime.
2465 Keybinding preferences
2466 ^^^^^^^^^^^^^^^^^^^^^^
2468 .. image:: ./images/pref_dialog_keys.png
2470 There are some commands listed in the keybinding dialog that are not, by default,
2471 bound to a key combination, and may not be available as a menu item.
2474 For more information see the section `Keybindings`_.
2477 Printing preferences
2478 ^^^^^^^^^^^^^^^^^^^^
2480 .. image:: ./images/pref_dialog_printing.png
2482 Use external command for printing
2483 Use a system command to print your file out.
2485 Use native GTK printing
2486 Let the GTK GUI toolkit handle your print request.
2489 Print the line numbers on the left of your paper.
2492 Print the page number on the bottom right of your paper.
2495 Print a header on every page that is sent to the printer.
2497 Use base name of the printed file
2498 Don't use the entire path for the header, only the filename.
2501 How the date should be printed. You can use the same format
2502 specifiers as in the ANSI C function strftime(). For details please
2503 see http://man.cx/strftime.
2509 .. image:: ./images/pref_dialog_various.png
2511 Rarely used preferences, explained in the table below. A few of them require
2512 restart to take effect, and a few other will only affect newly opened or created
2513 documents before restart.
2515 ================================ =========================================== ========== ===========
2516 Key Description Default Applies
2517 ================================ =========================================== ========== ===========
2519 use_gtk_word_boundaries Whether to look for the end of a word true to new
2520 when using word-boundary related documents
2521 Scintilla commands (see `Scintilla
2522 keyboard commands`_).
2523 brace_match_ltgt Whether to highlight <, > angle brackets. false immediately
2524 complete_snippets_whilst_editing Whether to allow completion of snippets false immediately
2525 when editing an existing line (i.e. there
2526 is some text after the current cursor
2527 position on the line). Only used when the
2528 keybinding `Complete snippet` is set to
2530 show_editor_scrollbars Whether to display scrollbars. If set to true immediately
2531 false, the horizontal and vertical
2532 scrollbars are hidden completely.
2533 indent_hard_tab_width The size of a tab character. Don't change 8 immediately
2534 it unless you really need to; use the
2535 indentation settings instead.
2536 **Interface related**
2537 show_symbol_list_expanders Whether to show or hide the small true to new
2538 expander icons on the symbol list documents
2540 allow_always_save Whether files can be saved always, even false immediately
2541 if they don't have any changes.
2542 By default, the Save button and menu
2543 item are disabled when a file is
2544 unchanged. When setting this option to
2545 true, the Save button and menu item are
2546 always active and files can be saved.
2547 compiler_tab_autoscroll Whether to automatically scroll to the true immediately
2548 last line of the output in the Compiler
2550 statusbar_template The status bar statistics line format. See below. immediately
2551 (See `Statusbar Templates`_ for details).
2552 new_document_after_close Whether to open a new document after all false immediately
2553 documents have been closed.
2554 msgwin_status_visible Whether to show the Status tab in the true immediately
2556 msgwin_compiler_visible Whether to show the Compiler tab in the true immediately
2558 msgwin_messages_visible Whether to show the Messages tab in the true immediately
2560 msgwin_scribble_visible Whether to show the Scribble tab in the true immediately
2563 emulation Terminal emulation mode. Only change this xterm immediately
2564 if you have VTE termcap files other than
2565 ``vte/termcap/xterm``.
2566 send_selection_unsafe By default, Geany strips any trailing false immediately
2567 newline characters from the current
2568 selection before sending it to the terminal
2569 to not execute arbitrary code. This is
2570 mainly a security feature.
2571 If, for whatever reasons, you really want
2572 it to be executed directly, set this option
2574 send_cmd_prefix String with which prefix the commands sent Empty immediately
2575 to the shell. This may be used to tell
2576 some shells (BASH with ``HISTCONTROL`` set
2577 to ``ignorespace``, ZSH with
2578 ``HIST_IGNORE_SPACE`` enabled, etc.) from
2579 putting these commands in their history by
2580 setting this to a space. Note that leading
2581 spaces must be escaped using `\s` in the
2584 use_atomic_file_saving Defines the mode how Geany saves files to false immediately
2585 disk. If disabled, Geany directly writes
2586 the content of the document to disk. This
2587 might cause loss of data when there is
2588 no more free space on disk to save the
2589 file. When set to true, Geany first saves
2590 the contents into a temporary file and if
2591 this succeeded, the temporary file is
2592 moved to the real file to save.
2593 This gives better error checking in case of
2594 no more free disk space. But it also
2595 destroys hard links of the original file
2596 and its permissions (e.g. executable flags
2597 are reset). Use this with care as it can
2598 break things seriously.
2599 The better approach would be to ensure your
2600 disk won't run out of free space.
2601 use_gio_unsafe_file_saving Whether to use GIO as the unsafe file true immediately
2602 saving backend. It is better on most
2603 situations but is known not to work
2604 correctly on some complex setups.
2605 gio_unsafe_save_backup Make a backup when using GIO unsafe file false immediately
2606 saving. Backup is named `filename~`.
2607 **Filetype related**
2608 extract_filetype_regex Regex to extract filetype name from file See below. immediately
2609 via capture group one.
2611 find_selection_type See `Find selection`_. 0 immediately
2612 **Build Menu related**
2613 number_ft_menu_items The maximum number of menu items in the 2 on restart
2614 filetype section of the Build menu.
2615 number_non_ft_menu_items The maximum number of menu items in the 3 on restart
2616 independent section of the Build menu.
2617 number_exec_menu_items The maximum number of menu items in the 2 on restart
2618 execute section of the Build menu.
2619 ================================ =========================================== ========== ===========
2621 The extract_filetype_regex has the default value GEANY_DEFAULT_FILETYPE_REGEX.
2626 The default statusbar template is (note ``\t`` = tab):
2628 ``line: %l / %L\t col: %c\t sel: %s\t %w %t %mmode: %M encoding: %e filetype: %f scope: %S``
2630 Settings the preference to an empty string will also cause Geany to use this
2633 The following format characters are available for the statusbar template:
2635 ============ ===========================================================
2636 Placeholder Description
2637 ============ ===========================================================
2638 ``%l`` The current line number starting at 1
2639 ``%L`` The total number of lines
2640 ``%c`` The current column number starting at 0
2641 ``%C`` The current column number starting at 1
2642 ``%s`` The number of selected characters or if only whole lines
2643 selected, the number of selected lines.
2644 ``%w`` Shows ``RO`` when the document is in read-only mode,
2645 otherwise shows whether the editor is in overtype (OVR)
2646 or insert (INS) mode.
2647 ``%t`` Shows the indentation mode, either tabs (TAB),
2648 spaces (SP) or both (T/S).
2649 ``%m`` Shows whether the document is modified (MOD) or nothing.
2650 ``%M`` The name of the document's line-endings (ex. ``Unix (LF)``)
2651 ``%e`` The name of the document's encoding (ex. UTF-8).
2652 ``%f`` The filetype of the document (ex. None, Python, C, etc).
2653 ``%S`` The name of the scope where the caret is located.
2654 ``%p`` The caret position in the entire document starting at 0.
2655 ``%r`` Shows whether the document is read-only (RO) or nothing.
2656 ``%Y`` The Scintilla style number at the caret position. This is
2657 useful if you're debugging color schemes or related code.
2658 ============ ===========================================================
2660 Terminal (VTE) preferences
2661 ^^^^^^^^^^^^^^^^^^^^^^^^^^
2663 See also: `Virtual terminal emulator widget (VTE)`_.
2665 .. image:: ./images/pref_dialog_vte.png
2671 Select the font that will be used in the terminal emulation control.
2674 Select the font color.
2677 Select the background color of the terminal.
2680 Select the background image to show behind the terminal's text.
2683 The number of lines buffered so that you can scroll though the history.
2686 The location of the shell on your system.
2689 Scroll the terminal to the prompt line when pressing a key.
2692 Scroll the output down.
2695 Let the terminal cursor blink.
2697 Override Geany keybindings
2698 Allow the VTE to receive keyboard shortcuts (apart from focus commands).
2700 Disable menu shortcut key (F10 by default)
2701 Disable the menu shortcut when you are in the virtual terminal.
2703 Follow path of the current file
2704 Make the path of the terminal change according to the path of the
2707 Execute programs in VTE
2708 Execute programs in the virtual terminal instead of using the external
2709 terminal tool. Note that if you run multiple execute commands at once
2710 the output may become mixed together in the VTE.
2712 Don't use run script
2713 Don't use the simple run script which is usually used to display
2714 the exit status of the executed program.
2715 This can be useful if you already have a program running in the VTE
2716 like a Python console (e.g. ipython). Use this with care.
2722 Project management is optional in Geany. Currently it can be used for:
2724 * Storing and opening session files on a project basis.
2725 * Overriding default settings with project equivalents.
2726 * Configuring the Build menu on a project basis.
2728 A list of session files can be stored and opened with the project
2729 when the *Use project-based session files* preference is enabled,
2730 in the *Project* group of the `Preferences`_ dialog.
2732 As long as a project is open, the Build menu will use
2733 the items defined in project's settings, instead of the defaults.
2734 See `Build Menu Configuration`_ for information on configuring the menu.
2736 The current project's settings are saved when it is closed, or when
2737 Geany is shutdown. When restarting Geany, the previously opened project
2738 file that was in use at the end of the last session will be reopened.
2740 The project menu items are detailed below.
2746 To create a new project, fill in the *Name* field. By default this
2747 will setup a new project file ``~/projects/name.geany``. Usually it's
2748 best to store all your project files in the same directory (they are
2749 independent of any source directory trees).
2751 The Base path text field is setup to use ``~/projects/name``. This
2752 can safely be set to any existing path -- it will not touch the file
2753 structure contained in it.
2759 You can set an optional description for the project. Currently it's
2760 only used for a template wildcard - see `Template wildcards`_.
2762 The *Base path* field is used as the directory to run the Build menu commands.
2763 The specified path can be an absolute path or it is considered to be
2764 relative to the project's file name.
2766 The *File patterns* field allows to specify a list of file patterns for the
2767 project, which can be used in the `Find in files`_ dialog.
2769 The *Indentation* tab allows you to override the default
2770 `Indentation`_ settings.
2776 The Open command displays a standard file chooser, starting in
2777 ``~/projects``. Choose a project file named with the ``.geany``
2780 When project session support is enabled, Geany will close the currently
2781 open files and open the session files associated with the project.
2787 Project file settings are saved when the project is closed.
2789 When project session support is enabled, Geany will close the project
2790 session files and open any previously closed default session files.
2795 After editing code with Geany, the next step is to compile, link, build,
2796 interpret, run etc. As Geany supports many languages each with a different
2797 approach to such operations, and as there are also many language independent
2798 software building systems, Geany does not have a built-in build system, nor
2799 does it limit which system you can use. Instead the build menu provides
2800 a configurable and flexible means of running any external commands to
2801 execute your preferred build system.
2803 This section provides a description of the default configuration of the
2804 build menu and then covers how to configure it, and where the defaults fit in.
2806 Running the commands from within Geany has two benefits:
2808 * The current file is automatically saved before the command is run.
2809 * The output is captured in the Compiler notebook tab and parsed for
2812 Warnings and errors that can be parsed for line numbers will be shown in
2813 red in the Compiler tab and you can click on them to switch to the relevant
2814 source file (or open it) and mark the line number. Also lines with
2815 warnings or errors are marked in the source, see `Indicators`_ below.
2818 If Geany's default error message parsing does not parse errors for
2819 the tool you're using, you can set a custom regex in the Build Commands
2820 Dialog, see `Build Menu Configuration`_.
2825 Indicators are red squiggly underlines which are used to highlight
2826 errors which occurred while compiling the current file. So you can
2827 easily see where your code failed to compile. You can remove them by
2828 selecting *Remove Error Indicators* in the Document menu.
2830 If you do not like this feature, you can disable it - see `Editor Features
2834 Default build menu items
2835 ^^^^^^^^^^^^^^^^^^^^^^^^
2836 Depending on the current file's filetype, the default Build menu will contain
2837 the following items:
2842 * Make Custom Target
2847 * Set Build Menu Commands
2853 The Compile command has different uses for different kinds of files.
2855 For compilable languages such as C and C++, the Compile command is
2856 set up to compile the current source file into a binary object file.
2858 Java source files will be compiled to class file bytecode.
2860 Interpreted languages such as Perl, Python, Ruby will compile to
2861 bytecode if the language supports it, or will run a syntax check,
2862 or if that is not available will run the file in its language interpreter.
2867 For compilable languages such as C and C++, the Build command will link
2868 the current source file's equivalent object file into an executable. If
2869 the object file does not exist, the source will be compiled and linked
2870 in one step, producing just the executable binary.
2872 Interpreted languages do not use the Build command.
2875 If you need complex settings for your build system, or several
2876 different settings, then writing a Makefile and using the Make
2877 commands is recommended; this will also make it easier for users to
2878 build your software.
2884 This runs "make" in the same directory as the
2890 This is similar to running 'Make' but you will be prompted for
2891 the make target name to be passed to the Make tool. For example,
2892 typing 'clean' in the dialog prompt will run "make clean".
2898 Make object will run "make current_file.o" in the same directory as
2899 the current file, using the filename for 'current_file'. It is useful
2900 for building just the current file without building the whole project.
2905 The next error item will move to the next detected error in the file.
2909 The previous error item will move to the previous detected error in the file.
2914 Execute will run the corresponding executable file, shell script or
2915 interpreted script in a terminal window. The command set in the
2916 "Set Build Commands" dialog is run in a script to ensure the terminal
2917 stays open after execution completes. Note: see `Terminal emulators`_
2918 below for the command format. Alternatively the built-in VTE can be used
2919 if it is available - see `Virtual terminal emulator widget (VTE)`_.
2921 After your program or script has finished executing, the run script will
2922 prompt you to press the return key. This allows you to review any text
2923 output from the program before the terminal window is closed.
2926 The execute command output is not parsed for errors.
2929 Stopping running processes
2930 ``````````````````````````
2932 When there is a running program, the Execute menu item in the menu and
2933 the Run button in the toolbar
2934 each become a stop button so you can stop the current running program (and
2935 any child processes). This works by sending the SIGQUIT signal to the process.
2937 Depending on the process you started it is possible that the process
2938 cannot be stopped. For example this can happen when the process creates
2939 more than one child process.
2945 The Terminal field of the tools preferences tab requires a command to
2946 execute the terminal program and to pass it the name of the Geany run
2947 script that it should execute in a Bourne compatible shell (eg /bin/sh).
2948 The marker "%c" is substituted with the name of the Geany run script,
2949 which is created in the working directory set in the Build commands
2950 dialog, see `Build menu commands dialog`_ for details.
2952 As an example the default (Linux) command is::
2954 xterm -e "/bin/sh %c"
2960 By default Compile, Build and Execute are fairly basic commands. You
2961 may wish to customise them using *Set Build Commands*.
2963 E.g. for C you can add any include paths and compile flags for the
2964 compiler, any library names and paths for the linker, and any
2965 arguments you want to use when running Execute.
2967 Build menu configuration
2968 ^^^^^^^^^^^^^^^^^^^^^^^^
2970 The build menu has considerable flexibility and configurability, allowing
2971 both menu labels the commands they execute and the directory they execute
2972 in to be configured.
2974 For example, if you change one of the default make commands to run say 'waf'
2975 you can also change the label to match.
2977 These settings are saved automatically when Geany is shut down.
2979 The build menu is divided into four groups of items each with different
2982 * Filetype build commands - are configurable and depend on the filetype of the
2983 current document; they capture output in the compiler tab and parse it for
2985 * Independent build commands - are configurable and mostly don't depend on the
2986 filetype of the current document; they also capture output in the
2987 compiler tab and parse it for errors.
2988 * Execute commands - are configurable and intended for executing your
2989 program or other long running programs. The output is not parsed for errors
2990 and is directed to the terminal command selected in preferences.
2991 * Fixed commands - these perform built-in actions:
2993 * Go to the next error.
2994 * Go to the previous error.
2995 * Show the build menu commands dialog.
2997 The maximum numbers of items in each of the configurable groups can be
2998 configured in the `Various preferences`_. Even though the maximum number of
2999 items may have been increased, only those menu items that have values
3000 configured are shown in the menu.
3002 The groups of menu items obtain their configuration from four potential
3003 sources. The highest priority source that has the menu item defined will
3004 be used. The sources in decreasing priority are:
3006 * A project file if open
3007 * The user preferences
3008 * The system filetype definitions
3011 The detailed relationships between sources and the configurable menu item groups
3012 is shown in the following table.
3014 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
3015 | Group | Project File | Preferences | System Filetype | Defaults |
3016 +==============+=====================+==========================+===================+===============================+
3017 | Filetype | Loads From: project | Loads From: | Loads From: | None |
3018 | | file | filetypes.xxx file in | filetypes.xxx in | |
3019 | | | ~/.config/geany/filedefs | Geany install | |
3020 | | Saves To: project | | | |
3021 | | file | Saves to: as above, | Saves to: as user | |
3022 | | | creating if needed. | preferences left. | |
3023 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
3024 | Filetype | Loads From: project | Loads From: | Loads From: | 1: |
3025 | Independent | file | geany.conf file in | filetypes.xxx in | Label: _Make |
3026 | | | ~/.config/geany | Geany install | Command: make |
3027 | | Saves To: project | | | |
3028 | | file | Saves to: as above, | Saves to: as user | 2: |
3029 | | | creating if needed. | preferences left. | Label: Make Custom _Target |
3030 | | | | | Command: make |
3033 | | | | | Label: Make _Object |
3034 | | | | | Command: make %e.o |
3035 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
3036 | Execute | Loads From: project | Loads From: | Loads From: | Label: _Execute |
3037 | | file or else | geany.conf file in | filetypes.xxx in | Command: ./%e |
3038 | | filetype defined in | ~/.config/geany or else | Geany install | |
3039 | | project file | filetypes.xxx file in | | |
3040 | | | ~/.config/geany/filedefs | Saves To: as user | |
3041 | | Saves To: | | preferences left. | |
3042 | | project file | Saves To: | | |
3043 | | | filetypes.xxx file in | | |
3044 | | | ~/.config/geany/filedefs | | |
3045 +--------------+---------------------+--------------------------+-------------------+-------------------------------+
3047 The following notes on the table reference cells by coordinate as (group,source):
3049 * General - for filetypes.xxx substitute the appropriate extension for
3050 the filetype of the current document for xxx - see `filenames`_.
3052 * System Filetypes - Labels loaded from these sources are locale sensitive
3053 and can contain translations.
3055 * (Filetype, Project File) and (Filetype, Preferences) - preferences use a full
3056 filetype file so that users can configure all other filetype preferences
3057 as well. Projects can only configure menu items per filetype. Saving
3058 in the project file means that there is only one file per project not
3061 * (Filetype-Independent, System Filetype) - although conceptually strange, defining
3062 filetype-independent commands in a filetype file, this provides the ability to
3063 define filetype dependent default menu items.
3065 * (Execute, Project File) and (Execute, Preferences) - the project independent
3066 execute and preferences independent execute commands can only be set by hand
3067 editing the appropriate file, see `Preferences file format`_ and `Project file
3070 Build menu commands dialog
3071 ^^^^^^^^^^^^^^^^^^^^^^^^^^
3073 Most of the configuration of the build menu is done through the Build Menu
3074 Commands Dialog. You edit the configuration sourced from preferences in the
3075 dialog opened from the Build->Build Menu Commands item and you edit the
3076 configuration from the project in the build tab of the project preferences
3077 dialog. Both use the same form shown below.
3079 .. image:: ./images/build_menu_commands_dialog.png
3081 The dialog is divided into three sections:
3083 * Filetype build commands (selected based on the current document's filetype).
3084 * Independent build commands (available regardless of filetype).
3085 * Filetype execute commands.
3087 The filetype and independent sections also each contain a field for the regular
3088 expression used for parsing command output for error and warning messages.
3090 The columns in the first three sections allow setting of the label, command,
3091 and working directory to run the command in.
3093 An item with an empty label will not be shown in the menu.
3095 An empty working directory will default to the directory of the current document.
3096 If there is no current document then the command will not run.
3098 The dialog will always show the command selected by priority, not just the
3099 commands configured in this configuration source. This ensures that you always
3100 see what the menu item is going to do if activated.
3102 If the current source of the menu item is higher priority than the
3103 configuration source you are editing then the command will be shown
3104 in the dialog but will be insensitive (greyed out). This can't happen
3105 with the project source but can with the preferences source dialog.
3107 The clear buttons remove the definition from the configuration source you are editing.
3108 When you do this the command from the next lower priority source will be shown.
3109 To hide lower priority menu items without having anything show in the menu
3110 configure with a nothing in the label but at least one character in the command.
3112 Substitutions in commands and working directories
3113 `````````````````````````````````````````````````
3115 The first occurence of each of the following character sequences in each of the
3116 command and working directory fields is substituted by the items specified below
3117 before the command is run.
3119 * %d - substituted by the absolute path to the directory of the current file.
3120 * %e - substituted by the name of the current file without the extension or path.
3121 * %f - substituted by the name of the current file without the path.
3122 * %p - if a project is open, substituted by the base path from the project.
3125 If the basepath set in the project preferences is not an absolute path , then it is
3126 taken as relative to the directory of the project file. This allows a project file
3127 stored in the source tree to specify all commands and working directories relative
3128 to the tree itself, so that the whole tree including the project file, can be moved
3129 and even checked into and out of version control without having to re-configure the
3132 Build menu keyboard shortcuts
3133 `````````````````````````````
3135 Keyboard shortcuts can be defined for the first two filetype menu items, the first three
3136 independent menu items, the first two execute menu items and the fixed menu items.
3137 In the keybindings configuration dialog (see `Keybinding preferences`_)
3138 these items are identified by the default labels shown in the `Build Menu`_ section above.
3140 It is currently not possible to bind keyboard shortcuts to more than these menu items.
3142 You can also use underlines in the labels to set mnemonic characters.
3147 The configurable Build Menu capability was introduced in Geany 0.19 and
3148 required a new section to be added to the configuration files (See
3149 `Preferences file format`_). Geany will still load older format project,
3150 preferences and filetype file settings and will attempt to map them into the new
3151 configuration format. There is not a simple clean mapping between the formats.
3152 The mapping used produces the most sensible results for the majority of cases.
3153 However, if they do not map the way you want, you may have to manually
3154 configure some settings using the Build Commands
3155 Dialog or the Build tab of the project preferences dialog.
3157 Any setting configured in either of these dialogs will override settings mapped from
3158 older format configuration files.
3163 Since Geany 0.13 there has been printing support using GTK's printing API.
3164 The printed page(s) will look nearly the same as on your screen in Geany.
3165 Additionally, there are some options to modify the printed page(s).
3168 The background text color is set to white, except for text with
3169 a white foreground. This allows dark color schemes to save ink
3172 You can define whether to print line numbers, page numbers at the bottom of
3173 each page and whether to print a page header on each page. This header
3174 contains the filename of the printed document, the current page number and
3175 the date and time of printing. By default, the file name of the document
3176 with full path information is added to the header. If you prefer to add
3177 only the basename of the file(without any path information) you can set it
3178 in the preferences dialog. You can also adjust the format of the date and
3179 time added to the page header. The available conversion specifiers are the
3180 same as the ones which can be used with the ANSI C strftime function.
3182 All of these settings can also be changed in the print dialog just before
3183 actual printing is done.
3184 On Unix-like systems the provided print dialog offers a print preview. The
3185 preview file is opened with a PDF viewer and by default GTK uses ``evince``
3186 for print preview. If you have not installed evince or just want to use
3187 another PDF viewer, you can change the program to use in the file
3188 ``.gtkrc-2.0`` (usually found in your home directory). Simply add a line
3191 gtk-print-preview-command = "epdfview %f"
3193 at the end of the file. Of course, you can also use xpdf, kpdf or whatever
3194 as the print preview command.
3196 Geany also provides an alternative basic printing support using a custom
3197 print command. However, the printed document contains no syntax highlighting.
3198 You can adjust the command to which the filename is passed in the preferences
3199 dialog. The default command is::
3203 ``%f`` will be substituted by the filename of the current file. Geany
3204 will not show errors from the command itself, so you should make
3205 sure that it works before(e.g. by trying to execute it from the
3208 A nicer example, which many prefer is::
3210 % a2ps -1 --medium=A4 -o - %f | xfprint4
3212 But this depends on a2ps and xfprint4. As a replacement for xfprint4,
3213 gtklp or similar programs can be used.
3220 Plugins are loaded at startup, if the *Enable plugin support*
3221 general preference is set. There is also a command-line option,
3222 ``-p``, which prevents plugins being loaded. Plugins are scanned in
3223 the following directories:
3225 * ``$prefix/lib/geany`` on Unix-like systems (see `Installation prefix`_)
3226 * The ``lib`` subfolder of the installation path on Windows.
3227 * The ``plugins`` subfolder of the user configuration directory - see
3228 `Configuration file paths`_.
3229 * The `Extra plugin path` preference (usually blank) - see `Paths`_.
3231 Most plugins add menu items to the *Tools* menu when they are loaded.
3233 See also `Plugin documentation`_ for information about single plugins
3234 which are included in Geany.
3238 The Plugin Manager dialog lets you choose which plugins
3239 should be loaded at startup. You can also load and unload plugins on the
3240 fly using this dialog. Once you click the checkbox for a specific plugin
3241 in the dialog, it is loaded or unloaded according to its previous state.
3242 By default, no plugins are loaded at startup until you select some.
3243 You can also configure some plugin specific options if the plugin
3250 Geany supports the default keyboard shortcuts for the Scintilla
3251 editing widget. For a list of these commands, see `Scintilla
3252 keyboard commands`_. The Scintilla keyboard shortcuts will be overridden
3253 by any custom keybindings with the same keyboard shortcut.
3259 There are some non-configurable bindings to switch between documents,
3260 listed below. These can also be overridden by custom keybindings.
3262 =============== ==================================
3264 =============== ==================================
3265 Alt-[1-9] Select left-most tab, from 1 to 9.
3266 Alt-0 Select right-most tab.
3267 =============== ==================================
3269 See also `Notebook tab keybindings`_.
3272 Configurable keybindings
3273 ^^^^^^^^^^^^^^^^^^^^^^^^
3275 For all actions listed below you can define your own keybindings. Open
3276 the Preferences dialog, select the desired action and click on
3277 change. In the resulting dialog you can press the key combination you
3278 want to assign to the action and it will be saved when you press OK.
3279 You can define only one key combination for each action and each key
3280 combination can only be defined for one action.
3282 The following tables list all customizable keyboard shortcuts, those
3283 which are common to many applications are marked with (C) after the
3288 =============================== ========================= ==================================================
3289 Action Default shortcut Description
3290 =============================== ========================= ==================================================
3291 New Ctrl-N (C) Creates a new file.
3293 Open Ctrl-O (C) Opens a file.
3295 Open selected file Ctrl-Shift-O Opens the selected filename.
3297 Re-open last closed tab Re-opens the last closed document tab.
3299 Save Ctrl-S (C) Saves the current file.
3301 Save As Saves the current file under a new name.
3303 Save all Ctrl-Shift-S Saves all open files.
3305 Close all Ctrl-Shift-W Closes all open files.
3307 Close Ctrl-W (C) Closes the current file.
3309 Reload file Ctrl-R (C) Reloads the current file. All unsaved changes
3312 Print Ctrl-P (C) Prints the current file.
3314 Quit Ctrl-Q (C) Quits Geany.
3315 =============================== ========================= ==================================================
3320 =============================== ========================= ==================================================
3321 Action Default shortcut Description
3322 =============================== ========================= ==================================================
3323 Undo Ctrl-Z (C) Un-does the last action.
3325 Redo Ctrl-Y Re-does the last action.
3327 Delete current line(s) Ctrl-K Deletes the current line (and any lines with a
3330 Delete to line end Ctrl-Shift-Delete Deletes from the current caret position to the
3331 end of the current line.
3333 Duplicate line or selection Ctrl-D Duplicates the current line or selection.
3335 Transpose current line Transposes the current line with the previous one.
3337 Scroll to current line Ctrl-Shift-L Scrolls the current line into the centre of the
3338 view. The cursor position and or an existing
3339 selection will not be changed.
3341 Scroll up by one line Alt-Up Scrolls the view.
3343 Scroll down by one line Alt-Down Scrolls the view.
3345 Complete word Ctrl-Space Shows the autocompletion list. If already showing
3346 tag completion, it shows document word completion
3347 instead, even if it is not enabled for automatic
3348 completion. Likewise if no tag suggestions are
3349 available, it shows document word completion.
3351 Show calltip Ctrl-Shift-Space Shows a calltip for the current function or
3354 Show macro list Ctrl-Return Shows a list of available macros and variables in
3357 Complete snippet Tab If you type a construct like if or for and press
3358 this key, it will be completed with a matching
3361 Suppress snippet completion If you type a construct like if or for and press
3362 this key, it will not be completed, and a space or
3363 tab will be inserted, depending on what the
3364 construct completion keybinding is set to. For
3365 example, if you have set the construct completion
3366 keybinding to space, then setting this to
3367 Shift+space will prevent construct completion and
3370 Context Action Executes a command and passes the current word
3371 (near the cursor position) or selection as an
3372 argument. See the section called `Context
3375 Move cursor in snippet Jumps to the next defined cursor positions in a
3376 completed snippets if multiple cursor positions
3379 Word part completion Tab When the autocompletion list is visible, complete
3380 the currently selected item up to the next word
3383 Move line(s) up Alt-PageUp Move the current line or selected lines up by
3386 Move line(s) down Alt-PageDown Move the current line or selected lines down by
3388 =============================== ========================= ==================================================
3391 Clipboard keybindings
3392 `````````````````````
3393 =============================== ========================= ==================================================
3394 Action Default shortcut Description
3395 =============================== ========================= ==================================================
3396 Cut Ctrl-X (C) Cut the current selection to the clipboard.
3398 Copy Ctrl-C (C) Copy the current selection to the clipboard.
3400 Paste Ctrl-V (C) Paste the clipboard text into the current document.
3402 Cut current line(s) Ctrl-Shift-X Cuts the current line (and any lines with a
3403 selection) to the clipboard.
3405 Copy current line(s) Ctrl-Shift-C Copies the current line (and any lines with a
3406 selection) to the clipboard.
3407 =============================== ========================= ==================================================
3412 =============================== ========================= ==================================================
3413 Action Default shortcut Description
3414 =============================== ========================= ==================================================
3415 Select all Ctrl-A (C) Makes a selection of all text in the current
3418 Select current word Alt-Shift-W Selects the current word under the cursor.
3420 Select current paragraph Alt-Shift-P Selects the current paragraph under the cursor
3421 which is defined by two empty lines around it.
3423 Select current line(s) Alt-Shift-L Selects the current line under the cursor (and any
3424 partially selected lines).
3426 Select to previous word part (Extend) selection to previous word part boundary.
3428 Select to next word part (Extend) selection to next word part boundary.
3429 =============================== ========================= ==================================================
3434 =============================== ========================= ==================================================
3435 Action Default shortcut Description
3436 =============================== ========================= ==================================================
3437 Insert date Shift-Alt-D Inserts a customisable date.
3439 Insert alternative whitespace Inserts a tab character when spaces should
3440 be used for indentation and inserts space
3441 characters of the amount of a tab width when
3442 tabs should be used for indentation.
3444 Insert New Line Before Current Inserts a new line with indentation.
3446 Insert New Line After Current Inserts a new line with indentation.
3447 =============================== ========================= ==================================================
3452 =============================== ========================= ==================================================
3453 Action Default shortcut Description
3454 =============================== ========================= ==================================================
3455 Toggle case of selection Ctrl-Alt-U Changes the case of the selection. A lowercase
3456 selection will be changed into uppercase and vice
3457 versa. If the selection contains lower- and
3458 uppercase characters, all will be converted to
3461 Comment line Comments current line or selection.
3463 Uncomment line Uncomments current line or selection.
3465 Toggle line commentation Ctrl-E Comments a line if it is not commented or removes
3466 a comment if the line is commented.
3468 Increase indent Ctrl-I Indents the current line or selection by one tab
3469 or by spaces in the amount of the tab width
3472 Decrease indent Ctrl-U Removes one tab or the amount of spaces of
3473 the tab width setting from the indentation of the
3474 current line or selection.
3476 Increase indent by one space Indents the current line or selection by one
3479 Decrease indent by one space Deindents the current line or selection by one
3482 Smart line indent Indents the current line or all selected lines
3483 with the same indentation as the previous line.
3485 Send to Custom Command 1 (2,3) Ctrl-1 (2,3) Passes the current selection to a configured
3486 external command (available for the first
3487 three configured commands, see
3488 `Sending text through custom commands`_ for
3491 Send Selection to Terminal Sends the current selection or the current
3492 line (if there is no selection) to the
3493 embedded Terminal (VTE).
3495 Reflow lines/block Reformat selected lines or current
3496 (indented) text block,
3497 breaking lines at the long line marker or the
3498 line breaking column if line breaking is
3499 enabled for the current document.
3500 =============================== ========================= ==================================================
3503 Settings keybindings
3504 ````````````````````
3505 =============================== ========================= ==================================================
3506 Action Default shortcut Description
3507 =============================== ========================= ==================================================
3508 Preferences Ctrl-Alt-P Opens preferences dialog.
3510 Plugin Preferences Opens plugin preferences dialog.
3511 =============================== ========================= ==================================================
3516 =============================== ========================= ==================================================
3517 Action Default shortcut Description
3518 =============================== ========================= ==================================================
3519 Find Ctrl-F (C) Opens the Find dialog.
3521 Find Next Ctrl-G Finds next result.
3523 Find Previous Ctrl-Shift-G Finds previous result.
3525 Find Next Selection Finds next occurence of selected text.
3527 Find Previous Selection Finds previous occurence of selected text.
3529 Replace Ctrl-H (C) Opens the Replace dialog.
3531 Find in files Ctrl-Shift-F Opens the Find in files dialog.
3533 Next message Jumps to the line with the next message in
3534 the Messages window.
3536 Previous message Jumps to the line with the previous message
3537 in the Messages window.
3539 Find Usage Ctrl-Shift-E Finds all occurrences of the current word (near
3540 the keyboard cursor) or selection in all open
3541 documents and displays them in the messages
3544 Find Document Usage Ctrl-Shift-D Finds all occurrences of the current word (near
3545 the keyboard cursor) or selection in the current
3546 document and displays them in the messages
3549 Mark All Ctrl-Shift-M Highlight all matches of the current
3550 word/selection in the current document
3551 with a colored box. If there's nothing to
3552 find, or the cursor is next to an existing match,
3553 the highlighted matches will be cleared.
3554 =============================== ========================= ==================================================
3559 =============================== ========================= ==================================================
3560 Action Default shortcut Description
3561 =============================== ========================= ==================================================
3562 Navigate forward a location Alt-Right (C) Switches to the next location in the navigation
3563 history. See the section called `Code Navigation
3566 Navigate back a location Alt-Left (C) Switches to the previous location in the
3567 navigation history. See the section called
3568 `Code navigation history`_.
3570 Go to line Ctrl-L Focuses the Go to Line entry (if visible) or
3571 shows the Go to line dialog.
3573 Goto matching brace Ctrl-B If the cursor is ahead or behind a brace, then it
3574 is moved to the brace which belongs to the current
3575 one. If this keyboard shortcut is pressed again,
3576 the cursor is moved back to the first brace.
3578 Toggle marker Ctrl-M Set a marker on the current line, or clear the
3579 marker if there already is one.
3581 Goto next marker Ctrl-. Goto the next marker in the current document.
3583 Goto previous marker Ctrl-, Goto the previous marker in the current document.
3585 Go to tag definition Ctrl-T Jump to the definition of the current word or
3586 selection. See `Go to tag definition`_.
3588 Go to tag declaration Ctrl-Shift-T Jump to the declaration of the current word or
3589 selection. See `Go to tag declaration`_.
3591 Go to Start of Line Home Move the caret to the start of the line.
3592 Behaves differently if smart_home_key_ is set.
3594 Go to End of Line End Move the caret to the end of the line.
3596 Go to Start of Display Line Alt-Home Move the caret to the start of the display line.
3597 This is useful when you use line wrapping and
3598 want to jump to the start of the wrapped, virtual
3599 line, not the real start of the whole line.
3600 If the line is not wrapped, it behaves like
3601 `Go to Start of Line`.
3603 Go to End of Display Line Alt-End Move the caret to the end of the display line.
3604 If the line is not wrapped, it behaves like
3605 `Go to End of Line`.
3607 Go to Previous Word Part Ctrl-/ Goto the previous part of the current word.
3609 Go to Next Word Part Ctrl-\\ Goto the next part of the current word.
3610 =============================== ========================= ==================================================
3614 =============================== ========================= ==================================================
3615 Action Default shortcut Description
3616 =============================== ========================= ==================================================
3617 Fullscreen F11 (C) Switches to fullscreen mode.
3619 Toggle Messages Window Toggles the message window (status and compiler
3620 messages) on and off.
3622 Toggle Sidebar Shows or hides the sidebar.
3624 Toggle all additional widgets Hide and show all additional widgets like the
3625 notebook tabs, the toolbar, the messages window
3628 Zoom In Ctrl-+ (C) Zooms in the text.
3630 Zoom Out Ctrl-- (C) Zooms out the text.
3632 Zoom Reset Ctrl-0 Reset any previous zoom on the text.
3633 =============================== ========================= ==================================================
3637 ================================ ========================= ==================================================
3638 Action Default shortcut Description
3639 ================================ ========================= ==================================================
3640 Switch to Editor F2 Switches to editor widget.
3641 Also reshows the document statistics line
3642 (after a short timeout).
3644 Switch to Search Bar F7 Switches to the search bar in the toolbar (if
3647 Switch to Message Window Focus the Message Window's current tab.
3649 Switch to Compiler Focus the Compiler message window tab.
3651 Switch to Messages Focus the Messages message window tab.
3653 Switch to Scribble F6 Switches to scribble widget.
3655 Switch to VTE F4 Switches to VTE widget.
3657 Switch to Sidebar Focus the Sidebar.
3659 Switch to Sidebar Symbol List Focus the Symbol list tab in the Sidebar
3662 Switch to Sidebar Document List Focus the Document list tab in the Sidebar
3664 ================================ ========================= ==================================================
3667 Notebook tab keybindings
3668 ````````````````````````
3669 =============================== ========================= ==================================================
3670 Action Default shortcut Description
3671 =============================== ========================= ==================================================
3672 Switch to left document Ctrl-PageUp (C) Switches to the previous open document.
3674 Switch to right document Ctrl-PageDown (C) Switches to the next open document.
3676 Switch to last used document Ctrl-Tab Switches to the previously shown document (if it's
3678 Holding Ctrl (or another modifier if the keybinding
3679 has been changed) will show a dialog, then repeated
3680 presses of the keybinding will switch to the 2nd-last
3681 used document, 3rd-last, etc. Also known as
3682 Most-Recently-Used documents switching.
3684 Move document left Ctrl-Shift-PageUp Changes the current document with the left hand
3687 Move document right Ctrl-Shift-PageDown Changes the current document with the right hand
3690 Move document first Moves the current document to the first position.
3692 Move document last Moves the current document to the last position.
3693 =============================== ========================= ==================================================
3696 Document keybindings
3697 ````````````````````
3698 ==================================== ==================== ==================================================
3699 Action Default shortcut Description
3700 ==================================== ==================== ==================================================
3701 Clone See `Cloning documents`_.
3703 Replace tabs by space Replaces all tabs with the right amount of spaces.
3705 Replace spaces by tabs Replaces leading spaces with tab characters.
3707 Toggle current fold Toggles the folding state of the current code block.
3709 Fold all Folds all contractible code blocks.
3711 Unfold all Unfolds all contracted code blocks.
3713 Reload symbol list Ctrl-Shift-R Reloads the tag/symbol list.
3715 Toggle Line wrapping Enables or disables wrapping of long lines.
3717 Toggle Line breaking Enables or disables automatic breaking of long
3718 lines at a configurable column.
3720 Remove Markers Remove any markers on lines or words which
3721 were set by using 'Mark All' in the
3722 search dialog or by manually marking lines.
3724 Remove Error Indicators Remove any error indicators in the
3727 Remove Markers and Error Indicators Combines ``Remove Markers`` and
3728 ``Remove Error Indicators``.
3729 ==================================== ==================== ==================================================
3734 =============================== ========================= ==================================================
3735 Action Default shortcut Description
3736 =============================== ========================= ==================================================
3737 New Create a new project.
3738 Open Opens a project file.
3739 Properties Shows project properties.
3740 Close Close the current project.
3741 =============================== ========================= ==================================================
3746 =============================== ========================= ==================================================
3747 Action Default shortcut Description
3748 =============================== ========================= ==================================================
3749 Compile F8 Compiles the current file.
3751 Build F9 Builds (compiles if necessary and links) the
3754 Make all Shift-F9 Builds the current file with the Make tool.
3756 Make custom target Ctrl-Shift-F9 Builds the current file with the Make tool and a
3759 Make object Shift-F8 Compiles the current file with the Make tool.
3761 Next error Jumps to the line with the next error from the
3764 Previous error Jumps to the line with the previous error from
3765 the last build process.
3767 Run F5 Executes the current file in a terminal emulation.
3769 Set Build Commands Opens the build commands dialog.
3770 =============================== ========================= ==================================================
3775 =============================== ========================= ==================================================
3776 Action Default shortcut Description
3777 =============================== ========================= ==================================================
3778 Show Color Chooser Opens the Color Chooser dialog.
3779 =============================== ========================= ==================================================
3784 =============================== ========================= ==================================================
3785 Action Default shortcut Description
3786 =============================== ========================= ==================================================
3787 Help F1 (C) Opens the manual.
3788 =============================== ========================= ==================================================
3796 You must use UTF-8 encoding *without BOM* for configuration files.
3799 Configuration file paths
3800 ------------------------
3801 Geany has default configuration files installed for the system and
3802 also per-user configuration files.
3804 The system files should not normally be edited because they will be
3805 overwritten when upgrading Geany.
3807 The user configuration directory can be overridden with the ``-c``
3808 switch, but this is not normally done. See `Command line options`_.
3811 Any missing subdirectories in the user configuration directory
3812 will be created when Geany starts.
3814 You can check the paths Geany is using with *Help->Debug Messages*.
3815 Near the top there should be 2 lines with something like::
3817 Geany-INFO: System data dir: /usr/share/geany
3818 Geany-INFO: User config dir: /home/username/.config/geany
3821 Paths on Unix-like systems
3822 ^^^^^^^^^^^^^^^^^^^^^^^^^^
3823 The system path is ``$prefix/share/geany``, where ``$prefix`` is the
3824 path where Geany is installed (see `Installation prefix`_).
3826 The user configuration directory is normally:
3827 ``/home/username/.config/geany``
3831 The system path is the ``data`` subfolder of the installation path
3834 The user configuration directory might vary, but on Windows XP it's:
3835 ``C:\Documents and Settings\UserName\Application Data\geany``
3836 On Windows 7 and above you most likely will find it at:
3837 ``C:\users\UserName\Roaming\geany``
3842 There's a *Configuration files* submenu in the *Tools* menu that
3843 contains items for some of the available user configuration files.
3844 Clicking on one opens it in the editor for you to update. Geany will
3845 reload the file after you have saved it.
3848 Other configuration files not shown here will need to be opened
3849 manually, and will not be automatically reloaded when saved.
3850 (see *Reload Configuration* below).
3852 There's also a *Reload Configuration* item which can be used if you
3853 updated one of the other configuration files, or modified or added
3856 *Reload Configuration* is also necessary to update syntax highlighting colors.
3859 Syntax highlighting colors aren't updated in open documents after
3860 saving filetypes.common as this may take a significant
3864 Global configuration file
3865 -------------------------
3867 System administrators can add a global configuration file for Geany
3868 which will be used when starting Geany and a user configuration file
3871 The global configuration file is read from ``geany.conf`` in the
3872 system configuration path - see `Configuration file paths`_. It can
3873 contain any settings which are found in the usual configuration file
3874 created by Geany, but does not have to contain all settings.
3877 This feature is mainly intended for package maintainers or system
3878 admins who want to set up Geany in a multi user environment and
3879 set some sane default values for this environment. Usually users won't
3884 Filetype definition files
3885 -------------------------
3887 All color definitions and other filetype specific settings are
3888 stored in the filetype definition files. Those settings are colors
3889 for syntax highlighting, general settings like comment characters or
3890 word delimiter characters as well as compiler and linker settings.
3892 See also `Configuration file paths`_.
3896 Each filetype has a corresponding filetype definition file. The format
3897 for built-in filetype `Foo` is::
3901 The extension is normally just the filetype name in lower case.
3903 However there are some exceptions:
3905 =============== =========
3907 =============== =========
3911 Matlab/Octave matlab
3912 =============== =========
3914 There is also the `special file filetypes.common`_.
3916 For `custom filetypes`_, the filename for `Foo` is different::
3920 See the link for details.
3924 The system-wide filetype configuration files can be found in the
3925 system configuration path and are called ``filetypes.$ext``,
3926 where $ext is the name of the filetype. For every
3927 filetype there is a corresponding definition file. There is one
3928 exception: ``filetypes.common`` -- this file is for general settings,
3929 which are not specific to a certain filetype.
3932 It is not recommended that users edit the system-wide files,
3933 because they will be overridden when Geany is updated.
3937 To change the settings, copy a file from the system configuration
3938 path to the subdirectory ``filedefs`` in your user configuration
3939 directory. Then you can edit the file and the changes will still be
3940 available after an update of Geany.
3942 Alternatively, you can create the file yourself and add only the
3943 settings you want to change. All missing settings will be read from
3944 the corresponding system configuration file.
3948 At startup Geany looks for ``filetypes.*.conf`` files in the system and
3949 user filetype paths, adding any filetypes found with the name matching
3950 the '``*``' wildcard - e.g. ``filetypes.Bar.conf``.
3952 Custom filetypes are not as powerful as built-in filetypes, but
3953 support for the following has been implemented:
3955 * Recognizing and setting the filetype (after the user has manually updated
3956 the `filetype extensions`_ file).
3957 * `Filetype group membership`_.
3958 * Reading filetype settings in the ``[settings]`` section, including:
3959 * Using an existing syntax highlighting lexer (`lexer_filetype`_ key).
3960 * Using an existing tag parser (`tag_parser`_ key).
3961 * Build commands (``[build-menu]`` section).
3962 * Loading global tags files (sharing the ``tag_parser`` filetype's namespace).
3964 See `Filetype configuration`_ for details on each setting.
3966 Creating a custom filetype from an existing filetype
3967 ````````````````````````````````````````````````````
3968 Because most filetype settings will relate to the syntax
3969 highlighting (e.g. styling, keywords, ``lexer_properties``
3970 sections), it is best to copy an existing filetype file that uses
3971 the lexer you wish to use as the basis of a custom filetype, using
3972 the correct filename extension format shown above, e.g.::
3974 cp filetypes.foo filetypes.Bar.conf
3976 Then add the ``lexer_filetype=Foo`` setting (if not already present)
3977 and add/adjust other settings.
3980 The ``[styling]`` and ``[keywords]`` sections have key names
3981 specific to each filetype/lexer. You must follow the same
3982 names - in particular, some lexers only support one keyword
3986 Filetype configuration
3987 ^^^^^^^^^^^^^^^^^^^^^^
3989 As well as the sections listed below, each filetype file can contain
3990 a [build-menu] section as described in `[build-menu] section`_.
3995 In this section the colors for syntax highlighting are defined. The
3998 * ``key=foreground_color;background_color;bold_flag;italic_flag``
4000 Colors have to be specified as RGB hex values prefixed by
4001 0x or # similar to HTML/CSS hex triplets. For example, all of the following
4002 are valid values for pure red; 0xff0000, 0xf00, #ff0000, or #f00. The
4003 values are case-insensitive but it is a good idea to use lower-case.
4004 Note that you can also use *named colors* as well by substituting the
4005 color value with the name of a color as defined in the ``[named_colors]``
4006 section, see the `[named_colors] Section`_ for more information.
4008 Bold and italic are flags and should only be "true" or "false". If their
4009 value is something other than "true" or "false", "false" is assumed.
4011 You can omit fields to use the values from the style named ``"default"``.
4013 E.g. ``key=0xff0000;;true``
4015 This makes the key style have red foreground text, default background
4016 color text and bold emphasis.
4020 The second format uses a *named style* name to reference a style
4021 defined in filetypes.common.
4023 * ``key=named_style``
4024 * ``key2=named_style2,bold,italic``
4026 The bold and italic parts are optional, and if present are used to
4027 toggle the bold or italic flags to the opposite of the named style's
4028 flags. In contrast to style definition booleans, they are a literal
4029 ",bold,italic" and commas are used instead of semi-colons.
4031 E.g. ``key=comment,italic``
4033 This makes the key style match the ``"comment"`` named style, but with
4036 To define named styles, see the filetypes.common `[named_styles]
4039 Reading styles from another filetype
4040 ************************************
4041 You can automatically copy all of the styles from another filetype
4042 definition file by using the following syntax for the ``[styling]``
4047 Where Foo is a filetype name. The corresponding ``[styling]``
4048 section from ``filetypes.foo`` will be read.
4050 This is useful when the same lexer is being used for multiple
4051 filetypes (e.g. C/C++/C#/Java/etc). For example, to make the C++
4052 styling the same as the C styling, you would put the following in
4061 This section contains keys for different keyword lists specific to
4062 the filetype. Some filetypes do not support keywords, so adding a
4063 new key will not work. You can only add or remove keywords to/from
4067 The keywords list must be in one line without line ending characters.
4070 [lexer_properties] section
4071 ``````````````````````````
4072 Here any special properties for the Scintilla lexer can be set in the
4073 format ``key.name.field=some.value``.
4075 Properties Geany uses are listed in the system filetype files. To find
4076 other properties you need Geany's source code::
4078 egrep -o 'GetProperty\w*\("([^"]+)"[^)]+\)' scintilla/Lex*.cxx
4085 This is the default file extension used when saving files, not
4086 including the period character (``.``). The extension used should
4087 match one of the patterns associated with that filetype (see
4088 `Filetype extensions`_).
4090 *Example:* ``extension=cxx``
4093 These characters define word boundaries when making selections
4094 and searching using word matching options.
4096 *Example:* (look at system filetypes.\* files)
4099 This overrides the *whitespace_chars* filetypes.common setting.
4102 A character or string which is used to comment code. If you want to use
4103 multiline comments only, don't set this but rather comment_open and
4106 Single-line comments are used in priority over multiline comments to
4107 comment a line, e.g. with the `Comment/Uncomment line` command.
4109 *Example:* ``comment_single=//``
4112 A character or string which is used to comment code. You need to also
4113 set comment_close to really use multiline comments. If you want to use
4114 single-line comments, prefer setting comment_single.
4116 Multiline comments are used in priority over single-line comments to
4117 comment a block, e.g. template comments.
4119 *Example:* ``comment_open=/*``
4122 If multiline comments are used, this is the character or string to
4125 *Example:* ``comment_close=*/``
4128 Set this to false if a comment character or string should start at
4129 column 0 of a line. If set to true it uses any indentation of the
4132 Note: Comment indentation
4134 ``comment_use_indent=true`` would generate this if a line is
4135 commented (e.g. with Ctrl-D)::
4139 ``comment_use_indent=false`` would generate this if a line is
4140 commented (e.g. with Ctrl-D)::
4142 # command_example();
4145 Note: This setting only works for single line comments (like '//',
4148 *Example:* ``comment_use_indent=true``
4151 A command which can be executed on the current word or the current
4154 Example usage: Open the API documentation for the
4155 current function call at the cursor position.
4158 be set for every filetype or if not set, a global command will
4159 be used. The command itself can be specified without the full
4160 path, then it is searched in $PATH. But for security reasons,
4161 it is recommended to specify the full path to the command. The
4162 wildcard %s will be replaced by the current word at the cursor
4163 position or by the current selection.
4165 Hint: for PHP files the following could be quite useful:
4166 context_action_cmd=firefox "http://www.php.net/%s"
4168 *Example:* ``context_action_cmd=devhelp -s "%s"``
4173 The TagManager language name, e.g. "C". Usually the same as the
4179 A filetype name to setup syntax highlighting from another filetype.
4180 This must not be recursive, i.e. it should be a filetype name that
4181 doesn't use the *lexer_filetype* key itself, e.g.::
4186 The second line is wrong, because ``filetypes.cpp`` itself uses
4187 ``lexer_filetype=C``, which would be recursive.
4189 symbol_list_sort_mode
4190 What the default symbol list sort order should be.
4192 ===== =====================================
4194 ===== =====================================
4196 1 Sort tags by appearance (line number)
4197 ===== =====================================
4199 .. _xml_indent_tags:
4202 If this setting is set to *true*, a new line after a line ending with an
4203 unclosed XML/HTML tag will be automatically indented. This only applies
4204 to filetypes for which the HTML or XML lexer is used. Such filetypes have
4205 this setting in their system configuration files.
4208 [indentation] section
4209 `````````````````````
4211 This section allows definition of default indentation settings specific to
4212 the file type, overriding the ones configured in the preferences. This can
4213 be useful for file types requiring specific indentation settings (e.g. tabs
4214 only for Makefile). These settings don't override auto-detection if activated.
4217 The forced indentation width.
4220 The forced indentation type.
4222 ===== =======================
4223 Value Indentation type
4224 ===== =======================
4227 2 Mixed (tabs and spaces)
4228 ===== =======================
4231 [build_settings] section
4232 ````````````````````````
4234 As of Geany 0.19 this section is supplemented by the `[build-menu] section`_.
4235 Values that are set in the [build-menu] section will override those in this section.
4238 This is a regular expression to parse a filename
4239 and line number from build output. If undefined, Geany will fall
4240 back to its default error message parsing.
4242 Only the first two matches will be read by Geany. Geany will look for
4243 a match that is purely digits, and use this for the line number. The
4244 remaining match will be used as the filename.
4246 *Example:* ``error_regex=(.+):([0-9]+):[0-9]+``
4248 This will parse a message such as:
4249 ``test.py:7:24: E202 whitespace before ']'``
4253 If any build menu item settings have been configured in the Build Menu Commands
4254 dialog or the Build tab of the project preferences dialog then these
4255 settings are stored in the [build-menu] section and override the settings in
4256 this section for that item.
4259 This item specifies the command to compile source code files. But
4260 it is also possible to use it with interpreted languages like Perl
4261 or Python. With these filetypes you can use this option as a kind of
4262 syntax parser, which sends output to the compiler message window.
4264 You should quote the filename to also support filenames with
4265 spaces. The following wildcards for filenames are available:
4267 * %f -- complete filename without path
4268 * %e -- filename without path and without extension
4270 *Example:* ``compiler=gcc -Wall -c "%f"``
4273 This item specifies the command to link the file. If the file is not
4274 already compiled, it will be compiled while linking. The -o option
4275 is automatically added by Geany. This item works well with GNU gcc,
4276 but may be problematic with other compilers (esp. with the linker).
4278 *Example:* ``linker=gcc -Wall "%f"``
4281 Use this item to execute your file. It has to have been built
4282 already. Use the %e wildcard to have only the name of the executable
4283 (i.e. without extension) or use the %f wildcard if you need the
4284 complete filename, e.g. for shell scripts.
4286 *Example:* ``run_cmd="./%e"``
4289 Special file filetypes.common
4290 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4292 There is a special filetype definition file called
4293 filetypes.common. This file defines some general non-filetype-specific
4296 You can open the user filetypes.common with the
4297 *Tools->Configuration Files->filetypes.common* menu item. This adds
4298 the default settings to the user file if the file doesn't exist.
4299 Alternatively the file can be created manually, adding only the
4300 settings you want to change. All missing settings will be read from
4304 See the `Filetype configuration`_ section for how to define styles.
4307 [named_styles] section
4308 ``````````````````````
4309 Named styles declared here can be used in the [styling] section of any
4314 *In filetypes.common*::
4317 foo=0xc00000;0xffffff;false;true
4325 This saves copying and pasting the whole style definition into several
4329 You can define aliases for named styles, as shown with the ``bar``
4330 entry in the above example, but they must be declared after the
4334 [named_colors] section
4335 ``````````````````````
4336 Named colors declared here can be used in the ``[styling]`` or
4337 ``[named_styles]`` section of any filetypes.* file or color scheme.
4342 my_red_color=#FF0000
4343 my_blue_color=#0000FF
4346 foo=my_red_color;my_blue_color;false;true
4348 This allows to define a color pallete by name so that to change a color
4349 scheme-wide only involves changing the hex value in a single location.
4354 This is the default style. It is used for styling files without a
4357 *Example:* ``default=0x000000;0xffffff;false;false``
4360 The style for coloring selected text. The format is:
4364 * Use foreground color
4365 * Use background color
4367 The colors are only set if the 3rd or 4th argument is true. When
4368 the colors are not overridden, the default is a dark grey
4369 background with syntax highlighted foreground text.
4371 *Example:* ``selection=0xc0c0c0;0x00007F;true;true``
4374 The style for brace highlighting when a matching brace was found.
4376 *Example:* ``brace_good=0xff0000;0xFFFFFF;true;false``
4379 The style for brace highlighting when no matching brace was found.
4381 *Example:* ``brace_bad=0x0000ff;0xFFFFFF;true;false``
4384 The style for coloring the caret(the blinking cursor). Only first
4385 and third argument is interpreted.
4386 Set the third argument to true to change the caret into a block caret.
4388 *Example:* ``caret=0x000000;0x0;false;false``
4391 The width for the caret(the blinking cursor). Only the first
4392 argument is interpreted. The width is specified in pixels with
4393 a maximum of three pixel. Use the width 0 to make the caret
4396 *Example:* ``caret=1;0;false;false``
4399 The style for coloring the background of the current line. Only
4400 the second and third arguments are interpreted. The second argument
4401 is the background color. Use the third argument to enable or
4402 disable background highlighting for the current line (has to be
4405 *Example:* ``current_line=0x0;0xe5e5e5;true;false``
4408 The style for coloring the indentation guides. Only the first and
4409 second arguments are interpreted.
4411 *Example:* ``indent_guide=0xc0c0c0;0xffffff;false;false``
4414 The style for coloring the white space if it is shown. The first
4415 both arguments define the foreground and background colors, the
4416 third argument sets whether to use the defined foreground color
4417 or to use the color defined by each filetype for the white space.
4418 The fourth argument defines whether to use the background color.
4420 *Example:* ``white_space=0xc0c0c0;0xffffff;true;true``
4423 Line number margin foreground and background colors.
4425 .. _Folding Settings:
4428 Fold margin foreground and background colors.
4430 fold_symbol_highlight
4431 Highlight color of folding symbols.
4434 The style of folding icons. Only first and second arguments are
4437 Valid values for the first argument are:
4444 Valid values for the second argument are:
4447 * 1 -- for straight lines
4448 * 2 -- for curved lines
4450 *Default:* ``folding_style=1;1;``
4452 *Arrows:* ``folding_style=3;0;``
4455 Draw a thin horizontal line at the line where text is folded. Only
4456 first argument is used.
4458 Valid values for the first argument are:
4460 * 0 -- disable, do not draw a line
4461 * 1 -- draw the line above folded text
4462 * 2 -- draw the line below folded text
4464 *Example:* ``folding_horiz_line=0;0;false;false``
4467 First argument: drawing of visual flags to indicate a line is wrapped.
4468 This is a bitmask of the values:
4470 * 0 -- No visual flags
4471 * 1 -- Visual flag at end of subline of a wrapped line
4472 * 2 -- Visual flag at begin of subline of a wrapped line. Subline is
4473 indented by at least 1 to make room for the flag.
4475 Second argument: wether the visual flags to indicate a line is wrapped
4476 are drawn near the border or near the text. This is a bitmask of the values:
4478 * 0 -- Visual flags drawn near border
4479 * 1 -- Visual flag at end of subline drawn near text
4480 * 2 -- Visual flag at begin of subline drawn near text
4482 Only first and second arguments are interpreted.
4484 *Example:* ``line_wrap_visuals=3;0;false;false``
4487 First argument: sets the size of indentation of sublines for wrapped lines
4488 in terms of the width of a space, only used when the second argument is ``0``.
4490 Second argument: wrapped sublines can be indented to the position of their
4491 first subline or one more indent level. Possible values:
4493 * 0 - Wrapped sublines aligned to left of window plus amount set by the first argument
4494 * 1 - Wrapped sublines are aligned to first subline indent (use the same indentation)
4495 * 2 - Wrapped sublines are aligned to first subline indent plus one more level of indentation
4497 Only first and second arguments are interpreted.
4499 *Example:* ``line_wrap_indent=0;1;false;false``
4502 Translucency for the current line (first argument) and the selection
4503 (second argument). Values between 0 and 256 are accepted.
4505 Note for Windows 95, 98 and ME users:
4506 keep this value at 256 to disable translucency otherwise Geany might crash.
4508 Only the first and second arguments are interpreted.
4510 *Example:* ``translucency=256;256;false;false``
4513 The style for a highlighted line (e.g when using Goto line or goto tag).
4514 The foreground color (first argument) is only used when the Markers margin
4515 is enabled (see View menu).
4517 Only the first and second arguments are interpreted.
4519 *Example:* ``marker_line=0x000000;0xffff00;false;false``
4522 The style for a marked search results (when using "Mark" in Search dialogs).
4523 The second argument sets the background color for the drawn rectangle.
4525 Only the second argument is interpreted.
4527 *Example:* ``marker_search=0x000000;0xb8f4b8;false;false``
4530 The style for a marked line (e.g when using the "Toggle Marker" keybinding
4531 (Ctrl-M)). The foreground color (first argument) is only used
4532 when the Markers margin is enabled (see View menu).
4534 Only the first and second arguments are interpreted.
4536 *Example:* ``marker_mark=0x000000;0xb8f4b8;false;false``
4539 Translucency for the line marker (first argument) and the search marker
4540 (second argument). Values between 0 and 256 are accepted.
4542 Note for Windows 95, 98 and ME users:
4543 keep this value at 256 to disable translucency otherwise Geany might crash.
4545 Only the first and second arguments are interpreted.
4547 *Example:* ``marker_translucency=256;256;false;false``
4550 Amount of space to be drawn above and below the line's baseline.
4551 The first argument defines the amount of space to be drawn above the line, the second
4552 argument defines the amount of space to be drawn below.
4554 Only the first and second arguments are interpreted.
4556 *Example:* ``line_height=0;0;false;false``
4559 The style for coloring the calltips. The first two arguments
4560 define the foreground and background colors, the third and fourth
4561 arguments set whether to use the defined colors.
4563 *Example:* ``calltips=0xc0c0c0;0xffffff;false;false``
4569 Characters to treat as whitespace. These characters are ignored
4570 when moving, selecting and deleting across word boundaries
4571 (see `Scintilla keyboard commands`_).
4573 This should include space (\\s) and tab (\\t).
4575 *Example:* ``whitespace_chars=\s\t!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~``
4583 To change the default filetype extension used when saving a new file,
4584 see `Filetype definition files`_.
4586 You can override the list of file extensions that Geany uses to detect
4587 filetypes using the user ``filetype_extensions.conf`` file. Use the
4588 *Tools->Configuration Files->filetype_extensions.conf* menu item. See
4589 also `Configuration file paths`_.
4591 You should only list lines for filetype extensions that you want to
4592 override in the user configuration file and remove or comment out
4593 others. The patterns are listed after the ``=`` sign, using a
4594 semi-colon separated list of patterns which should be matched for
4597 For example, to override the filetype extensions for Make, the file
4601 Make=Makefile*;*.mk;Buildfile;
4603 Filetype group membership
4604 ^^^^^^^^^^^^^^^^^^^^^^^^^
4605 Group membership is also stored in ``filetype_extensions.conf``. This
4606 file is used to store information Geany needs at startup, whereas the
4607 separate filetype definition files hold information only needed when
4608 a document with their filetype is used.
4610 The format looks like::
4619 The key names cannot be configured.
4622 Group membership is only read at startup.
4624 Preferences file format
4625 -----------------------
4627 The user preferences file ``geany.conf`` holds settings for all the items configured
4628 in the preferences dialog. This file should not be edited while Geany is running
4629 as the file will be overwritten when the preferences in Geany are changed or Geany
4633 [build-menu] section
4634 ^^^^^^^^^^^^^^^^^^^^
4636 The [build-menu] section contains the configuration of the build menu.
4637 This section can occur in filetype, preferences and project files and
4638 always has the format described here. Different menu items are loaded
4639 from different files, see the table in the `Build Menu Configuration`_
4640 section for details. All the settings can be configured from the dialogs
4641 except the execute command in filetype files and filetype definitions in
4642 the project file, so these are the only ones which need hand editing.
4644 The build-menu section stores one entry for each setting for each menu item that
4645 is configured. The keys for these settings have the format:
4651 * GG - is the menu item group,
4654 - NF for independent (non-filetype)
4657 * NN - is a two decimal digit number of the item within the group,
4659 * FF - is the field,
4663 - WD for working directory
4669 The project file contains project related settings and possibly a
4670 record of the current session files.
4673 [build-menu] additions
4674 ^^^^^^^^^^^^^^^^^^^^^^
4676 The project file also can have extra fields in the [build-menu] section
4677 in addition to those listed in `[build-menu] section`_ above.
4679 When filetype menu items are configured for the project they are stored
4680 in the project file.
4682 The ``filetypes`` entry is a list of the filetypes which exist in the
4685 For each filetype the entries for that filetype have the format defined in
4686 `[build-menu] section`_ but the key is prefixed by the name of the filetype
4687 as it appears in the ``filetypes`` entry, eg the entry for the label of
4688 filetype menu item 0 for the C filetype would be
4696 Geany supports the following templates:
4700 * Function description
4705 To use these templates, just open the Edit menu or open the popup menu
4706 by right-clicking in the editor widget, and choose "Insert Comments"
4707 and insert templates as you want.
4709 Some templates (like File header or ChangeLog entry) will always be
4710 inserted at the top of the file.
4712 To insert a function description, the cursor must be inside
4713 of the function, so that the function name can be determined
4714 automatically. The description will be positioned correctly one line
4715 above the function, just check it out. If the cursor is not inside
4716 of a function or the function name cannot be determined, the inserted
4717 function description won't contain the correct function name but "unknown"
4721 Geany automatically reloads template information when it notices you
4722 save a file in the user's template configuration directory. You can
4723 also force this by selecting *Tools->Reload Configuration*.
4729 Meta data can be used with all templates, but by default user set
4730 meta data is only used for the ChangeLog and File header templates.
4732 In the configuration dialog you can find a tab "Templates" (see
4733 `Template preferences`_). You can define the default values
4734 which will be inserted in the templates.
4740 File templates are templates used as the basis of a new file. To
4741 use them, choose the *New (with Template)* menu item from the *File*
4744 By default, file templates are installed for some filetypes. Custom
4745 file templates can be added by creating the appropriate template file. You can
4746 also edit the default file templates.
4748 The file's contents are just the text to place in the document, with
4749 optional template wildcards like ``{fileheader}``. The fileheader
4750 wildcard can be placed anywhere, but it's usually put on the first
4751 line of the file, followed by a blank line.
4753 Adding file templates
4754 `````````````````````
4756 File templates are read from ``templates/files`` under the
4757 `Configuration file paths`_.
4759 The filetype to use is detected from the template file's extension, if
4760 any. For example, creating a file ``module.c`` would add a menu item
4761 which created a new document with the filetype set to 'C'.
4763 The template file is read from disk when the corresponding menu item is
4767 Customizing templates
4768 ^^^^^^^^^^^^^^^^^^^^^
4770 Each template can be customized to your needs. The templates are
4771 stored in the ``~/.config/geany/templates/`` directory (see the section called
4772 `Command line options`_ for further information about the configuration
4773 directory). Just open the desired template with an editor (ideally,
4774 Geany ;-) ) and edit the template to your needs. There are some
4775 wildcards which will be automatically replaced by Geany at startup.
4781 All wildcards must be enclosed by "{" and "}", e.g. {date}.
4783 **Wildcards for character escaping**
4785 ============== ============================================= =======================================
4786 Wildcard Description Available in
4787 ============== ============================================= =======================================
4788 ob { Opening Brace (used to prevent other file templates, file header, snippets.
4789 wildcards being expanded).
4790 cb } Closing Brace. file templates, file header, snippets.
4791 pc \% Percent (used to escape e.g. %block% in
4792 snippets). snippets.
4793 ============== ============================================= =======================================
4795 **Global wildcards**
4797 These are configurable, see `Template preferences`_.
4799 ============== ============================================= =======================================
4800 Wildcard Description Available in
4801 ============== ============================================= =======================================
4802 developer The name of the developer. file templates, file header,
4803 function description, ChangeLog entry,
4806 initial The developer's initials, e.g. "ET" for file templates, file header,
4807 Enrico Tröger or "JFD" for John Foobar Doe. function description, ChangeLog entry,
4810 mail The email address of the developer. file templates, file header,
4811 function description, ChangeLog entry,
4814 company The company the developer is working for. file templates, file header,
4815 function description, ChangeLog entry,
4818 version The initial version of a new file. file templates, file header,
4819 function description, ChangeLog entry,
4821 ============== ============================================= =======================================
4823 **Date & time wildcards**
4825 The format for these wildcards can be changed in the preferences
4826 dialog, see `Template preferences`_. You can use any conversion
4827 specifiers which can be used with the ANSI C strftime function.
4828 For details please see http://man.cx/strftime.
4830 ============== ============================================= =======================================
4831 Wildcard Description Available in
4832 ============== ============================================= =======================================
4833 year The current year. Default format is: YYYY. file templates, file header,
4834 function description, ChangeLog entry,
4837 date The current date. Default format: file templates, file header,
4838 YYYY-MM-DD. function description, ChangeLog entry,
4841 datetime The current date and time. Default format: file templates, file header,
4842 DD.MM.YYYY HH:mm:ss ZZZZ. function description, ChangeLog entry,
4844 ============== ============================================= =======================================
4846 **Dynamic wildcards**
4848 ============== ============================================= =======================================
4849 Wildcard Description Available in
4850 ============== ============================================= =======================================
4851 untitled The string "untitled" (this will be file templates, file header,
4852 translated to your locale), used in function description, ChangeLog entry,
4853 file templates. bsd, gpl, snippets.
4855 geanyversion The actual Geany version, e.g. file templates, file header,
4856 "Geany |(version)|". function description, ChangeLog entry,
4859 filename The filename of the current file. file header, snippets, file
4860 For new files, it's only replaced when templates.
4861 first saving if found on the first 4 lines
4864 project The current project's name, if any. file header, snippets, file templates.
4866 description The current project's description, if any. file header, snippets, file templates.
4868 functionname The function name of the function at the function description.
4869 cursor position. This wildcard will only be
4870 replaced in the function description
4873 command:path Executes the specified command and replace file templates, file header,
4874 the wildcard with the command's standard function description, ChangeLog entry,
4875 output. See `Special {command:} wildcard`_ bsd, gpl, snippets.
4877 ============== ============================================= =======================================
4879 **Template insertion wildcards**
4881 ============== ============================================= =======================================
4882 Wildcard Description Available in
4883 ============== ============================================= =======================================
4884 gpl This wildcard inserts a short GPL notice. file header.
4886 bsd This wildcard inserts a BSD licence notice. file header.
4888 fileheader The file header template. This wildcard snippets, file templates.
4889 will only be replaced in file templates.
4890 ============== ============================================= =======================================
4893 Special {command:} wildcard
4894 ***************************
4896 The {command:} wildcard is a special one because it can execute
4897 a specified command and put the command's output (stdout) into
4906 Linux localhost 2.6.9-023stab046.2-smp #1 SMP Mon Dec 10 15:04:55 MSK 2007 x86_64 GNU/Linux
4908 Using this wildcard you can insert nearly any arbitrary text into the
4911 In the environment of the executed command the variables
4912 ``GEANY_FILENAME``, ``GEANY_FILETYPE`` and ``GEANY_FUNCNAME`` are set.
4913 The value of these variables is filled in only if Geany knows about it.
4914 For example, ``GEANY_FUNCNAME`` is only filled within the function
4915 description template. However, these variables are ``always`` set,
4916 just maybe with an empty value.
4917 You can easily access them e.g. within an executed shell script using::
4923 If the specified command could not be found or not executed, the wildcard is substituted
4924 by an empty string. In such cases, you can find the occurred error message on Geany's
4925 standard error and in the Help->Debug Messages dialog.
4928 Customizing the toolbar
4929 -----------------------
4931 You can add, remove and reorder the elements in the toolbar by using
4932 the toolbar editor, or by manually editing the configuration file
4935 The toolbar editor can be opened from the preferences editor on the Toolbar tab or
4936 by right-clicking on the toolbar itself and choosing it from the menu.
4938 Manually editing the toolbar layout
4939 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4941 To override the system-wide configuration file, copy it to your user
4942 configuration directory (see `Configuration file paths`_).
4946 % cp /usr/local/share/geany/ui_toolbar.xml /home/username/.config/geany/
4948 Then edit it and add any of the available elements listed in the file or remove
4949 any of the existing elements. Of course, you can also reorder the elements as
4950 you wish and add or remove additional separators.
4951 This file must be valid XML, otherwise the global toolbar UI definition
4952 will be used instead.
4954 Your changes are applied once you save the file.
4957 (1) You cannot add new actions which are not listed below.
4958 (2) Everything you add or change must be inside the /ui/toolbar/ path.
4961 Available toolbar elements
4962 ^^^^^^^^^^^^^^^^^^^^^^^^^^
4964 ================== ==============================================================================
4965 Element name Description
4966 ================== ==============================================================================
4967 New Create a new file
4968 Open Open an existing file
4969 Save Save the current file
4970 SaveAll Save all open files
4971 Reload Reload the current file from disk
4972 Close Close the current file
4973 CloseAll Close all open files
4974 Print Print the current file
4975 Cut Cut the current selection
4976 Copy Copy the current selection
4977 Paste Paste the contents of the clipboard
4978 Delete Delete the current selection
4979 Undo Undo the last modification
4980 Redo Redo the last modification
4981 NavBack Navigate back a location
4982 NavFor Navigate forward a location
4983 Compile Compile the current file
4984 Build Build the current file, includes a submenu for Make commands. Geany
4985 remembers the last chosen action from the submenu and uses this as default
4986 action when the button itself is clicked.
4987 Run Run or view the current file
4988 Color Open a color chooser dialog, to interactively pick colors from a palette
4989 ZoomIn Zoom in the text
4990 ZoomOut Zoom out the text
4991 UnIndent Decrease indentation
4992 Indent Increase indentation
4993 Replace Replace text in the current document
4994 SearchEntry The search field belonging to the 'Search' element (can be used alone)
4995 Search Find the entered text in the current file (only useful if you also
4997 GotoEntry The goto field belonging to the 'Goto' element (can be used alone)
4998 Goto Jump to the entered line number (only useful if you also use 'GotoEntry')
4999 Preferences Show the preferences dialog
5001 ================== ==============================================================================
5005 Plugin documentation
5006 ====================
5011 The HTML Characters plugin helps when working with special
5012 characters in XML/HTML, e.g. German Umlauts ü and ä.
5015 Insert entity dialog
5016 ^^^^^^^^^^^^^^^^^^^^
5018 When the plugin is enabled, you can insert special character
5019 entities using *Tools->Insert Special HTML Characters*.
5021 This opens up a dialog where you can find a huge amount of special
5022 characters sorted by category that you might like to use inside your
5023 document. You can expand and collapse the categories by clicking on
5024 the little arrow on the left hand side. Once you have found the
5025 desired character click on it and choose "Insert". This will insert
5026 the entity for the character at the current cursor position. You
5027 might also like to double click the chosen entity instead.
5030 Replace special chars by its entity
5031 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5033 To help make a XML/HTML document valid the plugin supports
5034 replacement of special chars known by the plugin. Both bulk
5035 replacement and immediate replacement during typing are supported.
5037 A few characters will not be replaced. These are
5048 You can activate/deactivate this feature using the *Tools->HTML
5049 Replacement->Auto-replace Special Characters* menu item. If it's
5050 activated, all special characters (beside the given exceptions from
5051 above) known by the plugin will be replaced by their entities.
5053 You could also set a keybinding for the plugin to toggle the status
5060 After inserting a huge amount of text, e.g. by using copy & paste, the
5061 plugin allows bulk replacement of all known characters (beside the
5062 mentioned exceptions). You can find the function under the same
5063 menu at *Tools->HTML Replacement->Replace Characters in Selection*, or
5064 configure a keybinding for the plugin.
5072 This plugin sets on every new file (*File->New* or *File->New (with template)*)
5073 a randomly chosen filename and set its filetype appropriate to the used template
5074 or when no template was used, to a configurable default filetype.
5075 This enables you to quickly compile, build and/or run the new file without the
5076 need to give it an explicit filename using the Save As dialog. This might be
5077 useful when you often create new files just for testing some code or something
5084 This plugin creates a backup copy of the current file in Geany when it is
5085 saved. You can specify the directory where the backup copy is saved and
5086 you can configure the automatically added extension in the configure dialog
5087 in Geany's plugin manager.
5089 After the plugin was loaded in Geany's plugin manager, every file is
5090 copied into the configured backup directory when the file is saved in Geany.
5094 Contributing to this document
5095 =============================
5097 This document (``geany.txt``) is written in `reStructuredText`__
5098 (or "reST"). The source file for it is located in Geany's ``doc``
5099 subdirectory. If you intend on making changes, you should grab the
5100 source right from Git to make sure you've got the newest version. After
5101 editing the file, to build the HTML document to see how your changes
5102 look, run "``make doc``" in the subdirectory ``doc`` of Geany's source
5103 directory. This regenerates the ``geany.html`` file. To generate a PDF
5104 file, use the command "``make pdf``" which should generate a file called
5105 geany-|(version)|.pdf.
5107 __ http://docutils.sourceforge.net/rst.html
5109 After you are happy with your changes, create a patch e.g. by using::
5111 % git diff geany.txt > foo.patch
5113 or even better, by creating a Git-formatted patch which will keep authoring
5114 and description data, by first committing your changes (doing so in a fresh
5115 new branch is recommended for `matser` not to diverge from upstream) and then
5116 using git format-patch::
5118 % git checkout -b my-documentation-changes # create a fresh branch
5119 % git commit geany.txt
5120 Write a good commit message...
5121 % git format-patch HEAD^
5122 % git checkout master # go back to master
5124 and then submit that file to the mailing list for review.
5126 Also you can clone the Geany repository at GitHub and send a pull request.
5128 Note, you will need the Python docutils software package installed
5129 to build the docs. The package is named ``python-docutils`` on Debian
5135 Scintilla keyboard commands
5136 ===========================
5138 Copyright © 1998, 2006 Neil Hodgson <neilh(at)scintilla(dot)org>
5140 This appendix is distributed under the terms of the License for
5141 Scintilla and SciTE. A copy of this license can be found in the file
5142 ``scintilla/License.txt`` included with the source code of this
5143 program and in the appendix of this document. See `License for
5144 Scintilla and SciTE`_.
5153 Keyboard commands for Scintilla mostly follow common Windows and GTK+
5154 conventions. All move keys (arrows, page up/down, home and end)
5155 allows to extend or reduce the stream selection when holding the
5156 Shift key, and the rectangular selection when holding the
5157 appropriate keys (see `Column mode editing (rectangular selections)`_).
5159 Some keys may not be available with some national keyboards
5160 or because they are taken by the system such as by a window manager
5161 or GTK. Keyboard equivalents of menu commands are listed in the
5162 menus. Some less common commands with no menu equivalent are:
5164 ============================================= ======================
5166 ============================================= ======================
5167 Magnify text size. Ctrl-Keypad+
5168 Reduce text size. Ctrl-Keypad-
5169 Restore text size to normal. Ctrl-Keypad/
5171 Dedent block. Shift-Tab
5172 Delete to start of word. Ctrl-BackSpace
5173 Delete to end of word. Ctrl-Delete
5174 Delete to start of line. Ctrl-Shift-BackSpace
5175 Go to start of document. Ctrl-Home
5176 Extend selection to start of document. Ctrl-Shift-Home
5177 Go to start of display line. Alt-Home
5178 Extend selection to start of display line. Alt-Shift-Home
5179 Go to end of document. Ctrl-End
5180 Extend selection to end of document. Ctrl-Shift-End
5181 Extend selection to end of display line. Alt-Shift-End
5182 Previous paragraph. Shift extends selection. Ctrl-Up
5183 Next paragraph. Shift extends selection. Ctrl-Down
5184 Previous word. Shift extends selection. Ctrl-Left
5185 Next word. Shift extends selection. Ctrl-Right
5186 ============================================= ======================
5197 * Double-click on empty space in the notebook tab bar to open a
5199 * Middle-click on a document's notebook tab to close the document.
5200 * Hold `Ctrl` and click on any notebook tab to switch to the last used
5202 * Double-click on a document's notebook tab to toggle all additional
5203 widgets (to show them again use the View menu or the keyboard
5204 shortcut). The interface pref must be enabled for this to work.
5209 * Alt-scroll wheel moves up/down a page.
5210 * Ctrl-scroll wheel zooms in/out.
5211 * Shift-scroll wheel scrolls 8 characters right/left.
5212 * Ctrl-click on a word in a document to perform *Go to Tag Definition*.
5213 * Ctrl-click on a bracket/brace to perform *Go to Matching Brace*.
5218 * Double-click on a symbol-list group to expand or compact it.
5223 * Scrolling the mouse wheel over a notebook tab bar will switch
5226 The following are derived from X-Windows features (but GTK still supports
5229 * Middle-click pastes the last selected text.
5230 * Middle-click on a scrollbar moves the scrollbar to that
5231 position without having to drag it.
5235 Compile-time options
5236 ====================
5238 There are some options which can only be changed at compile time,
5239 and some options which are used as the default for configurable
5240 options. To change these options, edit the appropriate source file
5241 in the ``src`` subdirectory. Look for a block of lines starting with
5242 ``#define GEANY_*``. Any definitions which are not listed here should
5246 Most users should not need to change these options.
5251 ============================== ============================================ ==================
5252 Option Description Default
5253 ============================== ============================================ ==================
5254 GEANY_STRING_UNTITLED A string used as the default name for new untitled
5255 files. Be aware that the string can be
5256 translated, so change it only if you know
5258 GEANY_WINDOW_MINIMAL_WIDTH The minimal width of the main window. 620
5259 GEANY_WINDOW_MINIMAL_HEIGHT The minimal height of the main window. 440
5260 GEANY_WINDOW_DEFAULT_WIDTH The default width of the main window at the 900
5262 GEANY_WINDOW_DEFAULT_HEIGHT The default height of the main window at the 600
5264 **Windows specific**
5265 GEANY_USE_WIN32_DIALOG Set this to 1 if you want to use the default 0
5266 Windows file open and save dialogs instead
5267 GTK's file open and save dialogs. The
5268 default Windows file dialogs are missing
5269 some nice features like choosing a filetype
5270 or an encoding. *Do not touch this setting
5271 when building on a non-Win32 system.*
5272 ============================== ============================================ ==================
5277 ============================== ============================================ ==================
5278 Option Description Default
5279 ============================== ============================================ ==================
5280 GEANY_PROJECT_EXT The default filename extension for Geany geany
5281 project files. It is used when creating new
5282 projects and as filter mask for the project
5284 ============================== ============================================ ==================
5289 ============================== ============================================ ==================
5290 Option Description Default
5291 ============================== ============================================ ==================
5292 GEANY_FILETYPE_SEARCH_LINES The number of lines to search for the 2
5293 filetype with the extract filetype regex.
5294 ============================== ============================================ ==================
5299 ============================== ============================================ ==================
5300 Option Description Default
5301 ============================== ============================================ ==================
5302 GEANY_WORDCHARS These characters define word boundaries when a string with:
5303 making selections and searching using word a-z, A-Z, 0-9 and
5304 matching options. underscore.
5305 ============================== ============================================ ==================
5310 These are default settings that can be overridden in the `Preferences`_ dialog.
5312 ============================== ============================================ ==================
5313 Option Description Default
5314 ============================== ============================================ ==================
5315 GEANY_MIN_SYMBOLLIST_CHARS How many characters you need to type to 4
5316 trigger the autocompletion list.
5317 GEANY_DISK_CHECK_TIMEOUT Time in seconds between checking a file for 30
5319 GEANY_DEFAULT_TOOLS_MAKE The make tool. This can also include a path. "make"
5320 GEANY_DEFAULT_TOOLS_TERMINAL A terminal emulator command, see See below.
5321 `Terminal emulators`_.
5322 GEANY_DEFAULT_TOOLS_BROWSER A web browser. This can also include a path. "firefox"
5323 GEANY_DEFAULT_TOOLS_PRINTCMD A printing tool. It should be able to accept "lpr"
5324 and process plain text files. This can also
5326 GEANY_DEFAULT_TOOLS_GREP A grep tool. It should be compatible with "grep"
5327 GNU grep. This can also include a path.
5328 GEANY_DEFAULT_MRU_LENGTH The length of the "Recent files" list. 10
5329 GEANY_DEFAULT_FONT_SYMBOL_LIST The font used in sidebar to show symbols and "Sans 9"
5331 GEANY_DEFAULT_FONT_MSG_WINDOW The font used in the messages window. "Sans 9"
5332 GEANY_DEFAULT_FONT_EDITOR The font used in the editor window. "Monospace 10"
5333 GEANY_TOGGLE_MARK A string which is used to mark a toggled "~ "
5335 GEANY_MAX_AUTOCOMPLETE_WORDS How many autocompletion suggestions should 30
5337 GEANY_DEFAULT_FILETYPE_REGEX The default regex to extract filetypes from See below.
5339 ============================== ============================================ ==================
5341 The GEANY_DEFAULT_FILETYPE_REGEX default value is -\\*-\\s*([^\\s]+)\\s*-\\*- which finds Emacs filetypes.
5343 The GEANY_DEFAULT_TOOLS_TERMINAL default value on Windows is::
5347 and on any non-Windows system is::
5349 xterm -e "/bin/sh %c"
5355 ============================== ============================================ ==================
5356 Option Description Default
5357 ============================== ============================================ ==================
5358 GEANY_BUILD_ERR_HIGHLIGHT_MAX Amount of build error indicators to 50
5359 be shown in the editor window.
5360 This affects the special coloring
5361 when Geany detects a compiler output line as
5362 an error message and then highlights the
5363 corresponding line in the source code.
5364 Usually only the first few messages are
5365 interesting because following errors are
5367 All errors in the Compiler window are parsed
5368 and unaffected by this value.
5369 PRINTBUILDCMDS Every time a build menu item priority FALSE
5370 calculation is run, print the state of the
5371 menu item table in the form of the table
5372 in `Build Menu Configuration`_. May be
5373 useful to debug configuration file
5374 overloading. Warning produces a lot of
5375 output. Can also be enabled/disabled by the
5376 debugger by setting printbuildcmds to 1/0
5377 overriding the compile setting.
5378 ============================== ============================================ ==================
5382 GNU General Public License
5383 ==========================
5387 GNU GENERAL PUBLIC LICENSE
5388 Version 2, June 1991
5390 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5391 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
5392 Everyone is permitted to copy and distribute verbatim copies
5393 of this license document, but changing it is not allowed.
5397 The licenses for most software are designed to take away your
5398 freedom to share and change it. By contrast, the GNU General Public
5399 License is intended to guarantee your freedom to share and change free
5400 software--to make sure the software is free for all its users. This
5401 General Public License applies to most of the Free Software
5402 Foundation's software and to any other program whose authors commit to
5403 using it. (Some other Free Software Foundation software is covered by
5404 the GNU Library General Public License instead.) You can apply it to
5407 When we speak of free software, we are referring to freedom, not
5408 price. Our General Public Licenses are designed to make sure that you
5409 have the freedom to distribute copies of free software (and charge for
5410 this service if you wish), that you receive source code or can get it
5411 if you want it, that you can change the software or use pieces of it
5412 in new free programs; and that you know you can do these things.
5414 To protect your rights, we need to make restrictions that forbid
5415 anyone to deny you these rights or to ask you to surrender the rights.
5416 These restrictions translate to certain responsibilities for you if you
5417 distribute copies of the software, or if you modify it.
5419 For example, if you distribute copies of such a program, whether
5420 gratis or for a fee, you must give the recipients all the rights that
5421 you have. You must make sure that they, too, receive or can get the
5422 source code. And you must show them these terms so they know their
5425 We protect your rights with two steps: (1) copyright the software, and
5426 (2) offer you this license which gives you legal permission to copy,
5427 distribute and/or modify the software.
5429 Also, for each author's protection and ours, we want to make certain
5430 that everyone understands that there is no warranty for this free
5431 software. If the software is modified by someone else and passed on, we
5432 want its recipients to know that what they have is not the original, so
5433 that any problems introduced by others will not reflect on the original
5434 authors' reputations.
5436 Finally, any free program is threatened constantly by software
5437 patents. We wish to avoid the danger that redistributors of a free
5438 program will individually obtain patent licenses, in effect making the
5439 program proprietary. To prevent this, we have made it clear that any
5440 patent must be licensed for everyone's free use or not licensed at all.
5442 The precise terms and conditions for copying, distribution and
5443 modification follow.
5445 GNU GENERAL PUBLIC LICENSE
5446 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
5448 0. This License applies to any program or other work which contains
5449 a notice placed by the copyright holder saying it may be distributed
5450 under the terms of this General Public License. The "Program", below,
5451 refers to any such program or work, and a "work based on the Program"
5452 means either the Program or any derivative work under copyright law:
5453 that is to say, a work containing the Program or a portion of it,
5454 either verbatim or with modifications and/or translated into another
5455 language. (Hereinafter, translation is included without limitation in
5456 the term "modification".) Each licensee is addressed as "you".
5458 Activities other than copying, distribution and modification are not
5459 covered by this License; they are outside its scope. The act of
5460 running the Program is not restricted, and the output from the Program
5461 is covered only if its contents constitute a work based on the
5462 Program (independent of having been made by running the Program).
5463 Whether that is true depends on what the Program does.
5465 1. You may copy and distribute verbatim copies of the Program's
5466 source code as you receive it, in any medium, provided that you
5467 conspicuously and appropriately publish on each copy an appropriate
5468 copyright notice and disclaimer of warranty; keep intact all the
5469 notices that refer to this License and to the absence of any warranty;
5470 and give any other recipients of the Program a copy of this License
5471 along with the Program.
5473 You may charge a fee for the physical act of transferring a copy, and
5474 you may at your option offer warranty protection in exchange for a fee.
5476 2. You may modify your copy or copies of the Program or any portion
5477 of it, thus forming a work based on the Program, and copy and
5478 distribute such modifications or work under the terms of Section 1
5479 above, provided that you also meet all of these conditions:
5481 a) You must cause the modified files to carry prominent notices
5482 stating that you changed the files and the date of any change.
5484 b) You must cause any work that you distribute or publish, that in
5485 whole or in part contains or is derived from the Program or any
5486 part thereof, to be licensed as a whole at no charge to all third
5487 parties under the terms of this License.
5489 c) If the modified program normally reads commands interactively
5490 when run, you must cause it, when started running for such
5491 interactive use in the most ordinary way, to print or display an
5492 announcement including an appropriate copyright notice and a
5493 notice that there is no warranty (or else, saying that you provide
5494 a warranty) and that users may redistribute the program under
5495 these conditions, and telling the user how to view a copy of this
5496 License. (Exception: if the Program itself is interactive but
5497 does not normally print such an announcement, your work based on
5498 the Program is not required to print an announcement.)
5500 These requirements apply to the modified work as a whole. If
5501 identifiable sections of that work are not derived from the Program,
5502 and can be reasonably considered independent and separate works in
5503 themselves, then this License, and its terms, do not apply to those
5504 sections when you distribute them as separate works. But when you
5505 distribute the same sections as part of a whole which is a work based
5506 on the Program, the distribution of the whole must be on the terms of
5507 this License, whose permissions for other licensees extend to the
5508 entire whole, and thus to each and every part regardless of who wrote it.
5510 Thus, it is not the intent of this section to claim rights or contest
5511 your rights to work written entirely by you; rather, the intent is to
5512 exercise the right to control the distribution of derivative or
5513 collective works based on the Program.
5515 In addition, mere aggregation of another work not based on the Program
5516 with the Program (or with a work based on the Program) on a volume of
5517 a storage or distribution medium does not bring the other work under
5518 the scope of this License.
5520 3. You may copy and distribute the Program (or a work based on it,
5521 under Section 2) in object code or executable form under the terms of
5522 Sections 1 and 2 above provided that you also do one of the following:
5524 a) Accompany it with the complete corresponding machine-readable
5525 source code, which must be distributed under the terms of Sections
5526 1 and 2 above on a medium customarily used for software interchange; or,
5528 b) Accompany it with a written offer, valid for at least three
5529 years, to give any third party, for a charge no more than your
5530 cost of physically performing source distribution, a complete
5531 machine-readable copy of the corresponding source code, to be
5532 distributed under the terms of Sections 1 and 2 above on a medium
5533 customarily used for software interchange; or,
5535 c) Accompany it with the information you received as to the offer
5536 to distribute corresponding source code. (This alternative is
5537 allowed only for noncommercial distribution and only if you
5538 received the program in object code or executable form with such
5539 an offer, in accord with Subsection b above.)
5541 The source code for a work means the preferred form of the work for
5542 making modifications to it. For an executable work, complete source
5543 code means all the source code for all modules it contains, plus any
5544 associated interface definition files, plus the scripts used to
5545 control compilation and installation of the executable. However, as a
5546 special exception, the source code distributed need not include
5547 anything that is normally distributed (in either source or binary
5548 form) with the major components (compiler, kernel, and so on) of the
5549 operating system on which the executable runs, unless that component
5550 itself accompanies the executable.
5552 If distribution of executable or object code is made by offering
5553 access to copy from a designated place, then offering equivalent
5554 access to copy the source code from the same place counts as
5555 distribution of the source code, even though third parties are not
5556 compelled to copy the source along with the object code.
5558 4. You may not copy, modify, sublicense, or distribute the Program
5559 except as expressly provided under this License. Any attempt
5560 otherwise to copy, modify, sublicense or distribute the Program is
5561 void, and will automatically terminate your rights under this License.
5562 However, parties who have received copies, or rights, from you under
5563 this License will not have their licenses terminated so long as such
5564 parties remain in full compliance.
5566 5. You are not required to accept this License, since you have not
5567 signed it. However, nothing else grants you permission to modify or
5568 distribute the Program or its derivative works. These actions are
5569 prohibited by law if you do not accept this License. Therefore, by
5570 modifying or distributing the Program (or any work based on the
5571 Program), you indicate your acceptance of this License to do so, and
5572 all its terms and conditions for copying, distributing or modifying
5573 the Program or works based on it.
5575 6. Each time you redistribute the Program (or any work based on the
5576 Program), the recipient automatically receives a license from the
5577 original licensor to copy, distribute or modify the Program subject to
5578 these terms and conditions. You may not impose any further
5579 restrictions on the recipients' exercise of the rights granted herein.
5580 You are not responsible for enforcing compliance by third parties to
5583 7. If, as a consequence of a court judgment or allegation of patent
5584 infringement or for any other reason (not limited to patent issues),
5585 conditions are imposed on you (whether by court order, agreement or
5586 otherwise) that contradict the conditions of this License, they do not
5587 excuse you from the conditions of this License. If you cannot
5588 distribute so as to satisfy simultaneously your obligations under this
5589 License and any other pertinent obligations, then as a consequence you
5590 may not distribute the Program at all. For example, if a patent
5591 license would not permit royalty-free redistribution of the Program by
5592 all those who receive copies directly or indirectly through you, then
5593 the only way you could satisfy both it and this License would be to
5594 refrain entirely from distribution of the Program.
5596 If any portion of this section is held invalid or unenforceable under
5597 any particular circumstance, the balance of the section is intended to
5598 apply and the section as a whole is intended to apply in other
5601 It is not the purpose of this section to induce you to infringe any
5602 patents or other property right claims or to contest validity of any
5603 such claims; this section has the sole purpose of protecting the
5604 integrity of the free software distribution system, which is
5605 implemented by public license practices. Many people have made
5606 generous contributions to the wide range of software distributed
5607 through that system in reliance on consistent application of that
5608 system; it is up to the author/donor to decide if he or she is willing
5609 to distribute software through any other system and a licensee cannot
5612 This section is intended to make thoroughly clear what is believed to
5613 be a consequence of the rest of this License.
5615 8. If the distribution and/or use of the Program is restricted in
5616 certain countries either by patents or by copyrighted interfaces, the
5617 original copyright holder who places the Program under this License
5618 may add an explicit geographical distribution limitation excluding
5619 those countries, so that distribution is permitted only in or among
5620 countries not thus excluded. In such case, this License incorporates
5621 the limitation as if written in the body of this License.
5623 9. The Free Software Foundation may publish revised and/or new versions
5624 of the General Public License from time to time. Such new versions will
5625 be similar in spirit to the present version, but may differ in detail to
5626 address new problems or concerns.
5628 Each version is given a distinguishing version number. If the Program
5629 specifies a version number of this License which applies to it and "any
5630 later version", you have the option of following the terms and conditions
5631 either of that version or of any later version published by the Free
5632 Software Foundation. If the Program does not specify a version number of
5633 this License, you may choose any version ever published by the Free Software
5636 10. If you wish to incorporate parts of the Program into other free
5637 programs whose distribution conditions are different, write to the author
5638 to ask for permission. For software which is copyrighted by the Free
5639 Software Foundation, write to the Free Software Foundation; we sometimes
5640 make exceptions for this. Our decision will be guided by the two goals
5641 of preserving the free status of all derivatives of our free software and
5642 of promoting the sharing and reuse of software generally.
5646 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
5647 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
5648 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
5649 PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
5650 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
5651 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
5652 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
5653 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
5654 REPAIR OR CORRECTION.
5656 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
5657 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
5658 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
5659 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
5660 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
5661 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
5662 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
5663 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
5664 POSSIBILITY OF SUCH DAMAGES.
5666 END OF TERMS AND CONDITIONS
5668 How to Apply These Terms to Your New Programs
5670 If you develop a new program, and you want it to be of the greatest
5671 possible use to the public, the best way to achieve this is to make it
5672 free software which everyone can redistribute and change under these terms.
5674 To do so, attach the following notices to the program. It is safest
5675 to attach them to the start of each source file to most effectively
5676 convey the exclusion of warranty; and each file should have at least
5677 the "copyright" line and a pointer to where the full notice is found.
5679 <one line to give the program's name and a brief idea of what it does.>
5680 Copyright (C) <year> <name of author>
5682 This program is free software; you can redistribute it and/or modify
5683 it under the terms of the GNU General Public License as published by
5684 the Free Software Foundation; either version 2 of the License, or
5685 (at your option) any later version.
5687 This program is distributed in the hope that it will be useful,
5688 but WITHOUT ANY WARRANTY; without even the implied warranty of
5689 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5690 GNU General Public License for more details.
5692 You should have received a copy of the GNU General Public License along
5693 with this program; if not, write to the Free Software Foundation, Inc.,
5694 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
5697 Also add information on how to contact you by electronic and paper mail.
5699 If the program is interactive, make it output a short notice like this
5700 when it starts in an interactive mode:
5702 Gnomovision version 69, Copyright (C) year name of author
5703 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
5704 This is free software, and you are welcome to redistribute it
5705 under certain conditions; type `show c' for details.
5707 The hypothetical commands `show w' and `show c' should show the appropriate
5708 parts of the General Public License. Of course, the commands you use may
5709 be called something other than `show w' and `show c'; they could even be
5710 mouse-clicks or menu items--whatever suits your program.
5712 You should also get your employer (if you work as a programmer) or your
5713 school, if any, to sign a "copyright disclaimer" for the program, if
5714 necessary. Here is a sample; alter the names:
5716 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
5717 `Gnomovision' (which makes passes at compilers) written by James Hacker.
5719 <signature of Ty Coon>, 1 April 1989
5720 Ty Coon, President of Vice
5722 This General Public License does not permit incorporating your program into
5723 proprietary programs. If your program is a subroutine library, you may
5724 consider it more useful to permit linking proprietary applications with the
5725 library. If this is what you want to do, use the GNU Library General
5726 Public License instead of this License.
5731 License for Scintilla and SciTE
5732 ===============================
5734 Copyright 1998-2003 by Neil Hodgson <neilh(at)scintilla(dot)org>
5738 Permission to use, copy, modify, and distribute this software and
5739 its documentation for any purpose and without fee is hereby granted,
5740 provided that the above copyright notice appear in all copies and
5741 that both that copyright notice and this permission notice appear in
5742 supporting documentation.
5744 NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
5745 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
5746 NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
5747 CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
5748 OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
5749 OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
5750 USE OR PERFORMANCE OF THIS SOFTWARE.