~ubuntu-branches/ubuntu/utopic/geany/utopic

« back to all changes in this revision

Viewing changes to doc/geany.txt

  • Committer: Package Import Robot
  • Author(s): Chow Loong Jin
  • Date: 2011-12-10 07:43:26 UTC
  • mfrom: (3.3.7 sid)
  • Revision ID: package-import@ubuntu.com-20111210074326-s8yqbew5i20h33tf
Tags: 0.21-1ubuntu1
* Merge from Debian Unstable, remaining changes:
  - debian/patches/20_use_evince_viewer.patch:
     + use evince as viewer for pdf and dvi files
  - debian/patches/20_use_x_terminal_emulator.patch:
     + use x-terminal-emulator as terminal
  - debian/control
     + Add breaks on geany-plugins-common << 0.20
* Also fixes bugs:
  - Filter for MATLAB/Octave files filters everythign (LP: 885505)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.. |(version)| replace:: 0.20
 
1
.. |(version)| replace:: 0.21
2
2
 
3
3
=======
4
4
 Geany
10
10
 
11
11
:Authors: Enrico Tröger,
12
12
          Nick Treleaven,
13
 
          Frank Lanitz
14
 
:Date: $Date: 2011-01-04 18:24:35 +0000 (Tue, 04 Jan 2011) $
 
13
          Frank Lanitz,
 
14
          Colomban Wendling
 
15
:Date: $Date: 2011-10-02 15:13:10 +0200 (dim. 02 oct. 2011) $
15
16
:Version: |(version)|
16
17
 
17
 
Copyright © 2005-2010
 
18
Copyright © 2005-2011
18
19
 
19
20
This document is distributed under the terms of the GNU General Public
20
21
License as published by the Free Software Foundation; either version 2
100
101
Requirements
101
102
------------
102
103
 
103
 
You will need the GTK (>= 2.8.0) libraries and their dependencies
 
104
You will need the GTK (>= 2.12.0) libraries and their dependencies
104
105
(Pango, GLib and ATK). Your distro should provide packages for these,
105
106
usually installed by default. For Windows, you can download an installer
106
107
from the website which bundles these libraries.
117
118
------------------
118
119
 
119
120
Compiling Geany is quite easy.
120
 
To do so, you need the GTK (>= 2.8.0) libraries and header files.
 
121
To do so, you need the GTK (>= 2.12.0) libraries and header files.
121
122
You also need the Pango, GLib and ATK libraries and header files.
122
123
All these files are available at http://www.gtk.org, but very often
123
124
your distro will provide development packages to save the trouble of
161
162
 
162
163
    % ./waf install
163
164
 
164
 
Waf Cache
 
165
Waf cache
165
166
`````````
166
167
 
167
168
The Waf build system has a nice and interesting feature which can help  to avoid
184
185
More information about the Waf cache feature are available at
185
186
http://code.google.com/p/waf/wiki/CacheObjectFiles.
186
187
 
187
 
Cleaning the Cache
 
188
Cleaning the cache
188
189
******************
189
190
You should be careful about the size of the cache directory as it may
190
191
grow rapidly over time.
552
553
The documents list and the editor tabs are two different ways
553
554
to switch between documents using the mouse. When you hit the key
554
555
combination to move between tabs, the order is determined by the tab
555
 
order. Its is not alphabetical as shown in the documents list
 
556
order. It is not alphabetical as shown in the documents list
556
557
(regardless of whether or not editor tabs are visible).
557
558
 
558
 
The tabs can be positioned at the top, bottom, left, or right of the
559
 
main editing window, by a selection in the interface preferences.
560
 
 
561
559
See the `Notebook tab keybindings`_ section for useful
562
560
shortcuts including for Most-Recently-Used document switching.
563
561
 
771
769
 
772
770
The default settings can be overridden per-document using the
773
771
Document menu. They can also be overridden by projects - see
774
 
`Project Management`_.
 
772
`Project management`_.
775
773
 
776
774
The indent mode for the current document is shown on the status bar
777
775
as follows:
883
881
of the program's standard error will be printed on Geany's standard
884
882
output.
885
883
 
 
884
If there is no selection, the whole current line is used instead.
 
885
 
886
886
To add a custom command, use the *Send Selection to->Set Custom
887
 
Commands* menu item. Click on *Add* to get a new text entry and type
888
 
the command. You can also specify some command line options. To
889
 
delete a command, just clear the text entry and press OK. It will be
890
 
deleted automatically.
 
887
Commands* menu item. Click on *Add* to get a new item and type the
 
888
command. You can also specify some command line options. Empty
 
889
commands are not saved.
891
890
 
892
891
Normal shell quoting is supported, so you can do things like:
893
892
 
1117
1116
Inserting Unicode characters
1118
1117
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1119
1118
 
1120
 
With GTK 2.10 and above, you can insert Unicode code points by hitting
1121
 
Ctrl-Shift-u, then still holding Ctrl-Shift, type some hex digits representing
1122
 
the code point for the character you want and hit Enter or Return (still
1123
 
holding Ctrl-Shift). If you release Ctrl-Shift before hitting Enter or Return
1124
 
(or any other character), the code insertion is completed, but the typed
1125
 
character is also entered.  In the case of Enter/Return, it is a newline, as
1126
 
you might expect.
 
1119
You can insert Unicode code points by hitting Ctrl-Shift-u, then still holding
 
1120
Ctrl-Shift, type some hex digits representing the code point for the character
 
1121
you want and hit Enter or Return (still holding Ctrl-Shift). If you release
 
1122
Ctrl-Shift before hitting Enter or Return (or any other character), the code
 
1123
insertion is completed, but the typed character is also entered.  In the case
 
1124
of Enter/Return, it is a newline, as you might expect.
1127
1125
 
1128
1126
 
1129
1127
In some earlier versions of Geany, you might need to first unbind Ctrl-Shift-u
1132
1130
applications, in that you'll need to continue to hold down the Ctrl and Shift
1133
1131
keys while typing the code point hex digits (and the Enter or Return to finish the code point).
1134
1132
 
1135
 
For GTK < 2.10, it is also possible, but typing the first Ctrl-Shift-u
1136
 
is not necessary. One problem is that you may find the alphabetic
1137
 
keys conflict with other Geany keybindings.
1138
 
 
1139
 
 
1140
1133
 
1141
1134
Search, replace and go to
1142
1135
-------------------------
1167
1160
``````````
1168
1161
The quickest way to find some text is to use the search bar entry in
1169
1162
the toolbar. This performs a case-insensitive search in the current
1170
 
document whilst you type. Pressing Enter will search again.
 
1163
document whilst you type. Pressing Enter will search again, and pressing
 
1164
Shift-Enter will search backwards.
1171
1165
 
1172
1166
Find
1173
1167
^^^^
1240
1234
The *Find Next/Previous Selection* commands perform a search for the
1241
1235
current selected text. If nothing is selected, by default the current
1242
1236
word is used instead. This can be customized by the
1243
 
*find_selection_type* hidden pref - see `Hidden preferences`_.
 
1237
*find_selection_type* preference - see `Various preferences`_.
1244
1238
 
1245
1239
=====   =============================================
1246
1240
Value   *find_selection_type* behaviour
1274
1268
 
1275
1269
.. image:: ./images/find_in_files_dialog.png
1276
1270
 
1277
 
The *Files* field optionally searches only files matching the
1278
 
patterns listed. Patterns are basic and shell-like, separated by a
1279
 
space. To search all ``.c`` and ``.h`` files, use: ``*.c *.h``.
 
1271
The *Files* setting allows to choose which files are included in the
 
1272
search, depending on the mode:
 
1273
 
 
1274
All
 
1275
    Search in all files;
 
1276
Project
 
1277
    Use the current project's patterns, see `Project properties`_;
 
1278
Custom
 
1279
    Use custom patterns.
 
1280
 
 
1281
Both project and custom patterns use a glob-style syntax, each
 
1282
pattern separated by a space. To search all ``.c`` and ``.h`` files,
 
1283
use: ``*.c *.h``.
 
1284
Note that an empty pattern list searches in all files rather
 
1285
than none.
1280
1286
 
1281
1287
The *Encoding* field can be used to define the encoding of the files
1282
1288
to be searched. The entered search text is converted to the chosen encoding
1286
1292
the grep tool.
1287
1293
 
1288
1294
.. note::
1289
 
    The *Files* setting uses ``--include=``, *Recurse in subfolders*
1290
 
    uses ``-r``; both are GNU Grep options and may not work with other
1291
 
    Grep implementations.
 
1295
    The *Files* setting uses ``--include=`` when searching recursively,
 
1296
    *Recurse in subfolders* uses ``-r``; both are GNU Grep options and may
 
1297
    not work with other Grep implementations.
1292
1298
 
1293
1299
 
1294
1300
Filtering out version control files
1479
1485
 
1480
1486
Color scheme files are read from the `Configuration file paths`_ under
1481
1487
the ``colorschemes`` subdirectory. They should have the extension
1482
 
``.conf`` and currently only contain a `[named_styles] section`_. The
1483
 
default color scheme is read from ``filetypes.common``.
 
1488
``.conf``. The default color scheme
 
1489
is read from ``filetypes.common``.
 
1490
 
 
1491
The `[named_styles] section`_ is the same as for ``filetypes.common``.
1484
1492
 
1485
1493
.. note::
1486
1494
    Some filetypes do not yet support named styles so will ignore
1487
1495
    any chosen color scheme.
1488
1496
 
 
1497
The ``[theme_info]`` section can contain information about the
 
1498
theme. The ``name`` and ``description`` keys are read to set the
 
1499
menu item text and tooltip, respectively. These keys can have
 
1500
translations, e.g.::
 
1501
 
 
1502
    key=Hello
 
1503
    key[de]=Hallo
 
1504
    key[fr_FR]=Bonjour
 
1505
 
1489
1506
Tags
1490
1507
----
1491
1508
 
1505
1522
Workspace tags
1506
1523
^^^^^^^^^^^^^^
1507
1524
 
1508
 
Tags for each document are parsed whenever a file is loaded or
1509
 
saved. These are shown in the Symbol list in the Sidebar. These tags
1510
 
are also used for autocompletion of symbols and calltips for all documents
1511
 
open in the current session that have the same filetype.
 
1525
Tags for each document are parsed whenever a file is loaded, saved or
 
1526
modified (see *Symbol list update frequency* preference in the `Editor
 
