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: * src/main.c:
Disable 'Send Selection to Terminal' item when not available Disable 'Send Selection to Terminal' item when not available
instead of removing it to avoid trailing separator. 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> 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 Installation prefix
------------------- -------------------
If you want to edit any of Geany's system configuration files after If you want to find Geany's system files after installation you may
installation you will need to know the installation prefix. Usually this want to know the installation prefix.
is not necessary as you can just use per user configuration files and
you will not need root permissions.
Use the ``--print-prefix`` option to Geany to check - see `Command line Pass the ``--print-prefix`` option to Geany to check this - see
options`_. The first path is the prefix. `Command line options`_. The first path is the prefix.
This is commonly ``/usr`` if you installed from a binary package, or On Unix-like systems this is commonly ``/usr`` if you installed from
``/usr/local`` if you build from source. 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 Usage
@ -352,7 +354,7 @@ Short option Long option Function
-p --no-plugins Do not load plugins or plugin support. -p --no-plugins Do not load plugins or plugin support.
*none* --print-prefix Print installation prefix, the data directory, the lib *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 stdout, one line each. This is mainly intended for plugin
authors to detect installation paths. 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" Every time you write ``myname`` <TAB> in Geany, it will replace "myname"
with "Enrico Tröger". The key to start autocompletion can be changed with "Enrico Tröger". The key to start autocompletion can be changed
in the preferences dialog, by default it is TAB. The corresponding keybinding in the preferences dialog, by default it is TAB. The corresponding keybinding
is called ``Complete snippet``. is called `Complete snippet`.
**Paths** **Paths**
The system-wide configuration file can be found in You can override the default snippets using the user
``$prefix/share/geany``, where ``$prefix`` is the path where Geany is ``snippets.conf`` file. Use the *Tools->Configuration
installed (see `Installation prefix`_). It is not recommended to edit the Files->snippets.conf* menu item. See also `Configuration file paths`_.
system-wide file, because it will be overridden when Geany is updated.
To change the settings, copy the file from ``$prefix/share/geany`` This adds the default settings to the user file if the file doesn't
in your configuration directory (usually ``~/.config/geany/``). exist. Alternatively the file can be created manually, adding only
the settings you want to change. All missing settings will be read
For example:: from the system snippets file.
% 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``.
**Snippet groups** **Snippet groups**
@ -1065,7 +1057,7 @@ will be replaced when using the snippet:
%cursor% Place the cursor at this position after completion has %cursor% Place the cursor at this position after completion has
been done. You can define multiple %cursor% wildcards 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 to the next defined cursor position in the completed
snippet. snippet.
@ -1509,11 +1501,8 @@ the library.
You can load a custom global tags file in two ways: You can load a custom global tags file in two ways:
* Using the *Load Tags* command in the Tools menu. * Using the *Load Tags* command in the Tools menu.
* By creating a directory ``~/.config/geany/tags``, and moving or symlinking * By moving or symlinking tags files to the ``tags`` subdirectory of
the tags files there before starting Geany. one of the `configuration file paths`_ 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`_).
You can either download these files or generate your own. They have You can either download these files or generate your own. They have
the format:: 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. 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 The configurable Build Menu capability was introduced in Geany 0.19 and
required a new section to be added to the configuration files (See 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 ``-p``, which prevents plugins being loaded. Plugins are scanned in
the following directories: the following directories:
* ``$prefix/lib/geany`` (see `Installation prefix`_) * ``$prefix/lib/geany`` (see `Installation prefix`_)
* ``~/.config/geany/plugins`` * 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. 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 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 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. 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. By default, no plugins are loaded at startup until you select some.
You can also configure some plugin specific options when the plugin You can also configure some plugin specific options if the plugin
provides some. provides any.
See also `Plugin documentation`_ for information about single plugins
which are included in Geany.
Keybindings Keybindings
@ -3477,6 +3470,37 @@ Configuration files
You must use UTF-8 encoding *without BOM* for 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 Tools menu items
---------------- ----------------
There's a *Configuration files* submenu in the *Tools* menu that There's a *Configuration files* submenu in the *Tools* menu that
@ -3504,17 +3528,14 @@ template files.
Global configuration file Global configuration file
------------------------- -------------------------
There is a global configuration file for Geany which will be used for System administrators can add a global configuration file for Geany
any settings not defined in the users local configuration file. which will be used when starting Geany and a user configuration file
Settings present in the local configuration file override those in the global does not exist.
file.
The global configuration file is read from The global configuration file is read from ``geany.conf`` in the
``$prefix/share/geany/geany.conf`` (where ``$prefix`` is the path where system configuration path - see `Configuration file paths`_. It can
Geany is installed, see `Installation prefix`_) when starting Geany and contain any settings which are found in the usual configuration file
an user configuration file does not exist. It can contain any settings created by Geany, but does not have to contain all settings.
which are found in the usual configuration file created by Geany but
does not have to contain all settings.
.. note:: .. note::
This feature is mainly intended for package maintainers or system 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 for syntax highlighting, general settings like comment characters or
word delimiter characters as well as compiler and linker settings. word delimiter characters as well as compiler and linker settings.
See also `Configuration file paths`_.
Custom filetypes Custom filetypes
^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
At startup Geany looks for ``filetypes.*.conf`` files in the system and At startup Geany looks for ``filetypes.*.conf`` files in the system and
@ -3552,10 +3575,9 @@ have been implemented:
System files System files
^^^^^^^^^^^^ ^^^^^^^^^^^^
The system-wide configuration files can be found in The system-wide filetype configuration files can be found in the
``$prefix/share/geany`` and are called ``filetypes.$ext``, system configuration path and are called ``filetypes.$ext``,
where ``$prefix`` is the path where Geany is installed (see where $ext is the name of the filetype. For every
`Installation prefix`_) and $ext is the name of the filetype. For every
filetype there is a corresponding definition file. There is one filetype there is a corresponding definition file. There is one
exception: ``filetypes.common`` -- this file is for general settings, exception: ``filetypes.common`` -- this file is for general settings,
which are not specific to a certain filetype. which are not specific to a certain filetype.
@ -3566,21 +3588,14 @@ which are not specific to a certain filetype.
User files User files
^^^^^^^^^^ ^^^^^^^^^^
To change the settings, copy a file from ``$prefix/share/geany`` to To change the settings, copy a file from the system configuration
the subdirectory filedefs in your configuration directory (usually path to the subdirectory ``filedefs`` in your user configuration
``~/.config/geany/``). directory. Then you can edit the file and the changes will still be
available after an update of 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``.
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 Filetype configuration
@ -4089,26 +4104,19 @@ Filetype extensions
To change the default filetype extension used when saving a new file, To change the default filetype extension used when saving a new file,
see `Filetype definition files`_. see `Filetype definition files`_.
You can override the list of file extensions that Geany uses for each You can override the list of file extensions that Geany uses to detect
filetype using the ``filetype_extensions.conf`` file. 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 You should only list lines for filetype extensions that you want to
``$prefix/share/geany`` to your configuration directory, usually override in the user configuration file and remove or comment out
``~/.config/geany/``. ``$prefix`` is the path where Geany is installed others. The patterns are listed after the ``=`` sign, using a
(see `Installation prefix`_). semi-colon separated list of patterns which should be matched for
that filetype.
For example:: For example, to override the filetype extensions for Make, the file
should look like::
% 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::
[Extensions] [Extensions]
Make=Makefile*;*.mk;Buildfile; Make=Makefile*;*.mk;Buildfile;
@ -4116,10 +4124,10 @@ look like::
Preferences File Format 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 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 as the file will be overwritten when the preferences in Geany are changed or Geany
is quitted. is quit.
Hidden preferences 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 when editing an existing line (i.e. there
is some text after the current cursor is some text after the current cursor
position on the line). Only used when the position on the line). Only used when the
keybinding ``Complete snippet`` is set to keybinding `Complete snippet` is set to
``Space``. ``Space``.
show_editor_scrollbars Whether to display scrollbars. If set to true show_editor_scrollbars Whether to display scrollbars. If set to true
false, the horizontal and vertical false, the horizontal and vertical
@ -4362,11 +4370,8 @@ line of the file, followed by a blank line.
Custom file templates Custom file templates
````````````````````` `````````````````````
These are read from the following directories: These are read from ``templates/files`` under the `Configuration file
paths`_.
* ``$prefix/share/geany/templates/files`` (see `Installation prefix`_)
* ``~/.config/geany/templates/files`` (created the first time
Geany is started).
The filetype to use is detected from the template file's extension, if 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 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 Customizing the toolbar
----------------------- -----------------------
You can add, remove and reorder the elements in the toolbar by using the toolbar editor You can add, remove and reorder the elements in the toolbar by using
by manually editing the file ``ui_toolbar.xml``. 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 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. 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 To override the system-wide configuration file, copy it to your user
``$prefix/share/geany`` to your configuration directory, usually configuration directory (see `Configuration file paths`_).
``~/.config/geany/``. ``$prefix`` is the path where Geany is installed
(see `Installation prefix`_).
For example:: For example::