Some corrections to the Filetypes section

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@403 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2006-06-03 21:41:15 +00:00
parent a1a029eb94
commit 067f3e1232
2 changed files with 40 additions and 37 deletions

View File

@ -9,6 +9,7 @@
* doc/geany.docbook: More minor corrections/rewording. * doc/geany.docbook: More minor corrections/rewording.
Added Build System section. Added Build System section.
Some corrections to the Filetypes section.
2006-06-02 Enrico Troeger <enrico.troeger@uvena.de> 2006-06-02 Enrico Troeger <enrico.troeger@uvena.de>

View File

@ -961,14 +961,15 @@
compiler and linker settings. compiler and linker settings.
</para> </para>
<para> <para>
The files can be found in <filename>$prefix/share/geany</filename> and are called The system-wide configuration files can be found in
<filename>filetypes.$ext</filename>. Where $prefix is the path where <filename>$prefix/share/geany</filename> and are called
<application>&app;</application> is installed, commonly <filename>filetypes.$ext</filename>, where $prefix is the path where
<filename>/usr/local</filename>filename>, and $ext is the name of the filetype. <application>&app;</application> is installed (commonly
There is for every filetype a corresponding defintion file. There is one exception: <filename>/usr/local</filename>) and $ext is the name of the filetype.
<filename>filetypes.common</filename> - in this file are general settings, which For every filetype there is a corresponding definition file. There is one exception:
are specific to a certain filetype. It is not recommend to edit this files, because <filename>filetypes.common</filename> - this file is for general settings, which
while updating Geany the will be overridden. are not specific to a certain filetype. It is not recommended to edit the
system-wide files, because they will be overridden when Geany is updated.
</para> </para>
<para> <para>
To change the settings, copy a file from <filename>$prefix/share/geany</filename> To change the settings, copy a file from <filename>$prefix/share/geany</filename>
@ -983,19 +984,19 @@
directory. Alternatively, you can create a file directory. Alternatively, you can create a file
<filename>~/.geany/filedefs/filetypes.X</filename> and add only these settings you <filename>~/.geany/filedefs/filetypes.X</filename> and add only these settings you
want to change. All missing settings will be read from the corresponding global want to change. All missing settings will be read from the corresponding global
defintion file in <filename>$prefix/share/geany</filename>. definition file in <filename>$prefix/share/geany</filename>.
</para> </para>
<section id="filetypes_format"> <section id="filetypes_format">
<title>Format</title> <title>Format</title>
<section> <section>
<title>Section [styling]</title> <title>[styling] Section</title>
<para> <para>
In this section the colours for syntax highlighting are defined. In this section the colours for syntax highlighting are defined.
The format is always: The format is always:
<constant>key=forground_colour;background_colour;bold;italic</constant> <constant>key=forground_colour;background_colour;bold;italic</constant>
</para> </para>
<para> <para>
Colours have to be specified as RGB hex values introduced by 0x. For Colours have to be specified as RGB hex values prefixed by 0x. For
example red is 0xff0000, blue is 0x0000ff. The values are case-insensitive, example red is 0xff0000, blue is 0x0000ff. The values are case-insensitive,
but it is a good idea to use small letters. Bold and italic are flags and but it is a good idea to use small letters. Bold and italic are flags and
should only be "true" or "false". If their value is something other than should only be "true" or "false". If their value is something other than
@ -1003,17 +1004,17 @@
</para> </para>
</section> </section>
<section> <section>
<title>Section [keywords]</title> <title>[keywords] Section</title>
<para> <para>
This section contains keys for different keyword lists specific to the This section contains keys for different keyword lists specific to the
filetype. Some filetypes do not support keywords, so adding a new key will filetype. Some filetypes do not support keywords, so adding a new key will
not work. You only could add or remove keywords to/from the list. not work. You can only add or remove keywords to/from an existing list.
<important><para>The keywords list must be in one line without line ending <important><para>The keywords list must be in one line without line ending
characters.</para></important> characters.</para></important>
</para> </para>
</section> </section>
<section> <section>
<title>Section [settings]</title> <title>[settings] Section</title>
<para> <para>
<table frame="all"> <table frame="all">
<title>General settings</title> <title>General settings</title>
@ -1038,7 +1039,7 @@
<row> <row>
<entry>comment_open</entry> <entry>comment_open</entry>
<entry>A character or string which is used to comment code. <entry>A character or string which is used to comment code.
If you want to use multiline comments, set also If you want to use multiline comments, also set
comment_close, otherwise leave it empty. comment_close, otherwise leave it empty.
</entry> </entry>
<entry>comment_open=/*</entry> <entry>comment_open=/*</entry>
@ -1054,20 +1055,20 @@
<entry>comment_use_indent</entry> <entry>comment_use_indent</entry>
<entry>Set this to false if a comment character or string <entry>Set this to false if a comment character or string
should start at column 0 of a line. If set to true should start at column 0 of a line. If set to true
it uses any indention of the line. it uses any indentation of the line.
<para><example><title>Comment indention</title> <para><example><title>Comment indentation</title>
<para> <para>
comment_use_indent=true would generate this if a line comment_use_indent=true would generate this if a line
if commented(e.g. with is commented (e.g. with
<keycombo><keycap>Ctrl</keycap><keycap>D</keycap></keycombo>) <keycombo><keycap>Ctrl</keycap><keycap>D</keycap></keycombo>)
<programlisting> #command_example();</programlisting> <programlisting> #command_example();</programlisting>
comment_use_indent=false would generate this if a line comment_use_indent=false would generate this if a line
if commented(e.g. with is commented (e.g. with
<keycombo><keycap>Ctrl</keycap><keycap>D</keycap></keycombo>) <keycombo><keycap>Ctrl</keycap><keycap>D</keycap></keycombo>)
<programlisting>#command_example();</programlisting> <programlisting>#command_example();</programlisting>
</para></example></para> </para></example></para>
<note><para> <note><para>
This setting works only for single line comments. This setting only works for single line comments.
</para></note> </para></note>
</entry> </entry>
<entry>comment_use_indent=true</entry> <entry>comment_use_indent=true</entry>
@ -1078,7 +1079,7 @@
</para> </para>
</section> </section>
<section> <section>
<title>Section [build_settings]</title> <title>[build_settings] Section</title>
<para> <para>
<table frame="all"> <table frame="all">
<title>Build settings</title> <title>Build settings</title>
@ -1100,9 +1101,9 @@
files. But it is also possible to use it with files. But it is also possible to use it with
interpreted languages like Perl or Python. With these interpreted languages like Perl or Python. With these
filetypes you can use this option as a kind of syntax filetypes you can use this option as a kind of syntax
parser, which does his output in the compiler message parser, which sends output to the compiler message
window. window.
<para>You should quote the filename to support also <para>You should quote the filename to also support
filenames with spaces. The following wildcards for filenames with spaces. The following wildcards for
filenames are available: filenames are available:
</para> </para>
@ -1126,16 +1127,17 @@
compiled while linking. The -o option is compiled while linking. The -o option is
automatically added by automatically added by
<application>&app;</application>. This item works <application>&app;</application>. This item works
well with the gcc, but may be problemtic with other well with GNU gcc, but may be problematic with other
compilers(resp. linker). compilers (esp. with the linker).
</entry> </entry>
<entry>linker=gcc -Wall "%f"</entry> <entry>linker=gcc -Wall "%f"</entry>
</row> </row>
<row> <row>
<entry>run_cmd</entry> <entry>run_cmd</entry>
<entry>Use this item to execute your file. It has to been <entry>Use this item to execute your file. It has to have been
built. Use the %e wildcard to have only the name of built already.
the executable(i.e. without extension) or use the %f Use the %e wildcard to have only the name of
the executable (i.e. without extension) or use the %f
wildcard if you need the complete filename, e.g. wildcard if you need the complete filename, e.g.
for shell scripts. for shell scripts.
</entry> </entry>
@ -1150,8 +1152,8 @@
<section id="filetypes_common"> <section id="filetypes_common">
<title>Special file filetypes.common</title> <title>Special file filetypes.common</title>
<para>There is a special filetype definition file called <para>There is a special filetype definition file called
<filename>filetypes.common</filename>. In this file are some general none <filename>filetypes.common</filename>. This file defines some general
filetype-specific settings defined. non-filetype-specific settings.
</para> </para>
<para> <para>
<table frame="all"> <table frame="all">
@ -1169,9 +1171,9 @@
<tbody> <tbody>
<row> <row>
<entry>default</entry> <entry>default</entry>
<entry>The default style for text(e.g. for files without <entry>The default style for text (e.g. for files without
filetype). For the detailed format, please see above filetype). For the detailed format, please see the above
"Section [styling]". "[styling] Section".
</entry> </entry>
<entry>default=0x000000;0xffffff;false;false</entry> <entry>default=0x000000;0xffffff;false;false</entry>
</row> </row>
@ -1184,14 +1186,14 @@
</row> </row>
<row> <row>
<entry>brace_good</entry> <entry>brace_good</entry>
<entry>The style for brace highlighting. It is used if a <entry>The style for brace highlighting when a
matching brace was found. matching brace was found.
</entry> </entry>
<entry>brace_good=0xff0000;0xFFFFFF;true;false</entry> <entry>brace_good=0xff0000;0xFFFFFF;true;false</entry>
</row> </row>
<row> <row>
<entry>brace_bad</entry> <entry>brace_bad</entry>
<entry>The style for brace highlighting. It is used if no <entry>The style for brace highlighting when no
matching brace was found. matching brace was found.
</entry> </entry>
<entry>brace_bad=0x0000ff;0xFFFFFF;true;false</entry> <entry>brace_bad=0x0000ff;0xFFFFFF;true;false</entry>
@ -1208,7 +1210,7 @@
<entry>The style of folding icons. Only first and second <entry>The style of folding icons. Only first and second
arguments are used. arguments are used.
<para> <para>
Valid values for the first argument areare: Valid values for the first argument are:
<itemizedlist> <itemizedlist>
<listitem><para> <listitem><para>
1 - for boxes 1 - for boxes
@ -1219,7 +1221,7 @@
</itemizedlist> </itemizedlist>
</para> </para>
<para> <para>
Valid values for the second argument areare: Valid values for the second argument are:
<itemizedlist> <itemizedlist>
<listitem><para> <listitem><para>
1 - for straight lines 1 - for straight lines