1527
Completions preferences`_). These are shown in the Symbol list in the
 
1528
Sidebar. These tags are also used for autocompletion of symbols and calltips
 
1529
for all documents open in the current session that have the same filetype.
1512
1530
 
1513
1531
The *Go to Tag* commands can be used with all workspace tags. See
1514
1532
`Go to tag definition`_.
1645
1663
upgrading Geany.
1646
1664
 
1647
1665
 
1648
 
C Ignore tags
 
1666
C ignore.tags
1649
1667
^^^^^^^^^^^^^
1650
1668
 
1651
1669
You can ignore certain tags for C-based languages if they would lead
1700
1718
however, are only for the current document and revert to defaults
1701
1719
when restarting Geany.
1702
1720
 
1703
 
There are also some rarer `Hidden preferences`_.
1704
 
 
1705
1721
.. note::
1706
1722
    In the paragraphs that follow, the text describing a dialog tab
1707
1723
    comes after the screenshot of that tab.
1825
1841
Interface preferences
1826
1842
^^^^^^^^^^^^^^^^^^^^^
1827
1843
 
1828
 
.. image:: ./images/pref_dialog_interface.png
 
1844
.. image:: ./images/pref_dialog_interface_interface.png
1829
1845
 
1830
1846
Sidebar
1831
1847
```````
1857
1873
Message window
1858
1874
    Change the font used for the message window area.
1859
1875
 
 
1876
Miscellaneous
 
1877
`````````````
 
1878
 
 
1879
Show status bar
 
1880
    Show the status bar at the bottom of the main window. It gives information about
 
1881
    the file you are editing like the line and column you are on, whether any
 
1882
    modifications were done, the file encoding, the filetype and other information.
 
1883
 
 
1884
Interface Notebook tab preferences
 
1885
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
1886
 
 
1887
.. image:: ./images/pref_dialog_interface_notebook.png
 
1888
 
1860
1889
Editor tabs
1861
1890
```````````
1862
1891
 
1895
1924
    Set the positioning of the message window's notebook tabs to the
1896
1925
    right, left, top, or bottom of the message window.
1897
1926
 
1898
 
Miscellaneous
1899
 
`````````````
1900
 
 
1901
 
Show status bar
1902
 
    Show the status bar at the bottom of the main window. It gives information about
1903
 
    the file you are editing like the line and column you are on, whether any
1904
 
    modifications were done, the file encoding, the filetype and other information.
1905
 
 
1906
 
 
1907
 
Toolbar preferences
1908
 
^^^^^^^^^^^^^^^^^^^
 
1927
 
 
1928
Interface Toolbar preferences
 
1929
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1909
1930
 
1910
1931
Affects the main toolbar underneath the menu bar.
1911
1932
 
1912
 
.. image:: ./images/pref_dialog_toolbar.png
 
1933
.. image:: ./images/pref_dialog_interface_toolbar.png
1913
1934
 
1914
1935
Toolbar
1915
1936
```````
1991
2012
 
1992
2013
See `Indentation`_ for more information.
1993
2014
 
 
2015
Width
 
2016
    The width of a single indent size in spaces. By default the indent
 
2017
    size is equivalent to 4 spaces.
 
2018
 
 
2019
Detect width from file
 
2020
    Try to detect and set the indent width based on file content, when
 
2021
    a file is opened.
 
2022
 
1994
2023
Type
1995
2024
    When Geany inserts indentation, whether to use:
1996
2025
 
2001
2030
    The *Tabs and Spaces* indent type is also known as *Soft tab
2002
2031
    support* in some other editors.
2003
2032
 
2004
 
Width
2005
 
    The width of a single indent size in spaces. By default the indent
2006
 
    size is equivalent to 4 spaces.
2007
 
 
2008
 
Detect from file
 
