12
This document is distributed under the terms of the GNU
13
General Public License as published by the Free Software
14
Foundation; either version 2 of the License, or (at your
15
option) any later version. A copy of this license can be found
16
in the file COPYING included with the source code of this
17
program and see Appendix B.
18
_________________________________________________________
24
1.2. About this document
31
2.2. Source compilation
42
3.2. Command line options
46
3.3.2. Opening files from the command-line in a
49
3.3.3. Virtual terminal emulator widget (VTE)
51
3.4. Character sets and Unicode Byte-Order-Mark (BOM)
52
3.5. Search, replace and go to
58
3.5.5. Go to tag definition
59
3.5.6. Go to tag declaration
61
3.5.8. Regular expressions
65
3.6.1. Compile time options
72
3.7.4. Make custom target
75
3.7.7. Set Includes and Arguments
77
3.7.9. File type configuration settings
82
4. Configuration files
84
4.1. Filetype definition files
87
4.1.2. Special file filetypes.common
89
4.2. Filetype extensions
92
A. Scintilla keyboard commands
94
A.1. Keyboard commands
96
B. GNU General Public License
99
B.2. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND
113
B.2.12. Section 11 NO WARRANTY
116
B.3. How to Apply These Terms to Your New Programs
118
C. License for Scintilla and SciTE
121
3-1. Command line Options
122
3-2. Regular expressions
123
3-3. Compile time options
124
3-4. Keybindings action table
125
4-1. General settings
127
4-3. General settings
128
4-4. Template wildcards
129
A-1. Scintilla keyboard commands
133
3-2. General tab in preferences dialog
134
3-3. Interface tab in preferences dialog
135
3-4. Toolbar tab in preferences dialog
136
3-5. Editor tab in preferences dialog
137
3-6. Tools tab in preferences dialog
138
3-7. Template tab in preferences dialog
139
3-8. Keybinding tab in preferences dialog
140
3-9. VTE tab in preferences dialog
143
4-1. Comment indentation
144
_________________________________________________________
146
Chapter 1. Introduction
150
Geany is a small and lightweight Integrated Development
151
Environment. It was developed to provide a small and fast IDE,
152
which has only a few dependencies from other packages. Another
153
goal was to be as independent as possible from a special
154
Desktop Environment like KDE or GNOME, so Geany only requires
155
the GTK2 toolkit and therefore you only need the GTK2 runtime
156
libraries installed to run it.
158
The basic features of Geany are:
160
* Syntax highlighting
162
* Auto completion of often used constructs like if, for and
164
* Auto completion of XML and HTML tags
166
* Many supported filetypes like C, Java, PHP, HTML, Python,
169
_________________________________________________________
171
1.2. About this document
173
This documentation is available in various formats like HTML,
174
text and PDF. The latest version is always available at
175
http://geany.uvena.de.
176
_________________________________________________________
180
You can obtain Geany from http://geany.uvena.de or perhaps
181
from your distributor.
182
_________________________________________________________
186
Geany is distributed under the terms of the GNU General Public
187
License as published by the Free Software Foundation; either
188
version 2 of the License, or (at your option) any later
189
version. A copy of this license can be found in the file
190
COPYING included with the source code of this program or see
193
The included Scintilla library (found in the subdirectory
194
scintilla/) has its own license, which can be found in the
195
appendix (see Appendix C).
196
_________________________________________________________
198
Chapter 2. Installation
202
For compiling Geany yourself, you will need the GTK (>= 2.6.0)
203
libraries and header files. You will also need the Pango, Glib
204
and ATK libraries and header files. All these files are
205
available at http://www.gtk.org.
207
Furthermore you need, of course, a C compiler and the Make
208
tool; a C++ compiler is also required for the included
209
Scintilla library. The GNU versions of these tools are
211
_________________________________________________________
213
2.2. Source compilation
215
Compiling Geany is quite easy. The following should do it:
220
The configure script supports several common options, for a
224
In the case that your system lacks dynamic linking loader
225
support, you probably want to pass the option --disable-vte to
226
the configure script. This prevents compiling Geany with
227
dynamic linking loader support to automatically load
228
libvte.so.4 if available.
230
Geany has been successfully compiled and tested under Debian
231
3.1 Sarge, Debian 3.2 Etch, Fedora Core 4, LinuxFromScratch
232
and FreeBSD 6.0. It also compiles under Microsoft Windows(TM),
233
but there are lots of changes to the makefiles necessary.
235
If there are any errors during compilation, check your build
236
environment and try to find the error, otherwise contact the
237
author at <enrico.troeger@uvena.de>.
238
_________________________________________________________
244
You can use the Fedora Core 4 repository from
245
http://naturidentisch.de/packages/fc4/.
247
You can also use the Fedora Core 5 repository from
248
http://naturidentisch.de/packages/fc5/.
249
_________________________________________________________
253
Geany is available through the official Debian archives.
255
apt-get install geany
256
_________________________________________________________
260
Packages for SuSE are not yet available.
261
_________________________________________________________
265
An ebuild for Gentoo can be found on http://bugs.gentoo.de.
266
_________________________________________________________
272
You can start Geany in the following ways:
274
* From the Desktop Environment menu
275
Choose in your application menu of your used Desktop
276
Environment: Development->Geany.
277
* From the command line
278
To start Geany from a command line, type the following and
281
_________________________________________________________
283
3.2. Command line options
285
Table 3-1. Command line Options
286
Short option Long option Function
287
-s --no-session Don't load the previous session's files.
288
-n --no-ctags Do not load auto completion and call tip data.
289
Use this option if you do not want to use them.
290
-m --no-msgwin Do not show the message window. Use this option
291
if you do not need compiler messages or VTE support.
292
-i --new-instance Do not open files in a running instance,
293
force opening a new instance.
294
-t --no-terminal Do not load terminal support. Use this option
295
if you do not want to load the virtual terminal emulator
296
widget at startup. If you do not have libvte.so.4 installed,
297
then terminal-support is automatically disabled.
298
-l --vte-lib Specify explicitly the path including filename or
299
only the filename to the VTE library, e.g. /usr/lib/libvte.so
300
or libvte.so. This option is only needed when the
301
autodetection does not work.
302
-c directory_name --config=directory_name Use an alternate
303
configuration directory. Default configuration directory is
304
~/.geany/ and there resides geany.conf and other configuration
306
-d --debug Run Geany in debug mode, which means being verbose
307
and printing lots of information.
308
-? --help Show help information and exit.
309
-v --version Show version information and exit.
310
[files ...] Open all given files at startup. This option
311
causes Geany to ignore loading stored files from the last
312
session (if enabled).
313
Geany supports all generic GTK options, a list is available on
315
_________________________________________________________
321
At startup, Geany loads the first 15 files from the last time
322
Geany was launched. You can disable this feature in the
323
preferences dialog(see Figure 3-2). If you specify some files
324
on the command line, only these files will be opened, but you
325
can find the files from the last session in the file menu
326
under the "Recent files" item. This contains the last 15
327
recently opened files. It may be that Geany loads not exactly
328
15 session files, this depends on the compile time option
329
GEANY_SESSION_FILES; the default is 15. For details see
332
You can start several instances of Geany, but only the first
333
will load files from the last session. To run a second
334
instance of Geany, do not specify any filenames on the
335
command-line, or disable opening files in a running instance
336
using the appropriate command line option.
337
_________________________________________________________
339
3.3.2. Opening files from the command-line in a running instance
341
Geany detects an already running instance of itself and opens
342
files from the command-line in the already running instance.
343
So, Geany can be used to view and edit files by opening them
344
from other programs such as a file manager. If you do not like
345
this for some reason, you can disable using the first instance
346
by using the appropriate command line option - see Section
348
_________________________________________________________
350
3.3.3. Virtual terminal emulator widget (VTE)
352
If you have installed libvte.so in your system, it is loaded
353
automatically by Geany, and you will have a terminal widget in
354
the notebook at the bottom.
356
If Geany cannot find libvte.so at startup, the terminal widget
357
will not be loaded. So there is no need to install the package
358
containing this file in order to run Geany. Additionally, you
359
can disable the use of the terminal widget by command line
360
option, for more information see Section 3.2.
362
You can use this terminal (from now on called VTE) nearly as
363
an usual terminal program like xterm. There is basic clipboard
364
support. You can paste the contents of the clipboard by
365
pressing the right mouse button to open the popup menu and
366
choosing Paste. To copy text from the VTE, just select the
367
desired text and then press the right mouse button and choose
368
Copy from the popup menu. On systems running the X Window
369
System you can paste the last selected text by pressing the
370
middle mouse button in the VTE (on 2-button mice, the middle
371
button can often be simulated by pressing both mouse buttons
376
Geany tries to load libvte.so. If this fails, it tries to load
377
libvte.so.4. If this fails too, you should check whether you
378
installed libvte correctly. Again, Geany also runs without
381
It could be, that the library is called something else than
382
libvte.so.4 (e.g. on FreeBSD 6.0 it is called libvte.so.8). So
383
please set a link to the correct file (as root).
384
# ln -s /usr/lib/libvte.so.X /usr/lib/libvte.so.4
386
Obviously, you have to adjust the paths and set X to the
387
number of your libvte.so.
388
_________________________________________________________
390
3.4. Character sets and Unicode Byte-Order-Mark (BOM)
392
Geany provides support for detecting and converting character
393
sets. So you can open and save files in different character
394
sets and even can convert a file from a character set to
395
another one. To do this, Geany uses the character conversion
396
capabilities of the GLib.
398
Furthermore, Geany detects an Unicode Byte Order Mark (see
399
http://en.wikipedia.org/wiki/Byte_Order_Mark for details). Of
400
course, this feature is only available if the opened file is
401
in an unicode encoding. The Byte Order Mark helps to detect
402
the encoding of a file, e.g. whether it is UTF-16LE or
403
UTF-16BE and so on. On Unix-like systems using a Byte Order
404
Mark could cause some problems, e.g. the gcc stops with stray
405
errors, PHP does not parse a script containing a BOM and
406
script files starting with a she-bang maybe cannot be started.
407
In the status bar you can easily see whether the file starts
408
with a BOM or not. If you want to set a BOM for a file or if
409
you want to remove it from a file, just use the document menu
410
and toggle the checkbox.
414
If you are unsure what a BOM is or if you do not understand
415
where to use it, then it is not important for you and you can
417
_________________________________________________________
419
3.5. Search, replace and go to
421
This section describes search-related commands from the Search
422
menu and the editor window's popup menu:
428
* Go to tag definition *
429
* Go to tag declaration *
432
* These items are available from the editor window's popup
433
menu, or by using a keyboard shortcut (see Section 3.9).
434
_________________________________________________________
438
The Find dialog is used for finding text within the current
439
document. The syntax for the "Use regular expressions" option
440
is shown in Table 3-2.
442
Figure 3-1. Find dialog
445
_________________________________________________________
449
Find usage searches all open files. If there is a selection,
450
then it is used as the search text; otherwise the current word
451
is used. The current word is either taken from the word
452
nearest the edit cursor, or the word underneath the popup menu
453
click position when the popup menu is used. The search results
454
are shown in the Messages window.
455
_________________________________________________________
459
Find in files is a more powerful version of Find usage that
460
searches all files in a certain directory using the Grep tool.
461
The Grep tool must be correctly set in Preferences to the path
462
of the system's Grep utility.
463
_________________________________________________________
467
The Replace dialog has the same options for finding text as
468
the Find dialog. There is also a "Replace in all files"
469
option, which is used with the Replace All button to perform
470
the replacement for all open files.
472
The "Use regular expressions" option applies both to the
473
search string and to the replacement text; for the latter back
474
references can be used - see the entry for '\n' in Table 3-2.
475
_________________________________________________________
477
3.5.5. Go to tag definition
479
If the current word is the name of a function and the file
480
containing the function definition (a.k.a. function body) is
481
open, Go to tag definition will switch to that file and go to
482
the corresponding line number. The current word is either
483
taken from the word nearest the edit cursor, or the word
484
underneath the popup menu click position when the popup menu
486
_________________________________________________________
488
3.5.6. Go to tag declaration
490
Like Go to tag definition, but for a forward function
491
declaration (a.k.a. function prototype) instead of a function
493
_________________________________________________________
497
Go to a particular line number in the current file.
498
_________________________________________________________
500
3.5.8. Regular expressions
502
You can use regular expressions in the Find and Replace
503
dialogs by selecting the "Use regular expressions" check box.
504
The syntax is POSIX-like, as described below in Table 3-2.
508
Searching backwards with regular expressions is not supported.
510
Table 3-2. Regular expressions
511
In a regular expression, the following characters are
513
. Matches any character.
514
( This marks the start of a region for tagging a match.
515
) This marks the end of a tagged region.
516
\n Where n is 1 through 9 refers to the first through ninth
517
tagged region when replacing. For example, if the search
518
string was Fred([1-9])XXX and the replace string was Sam\1YYY,
519
when applied to Fred2XXX this would generate Sam2YYY.
520
\< This matches the start of a word.
521
\> This matches the end of a word.
522
\x This allows you to use a character x that would otherwise
523
have a special meaning. For example, \[ would be interpreted
524
as [ and not as the start of a character set. Use \\ for a
526
[...] This indicates a set of characters, for example, [abc]
527
means any of the characters a, b or c. You can also use
528
ranges, for example [a-z] for any lower case character.
529
[^...] The complement of the characters in the set. For
530
example, [^A-Za-z] means any character except an alphabetic
532
^ This matches the start of a line (unless used inside a set,
534
$ This matches the end of a line.
535
* This matches 0 or more times. For example, Sa*m matches Sm,
536
Sam, Saam, Saaam and so on.
537
+ This matches 1 or more times. For example, Sa+m matches Sam,
538
Saam, Saaam and so on.
540
Note Partial POSIX compatibility
543
Note that the POSIX '?' regular expression character for
544
optional matching is not supported by the Find and Replace
546
_________________________________________________________
552
Figure 3-2. General tab in preferences dialog
554
[pref_dialog_gen.jpg]
556
Figure 3-3. Interface tab in preferences dialog
558
[pref_dialog_interface.jpg]
560
Figure 3-4. Toolbar tab in preferences dialog
562
[pref_dialog_toolbar.jpg]
564
Figure 3-5. Editor tab in preferences dialog
566
[pref_dialog_edit.jpg]
568
Figure 3-6. Tools tab in preferences dialog
570
[pref_dialog_tools.jpg]
572
Figure 3-7. Template tab in preferences dialog
574
[pref_dialog_templ.jpg]
576
Figure 3-8. Keybinding tab in preferences dialog
578
[pref_dialog_keys.jpg]
582
For more information see Section 3.9.
584
Figure 3-9. VTE tab in preferences dialog
586
[pref_dialog_vte.jpg]
587
_________________________________________________________
589
3.6.1. Compile time options
591
There are some options which can only be changed at compile
592
time. To change these options, edit the file src/geany.h. Look
593
for a block of lines starting with "#define GEANY_*". Any
594
definitions which are not listed here should not be changed.
596
Table 3-3. Compile time options
597
Option Description Default
598
GEANY_MAX_OPEN_FILES The limit to how many files can be open
600
GEANY_SESSION_FILES How many files should be reopened from the
601
last run. Obviously, the value should be smaller than
602
GEANY_MAX_OPEN_FILES. 15
603
GEANY_WORDCHARS These characters define word boundaries. (look
605
GEANY_MAX_AUTOCOMPLETE_WORDS How many auto completion
606
suggestions should Geany provide. 30
607
GEANY_STRING_UNTITLED A string used as the default name for
608
new files. Be aware that the string can be translated, so
609
change it only if you know what you are doing. untitled
610
GEANY_CHECK_FILE_DELAY Time in seconds between checking a file
611
for external changes. 30
612
GEANY_WINDOW_MINIMAL_WIDTH The minimal width of the main
614
GEANY_WINDOW_MINIMAL_HEIGHT The minimal height of the main
616
GEANY_WINDOW_DEFAULT_WIDTH The default width of the main
617
window at the first start. 900
618
GEANY_WINDOW_DEFAULT_HEIGHT The default height of the main
619
window at the first start. 600
621
GEANY_DEFAULT_TOOLS_MAKE The make tool. This can also include
623
GEANY_DEFAULT_TOOLS_TERMINAL A terminal emulator. It has to
624
accept the command line option "-e". This can also include a
626
GEANY_DEFAULT_TOOLS_BROWSER A web browser. This can also
627
include a path. "mozilla"
628
GEANY_DEFAULT_TOOLS_PRINTCMD A printing tool. It should be
629
able to accept and process plain text files. This can also
630
include a path. "lpr"
631
GEANY_DEFAULT_TOOLS_GREP A grep tool. It should be compatible
632
with GNU grep. This can also include a path. "grep"
633
GEANY_DEFAULT_MRU_LENGHTH The length of the "Recent files"
635
GEANY_DEFAULT_FONT_SYMBOL_LIST The font used in sidebar to
636
show symbols and open files. "Cursor 8"
637
GEANY_DEFAULT_FONT_MSG_WINDOW The font used in the messages
639
GEANY_DEFAULT_FONT_EDITOR The font used in the editor window.
641
_________________________________________________________
645
Geany has an integrated build system. Firstly this means that
646
the current source file will be saved before it is processed.
647
This is for convenience so that you don't need to keep saving
648
small changes to the current file before building.
650
Secondly the output for Compile, Build and Make actions will
651
be captured in the Compiler notebook tab of the messages
652
window (assuming you have it visible). If there are any
653
warnings or errors with line numbers shown in the Compiler
654
output tab, you can double click on them and Geany will switch
655
to the relevant source file (if it is open) and mark the line
656
number so the problem can be corrected. Geany will also set
657
indicators for warnings or errors with line numbers.
659
Depending on the current file's filetype, the Build menu will
660
contain the following items:
668
* Set Includes and Arguments
669
_________________________________________________________
673
The Compile command has different uses for different kinds of
676
For compilable languages such as C and C++, the Compile
677
command is setup to compile the current source file into a
680
Java source files will be compiled to class file bytecode.
681
Interpreted languages such as Perl, Python, Ruby will compile
682
to bytecode if the language supports it, or will run a syntax
683
check, or failing that will run the file in its language
685
_________________________________________________________
689
For compilable languages such as C and C++, the Build command
690
will link the current source file's equivalent object file
691
into an executable. If the object file does not exist, the
692
source will be compiled and linked in one step, producing just
693
the executable binary.
695
Interpreted languages do not use the Build command.
696
_________________________________________________________
700
This effectively runs "make all" in the same directory as the
705
For each of the Make commands, The Make tool path must be
706
correctly set in the Tools tab of the Preferences dialog.
707
_________________________________________________________
709
3.7.4. Make custom target
711
This is similar to running 'Make all' but you will be prompted
712
for the make target name to be passed to the Make tool. For
713
example, typing 'clean' in the dialog prompt will run "make
715
_________________________________________________________
719
Make object will run "make current_file.o" in the same
720
directory as the current file, using its prefix for
721
'current_file'. It is useful for compiling just the current
722
file without building the whole project.
723
_________________________________________________________
727
Execute will run the corresponding executable file, shell
728
script or interpreted script in a terminal window. Note that
729
the Terminal tool path must be correctly set in the Tools tab
730
of the Preferences dialog - you can use any terminal program
731
that runs a Bourne compatible shell.
733
After your program or script has finished executing, you will
734
be prompted to press the return key. This allows you to review
735
any text output from the program before the terminal window is
737
_________________________________________________________
739
3.7.7. Set Includes and Arguments
741
By default the Compile and Build commands invoke the compiler
742
and linker with only the basic arguments needed by all
743
programs. Using Set Includes and Arguments you can add any
744
include paths and compile flags for the compiler, any library
745
names and paths for the linker, and any arguments you want to
746
use when running Execute.
750
If you are using the Build command to compile and link in one
751
step, you will need to set both the compiler arguments and the
752
linker arguments in the linker command setting.
754
These settings are not saved when Geany is shut down. See
755
below for how to set permanent arguments.
757
If you need complex settings for your build system, or several
758
different settings, then writing a Makefile and using the Make
759
commands is recommended.
760
_________________________________________________________
764
Indicators are red squiggly underlines which are used to
765
highlight errors which occured while compiling the current
766
file. So you can easily see where your code failed to compile.
767
To remove the indicators, just click on "Remove all
768
indicators" in the document file menu.
770
If you do not like this feature, you can disable it in the
772
_________________________________________________________
774
3.7.9. File type configuration settings
776
You can set the commands to run for compiling, building or
777
executing by opening the relevant filetypes.* configuration
778
file, and checking the [build_settings] section. See Section
779
4.1 for more information.
780
_________________________________________________________
782
3.8. Printing support
784
Geany has basic printing support. This means you can print a
785
file by passing the filename of the current file to a command
786
which actually prints the file. However, the printed document
787
contains no syntax highlighting. You can adjust the command to
788
which the filename is passed in the preferences dialog. The
792
%f will be substituted by the filename of the current file.
793
Geany will not show errors from the command itself, so you
794
should make sure that it works before(e.g. by trying to
795
execute it from the command line).
797
A nicer example, which I prefer is:
798
% a2ps -1 --medium=A4 -o - %f | xfprint4
800
But this depends on a2ps and xfprint4. As a replacement for
801
xfprint4, gtklp or similar programs can be used.
805
The printing support of Geany will be improved in the future.
806
With GTK 2.10, better printing (including syntax highlighting)
808
_________________________________________________________
812
Geany supports the default keyboard shortcuts for the
813
Scintilla editing widget. For a list of these commands, see
814
Appendix A. The Scintilla keyboard shortcuts will be
815
overridden by any custom keybindings with the same keyboard
818
For all actions listed below you can define your own
819
keybindings. Open the Preferences dialog, select the desired
820
action and click on change. In the opening dialog you can
821
press any key combination you want and it will be saved when
822
you press OK. You can define only one key combination for one
825
Some of the default key combinations cannot be changed, e.g.
826
menu_new or menu_open. These are set by GTK and should be
827
kept, but you can still add other key combinations for these
828
actions. For example to execute menu_open by default Ctrl-O is
829
set, but you can also define Alt-O, so that the file open
830
dialog is shown by pressing either Ctrl-O or Alt-O.
832
The following table lists all customizable keyboard shortcuts.
834
Table 3-4. Keybindings action table
837
New Creates a new file.
839
Save Saves the current file.
840
Save all Saves all open files.
841
Close all Closes all open files.
842
Close Closes the current file.
843
Reload file Reloads the current file. All unsaved changes will
845
Print Prints the current file.
846
Undo Undoes the last action.
847
Redo Redoes the last action.
848
Select all Makes a selection of all text in the current
850
Preferences Opens preferences dialog.
851
Find Next Finds next result.
852
Find Previous Finds previous result.
853
Replace Opens the Replace dialog.
854
Find in files Opens the Find in files dialog.
855
Go to line Opens the Go to line dialog.
856
Show Colour Chooser Opens the Colour Chooser dialog.
857
Fullscreen Switches to fullscreen mode.
858
Toggle Messages Window Toggles the message window (status and
859
compiler messages) on and off.
860
Toggle Sidebar Shows or hides the sidebar.
861
Zoom In Zooms in the text
862
Zoom Out Zooms out the text
863
Replace tabs by space Replaces all tabs with the right amount
865
Fold all Folds all contractible code blocks.
866
Unfold all Unfolds all contracted code blocks.
868
Compile Compiles the current file.
869
Build Builds (compiles if necessary and links) the current
871
Make all Builds the current file with the Make tool.
872
Make custom target Builds the current file with the Make tool
874
Make object Compiles the current file with the Make tool.
875
Run Executes the current file in a terminal emulation.
876
Run (alternative command) Executes the current file in a
878
Build options Opens the build options dialog.
880
Reload symbol list Reloads the tag/symbol list.
881
Switch to Editor Switches to editor widget.
882
Switch to Scribble Switches to scribble widget.
883
Switch to VTE Switches to VTE widget.
884
Switch to left document Switches to the previous open
886
Switch to right document Switches to the next open document.
888
Duplicate line or selection Duplicates the current line or
890
Comment line Comments current line or selection.
891
Complete word Shows auto completion list.
892
Show calltip Shows call tips for the current function or
894
Show macro list Shows a list of available macros and variables
896
Suppress auto completion If you type something like if or for
897
and press this key, it will not be auto completed.
898
Find Usage Finds all occurrences of the current word (near the
899
keyboard cursor) and displays them in the messages window.
900
Go to tag definition Jump to the definition of the current
901
word (near the keyboard cursor). If the definition cannot be
902
found (e.g. the relevant file is not open) Geany will beep and
903
do nothing. Used for function definitions.
904
Go to tag declaration Jump to the declaration of the current
905
word (near the keyboard cursor). If the declaration cannot be
906
found (e.g. the relevant file is not open) Geany will beep and
907
do nothing. Used for function prototypes.
908
_________________________________________________________
910
Chapter 4. Configuration files
912
4.1. Filetype definition files
914
All colour definitions and other filetype specific settings
915
are stored in the filetype definition files. Those settings
916
are colours for syntax highlighting, general settings like
917
comment characters or word delimiter characters as well as
918
compiler and linker settings.
920
The system-wide configuration files can be found in
921
$prefix/share/geany and are called filetypes.$ext, where
922
$prefix is the path where Geany is installed (commonly
923
/usr/local) and $ext is the name of the filetype. For every
924
filetype there is a corresponding definition file. There is
925
one exception: filetypes.common - this file is for general
926
settings, which are not specific to a certain filetype. It is
927
not recommended to edit the system-wide files, because they
928
will be overridden when Geany is updated.
930
To change the settings, copy a file from $prefix/share/geany
931
to the subdirectory filedefs in your configuration directory
935
% cp /usr/local/share/geany/filetypes.c /home/username/.geany/filedefs/
937
Then you can edit the file and the changes are also available
938
after an update of Geany because they reside in your
939
configuration directory. Alternatively, you can create a file
940
~/.geany/filedefs/filetypes.X and add only these settings you
941
want to change. All missing settings will be read from the
942
corresponding global definition file in $prefix/share/geany.
943
_________________________________________________________
947
4.1.1.1. [styling] Section
949
In this section the colours for syntax highlighting are
950
defined. The format is always:
951
key=forground_colour;background_colour;bold;italic
953
Colours have to be specified as RGB hex values prefixed by 0x.
954
For example red is 0xff0000, blue is 0x0000ff. The values are
955
case-insensitive, but it is a good idea to use small letters.
956
Bold and italic are flags and should only be "true" or
957
"false". If their value is something other than "true" or
958
"false", "false" is assumed.
959
_________________________________________________________
961
4.1.1.2. [keywords] Section
963
This section contains keys for different keyword lists
964
specific to the filetype. Some filetypes do not support
965
keywords, so adding a new key will not work. You can only add
966
or remove keywords to/from an existing list.
970
The keywords list must be in one line without line ending
972
_________________________________________________________
974
4.1.1.3. [settings] Section
976
Table 4-1. General settings
977
Key Description Example
978
wordchars Word delimiting characters. These characters define
979
word boundaries. (look at sourcecode)
980
comment_open A character or string which is used to comment
981
code. If you want to use multiline comments, also set
982
comment_close, otherwise leave it empty. comment_open=/*
983
comment_close If multiline comments are used, this is the
984
character or string to close the comment. comment_close=*/
985
comment_use_indent Set this to false if a comment character or
986
string should start at column 0 of a line. If set to true it
987
uses any indentation of the line.
989
Example 4-1. Comment indentation
991
comment_use_indent=true would generate this if a line is
992
commented (e.g. with Ctrl-D)
1
.. |(version)| replace:: 0.14
7
-------------------------
8
A fast, light, GTK+ IDE
9
-------------------------
11
:Authors: Enrico Tröger,
14
:Date: $Date: 2008-04-18 19:04:16 +0200 (Fr, 18 Apr 2008) $
19
This document is distributed under the terms of the GNU General Public
20
License as published by the Free Software Foundation; either version 2
21
of the License, or (at your option) any later version. A copy of this
22
license can be found in the file COPYING included with the source code
23
of this program, and also in the chapter `GNU General Public License`_.
37
Geany is a small and lightweight Integrated Development Environment. It
38
was developed to provide a small and fast IDE, which has only a few
39
dependencies from other packages. Another goal was to be as independent
40
as possible from a special Desktop Environment like KDE or GNOME,
41
so Geany only requires the GTK2 toolkit and therefore you only need
42
the GTK2 runtime libraries installed to run it.
44
Some basic features of Geany are:
48
* Auto completion of often-used constructs like "if", "for" and "while"
49
* Auto completion of XML and HTML tags
51
* Many supported filetypes including C, Java, PHP, HTML, Python, Perl,
60
You can obtain Geany from http://geany.uvena.de or perhaps also from
68
Geany is distributed under the terms of the GNU General Public License
69
as published by the Free Software Foundation; either version 2 of
70
the License, or (at your option) any later version. A copy of this
71
license can be found in the file COPYING included with the source
72
code of this program or in the chapter, `GNU General Public License`_.
74
The included Scintilla library (found in the subdirectory
75
``scintilla/``) has its own license, which can be found in the chapter,
76
`License for Scintilla and SciTE`_.
83
This documentation is available in various formats like HTML, text and
84
PDF. The latest version is always available at http://geany.uvena.de.
86
If you want to contribute to it, see `Contributing to this document`_.
98
For compiling Geany yourself, you will need the GTK (>= 2.6.0)
99
libraries and header files. You will also need the Pango, Glib and
100
ATK libraries and header files. All these files are available at
103
Furthermore you need, of course, a C compiler and the Make tool; a
104
C++ compiler is also required for the included Scintilla library. The
105
GNU versions of these tools are recommended.
112
Compiling Geany is quite easy. The following should do it::
118
The configure script supports several common options, for a detailed
123
There also some compile time options which can be found in
124
``src/geany.h``. Please see `Compile-time options`_ for more
127
In the case that your system lacks dynamic linking loader support, you
128
probably want to pass the option ``--disable-vte`` to the ``configure``
129
script. This prevents compiling Geany with dynamic linking loader
130
support to automatically load ``libvte.so.4`` if available.
132
Geany has been successfully compiled and tested under Debian 3.1
133
Sarge, Debian 4.0 Etch, Fedora Core 3/4/5, LinuxFromScratch and
134
FreeBSD 6.0. It also compiles under Microsoft Windows™.
136
If there are any errors during compilation, check your build
137
environment and try to find the error, otherwise contact the author
138
at <enrico(dot)troeger(at)uvena(dot)de>.
145
There are many binary packages available. For an up to date but maybe
146
incomplete list see http://geany.uvena.de/Download/Releases.
158
You can start Geany in the following ways:
160
* From the Desktop Environment menu:
162
Choose in your application menu of your used Desktop Environment:
163
Development --> Geany.
165
* From the command line:
167
To start Geany from a command line, type the following and press
177
============ ======================= =================================================
178
Short option Long option Function
179
============ ======================= =================================================
180
*none* +number Set initial line number for the first opened file
181
(same as --line, do not put a space between the + sign
182
and the number). E.g. "geany +7 foo.bar" will open the
183
file foo.bar and place the cursor in line 7.
185
*none* --column Set initial column number for the first opened file.
187
-c dir_name --config=directory_name Use an alternate configuration directory. Default
188
configuration directory is ``~/.geany/`` and there resides
189
``geany.conf`` and other configuration files.
191
-d --debug Run Geany in debug mode, which means being verbose
192
and printing lots of information.
194
*none* --ft-names Print a list of Geany's internal filetype names (useful
195
for snippets configuration).
197
-g --generate-tags Generate a global tags file (see
198
`Generating a global tags file`_).
200
-P --no-preprocessing Don't preprocess C/C++ files when generating tags.
202
-i --new-instance Do not open files in a running instance, force opening
203
a new instance. Only available if Geany was compiled
204
with support for Sockets.
206
-l --line Set initial line number for the first opened file.
208
-m --no-msgwin Do not show the message window. Use this option if you
209
do not need compiler messages or VTE support.
211
-n --no-ctags Do not load symbol completion and call tip data. Use this
212
option if you do not want to use them.
214
-p --no-plugins Do not load plugins or plugin support.
216
*none* --print-prefix Print installation prefix, the data directory, the lib
217
directory and the locale directory (in this order) to
218
stdout, each per line. This is mainly intended for plugin
219
authors to detect installation paths.
221
-s --no-session Do not load the previous session's files.
223
-t --no-terminal Do not load terminal support. Use this option if you do
224
not want to load the virtual terminal emulator widget
225
at startup. If you do not have ``libvte.so.4`` installed,
226
then terminal-support is automatically disabled. Only
227
available if Geany was compiled with support for VTE.
229
*none* --vte-lib Specify explicitly the path including filename or only
230
the filename to the VTE library, e.g.
231
``/usr/lib/libvte.so`` or ``libvte.so``. This option is
232
only needed when the autodetection does not work. Only
233
available if Geany was compiled with support for VTE.
235
-v --version Show version information and exit.
237
-? --help Show help information and exit.
239
*none* [files ...] Open all given files at startup. This option causes
240
Geany to ignore loading stored files from the last
241
session (if enabled).
242
Geany also recognises line and column information when
243
appended to the filename with colons, e.g.
244
"geany foo.bar:10:5" will open the file foo.bar and
245
place the cursor in line 10 at column 5.
246
============ ======================= =================================================
248
Geany supports all generic GTK options, a list is available on the
260
At startup, Geany loads all files from the last time Geany was
261
launched. You can disable this feature in the preferences dialog
262
(see `General tab in preferences dialog`_). If you specify some
263
files on the command line, only these files will be opened, but you
264
can find the files from the last session in the file menu under the
265
"Recent files" item. By default this contains the last 10 recently
266
opened files. You can change the amount of recently opened files in
267
the preferences dialog.
269
You can start several instances of Geany, but only the first will
270
load files from the last session. To run a second instance of Geany,
271
do not specify any filenames on the command-line, or disable opening
272
files in a running instance using the appropriate command line option.
275
Opening files from the command-line in a running instance
276
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
278
Geany detects an already running instance of itself and opens files
279
from the command-line in the already running instance. So, Geany can
280
be used to view and edit files by opening them from other programs
281
such as a file manager. If you do not like this for some reason, you
282
can disable using the first instance by using the appropriate command
283
line option -- see the section called `Command line options`_.
286
Virtual terminal emulator widget (VTE)
287
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
289
If you have installed ``libvte.so`` in your system, it is loaded
290
automatically by Geany, and you will have a terminal widget in the
291
notebook at the bottom.
293
If Geany cannot find any ``libvte.so`` at startup, the terminal widget
294
will not be loaded. So there is no need to install the package containing
295
this file in order to run Geany. Additionally, you can disable the use
296
of the terminal widget by command line option, for more information
297
see the section called `Command line options`_.
299
You can use this terminal (from now on called VTE) nearly as an usual
300
terminal program like xterm. There is basic clipboard support. You
301
can paste the contents of the clipboard by pressing the right mouse
302
button to open the popup menu and choosing Paste. To copy text from
303
the VTE, just select the desired text and then press the right mouse
304
button and choose Copy from the popup menu. On systems running the
305
X Window System you can paste the last selected text by pressing the
306
middle mouse button in the VTE (on 2-button mice, the middle button
307
can often be simulated by pressing both mouse buttons together).
309
In the preferences dialog you can specify a shell which should be
310
started in the VTE. To make the specified shell a login shell just
311
use the appropriate command line options for the shell. These options
312
should be found in the manual page of the shell. For zsh and bash
313
you can use the argument ``--login``.
316
Geany tries to load ``libvte.so``. If this fails, it tries to load
317
some other filenames. If this fails too, you should check whether you
318
installed libvte correctly. Again, Geany also runs without this
321
It could be, that the library is called something else than
322
``libvte.so`` (e.g. on FreeBSD 6.0 it is called ``libvte.so.8``). So
323
please set a link to the correct file (as root)::
325
# ln -s /usr/lib/libvte.so.X /usr/lib/libvte.so
327
Obviously, you have to adjust the paths and set X to the number of your
330
You can also specify the filename of the VTE library to use on the command
331
line (see the section called `Command line options`_) or at compile time
332
by specifying the command line option ``--with-vte-module-path`` to
336
Defining own widget styles using .gtkrc-2.0
337
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
339
You can define your widget style for many of Geany's GUI parts. To
340
do this, just edit your ``.gtkrc-2.0`` (usually found in your home
341
directory on UNIX-like systems and in the etc subdirectory of your
342
Geany installation on Windows).
344
To get a defined style get noticed by Geany you must it assign to
345
one of Geany's widgets. To do so, use the following line::
347
widget "Geany*" style "geany_style"
349
This would assign your already defined style "geany_style" to all Geany
350
widgets. You can also assign styles only to specific widgets. At the
351
moment you can use the following widgets:
361
Example of a simple ``.gtkrc-2.0``::
367
widget "GeanyMainWindow" style "geanyStyle"
373
widget "GeanyPrefsDialog" style "geanyStyle"
379
Switching between documents
380
^^^^^^^^^^^^^^^^^^^^^^^^^^^
382
The documents list and the editor tabs are two different ways
383
to switch between documents using the mouse. When you hit the key
384
combination to move between tabs, the order is determined by the tab
385
order, not alphabetical as shown in the documents list (regardless
386
of whether or not editor tabs are visible).
389
Character sets and Unicode Byte-Order-Mark (BOM)
390
------------------------------------------------
396
Geany provides support for detecting and converting character sets. So
397
you can open and save files in different character sets and even
398
can convert a file from a character set to another one. To do this,
399
Geany uses the character conversion capabilities of the GLib.
401
Only text files are supported, i.e. opening files which contain
402
NUL-bytes may fail. Geany will try to open the file anyway but it is
403
likely that the file will be truncated because it can only opened up
404
to the first occurrence of a NUL-byte. All characters after this
405
position are lost and are not written when you save the file.
407
Geany tries to detect the encoding of a file while opening it. It
408
might be that the encoding of a file cannot be detected correctly so
409
you have to set manually the encoding of the file in order to display
410
it correctly. You can this in the file open dialog by selecting
411
an encoding in the drop down box or by reloading the file with the
412
file menu item "Reload as". The auto detection works well for most
413
encodings but there are also some encodings known where auto detection
414
has its problems. Auto detecting the encoding of a file is not easy
415
and sometimes an encoding might be detected not correctly.
417
There are different ways to use different encodings in Geany:
419
* Using the file open dialog
421
This opens the file with the encoding specified in the encoding drop
422
down box. If the encoding is set to "Detect from file" auto detection
423
will be used. If the encoding is set to "Without encoding (None)" the
424
file will be opened without any character conversion and Geany will
425
not try to auto detect the encoding(see below for more information).
427
* Using the "Reload as" menu item
429
This item reloads the current file with the specified encoding. It can
430
help if you opened a file and found out that a wrong encoding was used.
432
* Using the "Set encoding" menu item
434
In contrary to the above two options, this will not change or reload
435
the current file unless you save it. It is useful when you want to
436
change the encoding of the file.
438
* Specifying the encoding in the file itself
439
As mentioned above, auto detecting the encoding of a file may fail on
440
some encodings. If you know that Geany doesn't open a certain file,
441
you can add a special line to the beginning of the file to force an
442
encoding when opening the file (for details see below).
445
In-file encoding specification
446
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
448
Geany detects meta tags of HTML files which contain charset information
451
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-15" />
453
and the found charset is used when opening the file. This is useful if the
454
encoding of the file cannot be detected properly.
455
For non-HTML files you can also define a line like::
457
/* geany_encoding=ISO-8859-15 */
461
# geany_encoding=ISO-8859-15 #
463
to force an encoding to be used. The used #, /\* and \*/ are only examples
464
for filetype-specific comment characters. It doesn't matter which
465
characters are around the string " geany_encoding=ISO-8859-15 " as long
466
as there is at least one whitespace character before and after this
467
string. Whitespace characters are in this case a space or tab character.
468
"geany_encoding" must be in lower-case, the charset string is
469
case-independent. There must **not** be any whitespace between
470
"geany_encoding", the "=" sign and the charset.
471
An example to use this could be you have a file with ISO-8859-15
472
encoding but Geany constantly detects the file encoding as ISO-8859-1.
473
Then you simply add such a line to the file and Geany will open it
474
correctly the next time.
477
These specifications must be in the first 512 bytes of the file.
478
Anything after the first 512 bytes will not be recognised.
481
Special encoding "None"
482
^^^^^^^^^^^^^^^^^^^^^^^
484
There is a special encoding "None" which is actually no real
485
encoding. It is useful when you know that Geany cannot auto detect
486
the encoding of a file and it is not displayed correctly. Especially
487
when the file contains NUL-bytes this can be useful to skip auto
488
detection and open the file properly at least until the occurrence
489
of the first NUL-byte. Using this encoding opens the file as it is
490
without any character conversion.
493
Unicode Byte-Order-Mark (BOM)
494
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
496
Furthermore, Geany detects an Unicode Byte Order Mark (see
497
http://en.wikipedia.org/wiki/Byte_Order_Mark for details). Of course,
498
this feature is only available if the opened file is in an unicode
499
encoding. The Byte Order Mark helps to detect the encoding of a file,
500
e.g. whether it is UTF-16LE or UTF-16BE and so on. On Unix-like systems
501
using a Byte Order Mark could cause some problems, e.g. the gcc stops
502
with stray errors, PHP does not parse a script containing a BOM and
503
script files starting with a she-bang maybe cannot be started. In the
504
status bar you can easily see whether the file starts with a BOM or
505
not. If you want to set a BOM for a file or if you want to remove it
506
from a file, just use the document menu and toggle the checkbox.
509
If you are unsure what a BOM is or if you do not understand where
510
to use it, then it is probably not important for you and you can
522
Geany provides basic code folding support. Folding means the ability to
523
show and hide parts of the text in the current file. You can hide
524
unimportant code sections and concentrate on the parts you are working on
525
and later you can show these sections again. In the editor window there is
526
a small grey margin on the left side with some [+] and [-] symbols. By
527
clicking on these icons you can simply show and hide sections which are
528
marked by vertical lines within this margin. For many filetypes nested
529
folding is supported, so there may be several fold points within other
532
If you don't like it or don't need it at all, you can simply disable
533
folding support completely in the preferences dialog.
535
The folding behaviour can be changed with the "Fold/Unfold all children of
536
a fold point" option in the preference dialog. If activated, Geany will
537
unfold all nested fold points below the current one if they are already
538
folded (when clicking on a [+] symbol).
539
When clicking on a [-] symbol, Geany will fold all nested fold points
540
below the current one if they are unfolded.
542
The usage of this option can be instantly inverted by pressing the Shift
543
key while clicking on a fold symbol. That means, if the "Fold/Unfold all
544
children of a fold point" option is enabled, pressing Shift will disable
545
it for this click and vice versa.
551
There is basic support for column mode editing. To use it, create a
552
rectangular selection by holding down the Control key while selecting
553
some text. It is also possible to create a zero-column selection but
554
be careful because there is no visual indication of this selection.
555
Once a rectangular selection exists you can start editing the text within
556
this selection and the modifications will be done for every line in the
560
Drag and drop of text
561
^^^^^^^^^^^^^^^^^^^^^
563
If you drag selected text in the editor widget of Geany the text is
564
moved to the position where the mouse pointer is when releasing the
565
mouse button. Holding Control when releasing the mouse button will
566
copy the text instead. This behaviour was changed in Geany 0.11 -
567
before the selected text was copied to the new position.
573
Geany allows each document to indent either with a tab character
574
or multiple spaces. The default indent mode is set in the `Editor
575
tab in preferences dialog`_. But this can be overridden using either
576
the *Document->Indent Type* menu, or by using the *Detect from file*
577
indentation preference. When enabled, this scans each file that is opened
578
and sets the indent mode based on how many lines start with a tab vs. 2
581
The indent mode for the current document is shown on the status bar
585
Indent with Tab characters.
593
When enabled, auto-indentation happens when pressing *Enter* in the
594
Editor. It adds a certain amount of indentation to the new line so the
595
user doesn't always have to indent each line manually.
597
Geany knows four types of auto-indentation:
600
Disables auto-indentation completely.
602
Adds the same amount of whitespace on a new line as on the last line.
604
Does the same as *Basic* but also indents a new line after an opening
605
brace '{', and de-indents when typing a closing brace '}'. For Python,
606
a new line will be indented after typing ':' at the end of the
609
Similar to *Current chars* but the closing brace will be aligned to
610
match the indentation of the line with the opening brace.
616
Geany provides a handy bookmarking feature that lets you mark one
617
or more lines in a document, and return the cursor to them using a
620
To place a mark on a line, either left-mouse-click in the left margin
621
of the editor window, or else use Ctrl-m. Either way, this will
622
produce a small green plus symbol in the margin. You can have as many
623
marks in a document as you like. Click again (or use Ctrl-m again)
624
to remove the bookmark. To remove all the marks in a given document,
625
use "Remove Markers" in the Document menu.
627
To navigate down your document, jumping from one mark to the next,
628
use Ctrl-. (control period). To go in the opposite direction on
629
the page, use Ctrl-, (control comma). Using the bookmarking feature
630
together with the commands to switch from one editor tab to another
631
(Ctrl-PgUp/PgDn and Ctrl-Tab) provides a particularly fast way to
632
navigate around multiple files.
635
Code Navigation History
636
^^^^^^^^^^^^^^^^^^^^^^^
638
To ease navigation in source files and especially between
639
different files, Geany lets you jump between different navigation
640
points. Currently, this works when using the `Go to tag declaration`_,
641
`Go to tag definition`_ commands and when clicking on symbol list
644
When using one of these actions, Geany remembers your current position
645
and jumps to the new one. If you decide to go back to your previous
646
position in the file, just use "Navigate back a location". To
647
get back to the new position again, just use "Navigate forward a
648
location". This makes it easier to navigate in e.g. foreign code
649
and between different files.
652
Send text through definable commands
653
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
655
You can define several custom commands in Geany and send the current
656
selection to one of these commands. The output of the command will be
657
used to replace the current selection. So, it is possible to use text
658
formatting tools with Geany in a general way. The selected text will
659
be sent to the standard input of the executed command, so the command
660
should be able to read from it and it should print all results to its
661
standard output which will be read by Geany. To help finding errors
662
in executing the command, the output of the program's standard error
663
will be printed on Geany's standard output.
665
To add a custom command, just go to the Set Custom Commands dialog
666
in the Format sub menu of the Edit and Popup menu. Then click on Add
667
to get a new text entry and type the command. You can also specify
668
some command line options. To delete a command, just clear the text
669
entry and press OK. It will be deleted automatically.
675
You can execute a specified command on the current word near the
676
cursor position or an available selection and this word is passed
677
as an argument to this command. It can be used for example to open
678
some API documentation in a browser window or open any other external
679
program. To do this, there is an menu entry in the popup menu of the
680
editor widget and also a keyboard shortcut(see the section called
683
The command can be specified in the preferences dialog and additionally
684
for each filetype (see "context_action_cmd" in the section called
685
`Format`_). At executing, the filetype specific command is used if
686
available otherwise the command specified in the preferences dialog
689
The passed word can be referred with the wildcard "%s" everywhere
690
in the command, before executing it will be replaced by the current
691
word. For example, the command to open the PHP API documentation
694
firefox "http://www.php.net/%s"
696
when executing the command, the %s is substituted by the word near
697
the cursor position or by the current selection. If the cursor is at
698
the word "echo", a browser window will open(assumed your browser is
699
called firefox) and it will open the address: http://www.php.net/echo.
702
User-definable snippets
703
^^^^^^^^^^^^^^^^^^^^^^^
705
Snippets are small strings or code constructs which can be replaced or
706
completed to a more complex string. So you can save a lot of time by
707
not typing often used strings and letting Geany do the work for you.
708
To know what to complete or replace Geany reads a configuration file
709
called ``snippets.conf`` at startup.
711
The system-wide configuration file can be found in
712
``$prefix/share/geany``, where ``$prefix`` is the path where Geany is
713
installed (commonly ``/usr/local``). It is not recommended to edit the
714
system-wide file, because it will be overridden when Geany is updated.
716
To change the settings, copy the file from ``$prefix/share/geany``
717
in your configuration directory (usually ``~/.geany/``).
721
% cp /usr/local/share/geany/snippets.conf /home/username/.geany/
723
Then you can edit the file and the changes are also available
724
after an update of Geany because the file resides in your
725
configuration directory. Alternatively, you can create a file
726
``~/.geany/snippets.conf`` and add only these settings you want
727
to change. All missing settings will be read from the global snippets
728
file in ``$prefix/share/geany``.
730
The file ``snippets.conf`` may contain several sections for each
731
filetype. It also contains two additional sections "Default" and
732
"Special". Default contains all snippets which are available
733
for every filetype. You may define another section for a certain
734
filetype(e.g. C++) containing the same snippets. Then when using
735
such a snippet in a C++ file the snippet defined in the C++ section will
736
be used. In any other file the snippet defined in the Default section will
737
be used unless a section for the current filetype exists and the used
738
snippet is defined in this section. The section "Special" contains special
739
snippets which can only be used in other snippets. So you can define often
740
used parts of snippets and just use the special snippet as a placeholder
741
(see the ``snippets.conf`` for details).
743
To define snippets you can use several special characters which
744
will be replaced when using the snippet:
746
**Wildcards for snippets**
748
================ =========================================================
749
\\n or %newline% Insert a new line (it will be replaced by the used EOL
750
char(s): LF, CR/LF, or CR).
752
\\t or %ws% Insert an indentation step, if using only spaces for
753
indentation only spaces will be used.
755
\\s \\s to force whitespace at beginning or end of a value
756
('key= value' won't work, use 'key=\\svalue')
758
%cursor% Place the cursor at this position after completion has
761
%...% "..." means the name of a key in the "Special" section.
762
If you have defined a key "brace_open" in the "Special"
763
section you can use %brace_open" in any other snippet.
764
================ =========================================================
766
Defined snippets must not contain spaces otherwise they won't
767
work correctly. But beside that you can define almost everything
768
string as a snippet and use it later in Geany. It is not limited
769
to existing contructs of certain programming languages(like ``if``,
770
``for``, ``switch``). Define whatever you need.
772
Maybe you need to often type your name, so define a snippet like this::
777
Everytime you write ``myname`` <TAB> in Geany, it will replace "myname"
778
with "Enrico Tröger". The key to start auto completion can be changed
779
in the preferences dialog, by default it is TAB.
781
You may change the behaviour Geany recognizes the word to complete,
782
i.e. where define the start and end of a word. The section "Special" may
783
contain a key "wordchars" which lists all characters a string may contain
784
to be recognized as a word for completion. Leave it commented to use
785
default characters or define it to add or remove characters to fit your
789
Inserting unicode characters
790
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
792
With GTK 2.10 and above, you can hit Ctrl-Shift-u, then still holding
793
Ctrl-Shift, type some hex digits representing the code point for the
794
character you want, then let go of Ctrl-Shift and hit a key such as
797
For this to work in Geany, you'll need to first unbind Ctrl-Shift-u
798
in the `keybinding tab in preferences dialog`_, then restart Geany.
799
Note that it works slightly differently from other GTK applications,
800
in that you'll need to continue to hold down the Ctrl and Shift keys
801
while typing the code point hex digits.
803
For GTK < 2.10, it is also possible, but typing the first Ctrl-Shift-u
804
is not necessary. One problem is that you may find the alphabetic
805
keys conflict with other Geany keybindings.
809
Search, replace and go to
810
-------------------------
812
This section describes search-related commands from the Search menu
813
and the editor window's popup menu:
819
* Go to tag definition \*
820
* Go to tag declaration \*
823
\* These items are available from the editor window's popup menu, or by
824
using a keyboard shortcut (see the section called `Keybindings`_).
830
The Find dialog is used for finding text in one or more open documents.
832
.. image:: ./images/find_dialog.png
838
The syntax for the Use regular expressions option is shown in
839
`Regular expressions`_.
841
The Use escape sequences option will transform any escaped characters
842
into their UTF-8 equivalent. For example, \\t will be transformed into
843
a tab character. Other recognised symbols are: \\\\, \\n, \\r, \\uXXXX
844
(Unicode chararacters).
850
To find all matches, click on the Find All expander. This will reveal
857
Find All In Document will show a list of matching lines in the
858
current document in the Messages tab of the Message Window. *Find All
859
In Session* does the same for all open documents.
861
Mark will set markers for all matching lines in the current document,
862
if the Markers margin is visible. If not, the background colour of
863
matching lines will be highlighted. Markers and highlighting can be
864
removed by selecting the Remove Markers command from the Document menu.
867
Change font in search dialog text fields
868
````````````````````````````````````````
870
All search related dialogs use a Monospace for the text input fields to
871
increase the readibility of input text. This is useful when you are
872
typing e.g. regular expressions with spaces, periods and commas which
873
might it hard to read with a proportional font.
875
If you want to change the font for some reason, you can do this easily
876
by inserting the following style into your ``.gtkrc-2.0``
877
(usually found in your home directory on UNIX-like systems and in the
878
etc subdirectory of your Geany installation on Windows)::
882
font_name="Monospace 8"
884
widget "GeanyDialogSearch.*.GtkEntry" style:highest "search_style"
886
Please note the addition ":highest" in the last line which sets the priority
887
of this style to the highest available. Otherwise, the style is ignored
888
for the search dialogs.
894
Find usage searches all open files. It is similar to the Find All In
895
Session Find dialog command.
897
If there is a selection, then it is used as the search text; otherwise
898
the current word is used. The current word is either taken from the
899
word nearest the edit cursor, or the word underneath the popup menu
900
click position when the popup menu is used. The search results are
901
shown in the Messages tab of the Message Window.
907
Find in files is a more powerful version of Find usage that searches
908
all files in a certain directory using the Grep tool. The Grep tool
909
must be correctly set in Preferences to the path of the system's Grep
910
utility. GNU Grep is recommended.
912
.. image:: ./images/find_in_files_dialog.png
915
The Extra options field is used to pass any additional arguments to
919
Filtering out version control files
920
```````````````````````````````````
922
When using the *Recurse in subfolders* option with a directory that's
923
under version control, you can set the *Extra options* field to use
924
grep's ``--exclude`` flag to filter out filenames.
926
SVN Example: ``--exclude=*.svn-base``
928
The --exclude argument only matches the file name part, not the path. If
929
you have GNU Grep >= 2.5.2 you can use the ``--exclude-dir`` argument to
930
filter out CVS and hidden directories like ``.svn``.
932
Example: ``--exclude-dir=.* --exclude-dir=CVS``
938
The Replace dialog is used for replacing text in one or more open
941
.. image:: ./images/replace_dialog.png
943
The Replace dialog has the same options for matching text as the Find
944
dialog. See the section called `Matching options`_.
946
The *Use regular expressions* option applies both to the search string
947
and to the replacement text; for the latter back references can be
948
used -- see the entry for '\\n' in `Regular expressions`_.
954
To replace several matches, click on the *Replace All* expander. This
955
will reveal several options:
961
*Replace All In Document* will replace all matching text in the
962
current document. *Replace All In Session* does the same for all open
963
documents. *Replace All In Selection* will replace all matching text
964
in the current selection of the current document.
970
If the current word is the name of a tag definition (like a function
971
body) and the file containing the tag definition is open, this command
972
will switch to that file and go to the corresponding line number. The
973
current word is either taken from the word nearest the edit cursor,
974
or the word underneath the popup menu click position when the popup
978
Go to tag declaration
979
^^^^^^^^^^^^^^^^^^^^^
981
Like Go to tag definition, but for a forward declaration such as a
982
function prototype or ``extern`` declaration instead of a function
989
Go to a particular line number in the current file.
995
You can use regular expressions in the Find and Replace dialogs
996
by selecting the Use regular expressions check box. The syntax is
997
POSIX-like, as described below in `Regular expressions`_.
1000
Searching backwards with regular expressions is not supported.
1002
**In a regular expression, the following characters are interpreted:**
1004
====== ============================================================
1005
. Matches any character.
1007
( This marks the start of a region for tagging a match.
1009
) This marks the end of a tagged region.
1011
\\n Where n is 1 through 9 refers to the first through ninth tagged
1012
region when replacing. For example, if the search string was
1013
Fred([1-9])XXX and the replace string was Sam\\1YYY, when applied
1014
to Fred2XXX this would generate Sam2YYY.
1016
\\< This matches the start of a word.
1018
\\> This matches the end of a word.
1020
\\x This allows you to use a character x that would otherwise have
1021
a special meaning. For example, \\[ would be interpreted as [
1022
and not as the start of a character set. Use \\\\ for a literal
1025
[...] This indicates a set of characters, for example, [abc] means
1026
any of the characters a, b or c. You can also use ranges, for
1027
example [a-z] for any lower case character.
1029
[^...] The complement of the characters in the set. For example,
1030
[^A-Za-z] means any character except an alphabetic character.
1032
^ This matches the start of a line (unless used inside a set, see
1035
$ This matches the end of a line.
1037
\* This matches 0 or more times. For example, Sa*m matches Sm, Sam,
1038
Saam, Saaam and so on.
1040
\+ This matches 1 or more times. For example, Sa+m matches Sam,
1041
Saam, Saaam and so on.
1042
====== ============================================================
1045
Partial POSIX compatibility
1046
```````````````````````````
1048
Note that the POSIX '?' regular expression character for optional
1049
matching is not supported by the Find and Replace dialogs.
1056
Geany has built-in functionality for generating tag information (aka
1057
"workspace tags") for supported filetypes when you open a file. You
1058
can also have Geany automatically load external tag files (aka "global
1059
tags files") from its ``~/.geany/tags`` directory upon startup, or
1060
manually using *File --> Load Tags*.
1062
Geany uses its own tag file format, similar to what ``ctags`` uses
1063
(but is incompatible with ctags). You use Geany to generate global
1064
tags files, as described below.
1070
Tags for each document are parsed whenever a file is loaded or
1071
saved. These are shown in the Symbol list in the Sidebar. These tags
1072
are also used for autocompletion of symbols and calltips for all documents
1073
open in the current session that have the same filetype.
1075
The *Go to Tag* commands can be used with all workspace tags. See
1076
`Go to tag definition`_.
1082
Global tags are used to provide autocompletion of symbols and calltips
1083
without having to open the corresponding source files. This is intended
1084
for library APIs, as the tags file only has to be updated when you upgrade
1087
You can load a custom global tags file in two ways:
1089
* Using the *Load Tags* command in the File menu.
1090
* By creating a directory ``~/.geany/tags``, and moving or symlinking
1091
the tags files there before starting Geany.
1093
You can either download these files or generate your own. They have
1098
*lang_ext* is one of the extensions set for the filetype associated
1099
with the tags. See the section called `Filetype extensions`_ for
1103
Default global tags files
1104
`````````````````````````
1106
For some languages, a list of global tags is loaded when the
1107
corresponding filetype is first used. Currently these are for:
1109
* C -- GTK+ and GLib
1112
* HTML -- &symbol; completion, e.g. for ampersand, copyright, etc.
1116
Generating a global tags file
1117
`````````````````````````````
1120
*Filetypes support:*
1122
Currently this is not yet supported for Pascal, PHP and LaTeX
1125
You can generate your own global tags files by parsing a list of
1126
source files. The command is::
1128
geany -g [-P] <Tag File> <File list>
1130
* Tag File should be in the format described earlier -- see the
1131
section called `Global tags`_.
1132
* File list is a list of filenames, each with a full path (unless
1133
you are generating C/C++ tags and have set the CFLAGS environment
1134
variable appropriately).
1135
* ``-P`` or ``--no-preprocessing`` disables using the C pre-processor
1136
to process ``#include`` directives for C/C++ source files. Use this
1137
option if you want to specify each source file on the command-line
1138
instead of using a 'master' header file. Also can be useful if you
1139
don't want to specify the CFLAGS environment variable.
1141
Example for the wxD library for the D programming language::
1143
geany -g wxd.d.tags /home/username/wxd/wx/*.d
1146
*Generating C/C++ tag files:*
1148
For C/C++ tag files, gcc and grep are required, so that header files
1149
can be preprocessed to include any other headers they depend upon.
1151
For C/C++ files, the environment variable CFLAGS should be set with
1152
appropriate ``-I/path`` include paths. The following example works with
1153
the bash shell, generating tags for the GnomeUI library::
1155
CFLAGS=`pkg-config --cflags libgnomeui-2.0` geany -g gnomeui.c.tags \
1156
/usr/include/libgnomeui-2.0/gnome.h
1158
You can adapt this command to use CFLAGS and header files appropriate
1159
for whichever libraries you want.
1162
*Replacing the default C/C++ tags file:*
1164
Geany currently uses a default global tags file global.tags for
1165
C and C++, commonly installed in /usr/share/geany. This file can
1166
be replaced with one containing tags parsed from a different set
1167
of header files. When Geany is next started, your custom tags file
1168
will be loaded instead of the default global.tags. You should keep a
1169
copy of the generated tags file because it will get overwritten when
1176
You can also ignore certain tags if they would lead to wrong parsing of
1177
the code. Simply create a file called "ignore.tags" in your Geany
1178
configuration directory (usually ``~/.geany/``). Then list all tags
1179
you want to ignore in this file, separated by spaces and/or newlines.
1181
More detailed information about the usage from the Exuberant Ctags
1184
Specifies a list of identifiers which are to be specially handled
1185
while parsing C and C++ source files. This option is specifically
1186
provided to handle special cases arising through the use of
1187
preprocessor macros. When the identifiers listed are simple identifiers,
1188
these identifiers will be ignored during parsing of the source files.
1189
If an identifier is suffixed with a '+' character, ctags will also
1190
ignore any parenthesis-enclosed argument list which may immediately
1191
follow the identifier in the source files.
1192
If two identifiers are separated with the '=' character, the first
1193
identifiers is replaced by the second identifiers for parsing purposes.
1195
For even more detailed information please read the manual page of
1202
You may adjust Geany's settings using the Edit --> Preferences
1203
dialog. Any changes you make there can be applied by hitting either
1204
the Apply or the OK button. These settings will persist between Geany
1205
sessions. Note that most settings here have descriptive popup bubble
1206
help -- just hover the mouse over the item in question to get help
1209
You may also adjust some View settings (under the View menu) that
1210
persist between Geany sessions. The settings under the Document menu,
1211
however, are only for the current document and revert to defaults
1212
when restarting Geany.
1214
There are also some rarer `Hidden preferences`_.
1217
In the paragraphs that follow, the text describing a dialog tab
1218
comes after the screenshot of that tab.
1221
General tab in preferences dialog
1222
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1224
.. image:: ./images/pref_dialog_gen.png
1229
Load files from the last session
1230
On startup, load the same files you had open the last time you
1233
Load virtual terminal support
1234
Load the library for running a terminal in the message window area.
1236
Enable plugin support
1237
Allow plugins to be used in Geany.
1241
Save window position and geometry
1242
Save the current position and size of the main window so next time
1243
you open Geany it's in the same location.
1246
Have a dialog pop up to confirm that you really want to quit Geany.
1251
Use project-based session files
1252
Save your current session when closing projects. You will be able to
1253
resume different project sessions, automatically opening the files
1254
you had open previously.
1259
Beep on errors when compilation has finished
1260
Have the computer make a beeping sound when compilation of your program
1261
has completed or any errors occurred.
1263
.. Switch status message list at new message
1265
.. Suppress status message in the status bar
1267
.. Autofocus widgets (focus follows mouse)
1269
.. Always wrap search and hide the find dialog
1271
Use current word under the cursor for Find dialogs
1272
Use the currently selected word as the search text when you open
1273
one of the Search dialogs.
1276
Interface tab in preferences dialog
1277
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1279
.. image:: ./images/pref_dialog_interface.png
1285
Show the list of functions, variables, and other information in the
1286
current document you are editing.
1289
Show all the documents you have open currently. This can be used to
1290
change between documents (see `Switching between documents`_) and
1291
to perform some common operations such as saving, closing and reloading.
1293
Show full path name in documents list
1294
Show the full directory path of the files you are editing in the
1301
Change the font used to display documents.
1304
Change the font used for the Symbols sidebar tab.
1307
Change the font used for the message window area.
1313
Show a notebook tab for all documents so you can switch between them
1314
using the mouse (instead of using the Documents window).
1317
Make each tab show a close button so you can easily close open
1320
Placement of new file tabs
1321
Whether to create a document with its notebook tab to the left or
1322
right of all existing tabs.
1328
Set the positioning of the editor's notebook tabs to the right,
1329
left, top, or bottom of the editing window.
1332
Set the positioning of the sidebar's notebook tabs to the right,
1333
left, top, or bottom of the sidebar window.
1336
Set the positioning of the message window's notebook tabs to the
1337
right, left, top, or bottom of the message window.
1343
Show the status bar at the bottom of the main window. It gives information about
1344
the file you are editing like the line and column you are on, whether any
1345
modifications were done, the file encoding, the filetype and other information.
1348
Toolbar tab in preferences dialog
1349
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1351
Affects the main toolbar underneath the menu bar.
1353
.. image:: ./images/pref_dialog_toolbar.png
1359
Whether to show the toolbar.
1364
Show file operation buttons
1365
Show the buttons to open a new file, open an existing file, save a file,
1368
Show Redo and Undo buttons
1369
Show the undo/redo change buttons.
1371
Show Back and Forward buttons
1372
Show the buttons to navigate forwards and backwards between positions
1373
in the current session's documents.
1375
Show Compile and Run buttons
1376
Show the buttons to run or compile a file.
1378
Show Color Chooser button
1379
Show the button to run the color chooser dialog.
1381
Show Zoom In and Zoom Out buttons
1382
Show the buttons to zoom in closer to a document or zoom out.
1384
Show Increase and Decrease Indentation buttons
1385
Show the buttons to increase or decrease the current line or
1386
selection's indentation.
1389
Show the incremental search bar in the toolbar (quicker than using
1392
Show Go to Line field
1393
Show a line number text entry (quicker than using the Go to Line
1397
Show a button to quit geany.
1403
Select the toolbar icon style to use - either icons and text, just
1407
Select the size of the icons you see (large or small).
1410
Display tab in preferences dialog
1411
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1413
This is for visual elements displayed in the editor window.
1415
.. image:: ./images/pref_dialog_display.png
1421
Show indendation guides
1422
Show vertical lines to help show how much leading indentation there
1426
Mark all tabs with an arrow "-->" symbol and spaces with dots to
1427
show which kinds of whitespace are used.
1430
Displays a symbol everywhere that a carriage return or line feed
1436
The long line marker helps to indicate overly-long lines, or as a hint
1437
for when to break the line.
1441
Show a thin vertical line in the editor window at the given column
1444
Change the background color of characters after the given column
1445
position to the color set below. (This is recommended over the
1446
*Line* setting if you use proportional fonts).
1448
Don't mark long lines at all.
1451
Set this value to a value greater than zero to specify the column
1452
where it should appear.
1454
Long line marker color
1455
Set the color of the long line marker.
1457
Editor tab in preferences dialog
1458
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1460
.. image:: ./images/pref_dialog_edit.png
1465
See `Indentation`_ for more information.
1468
Whether to use tabs or spaces for indentation.
1471
The width of a single indent size in spaces. By default the indent
1472
size is the equivalent of 4 spaces.
1475
The type of auto-indentation you wish to use after pressing Enter,
1479
Just add the indentation of the previous line.
1481
Add indentation based on the current filetype and any characters at
1482
the end of the line such as ``{``, ``}`` for C, ``:`` for Python.
1484
Like *Current chars* but for C-like languages, make a closing
1485
``}`` brace line up with the matching opening brace.
1491
Show long lines wrapped around to new display lines.
1494
Currently, there is no setting to have Geany automatically insert
1495
newlines into your document while you type.
1497
Enable "smart" home key
1498
Whether to move the cursor to the first non-whitespace character
1499
on the line when you hit the home key on your keyboard. Pressing it
1500
again will go to the very start of the line.
1502
Disable Drag and Drop
1503
Do not allow the dragging and dropping of selected text in documents.
1506
Allow groups of lines in a document to be collapsed for easier
1509
Fold/Unfold all children of a fold point
1510
Whether to fold/unfold all child fold points when a parent line
1513
Use indicators to show compile errors
1514
Underline lines with compile errors using red squiggles to indicate
1515
them in the editor area.
1517
Newline strip trailing spaces
1518
Remove any white space at the end of the line when you hit the
1525
Whether to replace special keywords after typing Tab into a
1526
pre-defined text snippet.
1527
See `User-definable snippets`_.
1529
XML tag autocompletion
1530
When you open an XML tag automatically generate its completion tag.
1532
Automatic symbol completion
1533
When you start to type a symbol name, look for the full string to
1534
allow it to be completed for you.
1536
Characters to type for completion
1537
Number of characters of a word to type before autocompletion is
1540
Rows of symbol completion list
1541
The maximum number of symbols to show in the autocompletion window.
1544
Files tab in preferences dialog
1545
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1547
.. image:: ./images/pref_dialog_files.png
1552
Default encoding (new files)
1553
The type of file encoding you wish to use when creating files.
1555
Used fixed encoding when opening files
1556
Assume all files you are opening are using the type of encoding specified below.
1558
Default encoding (existing files)
1559
Opens all files with the specified encoding instead of auto-detecting it.
1560
Use this option when it's not possible for Geany to detect the exact encoding.
1564
Perform special formatting operations when a document is saved. These
1565
can each be undone with the Undo command as usual.
1567
Ensure newline at file end
1568
Add a newline at the end of the document if one is missing.
1570
Strip trailing spaces
1571
Remove the trailing spaces on each line of the document.
1573
Replace tabs by space
1574
Replace all tabs in the document with the equivalent number of spaces.
1577
It is better to use spaces to indent than use this preference - see
1583
Recent files list length
1584
The number of files to remember in the recently used files list.
1587
Tools tab in preferences dialog
1588
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1590
.. image:: ./images/pref_dialog_tools.png
1596
The location of the make executable.
1599
The location of your terminal executable.
1602
The location of your web browser executable.
1605
The location of the grep executable.
1608
For Windows users: at the time of writing it is recommended to use
1609
the grep.exe from the UnxUtils project
1610
(http://sourceforge.net/projects/unxutils). The grep.exe from the
1611
Mingw project for instance might not work with Geany at the moment.
1617
Set this to a command to execute on the current word.
1618
You can use the "%s" wildcard to pass the current word below the cursor
1619
to the specified command.
1622
Template tab in preferences dialog
1623
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1625
This data is used as metadata for various template text to insert into
1626
a document, such as the file header. You only need to set fields that
1627
you want to use in your template files.
1629
.. note:: For changes made here to take effect a restart of geany is required.
1631
.. image:: ./images/pref_dialog_templ.png
1637
The name of the developer who will be creating files.
1640
The initials of the developer.
1643
The email address of the developer.
1646
You may wish to add anti-spam markup, e.g. ``name<at>site<dot>ext``.
1649
The company the developer is working for.
1652
The initial version of files you will be creating.
1655
Keybinding tab in preferences dialog
1656
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1658
.. image:: ./images/pref_dialog_keys.png
1660
There are some handy commands in here that are not, by default,
1661
bound to a key combination, and may not be available as a menu item.
1664
For more information see the section called `Keybindings`_.
1667
Printing tab in preferences dialog
1668
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1670
.. image:: ./images/pref_dialog_printing.png
1672
Use external command for printing
1673
Use a system command to print your file out.
1675
Use native GTK printing
1676
Let the GTK GUI toolkit handle your print request.
1679
Print the line numbers on the left of your paper.
1682
Print the page number on the bottom right of your paper.
1685
Print a header on every page that is sent to the printer.
1687
Use base name of the printed file
1688
Don't use the entire path for the header, only the filename.
1691
How the date should be printed. You can use the same format
1692
specifiers as in the ANSI C function strftime(). For details please
1693
see http://man.cx/strftime.
1696
VTE tab in preferences dialog
1697
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1699
See also: `Virtual terminal emulator widget (VTE)`_.
1701
.. image:: ./images/pref_dialog_vte.png
1707
Select the font that will be used in the terminal emulation control.
1710
Select the font color.
1713
Select the background color of the terminal.
1716
The number of lines buffered so that you can scroll though the history.
1719
Controls how the terminal emulator should behave.
1720
Do not change this value unless you know exactly what you are doing.
1721
At time of writing only "xterm" is supported. For further details refer
1722
to the documentation of the libvte package.
1725
The location of the shell on your system.
1728
Scroll the terminal to the prompt line when pressing a key.
1731
Scroll the output down.
1733
Override Geany keybindings
1734
Allows the VTE to receive keyboard shortcuts (apart from focus commands).
1736
Disable menu shortcut key (F10 by default)
1737
Disable the menu shortcut when you are in the virtual terminal.
1739
Follow path of the current file
1740
Make the path of the terminal change according to the path of the
1743
Execute programs in VTE
1744
Execute programs in the virtual terminal instead of using the external
1747
Don't use run script
1748
Don't use the simple run script which is usually used to display
1749
the exit status of the executed program.
1750
This can be useful if you already have a program running in the VTE
1751
like a Python console (e.g. ipython). Use this with care.
1757
Project Management is optional in Geany. Currently it can be used for:
1759
* Storing and opening session files on a project basis.
1760
* Running *Make* from the project's base directory.
1761
* Setting a custom *Run* command specific to the project.
1763
A list of session files can be stored and opened with the project
1764
when the *Use project-based session files* preference is enabled,
1765
in the *Project* group of the `Preferences`_ dialog.
1767
As long as a project is open, the Make and Run commands will use
1768
the project's settings, instead of the defaults. These will be used
1769
whichever document is currently displayed.
1771
The current project's settings are saved when it is closed, or when
1772
Geany is shutdown. When restarting Geany, the previously opened project
1773
file that was in use at the end of the last session will be reopened.
1775
Below are the commands used to create, modify, open and close projects.
1781
To create a new project, fill in the *Name* field. By default this
1782
will setup a new project file ``~/projects/name.geany``. Usually it's
1783
best to store all your project files in the same directory (they are
1784
independent of any source directory trees).
1786
The Base path text field is setup to use ``~/projects/name``. This
1787
can safely be set to any existing path -- it will not touch the file
1788
structure contained in it.
1794
You can set an optional description for the project, but it is not
1795
used elsewhere by Geany.
1797
The *Base path* field is used as the directory to run the Make and Make
1798
custom commands in. It is also used as working directory for the project
1799
specific *Run command*.
1800
The specified path can be an absolute path or relative to the project's
1807
This setting makes the *Build->Make* command use the project's base
1808
path. Uncheck this if you want to use the current file's directory
1815
The *Run command* overrides the default run command. You can set this
1816
to the executable or main script file for the project, and append
1817
any command-line arguments.
1819
The following variables can be used:
1821
* %f -- complete filename without path
1822
* %e -- filename without path and without extension
1824
See `[build_settings] Section`_ for details.
1830
The Open command displays a standard file chooser, starting in
1831
``~/projects``. Choose a project file named with the ``.geany``
1834
When project session support is enabled, Geany will close the currently
1835
open files and open the session files associated with the project.
1841
Project file settings are saved when the project is closed.
1843
When project session support is enabled, Geany will close the project
1844
session files and open any previously closed default session files.
1850
Geany has an integrated build system. Firstly this means that the
1851
current source file will be saved before it is processed. This is
1852
for convenience so that you don't need to keep saving small changes
1853
to the current file before building.
1855
Secondly the output for Compile, Build and Make actions will be
1856
captured in the Compiler notebook tab of the messages window (assuming
1857
you have it visible). If there are any warnings or errors with line
1858
numbers shown in the Compiler output tab, you can double click on
1859
them and Geany will switch to the relevant source file (if it is open)
1860
and mark the line number so the problem can be corrected. Geany will
1861
also set indicators for warnings or errors with line numbers.
1863
Depending on the current file's filetype, the Build menu will contain
1864
the following items:
1869
* Make custom target
1872
* Set Includes and Arguments
1878
The Compile command has different uses for different kinds of files.
1880
For compilable languages such as C and C++, the Compile command is
1881
setup to compile the current source file into a binary object file.
1883
Java source files will be compiled to class file bytecode. Interpreted
1884
languages such as Perl, Python, Ruby will compile to bytecode if the
1885
language supports it, or will run a syntax check, or failing that
1886
will run the file in its language interpreter.
1892
For compilable languages such as C and C++, the Build command will link
1893
the current source file's equivalent object file into an executable. If
1894
the object file does not exist, the source will be compiled and linked
1895
in one step, producing just the executable binary.
1897
Interpreted languages do not use the Build command.
1903
This effectively runs "make all" in the same directory as the
1907
For each of the Make commands, The Make tool path must be correctly
1908
set in the Tools tab of the Preferences dialog.
1914
This is similar to running 'Make all' but you will be prompted for
1915
the make target name to be passed to the Make tool. For example,
1916
typing 'clean' in the dialog prompt will run "make clean".
1922
Make object will run "make current_file.o" in the same directory as
1923
the current file, using its prefix for 'current_file'. It is useful
1924
for compiling just the current file without building the whole project.
1930
Execute will run the corresponding executable file, shell script or
1931
interpreted script in a terminal window. Note that the Terminal tool
1932
path must be correctly set in the Tools tab of the Preferences dialog -
1933
you can use any terminal program that runs a Bourne compatible shell
1934
and accept the "-e" command line argument to start a command.
1936
After your program or script has finished executing, you will be
1937
prompted to press the return key. This allows you to review any text
1938
output from the program before the terminal window is closed.
1941
Stopping running processes
1942
^^^^^^^^^^^^^^^^^^^^^^^^^^
1944
When there is a running program, the Run button in the toolbar
1945
becomes a stop button and you can stop the current action. This
1946
works by sending a signal to the process (and its child process(es))
1947
to stop the process. The used signal is SIGQUIT.
1949
Depending on the process you started it might occur that the process
1950
cannot be stopped. This can happen when the process creates more than
1957
Xterm is known to work properly. If you are using "Terminal"
1958
(the terminal program of Xfce), you should add the command line
1959
option ``--disable-server`` otherwise the started process cannot be
1960
stopped. Just add this option in the preferences dialog on the Tools
1961
tab in the terminal field.
1964
Set Includes and Arguments
1965
^^^^^^^^^^^^^^^^^^^^^^^^^^
1967
By default the Compile and Build commands invoke the compiler and
1968
linker with only the basic arguments needed by all programs. Using
1969
Set Includes and Arguments you can add any include paths and compile
1970
flags for the compiler, any library names and paths for the linker,
1971
and any arguments you want to use when running Execute.
1973
These settings are saved automatically when Geany is shut down.
1975
The following variables can be used:
1977
* %f -- complete filename without path
1978
* %e -- filename without path and without extension
1980
See `[build_settings] Section`_ for details.
1982
If you need complex settings for your build system, or several
1983
different settings, then writing a Makefile and using the Make commands
1987
One step compilation
1988
````````````````````
1990
If you are using the Build command to compile and link in one step,
1991
you will need to set both the compiler arguments and the linker
1992
arguments in the linker command setting.
1998
Indicators are red squiggly underlines which are used to highlight
1999
errors which occured while compiling the current file. So you can
2000
easily see where your code failed to compile. To remove the indicators,
2001
just click on "Remove all indicators" in the document file menu.
2003
If you do not like this feature, you can disable it in the preferences
2011
Since Geany 0.13 there is full printing support using GTK's printing API.
2012
The printed page(s) will look nearly the same as on your screen in Geany.
2013
Additionally, there are some options to modify the printed page(s). You
2014
can define whether to print line numbers, page numbers at the bottom of
2015
each page and whether to print a page header on each page. This header
2016
contains the filename of the printed document, the current page number and
2017
the date and time of printing. By default, the file name of the document
2018
is added with full path information to the header. If you prefer to add
2019
only the basename of the file(without any path information) you can set it
2020
in the preferences dialog. You can also adjust the format of the date and
2021
time added to the page header. The available conversion specifiers are the
2022
same as the ones which can be used with the ANSI C strftime function.
2023
All of these settings can also be changed in the print dialog just before
2024
actual printing is done.
2025
On Unix-like systems the provided print dialog offers a print preview. The
2026
preview file is opened with a PDF viewer and by default GTK uses ``evince``
2027
for print preview. If you don't have installed evince or just want to use
2028
another PDF viewer, you can change the program to use in the file
2029
``.gtkrc-2.0`` (usually found in your home directory). Simply add a line
2032
gtk-print-preview-command = "epdfview %f"
2034
at the end of the file. Of course, you can also use xpdf, kpdf or whatever
2035
as the print preview command.
2037
Unfortunately, native GTK printing support is only available if Geany was
2038
built against GTK 2.10 (or above) **and** is running with GTK 2.10 (or above).
2039
If not, Geany provides basic printing support. This means you can print a
2040
file by passing the filename of the current file to a command which
2041
actually prints the file. However, the printed document contains no syntax
2042
highlighting. You can adjust the command to which the filename is
2043
passed in the preferences dialog. The default command is::
2047
``%f`` will be substituted by the filename of the current file. Geany
2048
will not show errors from the command itself, so you should make
2049
sure that it works before(e.g. by trying to execute it from the
2052
A nicer example, which I prefer is::
2054
% a2ps -1 --medium=A4 -o - %f | xfprint4
2056
But this depends on a2ps and xfprint4. As a replacement for xfprint4,
2057
gtklp or similar programs can be used.
2064
Plugins are loaded at startup, if the *Enable plugin support*
2065
general preference is set. There is also a command-line option,
2066
``-p``, which prevents plugins being loaded. Plugins are scanned in
2067
the following directories:
2069
* ``$prefix/lib/geany`` (``$prefix`` is usually ``/usr/local`` or
2071
* ``~/.geany/plugins``
2073
Most plugins add menu items to the *Tools* menu when they are loaded.
2075
Since Geany 0.13, there is a Plugin Manager to let you choose which plugins
2076
should be loaded at startup. You can also load and unload plugins on the
2077
fly using this dialog. Once you click the checkbox for a specific plugin
2078
in the dialog, it is loaded or unloaded according to its previous state.
2079
By default, no plugins are loaded at startup until you select some.
2080
You can also configure some plugin specific options when the plugin
2088
Geany supports the default keyboard shortcuts for the Scintilla
2089
editing widget. For a list of these commands, see `Scintilla
2090
keyboard commands`_. The Scintilla keyboard shortcuts will be overridden
2091
by any custom keybindings with the same keyboard shortcut.
2097
There are a few non-configurable bindings to switch between documents,
2098
listed below. These can also be overridden by custom keybindings.
2100
=============== ==================================
2102
=============== ==================================
2103
Alt-[1-9] Select left-most tab, from 1 to 9.
2104
Alt-0 Select right-most tab.
2105
Ctrl-Shift-PgUp Select left-most tab.
2106
Ctrl-Shift-PgDn Select right-most tab.
2107
=============== ==================================
2110
Configurable keybindings
2111
^^^^^^^^^^^^^^^^^^^^^^^^
2113
For all actions listed below you can define your own keybindings. Open
2114
the Preferences dialog, select the desired action and click on
2115
change. In the opening dialog you can press any key combination you
2116
want and it will be saved when you press OK. You can define only one
2117
key combination for one action.
2119
Some of the default key combinations cannot be changed, e.g. menu_new
2120
or menu_open. These are set by GTK and should be kept, but you can
2121
still add other key combinations for these actions. For example to
2122
execute menu_open by default *Ctrl-O* is set, but you can also define
2123
*Alt-O*, so that the file open dialog is shown by pressing either
2124
*Ctrl-O* or *Alt-O*.
2126
The following table lists all customizable keyboard shortcuts.
2128
=============================== ========================= =========================================
2129
Action Default shortcut Description
2130
=============================== ========================= =========================================
2133
New Ctrl-N Creates a new file.
2135
Open Ctrl-O Opens a file.
2137
Save Ctrl-S Saves the current file.
2139
Save As Saves the current file under a new name.
2141
Save all Ctrl-Shift-S Saves all open files.
2143
Close all Ctrl-Shift-W Closes all open files.
2145
Close Ctrl-W Closes the current file.
2147
Reload file Ctrl-R Reloads the current file. All unsaved changes
2150
Print Ctrl-P Prints the current file.
2154
Undo Ctrl-Z Un-does the last action.
2156
Redo Ctrl-Y Re-does the last action.
2158
Delete current line(s) Ctrl-K Deletes the current line (and any lines with a
2160
Duplicate line or selection Ctrl-D Duplicates the current line or selection.
2162
Transpose current line Ctrl-T Transposes the current line with the previous one.
2164
Scroll to current line Ctrl-Shift-L Scrolls the current line into the centre of the
2165
view. The cursor position and or an existing
2166
selection will not be changed.
2168
Scroll up by one line Alt-Up Scrolls the view.
2170
Scroll down by one line Alt-Down Scrolls the view.
2172
Complete word Ctrl-Space Shows auto completion list.
2174
Show calltip Alt-Space (Unix) Shows call tips for the current function or
2175
Alt-Shift-Space (Windows) method.
2177
Show macro list Ctrl-Return Shows a list of available macros and variables in
2180
Complete snippet Tab If you type a construct like if or for and press
2181
this key, it will be completed with a matching
2184
Suppress snippet completion If you type a construct like if or for and press
2185
this key, it will not be completed, and a space or
2186
tab will be inserted, depending on what the
2187
construct completion keybinding is set to. For
2188
example, if you have set the construct completion
2189
keybinding to space, then setting this to
2190
Shift+space will prevent construct completion and
2193
Context Action Executes a command and passes the current word
2194
(near the cursor postion) or selection as an
2195
argument. See the section called `Context
2200
Cut Ctrl-X Cut the current selection to the clipboard.
2202
Copy Ctrl-C Copy the current selection to the clipboard.
2204
Paste Ctrl-V Paste the clipboard text into the current document.
2206
Cut current line(s) Ctrl-Shift-X Cuts the current line (and any lines with a
2207
selection) to the clipboard.
2209
Copy current line(s) Ctrl-Shift-C Copies the current line (and any lines with a
2210
selection) to the clipboard.
2214
Select all Ctrl-A Makes a selection of all text in the current
2217
Select current word Alt-Shift-W Selects the current word under the cursor.
2219
Select current paragraph Alt-Shift-P Selects the current paragraph under the cursor
2220
which is defined by two empty lines around it.
2222
Select current line(s) Alt-Shift-L Selects the current line under the cursor (and any
2223
partially selected lines).
2227
Insert date Shift-Alt-D Inserts a customisable date.
2229
Insert alternative whitespace Inserts a tab character when spaces should
2230
be used for indentation and inserts space
2231
characters of the amount of a tab width when
2232
tabs should be used for indentation.
2236
Toggle case of selection Ctrl-Alt-U Changes the case of the selection. A lowercase
2237
selection will be changed into uppercase and vice
2238
versa. If the selection contains lower- and
2239
uppercase characters, all will be converted to
2242
Comment line Comments current line or selection.
2244
Uncomment line Uncomments current line or selection.
2246
Toggle line commentation Ctrl-E Comments a line if it is not commented or removes
2247
a comment if the line is commented.
2249
Increase indent Ctrl-I Indents the current line or selection by one tab
2250
or by spaces in the amount of the tab width
2253
Decrease indent Ctrl-U Removes one tab or the amount of spaces of
2254
the tab width setting from the indentation of the
2255
current line or selection.
2257
Increase indent by one space Indents the current line or selection by one
2260
Decrease indent by one space Deindents the current line or selection by one
2263
Smart line indent Indents the current line or all selected lines
2264
with the same intentation as the previous line.
2268
Preferences Ctrl-Alt-P Opens preferences dialog.
2272
Find Ctrl-F Opens the Find dialog.
2274
Find Next Ctrl-G Finds next result.
2276
Find Previous Ctrl-Shift-G Finds previous result.
2278
Replace Ctrl-H Opens the Replace dialog.
2280
Find in files Ctrl-Shift-F Opens the Find in files dialog.
2282
Next message Jumps to the line with the next message from
2283
the last call to Find usage.
2285
Find Usage Finds all occurrences of the current word (near
2286
the keyboard cursor) or selection and displays
2287
them in the messages window.
2291
Navigate forward a location Switches to the next location in the navigation
2292
history. See the section called `Code Navigation
2295
Navigate back a location Switches to the previous location in the
2296
navigation history. See the section called
2297
`Code Navigation History`_.
2299
Go to line Ctrl-L Opens the Go to line dialog.
2301
Goto matching brace Ctrl-B If the cursor is ahead or behind a brace, then it
2302
is moved to the brace which belongs to the current
2303
one. If this keyboard shortcut is pressed again,
2304
the cursor is moved back to the first brace.
2306
Toggle marker Ctrl-M Set a marker on the current line, or clear the
2307
marker if there already is one.
2309
Goto next marker Ctrl-. Goto the next marker in the current document.
2311
Goto previous marker Ctrl-, Goto the previous marker in the current document.
2313
Go to tag definition Jump to the definition of the current word (near
2314
the keyboard cursor). If the definition cannot be
2315
found (e.g. the relevant file is not open) Geany
2316
will beep and do nothing. See the section called
2317
`Go to tag definition`_.
2319
Go to tag declaration Jump to the declaration of the current word (near
2320
the keyboard cursor). If the declaration cannot be
2321
found (e.g. the relevant file is not open) Geany
2322
will beep and do nothing. See the section called
2323
`Go to tag declaration`_.
2327
Fullscreen F11 Switches to fullscreen mode.
2329
Toggle Messages Window Toggles the message window (status and compiler
2330
messages) on and off.
2332
Toggle Sidebar Shows or hides the sidebar.
2334
Toggle all additional widgets Hide and show all additional widgets like the
2335
notebook tabs, the toolbar, the messages window
2338
Zoom In Ctrl-+ Zooms in the text
2340
Zoom Out Ctrl-- Zooms out the text
2344
Switch to Editor F2 Switches to editor widget.
2346
Switch to Scribble F6 Switches to scribble widget.
2348
Switch to VTE F4 Switches to VTE widget.
2350
Switch to Search Bar F7 Switches to the search bar in the toolbar (if
2355
Switch to left document Ctrl-PageUp Switches to the previous open document.
2357
Switch to right document Ctrl-PageDown Switches to the next open document.
2359
Switch to last used document Ctrl-Tab Switches to the previously selected open document.
2361
Move document left Alt-PageUp Changes the current document with the left hand
2364
Move document right Alt-PageDown Changes the current document with the right hand
2367
Move document first Moves the current document to the first position.
2369
Move document last Moves the current document to the last position.
2373
Replace tabs by space Replaces all tabs with the right amount of spaces.
2375
Fold all Folds all contractible code blocks.
2377
Unfold all Unfolds all contracted code blocks.
2379
Reload symbol list Ctrl-Shift-R Reloads the tag/symbol list.
2383
Compile F8 Compiles the current file.
2385
Build F9 Builds (compiles if necessary and links) the
2388
Make all Shift-F9 Builds the current file with the Make tool.
2390
Make custom target Ctrl-Shift-F9 Builds the current file with the Make tool and a
2393
Make object Compiles the current file with the Make tool.
2395
Next error Jumps to the line with the next error from the
2398
Run F5 Executes the current file in a terminal emulation.
2400
Run (alternative command) Executes the current file in a terminal emulation.
2402
Build options Opens the build options dialog.
2406
Show Color Chooser Opens the Colour Chooser dialog.
2410
Help F1 Opens the manual.
2411
=============================== ========================= =========================================
2420
Global configuration file
2421
-------------------------
2423
You can use a global configuration file for Geany which will be used if
2424
the user starts Geany for the first time and an user's configuration
2425
file was not yet created or in case an user deleted the configuration
2426
file to use default values.
2428
The global configuration file is read from
2429
``$prefix/share/geany/geany.conf`` (where ``$prefix`` is the path where
2430
Geany is installed) when starting Geany and an user configuration
2431
file does not exist. It can contain any settings which are found in
2432
the usual configuration file created by Geany but does not have to
2433
contain all settings.
2436
This feature is mainly intended for package maintainers or system
2437
admins who want to set up Geany in a multi user environment and
2438
set some sane default values for this environment. Usual users won't
2443
Filetype definition files
2444
-------------------------
2446
All colour definitions and other filetype specific settings are
2447
stored in the filetype definition files. Those settings are colours
2448
for syntax highlighting, general settings like comment characters or
2449
word delimiter characters as well as compiler and linker settings.
2451
The system-wide configuration files can be found in
2452
``$prefix/share/geany`` and are called ``filetypes.$ext``,
2453
where ``$prefix`` is the path where Geany is installed (commonly
2454
``/usr/local``) and $ext is the name of the filetype. For every
2455
filetype there is a corresponding definition file. There is one
2456
exception: ``filetypes.common`` -- this file is for general settings,
2457
which are not specific to a certain filetype. It is not recommended
2458
to edit the system-wide files, because they will be overridden when
2461
To change the settings, copy a file from ``$prefix/share/geany`` to
2462
the subdirectory filedefs in your configuration directory (usually
2467
% cp /usr/local/share/geany/filetypes.c /home/username/.geany/filedefs/
2469
Then you can edit the file and the changes are also
2470
available after an update of Geany because they reside in your
2471
configuration directory. Alternatively, you can create a file
2472
``~/.geany/filedefs/filetypes.X`` and add only these settings you want
2473
to change. All missing settings will be read from the corresponding
2474
global definition file in ``$prefix/share/geany``.
2484
In this section the colours for syntax highlighting are defined. The
2485
format is always: key=forground_colour;background_colour;bold;italic
2487
Colours have to be specified as RGB hex values prefixed by
2488
0x. For example red is 0xff0000, blue is 0x0000ff. The values are
2489
case-insensitive, but it is a good idea to use small letters. Bold
2490
and italic are flags and should only be "true" or "false". If their
2491
value is something other than "true" or "false", "false" is assumed.
2497
This section contains keys for different keyword lists specific to
2498
the filetype. Some filetypes do not support keywords, so adding a
2499
new key will not work. You can only add or remove keywords to/from
2503
The keywords list must be in one line without line ending characters.
2510
This is the default file extension used when saving files, not
2511
including the period character (``.``). The extension used should
2512
match one of the patterns associated with that filetype (see
2513
`Filetype extensions`_).
2515
*Example:* ``extension=cxx``
2518
These characters define word boundaries when making selections
2519
and searching using word matching options.
2521
*Example:* (look at system filetypes.\* files)
2524
A character or string which is used to comment code. If you want to
2525
use multiline comments, also set comment_close, otherwise leave it
2528
*Example:* ``comment_open=/*``
2531
If multiline comments are used, this is the character or string to
2534
*Example:* ``comment_close=*/``
2537
Set this to false if a comment character or string should start at
2538
column 0 of a line. If set to true it uses any indentation of the
2541
Note: Comment indentation
2543
``comment_use_indent=true`` would generate this if a line is
2544
commented (e.g. with Ctrl-D)::
993
2546
#command_example();
995
comment_use_indent=false would generate this if a line is
996
commented (e.g. with Ctrl-D)
1001
This setting only works for single line comments.
1002
comment_use_indent=true
1003
_________________________________________________________
1005
4.1.1.4. [build_settings] Section
1007
Table 4-2. Build settings
1008
Key Description Example
1009
compiler This item specifies the command to compile source
1010
code files. But it is also possible to use it with interpreted
1011
languages like Perl or Python. With these filetypes you can
1012
use this option as a kind of syntax parser, which sends output
1013
to the compiler message window.
1015
You should quote the filename to also support filenames with
1016
spaces. The following wildcards for filenames are available:
1018
* %f - complete filename without path
1019
* %e - filename without path and without extension
1021
compiler=gcc -Wall -c "%f"
1022
linker This item specifies the command to link the file. If
1023
the file is not already compiled, it will be compiled while
1024
linking. The -o option is automatically added by Geany. This
1025
item works well with GNU gcc, but may be problematic with
1026
other compilers (esp. with the linker). linker=gcc -Wall "%f"
1027
run_cmd Use this item to execute your file. It has to have
1028
been built already. Use the %e wildcard to have only the name
1029
of the executable (i.e. without extension) or use the %f
1030
wildcard if you need the complete filename, e.g. for shell
1031
scripts. run_cmd="./%e"
1032
_________________________________________________________
1034
4.1.2. Special file filetypes.common
1036
There is a special filetype definition file called
1037
filetypes.common. This file defines some general
1038
non-filetype-specific settings.
1040
Table 4-3. General settings
1041
Key Description Example
1042
selection The style for colouring selected text. The format
1047
* Use foreground colour
1048
* Use background colour
1050
The colours are only set if the 3rd or 4th argument is true.
1051
When the colours are not overridden, the default is a dark
1052
grey background with syntax highlighted foreground text.
1053
selection=0xc0c0c0;0x00007F;true;true
1054
brace_good The style for brace highlighting when a matching
1055
brace was found. brace_good=0xff0000;0xFFFFFF;true;false
1056
brace_bad The style for brace highlighting when no matching
1057
brace was found. brace_bad=0x0000ff;0xFFFFFF;true;false
1058
caret The style for colouring the caret(the blinking cursor).
1059
Only the first argument is interpreted.
1060
caret=0x000000;0x0;false;false
1061
current_line The style for colouring the background of the
1062
current line. Only the second argument is interpreted.
1063
current_line=0x0;0xe5e5e5;false;false
1064
indent_guide The style for colouring the indentation guides.
1065
Only the first and second arguments are interpreted.
1066
indent_guide=0xc0c0c0;0xffffff;false;false
1067
white_space The style for colouring the white space if it is
1068
shown. The first both arguments define the foreground and
1069
background colours, the third argument sets whether to use the
1070
defined colours or to use the colours defined by each filetype
1071
for the white space. white_space=0xc0c0c0;0xffffff;true;false
1072
folding_style The style of folding icons. Only first and
1073
second arguments are used.
1075
Valid values for the first argument are:
1080
Valid values for the second argument are:
1082
* 1 - for straight lines
1083
* 2 - for curved lines
1085
folding_style=1;1;false;false
1086
invert_all Whether to invert all defined colours. This is
1087
useful if you like a dark background colour(e.g. black) and do
1088
not want to change every single line. Please note, at time of
1089
writing this was only tested with the C syntax highlighting.
1091
Only first argument is interpreted. Set it to 1 to invert all
1093
invert_all=0;0;false;false
1094
_________________________________________________________
1096
4.2. Filetype extensions
1098
You can override the default extensions that Geany uses for
1099
each filetype using the filetype_extensions.conf file.
1101
To override the system-wide configuration file, copy it from
1102
$prefix/share/geany to your configuration directory, usually
1103
~/.geany/. $prefix is the path where Geany is installed
1104
(commonly /usr/local).
1107
% cp /usr/local/share/geany/filetype_extensions.conf /home/username/.ge
1110
Then edit it and remove all the lines for filetype extensions
1111
that you do not want to override. The remaining lines can be
1112
edited after the = sign, using a semi-colon separated list of
1113
patterns which should be matched for that filetype.
1115
For example, to set the filetype extensions for Make, the
1116
/home/username/.geany/filetype_extensions.conf file should
1119
[Extensions] Make=Makefile*;*.mk;Buildfile;
1120
_________________________________________________________
1124
Geany supports several templates for file headers, multiline
1125
comments (frame comments), function descriptions, a typical
1126
ChangeLog entry and a short GPL notice. To use these
1127
templates, just open the Edit menu or open the popup menu by
1128
right-clicking in the editor widget, and choose "Insert
1129
Comments" and insert templates as you want.
1131
Some templates (like file header or ChangeLog entry) will
1132
always be inserted at the top of the file.
1134
To insert a function description, the cursor must be inside of
1135
the function, so that the function name can be determined
1136
automatically. The description will be positioned correctly
1137
one line above the function, just check it out. If the cursor
1138
is not inside of a function or the function name cannot be
1139
determined, you cannot insert a function description.
1141
Each template can be customized to your needs. The templates
1142
are in the configuration directory, which is in ~/.geany/ (see
1143
Section 3.2 for further information about the configuration
1144
directory). Just open the desired template with an editor
1145
(ideally Geany ;-) ) and edit the template as your needs.
1146
There are some wildcards which will be automatically replaced
1147
by Geany at startup.
1149
All wildcards must be enclosed by "{" and "}", e.g. {date}.
1151
In the configuration dialog you can find a tab "Templates"
1152
(see Figure 3-7). You can define the default values which will
1153
be inserted in the templates. You should restart Geany after
1154
making changes, because they are only read at startup.
1156
Since Geany 0.3 there are also templates for creating new
1157
files. They can be found in ~/.geany/, too. All template files
1158
for creating new files begin with template.filetype. followed
1159
by the filetype. At creating a new file with a filetype
1160
template, the template for the fileheader is automatically
1161
prepended. Please note that the complete behaviour is still
1162
under development and will probably be changed in one of the
1163
next releases. Sorry.
1166
Table 4-4. Template wildcards
1167
Wildcard Description Available in following templates
1168
developer The name of the developer. filetypes, file header,
1169
function description, ChangeLog entry
1170
initial The developer's initials, e.g. "ET" for Enrico Tröger
1171
or "JFD" for John Foobar Doe. filetypes, file header, function
1172
description, ChangeLog entry
1173
mail The email address of the developer. file header, function
1174
description, ChangeLog entry
1175
company The company the developer is working for. filetypes,
1176
file header, function description, ChangeLog entry
1177
year The current year in the format: YYYY filetypes, file
1178
header, function description, ChangeLog entry
1179
version The initial version of a new file. filetypes, file
1180
header, function description, ChangeLog entry
1181
date The current date in the format: YYYY-MM-DD filetypes,
1182
file header, function description, ChangeLog entry
1183
untitled The string "untitled" (this will be translated to
1184
your locale), used in filetype templates filetypes, file
1185
header, function description, ChangeLog entry
1186
geanyversion The actual Geany version, e.g. "Geany 0.9"
1187
filetypes, file header, function description, ChangeLog entry
1188
datetime The current date and time in the format: DD.MM.YYYY
1189
HH:mm:ss ZZZZ file header, function description
1190
filename The filename of the current file. Only available for
1191
the file header template. file header
1192
gpl This wildcard inserts a short GPL notice. file header
1193
functionname The function name of the function at the cursor
1194
position. This wildcard will only be replaced in the function
1195
description template. function description
1196
If you need any other wildcards or a special date/time format,
1197
please email the author <enrico.troeger@uvena.de>.
1198
_________________________________________________________
1200
Appendix A. Scintilla keyboard commands
1202
A.1. Keyboard commands
1204
Keyboard commands for Scintilla mostly follow common Windows
1205
and GTK+ conventions. All move keys (arrows, page up/down,
1206
home and end) allows to extend or reduce the stream selection
1207
when holding the Shift key, and the rectangular selection when
1208
holding the Shift and Alt keys. Some keys may not be available
1209
with some national keyboards or because they are taken by the
1210
system such as by a window manager on GTK+. Keyboard
1211
equivalents of menu commands are listed in the menus. Some
1212
less common commands with no menu equivalent are:
1214
Table A-1. Scintilla keyboard commands
1216
Magnify text size. Ctrl+Keypad+
1217
Reduce text size. Ctrl+Keypad-
1218
Restore text size to normal. Ctrl+Keypad/
1220
Dedent block. Shift+Tab
1221
Delete to start of word. Ctrl+BackSpace
1222
Delete to end of word. Ctrl+Delete
1223
Delete to start of line. Ctrl+Shift+BackSpace
1224
Delete to end of line. Ctrl+Shift+Delete
1225
Go to start of document. Ctrl+Home
1226
Extend selection to start of document. Ctrl+Shift+Home
1227
Go to start of display line. Alt+Home
1228
Extend selection to start of display line. Alt+Shift+Home
1229
Go to end of document. Ctrl+End
1230
Extend selection to end of document. Ctrl+Shift+End
1231
Go to end of display line. Alt+End
1232
Extend selection to end of display line. Alt+Shift+End
1234
Scroll down. Ctrl+Down
1236
Line copy. Ctrl+Shift+T
1237
Line delete. Ctrl+Shift+L
1238
Line transpose with previous. Ctrl+T
1239
Selection duplicate. Ctrl+D
1240
Previous paragraph. Shift extends selection. Ctrl+[
1241
Next paragraph. Shift extends selection. Ctrl+]
1242
Previous word. Shift extends selection. Ctrl+Left
1243
Next word. Shift extends selection. Ctrl+Right
1244
Previous word part. Shift extends selection Ctrl+/
1245
Next word part. Shift extends selection. Ctrl+\
1246
_________________________________________________________
1248
Appendix B. GNU General Public License
1252
The licenses for most software are designed to take away your
1253
freedom to share and change it. By contrast, the GNU General
1254
Public License is intended to guarantee your freedom to share
1255
and change free software - to make sure the software is free
1256
for all its users. This General Public License applies to most
1257
of the Free Software Foundation's software and to any other
1258
program whose authors commit to using it. (Some other Free
1259
Software Foundation software is covered by the GNU Library
1260
General Public License instead.) You can apply it to your
1263
When we speak of free software, we are referring to freedom,
1264
not price. Our General Public Licenses are designed to make
1265
sure that you have the freedom to distribute copies of free
1266
software (and charge for this service if you wish), that you
1267
receive source code or can get it if you want it, that you can
1268
change the software or use pieces of it in new free programs;
1269
and that you know you can do these things.
1271
To protect your rights, we need to make restrictions that
1272
forbid anyone to deny you these rights or to ask you to
1273
surrender the rights. These restrictions translate to certain
1274
responsibilities for you if you distribute copies of the
1275
software, or if you modify it.
1277
For example, if you distribute copies of such a program,
1278
whether gratis or for a fee, you must give the recipients all
1279
the rights that you have. You must make sure that they, too,
1280
receive or can get the source code. And you must show them
1281
these terms so they know their rights.
1283
We protect your rights with two steps:
1285
1. copyright the software, and
1286
2. offer you this license which gives you legal permission to
1287
copy, distribute and/or modify the software.
1289
Also, for each author's protection and ours, we want to make
1290
certain that everyone understands that there is no warranty
1291
for this free software. If the software is modified by someone
1292
else and passed on, we want its recipients to know that what
1293
they have is not the original, so that any problems introduced
1294
by others will not reflect on the original authors'
1297
Finally, any free program is threatened constantly by software
1298
patents. We wish to avoid the danger that redistributors of a
1299
free program will individually obtain patent licenses, in
1300
effect making the program proprietary. To prevent this, we
1301
have made it clear that any patent must be licensed for
1302
everyone's free use or not licensed at all.
1304
The precise terms and conditions for copying, distribution and
1305
modification follow.
1306
_________________________________________________________
1308
B.2. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1312
This License applies to any program or other work which
1313
contains a notice placed by the copyright holder saying it may
1314
be distributed under the terms of this General Public License.
1315
The "Program", below, refers to any such program or work, and
1316
a "work based on the Program " means either the Program or any
1317
derivative work under copyright law: that is to say, a work
1318
containing the Program or a portion of it, either verbatim or
1319
with modifications and/or translated into another language.
1320
(Hereinafter, translation is included without limitation in
1321
the term "modification ".) Each licensee is addressed as
1324
Activities other than copying, distribution and modification
1325
are not covered by this License; they are outside its scope.
1326
The act of running the Program is not restricted, and the
1327
output from the Program is covered only if its contents
1328
constitute a work based on the Program (independent of having
1329
been made by running the Program). Whether that is true
1330
depends on what the Program does.
1331
_________________________________________________________
1335
You may copy and distribute verbatim copies of the Program's
1336
source code as you receive it, in any medium, provided that
1337
you conspicuously and appropriately publish on each copy an
1338
appropriate copyright notice and disclaimer of warranty; keep
1339
intact all the notices that refer to this License and to the
1340
absence of any warranty; and give any other recipients of the
1341
Program a copy of this License along with the Program.
1343
You may charge a fee for the physical act of transferring a
1344
copy, and you may at your option offer warranty protection in
1346
_________________________________________________________
1350
You may modify your copy or copies of the Program or any
1351
portion of it, thus forming a work based on the Program, and
1352
copy and distribute such modifications or work under the terms
1353
of Section 1 above, provided that you also meet all of these
1356
1. You must cause the modified files to carry prominent
1357
notices stating that you changed the files and the date of
1359
2. You must cause any work that you distribute or publish,
1360
that in whole or in part contains or is derived from the
1361
Program or any part thereof, to be licensed as a whole at
1362
no charge to all third parties under the terms of this
1364
3. If the modified program normally reads commands
1365
interactively when run, you must cause it, when started
1366
running for such interactive use in the most ordinary way,
1367
to print or display an announcement including an
1368
appropriate copyright notice and a notice that there is no
1369
warranty (or else, saying that you provide a warranty) and
1370
that users may redistribute the program under these
1371
conditions, and telling the user how to view a copy of
1377
If the Program itself is interactive but does not normally
1378
print such an announcement, your work based on the Program is
1379
not required to print an announcement.)
1381
These requirements apply to the modified work as a whole. If
1382
identifiable sections of that work are not derived from the
1383
Program, and can be reasonably considered independent and
1384
separate works in themselves, then this License, and its
1385
terms, do not apply to those sections when you distribute them
1386
as separate works. But when you distribute the same sections
1387
as part of a whole which is a work based on the Program, the
1388
distribution of the whole must be on the terms of this
1389
License, whose permissions for other licensees extend to the
1390
entire whole, and thus to each and every part regardless of
1393
Thus, it is not the intent of this section to claim rights or
1394
contest your rights to work written entirely by you; rather,
1395
the intent is to exercise the right to control the
1396
distribution of derivative or collective works based on the
1399
In addition, mere aggregation of another work not based on the
1400
Program with the Program (or with a work based on the Program)
1401
on a volume of a storage or distribution medium does not bring
1402
the other work under the scope of this License.
1403
_________________________________________________________
1407
You may copy and distribute the Program (or a work based on
1408
it, under Section 2 in object code or executable form under
1409
the terms of Sections 1 and 2 above provided that you also do
1410
one of the following:
1412
1. Accompany it with the complete corresponding
1413
machine-readable source code, which must be distributed
1414
under the terms of Sections 1 and 2 above on a medium
1415
customarily used for software interchange; or,
1416
2. Accompany it with a written offer, valid for at least
1417
three years, to give any third party, for a charge no more
1418
than your cost of physically performing source
1419
distribution, a complete machine-readable copy of the
1420
corresponding source code, to be distributed under the
1421
terms of Sections 1 and 2 above on a medium customarily
1422
used for software interchange; or,
1423
3. Accompany it with the information you received as to the
1424
offer to distribute corresponding source code. (This
1425
alternative is allowed only for noncommercial distribution
1426
and only if you received the program in object code or
1427
executable form with such an offer, in accord with
1428
Subsection b above.)
1430
The source code for a work means the preferred form of the
1431
work for making modifications to it. For an executable work,
1432
complete source code means all the source code for all modules
1433
it contains, plus any associated interface definition files,
1434
plus the scripts used to control compilation and installation
1435
of the executable. However, as a special exception, the source
1436
code distributed need not include anything that is normally
1437
distributed (in either source or binary form) with the major
1438
components (compiler, kernel, and so on) of the operating
1439
system on which the executable runs, unless that component
1440
itself accompanies the executable.
1442
If distribution of executable or object code is made by
1443
offering access to copy from a designated place, then offering
1444
equivalent access to copy the source code from the same place
1445
counts as distribution of the source code, even though third
1446
parties are not compelled to copy the source along with the
1448
_________________________________________________________
1452
You may not copy, modify, sublicense, or distribute the
1453
Program except as expressly provided under this License. Any
1454
attempt otherwise to copy, modify, sublicense or distribute
1455
the Program is void, and will automatically terminate your
1456
rights under this License. However, parties who have received
1457
copies, or rights, from you under this License will not have
1458
their licenses terminated so long as such parties remain in
1460
_________________________________________________________
1464
You are not required to accept this License, since you have
1465
not signed it. However, nothing else grants you permission to
1466
modify or distribute the Program or its derivative works.
1467
These actions are prohibited by law if you do not accept this
1468
License. Therefore, by modifying or distributing the Program
1469
(or any work based on the Program), you indicate your
1470
acceptance of this License to do so, and all its terms and
1471
conditions for copying, distributing or modifying the Program
1472
or works based on it.
1473
_________________________________________________________
1477
Each time you redistribute the Program (or any work based on
1478
the Program), the recipient automatically receives a license
1479
from the original licensor to copy, distribute or modify the
1480
Program subject to these terms and conditions. You may not
1481
impose any further restrictions on the recipients' exercise of
1482
the rights granted herein. You are not responsible for
1483
enforcing compliance by third parties to this License.
1484
_________________________________________________________
1488
If, as a consequence of a court judgment or allegation of
1489
patent infringement or for any other reason (not limited to
1490
patent issues), conditions are imposed on you (whether by
1491
court order, agreement or otherwise) that contradict the
1492
conditions of this License, they do not excuse you from the
1493
conditions of this License. If you cannot distribute so as to
1494
satisfy simultaneously your obligations under this License and
1495
any other pertinent obligations, then as a consequence you may
1496
not distribute the Program at all. For example, if a patent
1497
license would not permit royalty-free redistribution of the
1498
Program by all those who receive copies directly or indirectly
1499
through you, then the only way you could satisfy both it and
1500
this License would be to refrain entirely from distribution of
1503
If any portion of this section is held invalid or
1504
unenforceable under any particular circumstance, the balance
1505
of the section is intended to apply and the section as a whole
1506
is intended to apply in other circumstances.
1508
It is not the purpose of this section to induce you to
1509
infringe any patents or other property right claims or to
1510
contest validity of any such claims; this section has the sole
1511
purpose of protecting the integrity of the free software
1512
distribution system, which is implemented by public license
1513
practices. Many people have made generous contributions to the
1514
wide range of software distributed through that system in
1515
reliance on consistent application of that system; it is up to
1516
the author/donor to decide if he or she is willing to
1517
distribute software through any other system and a licensee
1518
cannot impose that choice.
1520
This section is intended to make thoroughly clear what is
1521
believed to be a consequence of the rest of this License.
1522
_________________________________________________________
1526
If the distribution and/or use of the Program is restricted in
1527
certain countries either by patents or by copyrighted
1528
interfaces, the original copyright holder who places the
1529
Program under this License may add an explicit geographical
1530
distribution limitation excluding those countries, so that
1531
distribution is permitted only in or among countries not thus
1532
excluded. In such case, this License incorporates the
1533
limitation as if written in the body of this License.
1534
_________________________________________________________
1538
The Free Software Foundation may publish revised and/or new
1539
versions of the General Public License from time to time. Such
1540
new versions will be similar in spirit to the present version,
1541
but may differ in detail to address new problems or concerns.
1543
Each version is given a distinguishing version number. If the
1544
Program specifies a version number of this License which
1545
applies to it and "any later version", you have the option of
1546
following the terms and conditions either of that version or
1547
of any later version published by the Free Software
1548
Foundation. If the Program does not specify a version number
1549
of this License, you may choose any version ever published by
1550
the Free Software Foundation.
1551
_________________________________________________________
1555
If you wish to incorporate parts of the Program into other
1556
free programs whose distribution conditions are different,
1557
write to the author to ask for permission. For software which
1558
is copyrighted by the Free Software Foundation, write to the
1559
Free Software Foundation; we sometimes make exceptions for
1560
this. Our decision will be guided by the two goals of
1561
preserving the free status of all derivatives of our free
1562
software and of promoting the sharing and reuse of software
1564
_________________________________________________________
1566
B.2.12. Section 11 NO WARRANTY
1568
BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
1569
WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
1570
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE
1571
COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS
1572
IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
1573
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
1574
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
1575
ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
1576
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME
1577
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
1578
_________________________________________________________
1582
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
1583
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
1584
MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
1585
LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
1586
INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
1587
INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO
1588
LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES
1589
SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
1590
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR
1591
OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
1594
END OF TERMS AND CONDITIONS
1595
_________________________________________________________
1597
B.3. How to Apply These Terms to Your New Programs
1599
If you develop a new program, and you want it to be of the
1600
greatest possible use to the public, the best way to achieve
1601
this is to make it free software which everyone can
1602
redistribute and change under these terms.
1604
To do so, attach the following notices to the program. It is
1605
safest to attach them to the start of each source file to most
1606
effectively convey the exclusion of warranty; and each file
1607
should have at least the "copyright" line and a pointer to
1608
where the full notice is found.
1610
<one line to give the program's name and a brief idea of what
1611
it does.> Copyright (C) <year> <name of author>
1613
This program is free software; you can redistribute it and/or
1614
modify it under the terms of the GNU General Public License as
1615
published by the Free Software Foundation; either version 2 of
1616
the License, or (at your option) any later version.
1618
This program is distributed in the hope that it will be
1619
useful, but WITHOUT ANY WARRANTY; without even the implied
1620
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
1621
PURPOSE. See the GNU General Public License for more details.
1623
You should have received a copy of the GNU General Public
1624
License along with this program; if not, write to the Free
1625
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
1628
Also add information on how to contact you by electronic and
1631
If the program is interactive, make it output a short notice
1632
like this when it starts in an interactive mode:
1634
Gnomovision version 69, Copyright (C) year name of author
1635
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
1636
type `show w'. This is free software, and you are welcome to
1637
redistribute it under certain conditions; type `show c' for
1640
The hypothetical commands `show w' and `show c' should show
1641
the appropriate parts of the General Public License. Of
1642
course, the commands you use may be called something other
1643
than `show w' and `show c'; they could even be mouse-clicks or
1644
menu items--whatever suits your program.
1646
You should also get your employer (if you work as a
1647
programmer) or your school, if any, to sign a "copyright
1648
disclaimer" for the program, if necessary. Here is a sample;
1651
Yoyodyne, Inc., hereby disclaims all copyright interest in the
1652
program `Gnomovision' (which makes passes at compilers)
1653
written by James Hacker.
1655
<signature of Ty Coon>, 1 April 1989 Ty Coon, President of
1658
This General Public License does not permit incorporating your
1659
program into proprietary programs. If your program is a
1660
subroutine library, you may consider it more useful to permit
1661
linking proprietary applications with the library. If this is
1662
what you want to do, use the GNU Library General Public
1663
License instead of this License.
1664
_________________________________________________________
1666
Appendix C. License for Scintilla and SciTE
1668
Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>
1672
Permission to use, copy, modify, and distribute this software
1673
and its documentation for any purpose and without fee is
1674
hereby granted, provided that the above copyright notice
1675
appear in all copies and that both that copyright notice and
1676
this permission notice appear in supporting documentation.
1678
NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
1679
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1680
AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY
1681
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1682
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
1683
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
1684
ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1685
PERFORMANCE OF THIS SOFTWARE.
2548
``comment_use_indent=false`` would generate this if a line is
2549
commented (e.g. with Ctrl-D)::
2551
# command_example();
2554
Note: This setting only works for single line comments (like '//',
2557
*Example:* ``comment_use_indent=true``
2560
A command which can be executed on a certain word or the current
2561
selection. Example usage: Open the API documentation for the
2562
current function call at the cursor position. The command can
2563
be set for every filetype or if not set, a global command will
2564
be used. The command itself can be specified without the full
2565
path, then it is searched in $PATH. But for security reasons,
2566
it is recommended to specify the full path to the command. The
2567
wildcard %s will be replaced by the current word at the cursor
2568
position or by the current selection.
2570
Hint: for PHP files the following could be quite useful:
2571
context_action_cmd=firefox "http://www.php.net/%s"
2573
*Example:* ``context_action_cmd=devhelp -s "%s"``
2576
[build_settings] Section
2577
````````````````````````
2580
This item specifies the command to compile source code files. But
2581
it is also possible to use it with interpreted languages like Perl
2582
or Python. With these filetypes you can use this option as a kind of
2583
syntax parser, which sends output to the compiler message window.
2585
You should quote the filename to also support filenames with
2586
spaces. The following wildcards for filenames are available:
2588
* %f -- complete filename without path
2589
* %e -- filename without path and without extension
2591
*Example:* ``compiler=gcc -Wall -c "%f"``
2594
This item specifies the command to link the file. If the file is not
2595
already compiled, it will be compiled while linking. The -o option
2596
is automatically added by Geany. This item works well with GNU gcc,
2597
but may be problematic with other compilers (esp. with the linker).
2599
*Example:* ``linker=gcc -Wall "%f"``
2602
Use this item to execute your file. It has to have been built
2603
already. Use the %e wildcard to have only the name of the executable
2604
(i.e. without extension) or use the %f wildcard if you need the
2605
complete filename, e.g. for shell scripts.
2607
*Example:* ``run_cmd="./%e"``
2610
Special file filetypes.common
2611
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2613
There is a special filetype definition file called
2614
filetypes.common. This file defines some general non-filetype-specific
2618
This is the default style. It is used for styling files without a
2621
*Example:* ``default=0x000000;0xffffff;false;false``
2624
The style for colouring selected text. The format is:
2628
* Use foreground colour
2629
* Use background colour
2631
The colours are only set if the 3rd or 4th argument is true. When
2632
the colours are not overridden, the default is a dark grey
2633
background with syntax highlighted foreground text.
2635
*Example:* ``selection=0xc0c0c0;0x00007F;true;true``
2638
The style for brace highlighting when a matching brace was found.
2640
*Example:* ``brace_good=0xff0000;0xFFFFFF;true;false``
2643
The style for brace highlighting when no matching brace was found.
2645
*Example:* ``brace_bad=0x0000ff;0xFFFFFF;true;false``
2648
The style for colouring the caret(the blinking cursor). Only first
2649
and third argument is interpreted.
2650
Set the third argument to true to change the caret into a block caret.
2652
*Example:* ``caret=0x000000;0x0;false;false``
2655
The width for the caret(the blinking cursor). Only the first
2656
argument is interpreted. The width is specified in pixels with
2657
a maximum of three pixel. Use the width 0 to make the caret
2660
*Example:* ``caret=1;0;false;false``
2663
The style for colouring the background of the current line. Only
2664
the second and third arguments are interpreted. The second argument
2665
is the background colour. Use the third argument to enable or
2666
disable background highlighting for the current line (has to be
2669
*Example:* ``current_line=0x0;0xe5e5e5;true;false``
2672
The style for colouring the indentation guides. Only the first and
2673
second arguments are interpreted.
2675
*Example:* ``indent_guide=0xc0c0c0;0xffffff;false;false``
2678
The style for colouring the white space if it is shown. The first
2679
both arguments define the foreground and background colours, the
2680
third argument sets whether to use the defined foreground colour
2681
or to use the colour defined by each filetype for the white space.
2682
The fourth argument defines whether to use the background colour.
2684
*Example:* ``white_space=0xc0c0c0;0xffffff;true;true``
2687
The style of folding icons. Only first and second arguments are
2690
Valid values for the first argument are:
2695
Valid values for the second argument are:
2697
* 1 -- for straight lines
2698
* 2 -- for curved lines
2700
*Example:* ``folding_style=1;1;false;false``
2703
Draw a thin horizontal line at the line where text is folded. Only
2704
first argument is used.
2706
Valid values for the first argument are:
2708
* 0 -- disable, do not draw a line
2709
* 1 -- draw the line above folded text
2710
* 2 -- draw the line below folded text
2712
*Example:* ``folding_horiz_line=0;0;false;false``
2715
Whether to invert all defined colours. This is useful if you like a
2716
dark background colour(e.g. black) and do not want to change every
2717
single line. Please note, at time of writing this was only tested
2718
with the C syntax highlighting.
2720
Only first argument is interpreted. Set it to 1 to invert all
2723
*Example:* ``invert_all=0;0;false;false``
2726
First argument: drawing of visual flags to indicate a line is wrapped.
2727
This is a bitmask of the values:
2729
* 0 -- No visual flags
2730
* 1 -- Visual flag at end of subline of a wrapped line
2731
* 2 -- Visual flag at begin of subline of a wrapped line. Subline is
2732
indented by at least 1 to make room for the flag.
2734
Second argument: wether the visual flags to indicate a line is wrapped
2735
are drawn near the border or near the text. This is a bitmask of the values:
2737
* 0 -- Visual flags drawn near border
2738
* 1 -- Visual flag at end of subline drawn near text
2739
* 2 -- Visual flag at begin of subline drawn near text
2741
Only first and second argument is interpreted.
2743
*Example:* ``line_wrap_visuals=3;0;false;false``
2746
Sets the size of indentation of sublines for wrapped lines in terms
2747
of the width of a space.
2749
Only first argument is interpreted.
2751
*Example:* ``line_wrap_indent=0;0;false;false``
2754
Translucency for the current line (first argument) and the selection
2755
(second argument). Values between 0 and 256 are accepted.
2757
Note for Windows 95, 98 and ME users:
2758
keep this value at 256 to disable translucency otherwise Geany might crash.
2760
Only the first and second argument is interpreted.
2762
*Example:* ``translucency=256;256;false;false``
2765
The style for a highlighted line (e.g when using Goto line or goto tag).
2766
The forground colour (first argument) is only used when the Markers margin
2767
is enabled (see View menu).
2769
Only the first and second argument is interpreted.
2771
*Example:* ``marker_line=0x000000;0xffff00;false;false``
2774
The style for a highlighted search result (e.g when using "Mark" in
2775
Search dialogs). The foreground colour (first argument) is only used
2776
when the Markers margin is enabled (see View menu).
2778
Only the first and second argument is interpreted.
2780
*Example:* ``marker_search=0x000000;0xB8F4B8;false;false``
2783
Translucency for the line marker (first argument) and the search marker
2784
(second argument). Values between 0 and 256 are accepted.
2786
Note for Windows 95, 98 and ME users:
2787
keep this value at 256 to disable translucency otherwise Geany might crash.
2789
Only the first and second argument is interpreted.
2791
*Example:* ``marker_translucency=256;256;false;false``
2794
Characters to treat as whitespace. These characters are ignored
2795
when moving, selecting and deleting across word boundaries
2796
(see `Scintilla keyboard commands`_).
2798
This should include space (\\s) and tab (\\t).
2800
*Example:* ``whitespace_chars=\s\t!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~``
2807
To change the default filetype extension used when saving a new file,
2808
see `Filetype definition files`_.
2810
You can override the list of file extensions that Geany uses for each
2811
filetype using the ``filetype_extensions.conf`` file.
2813
To override the system-wide configuration file, copy it from
2814
``$prefix/share/geany`` to your configuration directory, usually
2815
``~/.geany/``. ``$prefix`` is the path where Geany is installed
2816
(commonly ``/usr/local``).
2820
% cp /usr/local/share/geany/filetype_extensions.conf /home/username/.geany/
2822
Then edit it and remove all the lines for filetype extensions that
2823
you do not want to override. The remaining lines can be edited after
2824
the ``=`` sign, using a semi-colon separated list of patterns which
2825
should be matched for that filetype.
2827
For example, to set the filetype extensions for Make, the
2828
``/home/username/.geany/filetype_extensions.conf`` file should
2832
Make=Makefile*;*.mk;Buildfile;
2839
Geany supports the following templates:
2843
* Function description
2848
To use these templates, just open the Edit menu or open the popup menu
2849
by right-clicking in the editor widget, and choose "Insert Comments"
2850
and insert templates as you want.
2852
Some templates (like File header or ChangeLog entry) will always be
2853
inserted at the top of the file.
2855
To insert a function description, the cursor must be inside
2856
of the function, so that the function name can be determined
2857
automatically. The description will be positioned correctly one line
2858
above the function, just check it out. If the cursor is not inside
2859
of a function or the function name cannot be determined, the inserted
2860
function description won't contain the correct function name but "unknown"
2867
Metadata can be used with all templates, but by default user set
2868
metadata is only used for the ChangeLog and File header templates.
2870
In the configuration dialog you can find a tab "Templates" (see
2871
`Template tab in preferences dialog`_). You can define the
2872
default values which will be inserted in the templates. You should
2873
restart Geany after making changes, because they are only read
2880
Filetype templates are templates used as the basis of a new file. To
2881
use them, choose the *New (with Template)* menu item from the *File*
2884
By default, templates are created for some filetypes. Other filetype
2885
templates can be added by creating the appropriate template file and
2886
restarting Geany. You can also edit the default filetype templates.
2888
Filetype template files are read from the ``~/.geany/templates``
2889
directory, and are named "filetype." followed by the filetype
2890
name, e.g. "filetype.python", "filetype.sh", etc. If you are
2891
unsure about the filetype name extensions, they are the same as
2892
the filetype configuration file extensions, commonly installed in
2893
``/usr/share/geany``, with the prefix "filetypes.".
2895
The file's contents are just the text to place in the document,
2896
except for the optional ``{fileheader}`` template wildcard. This can
2897
be placed anywhere, but is usually on the first line of the file,
2898
followed by a blank line.
2900
There is also a template file ``template.none`` which is used when
2901
the New command is used without a filetype. This is empty by default.
2904
Customizing templates
2905
^^^^^^^^^^^^^^^^^^^^^
2907
Each template can be customized to your needs. The templates are
2908
stored in the ``~/.geany/templates/`` directory (see the section called
2909
`Command line options`_ for further information about the configuration
2910
directory). Just open the desired template with an editor (ideally,
2911
Geany ;-) ) and edit the template to your needs. There are some
2912
wildcards which will be automatically replaced by Geany at startup.
2918
All wildcards must be enclosed by "{" and "}", e.g. {date}.
2920
============== ============================================= ==============
2921
Wildcard Description Available in
2922
============== ============================================= ==============
2923
developer The name of the developer. filetypes, file header, function
2924
description, ChangeLog entry, bsd,
2927
initial The developer's initials, e.g. "ET" for filetypes, file header, function
2928
Enrico Tröger or "JFD" for John Foobar Doe. description, ChangeLog entry, bsd,
2931
mail The email address of the developer. file header, function description,
2932
ChangeLog entry, bsd, gpl
2934
company The company the developer is working for. filetypes, file header, function
2935
description, ChangeLog entry, bsd,
2938
year The current year in the format: YYYY. filetypes, file header, function
2939
description, ChangeLog entry, bsd,
2942
version The initial version of a new file. filetypes, file header, function
2943
description, ChangeLog entry, bsd,
2946
date The current date in the format: YYYY-MM-DD. filetypes, file header, function
2947
description, ChangeLog entry, bsd,
2950
untitled The string "untitled" (this will be filetypes, file header, function
2951
translated to your locale), used in description, ChangeLog entry, bsd,
2952
filetype templates. gpl
2954
geanyversion The actual Geany version, e.g. filetypes, file header, function
2955
"Geany |(version)|". description, ChangeLog entry, bsd,
2958
datetime The current date and time in the format: file header, function description
2959
DD.MM.YYYY HH:mm:ss ZZZZ.
2961
filename The filename of the current file. file header
2963
gpl This wildcard inserts a short GPL notice. file header
2965
bsd This wildcard inserts a BSD licence notice. file header
2967
functionname The function name of the function at the function description
2968
cursor position. This wildcard will only be
2969
replaced in the function description
2972
fileheader The file header template. This wildcard filetypes
2973
will only be replaced in filetype
2975
============== ============================================= ==============
2980
Contributing to this document
2981
=============================
2983
This document (``geany.txt``) is written in `reStructuredText`__
2984
(or "reST"). The source file for it is located in Geany's ``doc``
2985
subdirectory. If you intend on making changes, you should grab the
2986
source right from SVN to make sure you've got the newest version. After
2987
editing the file, to build the HTML document to see how your changes
2988
look, run "``make doc``" in the subdirectory ``doc`` of Geany's source
2989
directory. This regenerates the ``geany.html`` file. To generate a PDF
2990
file, use the command "``make pdf``" which should generate a file called
2991
geany-|(version)|.pdf.
2993
__ http://docutils.sourceforge.net/rst.html
2995
After you are happy with your changes, create a patch::
2997
% svn diff geany.txt > foo.patch
2999
and then submit that file to the mailing list for review.
3001
Note, you will need the Python docutils software package installed
3002
to build the docs. The package is named ``python-docutils`` on Debian
3008
Scintilla keyboard commands
3009
===========================
3011
Copyright © 1998, 2006 Neil Hodgson <neilh(at)scintilla(dot)org>
3013
This appendix is distributed under the terms of the License for
3014
Scintilla and SciTE. A copy of this license can be found in the file
3015
``scintilla/License.txt`` included with the source code of this
3016
program and in the appendix of this document. See `License for
3017
Scintilla and SciTE`_.
3026
Keyboard commands for Scintilla mostly follow common Windows and GTK+
3027
conventions. All move keys (arrows, page up/down, home and end)
3028
allows to extend or reduce the stream selection when holding the
3029
Shift key, and the rectangular selection when holding the Shift and
3030
Ctrl keys. Some keys may not be available with some national keyboards
3031
or because they are taken by the system such as by a window manager
3032
on GTK+. Keyboard equivalents of menu commands are listed in the
3033
menus. Some less common commands with no menu equivalent are:
3035
============================================= ======================
3037
============================================= ======================
3038
Magnify text size. Ctrl+Keypad+
3039
Reduce text size. Ctrl+Keypad-
3040
Restore text size to normal. Ctrl+Keypad/
3042
Dedent block. Shift+Tab
3043
Delete to start of word. Ctrl+BackSpace
3044
Delete to end of word. Ctrl+Delete
3045
Delete to start of line. Ctrl+Shift+BackSpace
3046
Delete to end of line. Ctrl+Shift+Delete
3047
Go to start of document. Ctrl+Home
3048
Extend selection to start of document. Ctrl+Shift+Home
3049
Go to start of display line. Alt+Home
3050
Extend selection to start of display line. Alt+Shift+Home
3051
Go to end of document. Ctrl+End
3052
Extend selection to end of document. Ctrl+Shift+End
3053
Go to end of display line. Alt+End
3054
Extend selection to end of display line. Alt+Shift+End
3055
Previous paragraph. Shift extends selection. Ctrl+Up
3056
Next paragraph. Shift extends selection. Ctrl+Down
3057
Previous word. Shift extends selection. Ctrl+Left
3058
Next word. Shift extends selection. Ctrl+Right
3059
Previous word part. Ctrl+/
3060
Next word part. Ctrl+\\
3061
============================================= ======================
3069
There are some uncommon preferences that are not shown in the Preferences
3070
dialog. These can be set by editing ``~/.geany/geany.conf``, then
3071
restarting Geany. Search for the key name, then edit the value. Example:
3073
``brace_match_ltgt=true``
3075
The table below show the key names of hidden preferences in the
3078
================================ =========================================== ==================
3079
Key Description Default
3080
================================ =========================================== ==================
3082
brace_match_ltgt Whether to highlight <, > angle brackets. false
3083
show_editor_scrollbars Whether to display scrollbars. If set to true
3084
false, the horizontal and vertical
3085
scrollbars are hidden completely.
3086
use_tab_to_indent Whether pressing tab when a line is true
3087
selected will indent the line.
3088
use_gtk_word_boundaries Whether to look for the end of a word when true
3089
using word-boundary related Scintilla
3090
commands (see `Scintilla keyboard
3092
complete_snippets_whilst_editing Whether to allow completion of snippets false
3093
when editing an existing line (i.e. there
3094
is some text after the current cursor
3095
position on the line).
3096
scroll_stop_at_last_line Disable scrolling past end of document false
3098
show_symbol_list_expanders Whether to show or hide the small expander true
3099
icons on the symbol list treeview (only
3100
available with GTK 2.12 or above).
3101
================================ =========================================== ==================
3104
Compile-time options
3105
====================
3107
There are some options which can only be changed at compile time. To
3108
change these options, edit the file src/geany.h. Look for a block of
3109
lines starting with ``#define GEANY_*``. Any definitions which are
3110
not listed here should not be changed.
3113
Most users should not need to change these options.
3115
============================== ============================================ ==================
3116
Option Description Default
3117
============================== ============================================ ==================
3118
GEANY_WORDCHARS These characters define word boundaries when *look at sourcecode*
3119
making selections and searching using word
3121
GEANY_MAX_AUTOCOMPLETE_WORDS How many auto completion suggestions should 30
3123
GEANY_MAX_AUTOCOMPLETE_HEIGHT How many suggestions should be visible in 10
3124
the auto completion list.
3125
GEANY_MIN_SYMBOLLIST_CHARS How many characters you need to type to 4
3126
trigger the auto completion list.
3127
GEANY_PROJECT_EXT The default filename extension for Geany geany
3128
project files. It is used when creating new
3129
projects and as filter mask for the project
3131
GEANY_STRING_UNTITLED A string used as the default name for new untitled
3132
files. Be aware that the string can be
3133
translated, so change it only if you know
3135
GEANY_CHECK_FILE_DELAY Time in seconds between checking a file for 30
3137
GEANY_TOGGLE_MARK A string which is used to mark a toggled "~ "
3140
GEANY_WINDOW_MINIMAL_WIDTH The minimal width of the main window. 620
3141
GEANY_WINDOW_MINIMAL_HEIGHT The minimal height of the main window. 440
3142
GEANY_WINDOW_DEFAULT_WIDTH The default width of the main window at the 900
3144
GEANY_WINDOW_DEFAULT_HEIGHT The default height of the main window at the 600
3147
GEANY_DEFAULT_TOOLS_MAKE The make tool. This can also include a path. "make"
3148
GEANY_DEFAULT_TOOLS_TERMINAL A terminal emulator. It has to accept the "xterm"
3149
command line option "-e". This can also
3151
GEANY_DEFAULT_TOOLS_BROWSER A web browser. This can also include a path. "firefox"
3152
GEANY_DEFAULT_TOOLS_PRINTCMD A printing tool. It should be able to accept "lpr"
3153
and process plain text files. This can also
3155
GEANY_DEFAULT_TOOLS_GREP A grep tool. It should be compatible with "grep"
3156
GNU grep. This can also include a path.
3157
GEANY_DEFAULT_MRU_LENGHTH The length of the "Recent files" list. 10
3158
GEANY_DEFAULT_FONT_SYMBOL_LIST The font used in sidebar to show symbols and "Sans 9"
3160
GEANY_DEFAULT_FONT_MSG_WINDOW The font used in the messages window. "Sans 9"
3161
GEANY_DEFAULT_FONT_EDITOR The font used in the editor window. "Monospace 10"
3162
**Windows specific**
3163
GEANY_USE_WIN32_DIALOG Set this to 1 if you want to use the default 0
3164
Windows file open and save dialogs instead
3165
GTK's file open and save dialogs. The
3166
default Windows file dialogs are missing
3167
some nice features like choosing a filetype
3168
or an encoding. *Do not touch this setting
3169
when building on a non-Win32 system.*
3170
============================== ============================================ ==================
3175
GNU General Public License
3176
==========================
3180
GNU GENERAL PUBLIC LICENSE
3181
Version 2, June 1991
3183
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
3184
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
3185
Everyone is permitted to copy and distribute verbatim copies
3186
of this license document, but changing it is not allowed.
3190
The licenses for most software are designed to take away your
3191
freedom to share and change it. By contrast, the GNU General Public
3192
License is intended to guarantee your freedom to share and change free
3193
software--to make sure the software is free for all its users. This
3194
General Public License applies to most of the Free Software
3195
Foundation's software and to any other program whose authors commit to
3196
using it. (Some other Free Software Foundation software is covered by
3197
the GNU Library General Public License instead.) You can apply it to
3200
When we speak of free software, we are referring to freedom, not
3201
price. Our General Public Licenses are designed to make sure that you
3202
have the freedom to distribute copies of free software (and charge for
3203
this service if you wish), that you receive source code or can get it
3204
if you want it, that you can change the software or use pieces of it
3205
in new free programs; and that you know you can do these things.
3207
To protect your rights, we need to make restrictions that forbid
3208
anyone to deny you these rights or to ask you to surrender the rights.
3209
These restrictions translate to certain responsibilities for you if you
3210
distribute copies of the software, or if you modify it.
3212
For example, if you distribute copies of such a program, whether
3213
gratis or for a fee, you must give the recipients all the rights that
3214
you have. You must make sure that they, too, receive or can get the
3215
source code. And you must show them these terms so they know their
3218
We protect your rights with two steps: (1) copyright the software, and
3219
(2) offer you this license which gives you legal permission to copy,
3220
distribute and/or modify the software.
3222
Also, for each author's protection and ours, we want to make certain
3223
that everyone understands that there is no warranty for this free
3224
software. If the software is modified by someone else and passed on, we
3225
want its recipients to know that what they have is not the original, so
3226
that any problems introduced by others will not reflect on the original
3227
authors' reputations.
3229
Finally, any free program is threatened constantly by software
3230
patents. We wish to avoid the danger that redistributors of a free
3231
program will individually obtain patent licenses, in effect making the
3232
program proprietary. To prevent this, we have made it clear that any
3233
patent must be licensed for everyone's free use or not licensed at all.
3235
The precise terms and conditions for copying, distribution and
3236
modification follow.
3238
GNU GENERAL PUBLIC LICENSE
3239
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
3241
0. This License applies to any program or other work which contains
3242
a notice placed by the copyright holder saying it may be distributed
3243
under the terms of this General Public License. The "Program", below,
3244
refers to any such program or work, and a "work based on the Program"
3245
means either the Program or any derivative work under copyright law:
3246
that is to say, a work containing the Program or a portion of it,
3247
either verbatim or with modifications and/or translated into another
3248
language. (Hereinafter, translation is included without limitation in
3249
the term "modification".) Each licensee is addressed as "you".
3251
Activities other than copying, distribution and modification are not
3252
covered by this License; they are outside its scope. The act of
3253
running the Program is not restricted, and the output from the Program
3254
is covered only if its contents constitute a work based on the
3255
Program (independent of having been made by running the Program).
3256
Whether that is true depends on what the Program does.
3258
1. You may copy and distribute verbatim copies of the Program's
3259
source code as you receive it, in any medium, provided that you
3260
conspicuously and appropriately publish on each copy an appropriate
3261
copyright notice and disclaimer of warranty; keep intact all the
3262
notices that refer to this License and to the absence of any warranty;
3263
and give any other recipients of the Program a copy of this License
3264
along with the Program.
3266
You may charge a fee for the physical act of transferring a copy, and
3267
you may at your option offer warranty protection in exchange for a fee.
3269
2. You may modify your copy or copies of the Program or any portion
3270
of it, thus forming a work based on the Program, and copy and
3271
distribute such modifications or work under the terms of Section 1
3272
above, provided that you also meet all of these conditions:
3274
a) You must cause the modified files to carry prominent notices
3275
stating that you changed the files and the date of any change.
3277
b) You must cause any work that you distribute or publish, that in
3278
whole or in part contains or is derived from the Program or any
3279
part thereof, to be licensed as a whole at no charge to all third
3280
parties under the terms of this License.
3282
c) If the modified program normally reads commands interactively
3283
when run, you must cause it, when started running for such
3284
interactive use in the most ordinary way, to print or display an
3285
announcement including an appropriate copyright notice and a
3286
notice that there is no warranty (or else, saying that you provide
3287
a warranty) and that users may redistribute the program under
3288
these conditions, and telling the user how to view a copy of this
3289
License. (Exception: if the Program itself is interactive but
3290
does not normally print such an announcement, your work based on
3291
the Program is not required to print an announcement.)
3293
These requirements apply to the modified work as a whole. If
3294
identifiable sections of that work are not derived from the Program,
3295
and can be reasonably considered independent and separate works in
3296
themselves, then this License, and its terms, do not apply to those
3297
sections when you distribute them as separate works. But when you
3298
distribute the same sections as part of a whole which is a work based
3299
on the Program, the distribution of the whole must be on the terms of
3300
this License, whose permissions for other licensees extend to the
3301
entire whole, and thus to each and every part regardless of who wrote it.
3303
Thus, it is not the intent of this section to claim rights or contest
3304
your rights to work written entirely by you; rather, the intent is to
3305
exercise the right to control the distribution of derivative or
3306
collective works based on the Program.
3308
In addition, mere aggregation of another work not based on the Program
3309
with the Program (or with a work based on the Program) on a volume of
3310
a storage or distribution medium does not bring the other work under
3311
the scope of this License.
3313
3. You may copy and distribute the Program (or a work based on it,
3314
under Section 2) in object code or executable form under the terms of
3315
Sections 1 and 2 above provided that you also do one of the following:
3317
a) Accompany it with the complete corresponding machine-readable
3318
source code, which must be distributed under the terms of Sections
3319
1 and 2 above on a medium customarily used for software interchange; or,
3321
b) Accompany it with a written offer, valid for at least three
3322
years, to give any third party, for a charge no more than your
3323
cost of physically performing source distribution, a complete
3324
machine-readable copy of the corresponding source code, to be
3325
distributed under the terms of Sections 1 and 2 above on a medium
3326
customarily used for software interchange; or,
3328
c) Accompany it with the information you received as to the offer
3329
to distribute corresponding source code. (This alternative is
3330
allowed only for noncommercial distribution and only if you
3331
received the program in object code or executable form with such
3332
an offer, in accord with Subsection b above.)
3334
The source code for a work means the preferred form of the work for
3335
making modifications to it. For an executable work, complete source
3336
code means all the source code for all modules it contains, plus any
3337
associated interface definition files, plus the scripts used to
3338
control compilation and installation of the executable. However, as a
3339
special exception, the source code distributed need not include
3340
anything that is normally distributed (in either source or binary
3341
form) with the major components (compiler, kernel, and so on) of the
3342
operating system on which the executable runs, unless that component
3343
itself accompanies the executable.
3345
If distribution of executable or object code is made by offering
3346
access to copy from a designated place, then offering equivalent
3347
access to copy the source code from the same place counts as
3348
distribution of the source code, even though third parties are not
3349
compelled to copy the source along with the object code.
3351
4. You may not copy, modify, sublicense, or distribute the Program
3352
except as expressly provided under this License. Any attempt
3353
otherwise to copy, modify, sublicense or distribute the Program is
3354
void, and will automatically terminate your rights under this License.
3355
However, parties who have received copies, or rights, from you under
3356
this License will not have their licenses terminated so long as such
3357
parties remain in full compliance.
3359
5. You are not required to accept this License, since you have not
3360
signed it. However, nothing else grants you permission to modify or
3361
distribute the Program or its derivative works. These actions are
3362
prohibited by law if you do not accept this License. Therefore, by
3363
modifying or distributing the Program (or any work based on the
3364
Program), you indicate your acceptance of this License to do so, and
3365
all its terms and conditions for copying, distributing or modifying
3366
the Program or works based on it.
3368
6. Each time you redistribute the Program (or any work based on the
3369
Program), the recipient automatically receives a license from the
3370
original licensor to copy, distribute or modify the Program subject to
3371
these terms and conditions. You may not impose any further
3372
restrictions on the recipients' exercise of the rights granted herein.
3373
You are not responsible for enforcing compliance by third parties to
3376
7. If, as a consequence of a court judgment or allegation of patent
3377
infringement or for any other reason (not limited to patent issues),
3378
conditions are imposed on you (whether by court order, agreement or
3379
otherwise) that contradict the conditions of this License, they do not
3380
excuse you from the conditions of this License. If you cannot
3381
distribute so as to satisfy simultaneously your obligations under this
3382
License and any other pertinent obligations, then as a consequence you
3383
may not distribute the Program at all. For example, if a patent
3384
license would not permit royalty-free redistribution of the Program by
3385
all those who receive copies directly or indirectly through you, then
3386
the only way you could satisfy both it and this License would be to
3387
refrain entirely from distribution of the Program.
3389
If any portion of this section is held invalid or unenforceable under
3390
any particular circumstance, the balance of the section is intended to
3391
apply and the section as a whole is intended to apply in other
3394
It is not the purpose of this section to induce you to infringe any
3395
patents or other property right claims or to contest validity of any
3396
such claims; this section has the sole purpose of protecting the
3397
integrity of the free software distribution system, which is
3398
implemented by public license practices. Many people have made
3399
generous contributions to the wide range of software distributed
3400
through that system in reliance on consistent application of that
3401
system; it is up to the author/donor to decide if he or she is willing
3402
to distribute software through any other system and a licensee cannot
3405
This section is intended to make thoroughly clear what is believed to
3406
be a consequence of the rest of this License.
3408
8. If the distribution and/or use of the Program is restricted in
3409
certain countries either by patents or by copyrighted interfaces, the
3410
original copyright holder who places the Program under this License
3411
may add an explicit geographical distribution limitation excluding
3412
those countries, so that distribution is permitted only in or among
3413
countries not thus excluded. In such case, this License incorporates
3414
the limitation as if written in the body of this License.
3416
9. The Free Software Foundation may publish revised and/or new versions
3417
of the General Public License from time to time. Such new versions will
3418
be similar in spirit to the present version, but may differ in detail to
3419
address new problems or concerns.
3421
Each version is given a distinguishing version number. If the Program
3422
specifies a version number of this License which applies to it and "any
3423
later version", you have the option of following the terms and conditions
3424
either of that version or of any later version published by the Free
3425
Software Foundation. If the Program does not specify a version number of
3426
this License, you may choose any version ever published by the Free Software
3429
10. If you wish to incorporate parts of the Program into other free
3430
programs whose distribution conditions are different, write to the author
3431
to ask for permission. For software which is copyrighted by the Free
3432
Software Foundation, write to the Free Software Foundation; we sometimes
3433
make exceptions for this. Our decision will be guided by the two goals
3434
of preserving the free status of all derivatives of our free software and
3435
of promoting the sharing and reuse of software generally.
3439
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
3440
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
3441
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
3442
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
3443
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
3444
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
3445
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
3446
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
3447
REPAIR OR CORRECTION.
3449
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
3450
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
3451
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
3452
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
3453
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
3454
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
3455
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
3456
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
3457
POSSIBILITY OF SUCH DAMAGES.
3459
END OF TERMS AND CONDITIONS
3461
How to Apply These Terms to Your New Programs
3463
If you develop a new program, and you want it to be of the greatest
3464
possible use to the public, the best way to achieve this is to make it
3465
free software which everyone can redistribute and change under these terms.
3467
To do so, attach the following notices to the program. It is safest
3468
to attach them to the start of each source file to most effectively
3469
convey the exclusion of warranty; and each file should have at least
3470
the "copyright" line and a pointer to where the full notice is found.
3472
<one line to give the program's name and a brief idea of what it does.>
3473
Copyright (C) <year> <name of author>
3475
This program is free software; you can redistribute it and/or modify
3476
it under the terms of the GNU General Public License as published by
3477
the Free Software Foundation; either version 2 of the License, or
3478
(at your option) any later version.
3480
This program is distributed in the hope that it will be useful,
3481
but WITHOUT ANY WARRANTY; without even the implied warranty of
3482
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3483
GNU General Public License for more details.
3485
You should have received a copy of the GNU General Public License
3486
along with this program; if not, write to the Free Software
3487
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
3490
Also add information on how to contact you by electronic and paper mail.
3492
If the program is interactive, make it output a short notice like this
3493
when it starts in an interactive mode:
3495
Gnomovision version 69, Copyright (C) year name of author
3496
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
3497
This is free software, and you are welcome to redistribute it
3498
under certain conditions; type `show c' for details.
3500
The hypothetical commands `show w' and `show c' should show the appropriate
3501
parts of the General Public License. Of course, the commands you use may
3502
be called something other than `show w' and `show c'; they could even be
3503
mouse-clicks or menu items--whatever suits your program.
3505
You should also get your employer (if you work as a programmer) or your
3506
school, if any, to sign a "copyright disclaimer" for the program, if
3507
necessary. Here is a sample; alter the names:
3509
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
3510
`Gnomovision' (which makes passes at compilers) written by James Hacker.
3512
<signature of Ty Coon>, 1 April 1989
3513
Ty Coon, President of Vice
3515
This General Public License does not permit incorporating your program into
3516
proprietary programs. If your program is a subroutine library, you may
3517
consider it more useful to permit linking proprietary applications with the
3518
library. If this is what you want to do, use the GNU Library General
3519
Public License instead of this License.
3524
License for Scintilla and SciTE
3525
===============================
3527
Copyright 1998-2003 by Neil Hodgson <neilh(at)scintilla(dot)org>
3531
Permission to use, copy, modify, and distribute this software and
3532
its documentation for any purpose and without fee is hereby granted,
3533
provided that the above copyright notice appear in all copies and
3534
that both that copyright notice and this permission notice appear in
3535
supporting documentation.
3537
NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
3538
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
3539
NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
3540
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
3541
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
3542
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
3543
USE OR PERFORMANCE OF THIS SOFTWARE.