Add 'Configuration file paths' section and link to it instead of

repeating typical system data and user config directory paths.
List 2 Tools->Configuration Files menu items.
Add 'Plugin Manager' section break.
Edit some related sections.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5473 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2010-12-07 17:42:31 +00:00
parent b595c0a3d8
commit e8dba2dc31
3 changed files with 630 additions and 609 deletions

View File

@ -10,6 +10,12 @@
* src/main.c:
Disable 'Send Selection to Terminal' item when not available
instead of removing it to avoid trailing separator.
* doc/geany.txt, doc/geany.html:
Add 'Configuration file paths' section and link to it instead of
repeating typical system data and user config directory paths.
List 2 Tools->Configuration Files menu items.
Add 'Plugin Manager' section break.
Edit some related sections.
2010-12-06 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>

File diff suppressed because it is too large Load Diff

View File

@ -234,17 +234,19 @@ help from your distribution.
Installation prefix
-------------------
If you want to edit any of Geany's system configuration files after
installation you will need to know the installation prefix. Usually this
is not necessary as you can just use per user configuration files and
you will not need root permissions.
If you want to find Geany's system files after installation you may
want to know the installation prefix.
Use the ``--print-prefix`` option to Geany to check - see `Command line
options`_. The first path is the prefix.
Pass the ``--print-prefix`` option to Geany to check this - see
`Command line options`_. The first path is the prefix.
This is commonly ``/usr`` if you installed from a binary package, or
``/usr/local`` if you build from source.
On Unix-like systems this is commonly ``/usr`` if you installed from
a binary package, or ``/usr/local`` if you build from source.
.. note::
Editing system files is not necessary as you can use the
per-user configuration files instead, which don't need root
permissions. See `Configuration files`_.
Usage
@ -352,7 +354,7 @@ Short option Long option Function
-p --no-plugins Do not load plugins or plugin support.
*none* --print-prefix Print installation prefix, the data directory, the lib
directory and the locale directory (in this order) to
directory and the locale directory (in that order) to
stdout, one line each. This is mainly intended for plugin
authors to detect installation paths.
@ -1007,28 +1009,18 @@ Maybe you need to often type your name, so define a snippet like this::
Every time you write ``myname`` <TAB> in Geany, it will replace "myname"
with "Enrico Tröger". The key to start autocompletion can be changed
in the preferences dialog, by default it is TAB. The corresponding keybinding
is called ``Complete snippet``.
is called `Complete snippet`.
**Paths**
The system-wide configuration file can be found in
``$prefix/share/geany``, where ``$prefix`` is the path where Geany is
installed (see `Installation prefix`_). It is not recommended to edit the
system-wide file, because it will be overridden when Geany is updated.
You can override the default snippets using the user
``snippets.conf`` file. Use the *Tools->Configuration
Files->snippets.conf* menu item. See also `Configuration file paths`_.
To change the settings, copy the file from ``$prefix/share/geany``
in your configuration directory (usually ``~/.config/geany/``).
For example::
% cp /usr/local/share/geany/snippets.conf /home/username/.config/geany/
Then you can edit the file and the changes will remain available
after an update of Geany because the file resides in your
configuration directory. Alternatively, you can create a file
``~/.config/geany/snippets.conf`` and add only these settings you want
to change. All missing settings will be read from the global snippets
file in ``$prefix/share/geany``.
This adds the default settings to the user file if the file doesn't
exist. Alternatively the file can be created manually, adding only
the settings you want to change. All missing settings will be read
from the system snippets file.
**Snippet groups**
@ -1065,7 +1057,7 @@ will be replaced when using the snippet:
%cursor% Place the cursor at this position after completion has
been done. You can define multiple %cursor% wildcards
and use the keybinding ``Move cursor in snippet`` to jump
and use the keybinding `Move cursor in snippet` to jump
to the next defined cursor position in the completed
snippet.
@ -1509,11 +1501,8 @@ the library.
You can load a custom global tags file in two ways:
* Using the *Load Tags* command in the Tools menu.
* By creating a directory ``~/.config/geany/tags``, and moving or symlinking
the tags files there before starting Geany.
* By creating a directory ``$prefix/share/geany/tags``, and moving
or symlinking the tags files there before starting Geany.
``$prefix`` is the installation prefix (see `Installation prefix`_).
* By moving or symlinking tags files to the ``tags`` subdirectory of
one of the `configuration file paths`_ before starting Geany.
You can either download these files or generate your own. They have
the format::
@ -2833,8 +2822,8 @@ It is currently not possible to bind keyboard shortcuts to more than these menu
You can also use underlines in the labels to set mnemonic characters.
Configuration Files
```````````````````
Old settings
````````````
The configurable Build Menu capability was introduced in Geany 0.19 and
required a new section to be added to the configuration files (See
@ -2917,21 +2906,25 @@ general preference is set. There is also a command-line option,
``-p``, which prevents plugins being loaded. Plugins are scanned in
the following directories:
* ``$prefix/lib/geany`` (see `Installation prefix`_)
* ``~/.config/geany/plugins``
* ``$prefix/lib/geany`` (see `Installation prefix`_)
* The ``plugins`` subfolder of the user configuration directory - see
`Configuration file paths`_.
* The `Extra plugin path` preference (usually blank) - see `Paths`_.
Most plugins add menu items to the *Tools* menu when they are loaded.
Since Geany 0.13, there is a Plugin Manager to let you choose which plugins
See also `Plugin documentation`_ for information about single plugins
which are included in Geany.
Plugin Manager
^^^^^^^^^^^^^^
The Plugin Manager dialog lets you choose which plugins
should be loaded at startup. You can also load and unload plugins on the
fly using this dialog. Once you click the checkbox for a specific plugin
in the dialog, it is loaded or unloaded according to its previous state.
By default, no plugins are loaded at startup until you select some.
You can also configure some plugin specific options when the plugin
provides some.
See also `Plugin documentation`_ for information about single plugins
which are included in Geany.
You can also configure some plugin specific options if the plugin
provides any.
Keybindings
@ -3477,6 +3470,37 @@ Configuration files
You must use UTF-8 encoding *without BOM* for configuration files.
Configuration file paths
------------------------
Geany has default configuration files installed for the system and
also per-user configuration files.
The system files should not normally be edited because they will be
overwritten when upgrading Geany.
The user configuration directory can be overridden with the ``-c``
switch, but this is not normally done. See `Command line options`_.
.. note::
Any missing subdirectories in the user configuration directory
will be created when Geany starts.
You can check the paths Geany is using with *Help->Debug Messages*.
Near the top there should be 2 lines with something like::
Geany-INFO: System data dir: /usr/share/geany
Geany-INFO: User config dir: /home/username/.config/geany
Paths on Unix-like systems
^^^^^^^^^^^^^^^^^^^^^^^^^^
The system path is ``$prefix/share/geany``, where ``$prefix`` is the
path where Geany is installed (see `Installation prefix`_).
The user configuration directory is normally
``/home/username/.config/geany/``.
Tools menu items
----------------
There's a *Configuration files* submenu in the *Tools* menu that
@ -3504,17 +3528,14 @@ template files.
Global configuration file
-------------------------
There is a global configuration file for Geany which will be used for
any settings not defined in the users local configuration file.
Settings present in the local configuration file override those in the global
file.
System administrators can add a global configuration file for Geany
which will be used when starting Geany and a user configuration file
does not exist.
The global configuration file is read from
``$prefix/share/geany/geany.conf`` (where ``$prefix`` is the path where
Geany is installed, see `Installation prefix`_) when starting Geany and
an user configuration file does not exist. It can contain any settings
which are found in the usual configuration file created by Geany but
does not have to contain all settings.
The global configuration file is read from ``geany.conf`` in the
system configuration path - see `Configuration file paths`_. It can
contain any settings which are found in the usual configuration file
created by Geany, but does not have to contain all settings.
.. note::
This feature is mainly intended for package maintainers or system
@ -3532,6 +3553,8 @@ stored in the filetype definition files. Those settings are colors
for syntax highlighting, general settings like comment characters or
word delimiter characters as well as compiler and linker settings.
See also `Configuration file paths`_.
Custom filetypes
^^^^^^^^^^^^^^^^
At startup Geany looks for ``filetypes.*.conf`` files in the system and
@ -3552,10 +3575,9 @@ have been implemented:
System files
^^^^^^^^^^^^
The system-wide configuration files can be found in
``$prefix/share/geany`` and are called ``filetypes.$ext``,
where ``$prefix`` is the path where Geany is installed (see
`Installation prefix`_) and $ext is the name of the filetype. For every
The system-wide filetype configuration files can be found in the
system configuration path and are called ``filetypes.$ext``,
where $ext is the name of the filetype. For every
filetype there is a corresponding definition file. There is one
exception: ``filetypes.common`` -- this file is for general settings,
which are not specific to a certain filetype.
@ -3566,21 +3588,14 @@ which are not specific to a certain filetype.
User files
^^^^^^^^^^
To change the settings, copy a file from ``$prefix/share/geany`` to
the subdirectory filedefs in your configuration directory (usually
``~/.config/geany/``).
For example::
% cp /usr/local/share/geany/filetypes.c /home/username/.config/geany/filedefs/
Then you can edit the file and the changes are also
available after an update of Geany because they reside in your
configuration directory. Alternatively, you can create a file
``~/.config/geany/filedefs/filetypes.X`` and add only these settings you want
to change. All missing settings will be read from the corresponding
global definition file in ``$prefix/share/geany``.
To change the settings, copy a file from the system configuration
path to the subdirectory ``filedefs`` in your user configuration
directory. Then you can edit the file and the changes will still be
available after an update of Geany.
Alternatively, you can create the file yourself and add only the
settings you want to change. All missing settings will be read from
the corresponding system configuration file.
Filetype configuration
@ -4089,26 +4104,19 @@ Filetype extensions
To change the default filetype extension used when saving a new file,
see `Filetype definition files`_.
You can override the list of file extensions that Geany uses for each
filetype using the ``filetype_extensions.conf`` file.
You can override the list of file extensions that Geany uses to detect
filetypes using the user ``filetype_extensions.conf`` file. Use the
*Tools->Configuration Files->filetype_extensions.conf* menu item. See
also `Configuration file paths`_.
To override the system-wide configuration file, copy it from
``$prefix/share/geany`` to your configuration directory, usually
``~/.config/geany/``. ``$prefix`` is the path where Geany is installed
(see `Installation prefix`_).
You should only list lines for filetype extensions that you want to
override in the user configuration file and remove or comment out
others. The patterns are listed after the ``=`` sign, using a
semi-colon separated list of patterns which should be matched for
that filetype.
For example::
% cp /usr/local/share/geany/filetype_extensions.conf /home/username/.config/geany/
Then edit it and remove all the lines for filetype extensions that
you do not want to override. The remaining lines can be edited after
the ``=`` sign, using a semi-colon separated list of patterns which
should be matched for that filetype.
For example, to set the filetype extensions for Make, the
``/home/username/.config/geany/filetype_extensions.conf`` file should
look like::
For example, to override the filetype extensions for Make, the file
should look like::
[Extensions]
Make=Makefile*;*.mk;Buildfile;
@ -4116,10 +4124,10 @@ look like::
Preferences File Format
-----------------------
The preferences file ``~/.config/geany/geany.conf`` holds settings for all the items configured
The user preferences file ``geany.conf`` holds settings for all the items configured
in the preferences dialog. This file should not be edited while Geany is running
as the file will be overwritten when the preferences in Geany are changed or Geany
is quitted.
is quit.
Hidden preferences
@ -4152,7 +4160,7 @@ complete_snippets_whilst_editing Whether to allow completion of snippets f
when editing an existing line (i.e. there
is some text after the current cursor
position on the line). Only used when the
keybinding ``Complete snippet`` is set to
keybinding `Complete snippet` is set to
``Space``.
show_editor_scrollbars Whether to display scrollbars. If set to true
false, the horizontal and vertical
@ -4362,11 +4370,8 @@ line of the file, followed by a blank line.
Custom file templates
`````````````````````
These are read from the following directories:
* ``$prefix/share/geany/templates/files`` (see `Installation prefix`_)
* ``~/.config/geany/templates/files`` (created the first time
Geany is started).
These are read from ``templates/files`` under the `Configuration file
paths`_.
The filetype to use is detected from the template file's extension, if
any. For example, creating a file ``module.c`` would add a menu item
@ -4557,19 +4562,18 @@ You can easily access them e.g. within an executed shell script using::
Customizing the toolbar
-----------------------
You can add, remove and reorder the elements in the toolbar by using the toolbar editor
by manually editing the file ``ui_toolbar.xml``.
You can add, remove and reorder the elements in the toolbar by using
the toolbar editor, or by manually editing the configuration file
``ui_toolbar.xml``.
The toolbar editor can be opened from the preferences editor on the Toolbar tab or
by right-clicking on the toolbar itself and choosing it from the menu.
Manually editing of the toolbar layout
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Manually editing the toolbar layout
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To override the system-wide configuration file, copy it from
``$prefix/share/geany`` to your configuration directory, usually
``~/.config/geany/``. ``$prefix`` is the path where Geany is installed
(see `Installation prefix`_).
To override the system-wide configuration file, copy it to your user
configuration directory (see `Configuration file paths`_).
For example::