2033
Detect type from file
2009
2034
    Try to detect and set the indent type based on file content, when
2010
2035
    a file is opened.
2011
2036
 
2090
2115
Max. symbol name suggestions
2091
2116
    The maximum number of items in the autocompletion list.
2092
2117
 
 
2118
Symbol list update frequency
 
2119
    The minimum delay (in milliseconds) between two symbol list updates.
 
2120
 
 
2121
    This option determines how frequently the tag list is updated for the
 
2122
    current document. The smaller the delay, the more up-to-date the symbol
 
2123
    list (and then the completions); but rebuilding the symbol list has a
 
2124
    cost in performance, especially with large files.
 
2125
 
 
2126
    The default value is 250ms, which means the symbol list will be updated
 
2127
    at most four times per second, even if the document changes continuously.
 
2128
 
 
2129
    A value of 0 disables automatic updates, so the symbol list will only be
 
2130
    updated upon document saving.
 
2131
 
2093
2132
 
2094
2133
Auto-close quotes and brackets
2095
2134
``````````````````````````````
2302
2341
a document, such as the file header. You only need to set fields that
2303
2342
you want to use in your template files.
2304
2343
 
2305
 
.. note::
2306
 
    For changes made here to take effect, you must either select
2307
 
    *Tools->Reload Configuration* or restart Geany.
2308
 
 
2309
2344
.. image:: ./images/pref_dialog_templ.png
2310
2345
 
2311
2346
Template data
2386
2421
    see http://man.cx/strftime.
2387
2422
 
2388
2423
 
 
2424
Various preferences
 
2425
^^^^^^^^^^^^^^^^^^^
 
2426
 
 
2427
.. image:: ./images/pref_dialog_various.png
 
2428
 
 
2429
Rarely used preferences, explained in the table below. A few of them require
 
2430
restart to take effect, and a few other will only affect newly opened or created
 
2431
documents before restart.
 
2432
 
 
2433
================================  =========================================  ==========  ===========
 
2434
Key                               Description                                Default     Applies
 
2435
================================  =========================================  ==========  ===========
 
2436
**Editor related**
 
2437
use_gtk_word_boundaries           Whether to look for the end of a word      true        to new
 
2438
                                  when using word-boundary related                       documents
 
2439
                                  Scintilla commands (see `Scintilla
 
2440
                                  keyboard commands`_).
 
2441
brace_match_ltgt                  Whether to highlight <, > angle brackets.  false       immediately
 
2442
complete_snippets_whilst_editing  Whether to allow completion of snippets    false       immediately
 
2443
                                  when editing an existing line (i.e. there
 
2444
                                  is some text after the current cursor
 
2445
                                  position on the line). Only used when the
 
2446
                                  keybinding `Complete snippet` is set to
 
2447
                                  ``Space``.
 
2448
show_editor_scrollbars            Whether to display scrollbars. If set to   true        immediately
 
2449
                                  false, the horizontal and vertical
 
2450
                                  scrollbars are hidden completely.
 
2451
indent_hard_tab_width             The size of a tab character. Don't change  8           immediately
 
2452
                                  it unless you really need to; use the
 
2453
                                  indentation settings instead.
 
2454
**Interface related**
 
2455
show_symbol_list_expanders        Whether to show or hide the small          true        to new
 
2456
                                  expander icons on the symbol list                      documents
 
2457
allow_always_save                 treeview. Whether files can be saved       false       immediately
 
2458
                                  always, even if they don't have any
 
2459
                                  changes. By default, the Save button and
 
2460
                                  menu item are disabled when a file is
 
2461
                                  unchanged. When setting this option to
 
2462
                                  true, the Save button and menu item are
 
2463
                                  always active and files can be saved.
 
2464
compiler_tab_autoscroll           Whether to automatically scroll to the     true        immediately
 
2465
                                  last line of the output in the Compiler
 
2466
                                  tab.
 
2467
statusbar_template                The status bar statistics line format.     See below.  immediately
 
2468
                                  (Search in src/ui_utils.c for details).
 
2469
new_document_after_close          Whether to open a new document after all   false       immediately
 
2470
                                  documents have been closed.
 
2471
msgwin_status_visible             Whether to show the Status tab in the      true        immediately
 
2472
                                  Messages Window
 
2473
msgwin_compiler_visible           Whether to show the Compiler tab in the    true        immediately
 
2474
                                  Messages Window
 
2475
msgwin_messages_visible           Whether to show the Messages tab in the    true        immediately
 
2476
                                  Messages Window
 
2477
msgwin_scribble_visible           Whether to show the Scribble tab in the    true        immediately
 
2478
                                  Messages Window
 
2479
================================  =========================================  ==========  ===========
 
2480
 
 
2481
By default, statusbar_template is empty. This tells Geany to use its
 
2482
internal default, which is currently:
 
2483
 
 
2484
``line: %l / %L\t col: %c\t sel: %s\t %w      %t      %mmode: %M      encoding: %e      filetype: %f      scope: %S``
 
2485
 
 
2486
Note that ``\t`` = tab.
 
2487
 
 
2488
================================  ===========================================  ========  ===========
 
2489
Key                               Description                                  Default   Applies
 
2490
================================  ===========================================  ========  ===========
 
2491
**VTE related**
 
2492
emulation                         Terminal emulation mode. Only change this    xterm     immediately
 
2493
                                  if you have VTE termcap files other than
 
2494
                                  ``vte/termcap/xterm``.
 
2495
send_selection_unsafe             By default, Geany strips any trailing        false     immediately
 
2496
                                  newline characters from the current
 
2497
                                  selection before sending it to the terminal
 
2498
                                  to not execute arbitrary code. This is
 
2499
                                  mainly a security feature.
 
2500
                                  If, for whatever reasons, you really want
 
2501
                                  it to be executed directly, set this option
 
2502
                                  to true.
 
2503
**File related**
 
2504
use_atomic_file_saving            Defines the mode how Geany saves files to    false     immediately
 
2505
                                  disk. If disabled, Geany directly writes
 
2506
                                  the content of the document to disk. This
 
2507
                                  might cause loss of data when there is
 
2508
                                  no more free space on disk to save the
 
2509
                                  file. When set to true, Geany first saves
 
2510
                                  the contents into a temporary file and if
 
2511
                                  this succeeded, the temporary file is
 
2512
                                  moved to the real file to save.
 
2513
                                  This gives better error checking in case of
 
2514
                                  no more free disk space. But it also
 
2515
                                  destroys hard links of the original file
 
2516
                                  and its permissions (e.g. executable flags
 
2517
                                  are reset). Use this with care as it can
 
2518
                                  break things seriously.
 
2519
                                  The better approach would be to ensure your
 
2520
                                  disk won't run out of free space.
 
2521
use_gio_unsafe_file_saving        Whether to use GIO as the unsafe file        true      immediately
 
2522
                                  saving backend. It is better on most
 
2523
                                  situations but is known not to work
 
2524
                                  correctly on some complex setups.
 
2525
gio_unsafe_save_backup            Make a backup when using GIO unsafe file     false     immediately
 
2526
                                  saving. Backup is named `filename~`.
 
2527
**Search related**
 
2528
find_selection_type               See `Find selection`_.                       0         immediately
 
2529
**Build Menu related**
 
2530
number_ft_menu_items              The maximum number of menu items in the      2         on restart
 
2531
                                  filetype section of the Build menu.
 
2532
number_non_ft_menu_items          The maximum number of menu items in the      3         on restart
 
2533
                                  independent section of the Build menu.
 
2534
number_exec_menu_items            The maximum number of menu items in the      2         on restart
 
2535
                                  execute section of the Build menu.
 
2536
================================  ===========================================  ========  ===========
 
2537
 
 
2538
 
2389
2539
Terminal (VTE) preferences
2390
2540
^^^^^^^^^^^^^^^^^^^^^^^^^^
2391
2541
 
2442
2592
    like a Python console (e.g. ipython). Use this with care.
2443
2593
 
2444
2594
 
2445
 
Project Management
 
2595
Project management
2446
2596
------------------
2447
2597
 
2448
 
Project Management is optional in Geany. Currently it can be used for:
 
2598
Project management is optional in Geany. Currently it can be used for:
2449
2599
 
2450
2600
* Storing and opening session files on a project basis.
2451
2601
* Overriding default settings with project equivalents.
2466
2616
The project menu items are detailed below.
2467
2617
 
2468
2618
 
2469
 
New Project
 
2619
New project
2470
2620
^^^^^^^^^^^
2471
2621
 
2472
2622
To create a new project, fill in the *Name* field. By default this
2479
2629
structure contained in it.
2480
2630
 
2481
2631
 
2482
 
Project Properties
 
2632
Project properties
2483
2633
^^^^^^^^^^^^^^^^^^
2484
2634
 
2485
2635
You can set an optional description for the project. Currently it's
2489
2639
The specified path can be an absolute path or it is considered to be
2490
2640
relative to the project's file name.
2491
2641
 
 
2642
The *File patterns* field allows to specify a list of file patterns for the
 
2643
project, which can be used in the `Find in files`_ dialog.
 
2644
 
2492
2645
The *Indentation* tab allows you to override the default
2493
2646
`Indentation`_ settings.
2494
2647
 
2495
2648
 
2496
 
Open Project
 
2649
Open project
2497
2650
^^^^^^^^^^^^
2498
2651
 
2499
2652
The Open command displays a standard file chooser, starting in
2504
2657
open files and open the session files associated with the project.
2505
2658
 
2506
2659
 
2507
 
Close Project
 
2660
Close project
2508
2661
^^^^^^^^^^^^^
2509
2662
 
2510
2663
Project file settings are saved when the project is closed.
2513
2666
session files and open any previously closed default session files.
2514
2667
 
2515
2668
 
2516
 
Build Menu
 
2669
Build menu
2517
2670
----------
2518
2671
After editing code with Geany, the next step is to compile, link, build,
2519
2672
interpret, run etc.  As Geany supports many languages each with a different
2554
2707
preferences`_.
2555
2708
 
2556
2709
 
2557
 
Default Build Menu Items
 
2710
Default build menu items
2558
2711
^^^^^^^^^^^^^^^^^^^^^^^^
2559
2712
Depending on the current file's filetype, the default Build menu will contain
2560
2713
the following items:
2622
2775
the current file, using the filename for 'current_file'. It is useful
2623
2776
for building just the current file without building the whole project.
2624
2777
 
2625
 
Next Error
 
2778
Next error
2626
2779
``````````
2627
2780
 
2628
2781
The next error item will move to the next detected error in the file.
2629
2782
 
2630
 
Previous Error
 
2783
Previous error
2631
2784
``````````````
2632
2785
The previous error item will move to the previous detected error in the file.
2633
2786
 
2673
2826
tab in the terminal field.
2674
2827
 
2675
2828
 
2676
 
Set Build Commands
 
2829
Set build commands
2677
2830
``````````````````
2678
2831
 
2679
2832
By default Compile, Build and Execute are fairly basic commands. You
2683
2836
compiler, any library names and paths for the linker, and any
2684
2837
arguments you want to use when running Execute.
2685
2838
 
2686
 
Build Menu Configuration
 
2839
Build menu configuration
2687
2840
^^^^^^^^^^^^^^^^^^^^^^^^
2688
2841
 
2689
2842
The build menu has considerable flexibility and configurability, allowing
2714
2867
  * Show the build menu commands dialog.
2715
2868
 
2716
2869
The maximum numbers of items in each of the configurable groups can be
2717
 
configured when Geany starts using hidden settings (see `Preferences File Format`_).
2718
 
Even though the maximum number of items may have been increased, only
2719
 
those menu items that have values configured are shown in the menu.
 
2870
configured in the `Various preferences`_. Even though the maximum number of
 
2871
items may have been increased, only those menu items that have values
 
2872
configured are shown in the menu.
2720
2873
 
2721
2874
The groups of menu items obtain their configuration from four potential
2722
2875
sources.  The highest priority source that has the menu item defined will
2734
2887
| Group        | Project File        | Preferences              | System Filetype   |  Defaults                     |
2735
2888
+==============+=====================+==========================+===================+===============================+
2736
2889
| Filetype     | Loads From: project | Loads From:              | Loads From:       | None                          |
2737
 
|              | file                | filetype.xxx file in     | filetype.xxx in   |                               |
 
2890
|              | file                | filetypes.xxx file in    | filetypes.xxx in  |                               |
2738
2891
|              |                     | ~/.config/geany/filedefs | Geany install     |                               |
2739
2892
|              | Saves To: project   |                          |                   |                               |
2740
2893
|              | file                | Saves to: as above,      | Saves to: as user |                               |
2741
2894
|              |                     | creating if needed.      | preferences left. |                               |
2742
2895
+--------------+---------------------+--------------------------+-------------------+-------------------------------+
2743
2896
| Filetype     | Loads From: project | Loads From:              | Loads From:       | 1:                            |
2744
 
| Independent  | file                | geany.conf file in       | filetype.xxx in   |   Label: _Make                |
 
2897
| Independent  | file                | geany.conf file in       | filetypes.xxx in  |   Label: _Make                |
2745
2898
|              |                     | ~/.config/geany          | Geany install     |   Command: make               |
2746
2899
|              | Saves To: project   |                          |                   |                               |
2747
2900
|              | file                | Saves to: as above,      | Saves to: as user | 2:                            |
2753
2906
|              |                     |                          |                   |    Command: make %e.o         |
2754
2907
+--------------+---------------------+--------------------------+-------------------+-------------------------------+
2755
2908
| Execute      | Loads From: project | Loads From:              | Loads From:       | Label: _Execute               |
2756
 
|              | file or else        | geany.conf file in       | filetype.xxx in   | Command: ./%e                 |
 
2909
|              | file or else        | geany.conf file in       | filetypes.xxx in  | Command: ./%e                 |
2757
2910
|              | filetype defined in | ~/.config/geany or else  | Geany install     |                               |
2758
 
|              | project file        | filetype.xxx file in     |                   |                               |
 
2911
|              | project file        | filetypes.xxx file in    |                   |                               |
2759
2912
|              |                     | ~/.config/geany/filedefs | Saves To: as user |                               |
2760
2913
|              | Saves To:           |                          | preferences left. |                               |
2761
2914
|              | project file        | Saves To:                |                   |                               |
2762
 
|              |                     | filetype.xxx file in     |                   |                               |
 
2915
|              |                     | filetypes.xxx file in    |                   |                               |
2763
2916
|              |                     | ~/.config/geany/filedefs |                   |                               |
2764
2917
+--------------+---------------------+--------------------------+-------------------+-------------------------------+
2765
2918
 
2766
2919
The following notes on the table reference cells by coordinate as (group,source):
2767
2920
 
2768
 
* General - for filetype.xxx substitute the filetype name of the
2769
 
  current document for xxx.
 
2921
* General - for filetypes.xxx substitute the appropriate extension for
 
2922
  the filetype of the current document for xxx - see `filenames`_.
2770
2923
 
2771
2924
* System Filetypes - Labels loaded from these sources are locale sensitive
2772
2925
  and can contain translations.
2783
2936
 
2784
2937
* (Execute, Project File) and (Execute, Preferences) - the project independent
2785
2938
  execute and preferences independent execute commands can only be set by hand
2786
 
  editing the appropriate file, see `Preferences File Format`_ and `Project File
2787
 
  Format`_.
 
2939
  editing the appropriate file, see `Preferences file format`_ and `Project file
 
2940
  format`_.
2788
2941
 
2789
 
Build Menu Commands Dialog
 
2942
Build menu commands dialog
2790
2943
^^^^^^^^^^^^^^^^^^^^^^^^^^
2791
2944
 
2792
2945
Most of the configuration of the build menu is done through the Build Menu
2828
2981
To hide lower priority menu items without having anything show in the menu
2829
2982
configure with a nothing in the label but at least one character in the command.
2830
2983
 
2831
 
Substitutions in Commands and Working Directories
 
2984
Substitutions in commands and working directories
2832
2985
`````````````````````````````````````````````````
2833
2986
 
2834
2987
The first occurence of each of the following character sequences in each of the
2848
3001
   and even checked into and out of version control without having to re-configure the
2849
3002
   build menu.
2850
3003
 
2851
 
Build Menu Keyboard Shortcuts
 
3004
Build menu keyboard shortcuts
2852
3005
`````````````````````````````
2853
3006
 
2854
3007
Keyboard shortcuts can be defined for the first two filetype menu items, the first three
2865
3018
 
2866
3019
The configurable Build Menu capability was introduced in Geany 0.19 and
2867
3020
required a new section to be added to the configuration files (See
2868
 
`Preferences File Format`_).  Geany will still load older format project,
 
3021
`Preferences file format`_).  Geany will still load older format project,
2869
3022
preferences and filetype file settings and will attempt to map them into the new
2870
3023
configuration format.  There is not a simple clean mapping between the formats.
2871
3024
The mapping used produces the most sensible results for the majority of cases.
2912
3065
at the end of the file. Of course, you can also use xpdf, kpdf or whatever
2913
3066
as the print preview command.
2914
3067
 
2915
 
Unfortunately, native GTK printing support is only available if Geany was
2916
 
built against GTK 2.10 (or above) **and** is running with GTK 2.10 (or above).
2917
 
If not, Geany provides basic printing support. This means you can print a
2918
 
file by passing the filename of the current file to a command which
2919
 
actually prints the file. However, the printed document contains no syntax
2920
 
highlighting. You can adjust the command to which the filename is
2921
 
passed in the preferences dialog. The default command is::
 
3068
Geany also provides an alternative basic printing support using a custom
 
3069
print command. However, the printed document contains no syntax highlighting.
 
3070
You can adjust the command to which the filename is passed in the preferences
 
3071
dialog. The default command is::
2922
3072
 
2923
3073
    % lpr %f
2924
3074
 
2954
3104
See also `Plugin documentation`_ for information about single plugins
2955
3105
which are included in Geany.
2956
3106
 
2957
 
Plugin Manager
 
3107
Plugin manager
2958
3108
^^^^^^^^^^^^^^
2959
3109
The Plugin Manager dialog lets you choose which plugins
2960
3110
should be loaded at startup. You can also load and unload plugins on the
3424
3574
 
3425
3575
Document keybindings
3426
3576
````````````````````
3427
 
=============================== ========================= ==================================================
3428
 
Action                          Default shortcut          Description
3429
 
=============================== ========================= ==================================================
 
3577
==================================== ==================== ==================================================
 
3578
Action                               Default shortcut     Description
 
3579
==================================== ==================== ==================================================
3430
3580
Replace tabs by space                                     Replaces all tabs with the right amount of spaces.
3431
3581
 
3432
3582
Replace spaces by tabs                                    Replaces all spaces with tab characters.
3437
3587
 
3438
3588
Unfold all                                                Unfolds all contracted code blocks.
3439
3589
 
3440
 
Reload symbol list              Ctrl-Shift-R              Reloads the tag/symbol list.
 
3590
Reload symbol list                   Ctrl-Shift-R         Reloads the tag/symbol list.
3441
3591
 
3442
3592
Toggle Line wrapping                                      Enables or disables wrapping of long lines.
3443
3593
 
3450
3600
 
3451
3601
Remove Error Indicators                                   Remove any error indicators in the
3452
3602
                                                          current document.
3453
 
=============================== ========================= ==================================================
 
3603
 
 
3604
Remove Markers and Error Indicators                       Combines ``Remove Markers`` and
 
3605
                                                          ``Remove Error Indicators``.
 
3606
==================================== ==================== ==================================================
3454
3607
 
3455
3608
 
3456
3609
Build keybindings
3593
3746
 
3594
3747
See also `Configuration file paths`_.
3595
3748
 
 
3749
Filenames
 
3750
^^^^^^^^^
 
3751
Each filetype has a corresponding filetype definition file. The format
 
3752
for built-in filetype `Foo` is::
 
3753
 
 
3754
    filetypes.foo
 
3755
 
 
3756
The extension is normally just the filetype name in lower case.
 
3757
 
 
3758
However there are some exceptions:
 
3759
 
 
3760
=============== =========
 
3761
Filetype        Extension
 
3762
=============== =========
 
3763
C++             cpp
 
3764
C#              cs
 
3765
Make            makefile
 
3766
Matlab/Octave   matlab
 
3767
=============== =========
 
3768
 
 
3769
There is also the `special file filetypes.common`_.
 
3770
 
 
3771
For `custom filetypes`_, the filename for `Foo` is different::
 
3772
 
 
3773
    filetypes.Foo.conf
 
3774
 
 
3775
See the link for details.
 
3776
 
3596
3777
System files
3597
3778
^^^^^^^^^^^^
3598
3779
The system-wide filetype configuration files can be found in the
3660
3841
^^^^^^^^^^^^^^^^^^^^^^
3661
3842
 
3662
3843
As well as the sections listed below, each filetype file can contain
3663
 
a [build-menu] section as described in `[build-menu] Section`_.
 
3844
a [build-menu] section as described in `[build-menu] section`_.
3664
3845
 
3665
 
[styling] Section
 
3846
[styling] section
3666
3847
`````````````````
3667
3848
 
3668
3849
In this section the colors for syntax highlighting are defined. The
3704
3885
To define named styles, see the filetypes.common `[named_styles]
3705
3886
Section`_.
3706
3887
 
3707
 
 
3708
 
[keywords] Section
 
3888
Reading styles from another filetype
 
3889
************************************
 
3890
You can automatically copy all of the styles from another filetype
 
3891
definition file by using the following syntax for the ``[styling]``
 
3892
group::
 
3893
 
 
3894
        [styling=Foo]
 
3895
 
 
3896
Where Foo is a filetype name. The corresponding ``[styling]``
 
3897
section from ``filetypes.foo`` will be read.
 
3898
 
 
3899
This is useful when the same lexer is being used for multiple
 
3900
filetypes (e.g. C/C++/C#/Java/etc).  For example, to make the C++
 
3901
styling the same as the C styling, you would put the following in
 
3902
``filetypes.cpp``::
 
3903
 
 
3904
        [styling=C]
 
3905
 
 
3906
 
 
3907
[keywords] section
3709
3908
``````````````````
3710
3909
 
3711
3910
This section contains keys for different keyword lists specific to
3717
3916
    The keywords list must be in one line without line ending characters.
3718
3917
 
3719
3918
 
3720
 
[lexer_properties] Section
 
3919
[lexer_properties] section
3721
3920
``````````````````````````
3722
3921
Here any special properties for the Scintilla lexer can be set in the
3723
3922
format ``key.name.field=some.value``.
3728
3927
    egrep -o 'GetProperty\w*\("([^"]+)"[^)]+\)' scintilla/Lex*.cxx
3729
3928
 
3730
3929
 
3731
 
[settings] Section
 
3930
[settings] section
3732
3931
``````````````````
3733
3932
 
3734
3933
extension
3749
3948
        This can be overridden by the *whitespace_chars*
3750
3949
        filetypes.common setting.
3751
3950
 
 
3951
comment_single
 
3952
    A character or string which is used to comment code. If you want to use
 
3953
    multiline comments only, don't set this but rather comment_open and
 
3954
    comment_close.
 
3955
 
 
3956
    Single-line comments are used in priority over multiline comments to
 
3957
    comment a line, e.g. with the `Comment/Uncomment line` command.
 
3958
 
 
3959
    *Example:* ``comment_single=//``
 
3960
 
3752
3961
comment_open
3753
 
    A character or string which is used to comment code. If you want to
3754
 
    use multiline comments, also set comment_close, otherwise leave it
3755
 
    empty.
 
3962
    A character or string which is used to comment code. You need to also
 
3963
    set comment_close to really use multiline comments. If you want to use
 
3964
    single-line comments, prefer setting comment_single.
 
3965
 
 
3966
    Multiline comments are used in priority over single-line comments to
 
3967
    comment a block, e.g. template comments.
3756
3968
 
3757
3969
    *Example:* ``comment_open=/*``
3758
3970
 
3841
4053
    this setting in their system configuration files.
3842
4054
 
3843
4055
 
3844
 
[build_settings] Section
 
4056
[indentation] section
 
4057
`````````````````````
 
4058
 
 
4059
This section allows definition of default indentation settings specific to
 
4060
the file type, overriding the ones configured in the preferences.  This can
 
4061
be useful for file types requiring specific indentation settings (e.g. tabs
 
4062
only for Makefile).  These settings don't override auto-detection if activated.
 
4063
 
 
4064
width
 
4065
    The forced indentation width.
 
4066
 
 
4067
type
 
4068
    The forced indentation type.
 
4069
 
 
4070
    =====   =======================
 
4071
    Value   Indentation type
 
4072
    =====   =======================
 
4073
    0       Spaces only
 
4074
    1       Tabs only
 
4075
    2       Mixed (tabs and spaces)
 
4076
    =====   =======================
 
4077
 
 
4078
 
 
4079
[build_settings] section
3845
4080
````````````````````````
3846
4081
 
3847
 
As of Geany 0.19 this section is supplemented by the `[build-menu] Section`_.
 
4082
As of Geany 0.19 this section is supplemented by the `[build-menu] section`_.
3848
4083
Values that are set in the [build-menu] section will override those in this section.
3849
4084
 
3850
4085
error_regex
3917
4152
    See the `Filetype configuration`_ section for how to define styles.
3918
4153
 
3919
4154
 
3920
 
[named_styles] Section
 
4155
[named_styles] section
3921
4156
``````````````````````
3922
4157
Named styles declared here can be used in the [styling] section of any
3923
4158
filetypes.* file.
3946
4181
This section can be overridden with color scheme files - see the `Color
3947
4182
schemes menu`_.
3948
4183
 
3949
 
[styling] Section
 
4184
[styling] section
3950
4185
`````````````````
3951
4186
default
3952
4187
    This is the default style. It is used for styling files without a
4077
4312
    * 1 -- Visual flag at end of subline drawn near text
4078
4313
    * 2 -- Visual flag at begin of subline drawn near text
4079
4314
 
4080
 
    Only first and second argument is interpreted.
 
4315
    Only first and second arguments are interpreted.
4081
4316
 
4082
4317
    *Example:* ``line_wrap_visuals=3;0;false;false``
4083
4318
 
4092
4327
    * 1 - Wrapped sublines are aligned to first subline indent (use the same indentation)
4093
4328
    * 2 - Wrapped sublines are aligned to first subline indent plus one more level of indentation
4094
4329
 
4095
 
    Only first and second argument is interpreted.
 
4330
    Only first and second arguments are interpreted.
4096
4331
 
4097
4332
    *Example:* ``line_wrap_indent=0;1;false;false``
4098
4333
 
4103
4338
    Note for Windows 95, 98 and ME users:
4104
4339
    keep this value at 256 to disable translucency otherwise Geany might crash.
4105
4340
 
4106
 
    Only the first and second argument is interpreted.
 
4341
    Only the first and second arguments are interpreted.
4107
4342
 
4108
4343
    *Example:* ``translucency=256;256;false;false``
4109
4344
 
4112
4347
    The foreground color (first argument) is only used when the Markers margin
4113
4348
    is enabled (see View menu).
4114
4349
 
4115
 
    Only the first and second argument is interpreted.
 
4350
    Only the first and second arguments are interpreted.
4116
4351
 
4117
4352
    *Example:* ``marker_line=0x000000;0xffff00;false;false``
4118
4353
 
4129
4364
    (Ctrl-M)). The foreground color (first argument) is only used
4130
4365
    when the Markers margin is enabled (see View menu).
4131
4366
 
4132
 
    Only the first and second argument is interpreted.
 
4367
    Only the first and second arguments are interpreted.
4133
4368
 
4134
4369
    *Example:* ``marker_mark=0x000000;0xb8f4b8;false;false``
4135
4370
 
4140
4375
    Note for Windows 95, 98 and ME users:
4141
4376
    keep this value at 256 to disable translucency otherwise Geany might crash.
4142
4377
 
4143
 
    Only the first and second argument is interpreted.
 
4378
    Only the first and second arguments are interpreted.
4144
4379
 
4145
4380
    *Example:* ``marker_translucency=256;256;false;false``
4146
4381
 
4149
4384
    The first argument defines the amount of space to be drawn above the line, the second
4150
4385
    argument defines the amount of space to be drawn below.
4151
4386
 
4152
 
    Only the first and second argument is interpreted.
 
4387
    Only the first and second arguments are interpreted.
4153
4388
 
4154
4389
    *Example:* ``line_height=0;0;false;false``
4155
4390
 
4161
4396
    *Example:* ``calltips=0xc0c0c0;0xffffff;false;false``
4162
4397
 
4163
4398
 
4164
 
[settings] Section
 
4399
[settings] section
4165
4400
``````````````````
4166
4401
whitespace_chars
4167
4402
    Characters to treat as whitespace. These characters are ignored
4197
4432
    [Extensions]
4198
4433
    Make=Makefile*;*.mk;Buildfile;
4199
4434
 
4200
 
Preferences File Format
 
4435
Filetype group membership
 
4436
-------------------------
 
4437
Group membership is also stored in ``filetype_extensions.conf``. This
 
4438
file is used to store information Geany needs at startup, whereas the
 
4439
separate filetype definition files hold information only needed when
 
4440
a document with their filetype is used.
 
4441
 
 
4442
The format looks like::
 
4443
 
 
4444
    [Groups]
 
4445
    Programming=C;C++;
 
4446
    Script=Perl;Python;
 
4447
    Markup=HTML;XML;
 
4448
    Misc=Diff;Conf;
 
4449
    None=None;
 
4450
 
 
4451
The key names cannot be configured.
 
4452
 
 
4453
.. note::
 
4454
    Group membership is only read at startup.
 
4455
 
 
4456
Preferences file format
4201
4457
-----------------------
4202
4458
 
4203
4459
The user preferences file ``geany.conf`` holds settings for all the items configured
4206
4462
is quit.
4207
4463
 
4208
4464
 
4209
 
Hidden preferences
4210
 
^^^^^^^^^^^^^^^^^^
4211
 
 
4212
 
There are some rarely used preferences that are not shown in the Preferences
4213
 
dialog. These can be set by editing the preferences file, then
4214
 
restarting Geany. Search for the key name, then edit the value. Example:
4215
 
 
4216
 
    ``brace_match_ltgt=true``
4217
 
 
4218
 
.. note::
4219
 
    If you just installed or updated Geany, you should restart it
4220
 
    first so Geany can write/update the config file and you can find
4221
 
    the key lines.
4222
 
 
4223
 
The table below show the key names of hidden preferences in the
4224
 
configuration file.
4225
 
 
4226
 
================================  ===========================================  ==================
4227
 
Key                               Description                                  Default
4228
 
================================  ===========================================  ==================
4229
 
**Editor related**
4230
 
brace_match_ltgt                  Whether to highlight <, > angle brackets.    false
4231
 
use_gtk_word_boundaries           Whether to look for the end of a word when   true
4232
 
                                  using word-boundary related Scintilla
4233
 
                                  commands (see `Scintilla keyboard
4234
 
                                  commands`_).
4235
 
complete_snippets_whilst_editing  Whether to allow completion of snippets      false
4236
 
                                  when editing an existing line (i.e. there
4237
 
                                  is some text after the current cursor
4238
 
                                  position on the line). Only used when the
4239
 
                                  keybinding `Complete snippet` is set to
4240
 
                                  ``Space``.
4241
 
show_editor_scrollbars            Whether to display scrollbars. If set to     true
4242
 
                                  false, the horizontal and vertical
4243
 
                                  scrollbars are hidden completely.
4244
 
**Interface related**
4245
 
show_symbol_list_expanders        Whether to show or hide the small expander   true
4246
 
                                  icons on the symbol list treeview (only
4247
 
                                  available with GTK 2.12 or above).
4248
 
allow_always_save                 Whether files can be saved always, even if   false
4249
 
                                  they don't have any changes. By default,
4250
 
                                  the Save buttons and menu items are
4251
 
                                  disabled when a file is unchanged. When
4252
 
                                  setting this option to true, the Save
4253
 
                                  buttons and menu items are always active
4254
 
                                  and files can be saved.
4255
 
compiler_tab_autoscroll           Whether to automatically scroll to the       true
4256
 
                                  last line of the output in the Compiler
4257
 
                                  tab.
4258
 
statusbar_template                The status bar statistics line format.       See below.
4259
 
                                  (Search in src/ui_utils.c for details).
4260
 
new_document_after_close          Whether to open a new document after all     false
4261
 
                                  documents have been closed.
4262
 
msgwin_status_visible             Whether to show the Status tab in the        true
4263
 
                                  Messages Window
4264
 
msgwin_compiler_visible           Whether to show the Compiler tab in the      true
4265
 
                                  Messages Window
4266
 
msgwin_messages_visible           Whether to show the Messages tab in the      true
4267
 
                                  Messages Window
4268
 
msgwin_scribble_visible           Whether to show the Scribble tab in the      true
4269
 
                                  Messages Window
4270
 
================================  ===========================================  ==================
4271
 
 
4272
 
By default, statusbar_template is empty. This tells Geany to use its
4273
 
internal default, which is currently:
4274
 
 
4275
 
``line: %l / %L\t col: %c\t sel: %s\t %w      %t      %mmode: %M      encoding: %e      filetype: %f      scope: %S``
4276
 
 
4277
 
Note that ``\t`` = tab.
4278
 
 
4279
 
================================  ===========================================  ==================
4280
 
Key                               Description                                  Default
4281
 
================================  ===========================================  ==================
4282
 
**VTE related**
4283
 
emulation                         Terminal emulation mode. Only change this    xterm
4284
 
                                  if you have VTE termcap files other than
4285
 
                                  ``vte/termcap/xterm``.
4286
 
send_selection_unsafe             By default, Geany strips any trailing        false
4287
 
                                  newline characters from the current
4288
 
                                  selection before sending it to the terminal
4289
 
                                  to not execute arbitrary code. This is
4290
 
                                  mainly a security feature.
4291
 
                                  If, for whatever reasons, you really want
4292
 
                                  it to be executed directly, set this option
4293
 
                                  to true.
4294
 
**File related**
4295
 
use_safe_file_saving              Defines the mode how Geany saves files to    false
4296
 
                                  disk. If disabled, Geany directly writes
4297
 
                                  the content of the document to disk. This
4298
 
                                  might cause in loss of data when there is
4299
 
                                  no more free space on disk to save the
4300
 
                                  file. When set to true, Geany first saves
4301
 
                                  the contents into a temporary file and if
4302
 
                                  this succeeded, the temporary file is
4303
 
                                  moved to the real file to save.
4304
 
                                  This gives better error checking in case of
4305
 
                                  no more free disk space. But it also
4306
 
                                  destroys hard links of the original file
4307
 
                                  and its permissions (e.g. executable flags
4308
 
                                  are reset). Use this with care as it can
4309
 
                                  break things seriously.
4310
 
                                  The better approach would be to ensure your
4311
 
                                  disk won't run out of free space.
4312
 
gio_unsafe_save_backup            Make a backup when using GIO unsafe file     false
4313
 
                                  saving. Backup is named `filename~`.
4314
 
**Search related**
4315
 
find_selection_type               See `Find selection`_.                       0
4316
 
**Build Menu related**
4317
 
number_ft_menu_items              The maximum number of menu items in the      2
4318
 
                                  filetype section of the Build menu.
4319
 
number_non_ft_menu_items          The maximum number of menu items in the      3
4320
 
                                  independent section of the Build menu.
4321
 
number_exec_menu_items            The maximum number of menu items in the      2
4322
 
                                  execute section of the Build menu.
4323
 
================================  ===========================================  ==================
4324
 
 
4325
 
[build-menu] Section
 
4465
[build-menu] section
4326
4466
^^^^^^^^^^^^^^^^^^^^
4327
4467
 
4328
4468
The [build-menu] section contains the configuration of the build menu.
4355
4495
  - WD for working directory
4356
4496
 
4357
4497
 
4358
 
Project File Format
 
4498
Project file format
4359
4499
-------------------
4360
4500
 
4361
4501
The project file contains project related settings and possibly a
4362
4502
record of the current session files.
4363
4503
 
4364
4504
 
4365
 
[build-menu] Additions
 
4505
[build-menu] additions
4366
4506
^^^^^^^^^^^^^^^^^^^^^^
4367
4507
 
4368
4508
The project file also can have extra fields in the [build-menu] section
4369
 
in addition to those listed in `[build-menu] Section`_ above.
 
4509
in addition to those listed in `[build-menu] section`_ above.
4370
4510
 
4371
4511
When filetype menu items are configured for the project they are stored
4372
4512
in the project file.
4375
4515
project file.
4376
4516
 
4377
4517
For each filetype the entries for that filetype have the format defined in
4378
 
`[build-menu] Section`_ but the key is prefixed by the name of the filetype
 
4518
`[build-menu] section`_ but the key is prefixed by the name of the filetype
4379
4519
as it appears in the ``filetypes`` entry, eg the entry for the label of
4380
4520
filetype menu item 0 for the C filetype would be
4381
4521
 
4423
4563
 
4424
4564
In the configuration dialog you can find a tab "Templates" (see
4425
4565
`Template preferences`_). You can define the default values
4426
 
which will be inserted in the templates. You should select
4427
 
*Tools->Reload Configuration* or restart Geany after making changes.
 
4566
which will be inserted in the templates.
4428
4567
 
4429
4568
 
4430
4569
File templates
4443
4582
wildcard can be placed anywhere, but it's usually put on the first
4444
4583
line of the file, followed by a blank line.
4445
4584
 
4446
 
Custom file templates
 
4585
Adding file templates
4447
4586
`````````````````````
4448
4587
 
4449
 
These are read from ``templates/files`` under the `Configuration file
4450
 
paths`_.
 
4588
File templates are read from ``templates/files`` under the
 
4589
`Configuration file paths`_.
4451
4590
 
4452
4591
The filetype to use is detected from the template file's extension, if
4453
4592
any. For example, creating a file ``module.c`` would add a menu item
4456
4595
The template file is read from disk when the corresponding menu item is
4457
4596
clicked.
4458
4597
 
4459
 
Filetype templates
4460
 
``````````````````
4461
 
 
4462
 
.. note::
4463
 
    It's recommended to use custom file templates instead.
4464
 
 
4465
 
Filetype template files are read from the ``~/.config/geany/templates``
4466
 
directory, and are named "filetype." followed by the filetype
4467
 
name, e.g. "filetype.python", "filetype.sh", etc. If you are
4468
 
unsure about the filetype name extensions, they are the same as
4469
 
the filetype configuration file extensions, commonly installed in
4470
 
``/usr/share/geany``, with the prefix "filetypes.".
4471
 
 
4472
 
There is also a template file ``filetype.none`` which is used when
4473
 
the New command is used without a filetype. This is empty by default.
4474
 
 
4475
4598
 
4476
4599
Customizing templates
4477
4600
^^^^^^^^^^^^^^^^^^^^^
4595
4718
bsd            This wildcard inserts a BSD licence notice.   file header.
4596
4719
 
4597
4720
fileheader     The file header template. This wildcard       snippets, file templates.
4598
 
               will only be replaced in filetype
4599
 
               templates.
 
4721
               will only be replaced in file templates.
4600
4722
============== ============================================= =======================================
4601
4723
 
4602
4724
 
4859
4981
=============================================   ======================
4860
4982
Action                                          Shortcut key
4861
4983
=============================================   ======================
4862
 
Magnify text size.                              Ctrl+Keypad+
4863
 
Reduce text size.                               Ctrl+Keypad-
4864
 
Restore text size to normal.                    Ctrl+Keypad/
 
4984
Magnify text size.                              Ctrl-Keypad+
 
4985
Reduce text size.                               Ctrl-Keypad-
 
4986
Restore text size to normal.                    Ctrl-Keypad/
4865
4987
Indent block.                                   Tab
4866
 
Dedent block.                                   Shift+Tab
4867
 
Delete to start of word.                        Ctrl+BackSpace
4868
 
Delete to end of word.                          Ctrl+Delete
4869
 
Delete to start of line.                        Ctrl+Shift+BackSpace
4870
 
Go to start of document.                        Ctrl+Home
4871
 
Extend selection to start of document.          Ctrl+Shift+Home
4872
 
Go to start of display line.                    Alt+Home
4873
 
Extend selection to start of display line.      Alt+Shift+Home
4874
 
Go to end of document.                          Ctrl+End
4875
 
Extend selection to end of document.            Ctrl+Shift+End
4876
 
Extend selection to end of display line.        Alt+Shift+End
4877
 
Previous paragraph. Shift extends selection.    Ctrl+Up
4878
 
Next paragraph. Shift extends selection.        Ctrl+Down
4879
 
Previous word. Shift extends selection.         Ctrl+Left
4880
 
Next word. Shift extends selection.             Ctrl+Right
 
4988
Dedent block.                                   Shift-Tab
 
4989
Delete to start of word.                        Ctrl-BackSpace
 
4990
Delete to end of word.                          Ctrl-Delete
 
4991
Delete to start of line.                        Ctrl-Shift-BackSpace
 
4992
Go to start of document.                        Ctrl-Home
 
4993
Extend selection to start of document.          Ctrl-Shift-Home
 
4994
Go to start of display line.                    Alt-Home
 
4995
Extend selection to start of display line.      Alt-Shift-Home
 
4996
Go to end of document.                          Ctrl-End
 
4997
Extend selection to end of document.            Ctrl-Shift-End
 
4998
Extend selection to end of display line.        Alt-Shift-End
 
4999
Previous paragraph. Shift extends selection.    Ctrl-Up
 
5000
Next paragraph. Shift extends selection.        Ctrl-Down
 
5001
Previous word. Shift extends selection.         Ctrl-Left
 
5002
Next word. Shift extends selection.             Ctrl-Right
4881
5003
=============================================   ======================
4882
5004
 
4883
5005