diff --git a/ChangeLog b/ChangeLog index 6bebcf40..3b2d1b65 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-08-17 Nick Treleaven + + * doc/geany.txt, doc/geany.html, NEWS: + Add 'Scope autocompletion' section. + Add 'Tools menu items' section to explain configuration files + submenu, reload configuration item. + Minor updates/fixes. + + 2009-08-16 Enrico Tröger * src/document.c: diff --git a/NEWS b/NEWS index 9a22aca6..acbb0747 100644 --- a/NEWS +++ b/NEWS @@ -58,8 +58,8 @@ Geany 0.18 (August 16, 2009) Filetypes: * Add Markdown filetype (thanks to Jon Strait). * Highlight D WYSIWYG backtick `strings` and r"strings" (#1895745). - * Minor improvements for filetypes: Fortran, Haxe, HTML, Lua, - Matlab, Pascal, Python, Tcl + * Minor improvements for filetypes: Fortran, Haxe, HTML, Lua, + Matlab, Pascal, Python, Tcl. Tags: * Read custom system global tags files from $prefix/share/geany/tags diff --git a/doc/geany.html b/doc/geany.html index 47d127ce..24f03d77 100644 --- a/doc/geany.html +++ b/doc/geany.html @@ -3,7 +3,7 @@ - + Geany @@ -149,289 +149,293 @@ Stylesheet for Geany's documentation based on a version of John Gabriele. License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. A copy of this license can be found in the file COPYING included with the source code -of this program, and also in the chapter GNU General Public License.

-
-

Contents

+of this program, and also in the chapter GNU General Public License.

+
+

Contents

-
-

Introduction

-
-

About Geany

+
+

Introduction

+
+

About Geany

Geany is a small and lightweight Integrated Development Environment. It was developed to provide a small and fast IDE, which has only a few dependencies from other packages. Another goal was to be as independent @@ -441,10 +445,10 @@ Geany only requires the GTK2 runtime libraries.

  • Syntax highlighting
  • Code folding
  • -
  • Symbol name autocompletion
  • +
  • Autocompletion of symbols/words
  • Construct completion/snippets
  • Auto-closing of XML and HTML tags
  • -
  • Call tips
  • +
  • Calltips
  • Many supported filetypes including C, Java, PHP, HTML, Python, Perl, Pascal, and others
  • Symbol lists
  • @@ -454,56 +458,56 @@ Pascal, and others
  • Plugin interface
-
-

Where to get it

-

You can obtain Geany from http://www.geany.org/ or perhaps also from +

+

Where to get it

+

You can obtain Geany from http://www.geany.org/ or perhaps also from your distributor. For a list of available packages, please see -http://www.geany.org/Download/ThirdPartyPackages.

+http://www.geany.org/Download/ThirdPartyPackages.

-
-

License

+
+

License

Geany is distributed under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. A copy of this license can be found in the file COPYING included with the source -code of this program and in the chapter, GNU General Public License.

+code of this program and in the chapter, GNU General Public License.

The included Scintilla library (found in the subdirectory scintilla/) has its own license, which can be found in the chapter, -License for Scintilla and SciTE.

+License for Scintilla and SciTE.

-
-

About this document

+
+

About this document

This documentation is available in HTML and text formats. -The latest version can always be found at http://www.geany.org/.

-

If you want to contribute to it, see Contributing to this document.

+The latest version can always be found at http://www.geany.org/.

+

If you want to contribute to it, see Contributing to this document.

-
-

Installation

-
-

Requirements

+
+

Installation

+
+

Requirements

You will need the GTK (>= 2.8.0) libraries and their dependencies (Pango, GLib and ATK). Your distro should provide packages for these, usually installed by default. For Windows, you can download an installer which bundles these libraries from the website.

-
-

Binary packages

+
+

Binary packages

There are many binary packages available. For an up-to-date but maybe -incomplete list see http://www.geany.org/Download/ThirdPartyPackages.

+incomplete list see http://www.geany.org/Download/ThirdPartyPackages.

-
-

Source compilation

+
+

Source compilation

Compiling Geany is quite easy. To do so, you need the GTK (>= 2.8.0) libraries and header files. You also need the Pango, GLib and ATK libraries and header files. -All these files are available at http://www.gtk.org, but very often +All these files are available at http://www.gtk.org, but very often your distro will provide development packages to save the trouble of building these yourself.

Furthermore you need, of course, a C and C++ compiler. The GNU versions of these tools are recommended.

-
-

Autotools based build system

+
+

Autotools based build system

The Autotools based build system is very mature and has been well tested. To use it, you just need the Make tool, preferably GNU Make.

Then run the following commands:

@@ -516,8 +520,8 @@ $ make % make install
-
-

Waf based build system

+
+

Waf based build system

The Waf build system is still quite young and under heavy development but already in an usable state. In contrary to the Autotools, Waf needs Python. So before using Waf, you need to install Python on your system. @@ -525,7 +529,7 @@ The advantage of the Waf build system over the Autotools based build system is t build process might be a bit faster. Especially when you use the Waf cache feature repetitive builds (e.g. when changing only a few source files to test something) will become much faster since Waf will cache and re-use the unchanged built files and only compile the changed code -again. See Waf Cache for details. +again. See Waf Cache for details. To build Geany with Waf as usual run:

 $ ./waf configure
@@ -535,8 +539,8 @@ $ ./waf build
 
 % ./waf install
 
-
-

Waf Cache

+
+

Waf Cache

The Waf build system has a nice and interesting feature which can help a lot to avoid unnecessary rebuilding of unchanged code. This often happens when developing new features or trying to debug something. @@ -554,9 +558,9 @@ export WAFCACHE=/home/username/.cache/waf

Remember to replace username with your actual username.

More information about the Waf cache feature are available at -http://code.google.com/p/waf/wiki/CacheObjectFiles.

-
-
Cleaning the Cache
+http://code.google.com/p/waf/wiki/CacheObjectFiles.

+
+
Cleaning the Cache

You should take care about the size of the cache directory as it may grow rapidly by time. Waf doesn't do any cleaning or other house-keeping of the cache yet so you need to keep it clean by yourself. @@ -570,8 +574,8 @@ $ find /home/username/.cache/waf -mtime +14 -exec rm {} \;

-
-

Custom installation

+
+

Custom installation

The configure script supports several common options, for a detailed list, type:

@@ -585,39 +589,39 @@ $ ./configure --help
 

You may also want to read the INSTALL file for advanced installation options.

-
-

Dynamic linking loader support

+
+

Dynamic linking loader support

In the case that your system lacks dynamic linking loader support, you probably want to pass the option --disable-vte to the configure script. This prevents compiling Geany with dynamic linking loader support to automatically load libvte.so.4 if available.

-
-

Build problems

+
+

Build problems

If there are any errors during compilation, check your build environment and try to find the error, otherwise contact the mailing list or one the authors. Sometimes you might need to ask for specific help from your distro.

-
-

Installation prefix

+
+

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 user configuration files.

-

Use the --print-prefix option to check - see Command line +

Use the --print-prefix option to check - 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.

-
-

Usage

-
-

Getting started

+
+

Usage

+
+

Getting started

You can start Geany in the following ways:

  • From the Desktop Environment menu:

    @@ -633,8 +637,8 @@ Return:

-
-

Command line options

+
+

Command line options

@@ -673,7 +677,7 @@ for snippets configuration). +Generating a global tags file). @@ -765,13 +769,13 @@ geany some_file.foo:55:4

Geany supports all generic GTK options, a list is available on the help screen.

-
-

General

-
-

Startup

+
+

General

+
+

Startup

At startup, Geany loads all files from the last time Geany was launched. You can disable this feature in the preferences dialog -(see General Startup tab in preferences dialog). If you specify some +(see General Startup tab in preferences dialog). If you specify some files on the command line, only these files will be opened, but you can find the files from the last session in the file menu under the "Recent files" item. By default this contains the last 10 recently @@ -782,8 +786,8 @@ load files from the last session. To run a second instance of Geany, do not specify any filenames on the command-line, or disable opening files in a running instance using the appropriate command line option.

-
-

Opening files from the command-line in a running instance

+
+

Opening files from the command-line in a running instance

Geany detects an already running instance of itself and opens files from the command-line in the already running instance. So, Geany can be used to view and edit files by opening them from other programs @@ -796,10 +800,10 @@ geany some_file.foo:55:4 column 4.

If you do not like this for some reason, you can disable using the first instance by using the appropriate command line option -- see the section -called Command line options.

+called Command line options.

-
-

Virtual terminal emulator widget (VTE)

+
+

Virtual terminal emulator widget (VTE)

If you have installed libvte.so in your system, it is loaded automatically by Geany, and you will have a terminal widget in the notebook at the bottom.

@@ -807,7 +811,7 @@ notebook at the bottom.

will not be loaded. So there is no need to install the package containing this file in order to run Geany. Additionally, you can disable the use of the terminal widget by command line option, for more information -see the section called Command line options.

+see the section called Command line options.

You can use this terminal (from now on called VTE) nearly as an usual terminal program like xterm. There is basic clipboard support. You can paste the contents of the clipboard by pressing the right mouse @@ -838,12 +842,12 @@ please set a link to the correct file (as root):

Obviously, you have to adjust the paths and set X to the number of your libvte.so.

You can also specify the filename of the VTE library to use on the command -line (see the section called Command line options) or at compile time +line (see the section called Command line options) or at compile time by specifying the command line option --with-vte-module-path to ./configure.

-
-

Defining own widget styles using .gtkrc-2.0

+
+

Defining own widget styles using .gtkrc-2.0

You can define your widget style for many of Geany's GUI parts. To do this, just edit your .gtkrc-2.0 (usually found in your home directory on UNIX-like systems and in the etc subdirectory of your @@ -883,23 +887,23 @@ widget "GeanyPrefsDialog" style "geanyStyle"

-
-

Documents

-
-

Switching between documents

+
+

Documents

+
+

Switching between documents

The documents list and the editor tabs are two different ways to switch between documents using the mouse. When you hit the key combination to move between tabs, the order is determined by the tab order, not alphabetical as shown in the documents list (regardless of whether or not editor tabs are visible).

-

See the Notebook tabs group in the Keybindings section for useful +

See the Notebook tabs group in the Keybindings section for useful shortcuts including for Most-Recently-Used document switching.

-
-

Character sets and Unicode Byte-Order-Mark (BOM)

-
-

Using character sets

+
+

Character sets and Unicode Byte-Order-Mark (BOM)

+
+

Using character sets

Geany provides support for detecting and converting character sets. So you can open and save files in different character sets and even can convert a file from a character set to another one. To do this, @@ -944,8 +948,8 @@ encoding when opening the file (for details see below).

-
-

In-file encoding specification

+
+

In-file encoding specification

Geany detects meta tags of HTML files which contain charset information like:

@@ -986,8 +990,8 @@ correctly the next time.

Anything after the first 512 bytes will not be recognized.

-
-

Special encoding "None"

+
+

Special encoding "None"

There is a special encoding "None" which is actually no real encoding. It is useful when you know that Geany cannot auto-detect the encoding of a file and it is not displayed correctly. Especially @@ -996,10 +1000,10 @@ detection and open the file properly at least until the occurrence of the first NULL-byte. Using this encoding opens the file as it is without any character conversion.

-
-

Unicode Byte-Order-Mark (BOM)

+
+

Unicode Byte-Order-Mark (BOM)

Furthermore, Geany detects an Unicode Byte Order Mark (see -http://en.wikipedia.org/wiki/Byte_Order_Mark for details). Of course, +http://en.wikipedia.org/wiki/Byte_Order_Mark for details). Of course, this feature is only available if the opened file is in an Unicode encoding. The Byte Order Mark helps to detect the encoding of a file, e.g. whether it is UTF-16LE or UTF-16BE and so on. On Unix-like systems @@ -1017,10 +1021,10 @@ safely ignore it.

-
-

Editing

-
-

Folding

+
+

Editing

+
+

Folding

Geany provides basic code folding support. Folding means the ability to show and hide parts of the text in the current file. You can hide unimportant code sections and concentrate on the parts you are working on @@ -1043,8 +1047,8 @@ key while clicking on a fold symbol. That means, if the "Fold/Unfold all children of a fold point" option is enabled, pressing Shift will disable it for this click and vice versa.

-
-

Column mode editing (rectangular selections)

+
+

Column mode editing (rectangular selections)

There is basic support for column mode editing. To use it, create a rectangular selection by holding down the Control and Shift keys (or Control and Alt if it doesn't work) while @@ -1054,18 +1058,18 @@ Once a rectangular selection exists you can start editing the text within this selection and the modifications will be done for every line in the selection.

-
-

Drag and drop of text

+
+

Drag and drop of text

If you drag selected text in the editor widget of Geany the text is moved to the position where the mouse pointer is when releasing the mouse button. Holding Control when releasing the mouse button will copy the text instead. This behaviour was changed in Geany 0.11 - before the selected text was copied to the new position.

-
-

Indentation

+
+

Indentation

Geany allows each document to indent either with a tab character or -multiple spaces. The default indent mode is set in the Editor Features +multiple spaces. The default indent mode is set in the Editor Features tab in preferences dialog (see the link for more information). But this can be overridden using either the Document->Indent Type menu, or by using the Detect from file indentation preference. When enabled, @@ -1083,8 +1087,8 @@ as follows:

on a line.
-
-

Auto-indentation

+
+

Auto-indentation

When enabled, auto-indentation happens when pressing Enter in the Editor. It adds a certain amount of indentation to the new line so the user doesn't always have to indent each line manually.

@@ -1104,8 +1108,8 @@ previous line. match the indentation of the line with the opening brace.
-
-

Bookmarks

+
+

Bookmarks

Geany provides a handy bookmarking feature that lets you mark one or more lines in a document, and return the cursor to them using a key combination.

@@ -1122,14 +1126,14 @@ together with the commands to switch from one editor tab to another (Ctrl-PgUp/PgDn and Ctrl-Tab) provides a particularly fast way to navigate around multiple files.

-
-

Code Navigation History

+
+

Code Navigation History

To ease navigation in source files and especially between different files, Geany lets you jump between different navigation points. Currently, this works for the following:

-
-

Send text through definable commands

+
+

Send text through definable commands

You can define several custom commands in Geany and send the current selection to one of these commands. The output of the command will be used to replace the current selection. So, it is possible to use text @@ -1158,18 +1162,18 @@ to get a new text entry and type the command. You can also specify some command line options. To delete a command, just clear the text entry and press OK. It will be deleted automatically.

-
-

Context actions

+
+

Context actions

You can execute a specified command on the current word near the cursor position or an available selection and this word is passed as an argument to this command. It can be used for example to open some API documentation in a browser window or open any other external program. To do this, there is an menu entry in the popup menu of the editor widget and also a keyboard shortcut(see the section called -Keybindings).

+Keybindings).

The command can be specified in the preferences dialog and additionally for each filetype (see "context_action_cmd" in the section called -Format). At executing, the filetype specific command is used if +Format). At executing, the filetype specific command is used if available otherwise the command specified in the preferences dialog is executed.

The passed word can be referred with the wildcard "%s" everywhere @@ -1182,19 +1186,19 @@ firefox "http://www.php.net/%s"

when executing the command, the %s is substituted by the word near the cursor position or by the current selection. If the cursor is at the word "echo", a browser window will open(assumed your browser is -called firefox) and it will open the address: http://www.php.net/echo.

+called firefox) and it will open the address: http://www.php.net/echo.

-
-

Autocompletion

+
+

Autocompletion

Geany can offer a list of possible completions for symbols defined in the tags and for all words in a document.

The autocompletion list for symbols is presented when the first few -characters of the symbol are typed (configurable, see Editor Completions +characters of the symbol are typed (configurable, see Editor Completions tab in preferences dialog, default 4) or when the Complete word -keybinding is pressed (configurable, see Configurable keybindings, +keybinding is pressed (configurable, see Configurable keybindings, default Ctrl-Space).

When the defined keybinding is typed and the Autocomplete all words in -document preference (in Editor Completions tab in preferences dialog) +document preference (in Editor Completions tab in preferences dialog) is selected then the autocompletion list will show all matching words in the document, if there are no matching symbols.

If you don't want to use autocompletion it can be dismissed until @@ -1206,12 +1210,29 @@ the autocompletion window is closed.

item on the autocompletion list can be chosen from the list by Tab or Enter/Return. You can also double-click to select an item. The sequence will be completed to match the chosen item, and if the Drop rest of -word on completion preference is set (in Editor Completions tab in +word on completion preference is set (in Editor Completions tab in preferences dialog) then any characters after the cursor that match a symbol or word are deleted.

+
+

Scope autocompletion

+

E.g.:

+
+struct
+{
+    int i;
+    char c;
+} foo;
+
+

When you type foo. it will show an autocompletion list with 'i' and +'c' symbols.

+

It only works for languages that set parent scope names for e.g. struct +members. Currently this means C-like languages. The C tag parser only +parses global scopes, so this won't work for structs or objects declared +in local scope.

- +
+

User-definable snippets

Snippets are small strings or code constructs which can be replaced or completed to a more complex string. So you can save a lot of time by not typing often used strings and letting Geany do the work for you. @@ -1219,7 +1240,7 @@ To know what to complete or replace Geany reads a configuration file called snippets.conf at startup.

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 +installed (see Installation prefix). It is not recommended to edit the system-wide file, because it will be overridden when Geany is updated.

To change the settings, copy the file from $prefix/share/geany in your configuration directory (usually ~/.config/geany/).

@@ -1295,7 +1316,7 @@ 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.

Since Geany 0.15 you can also use most of the available templates wildcards -listed in Template wildcards. All wildcards which are listed as +listed in Template wildcards. All wildcards which are listed as available in snippets can be used. For instance to improve the above example:

 [Default]
@@ -1310,14 +1331,14 @@ to be recognized as a word for completion. Leave it commented to use
 default characters or define it to add or remove characters to fit your
 needs.

-
-

Inserting Unicode characters

+
+

Inserting Unicode characters

With GTK 2.10 and above, you can hit Ctrl-Shift-u, then still holding Ctrl-Shift, type some hex digits representing the code point for the character you want, then let go of Ctrl-Shift and hit a key such as the right arrow.

For this to work in Geany, you'll need to first unbind Ctrl-Shift-u -in the keybinding tab in preferences dialog, then restart Geany. +in the keybinding tab in preferences dialog, then restart Geany. Note that it works slightly differently from other GTK applications, in that you'll need to continue to hold down the Ctrl and Shift keys while typing the code point hex digits.

@@ -1326,8 +1347,8 @@ is not necessary. One problem is that you may find the alphabetic keys conflict with other Geany keybindings.

-
-

Search, replace and go to

+
+

Search, replace and go to

This section describes search-related commands from the Search menu and the editor window's popup menu:

    @@ -1340,22 +1361,22 @@ and the editor window's popup menu:

  • Go to line

* These items are available from the editor window's popup menu, or by -using a keyboard shortcut (see the section called Keybindings).

-
-

Find

+using a keyboard shortcut (see the section called Keybindings).

+
+

Find

The Find dialog is used for finding text in one or more open documents.

./images/find_dialog.png -
-

Matching options

+
+

Matching options

The syntax for the Use regular expressions option is shown in -Regular expressions.

+Regular expressions.

The Use escape sequences option will transform any escaped characters into their UTF-8 equivalent. For example, \t will be transformed into a tab character. Other recognized symbols are: \\, \n, \r, \uXXXX (Unicode characters).

-
-

Find all

+
+

Find all

To find all matches, click on the Find All expander. This will reveal several options:

    @@ -1370,8 +1391,8 @@ In Session does the same for all open documents.

    colored box. These markers can be removed by selecting the Remove Markers command from the Document menu.

-
-

Change font in search dialog text fields

+
+

Change font in search dialog text fields

All search related dialogs use a Monospace for the text input fields to increase the readability of input text. This is useful when you are typing e.g. regular expressions with spaces, periods and commas which @@ -1392,8 +1413,8 @@ of this style to the highest available. Otherwise, the style is ignored for the search dialogs.

-
-

Find usage

+
+

Find usage

Find usage searches all open files. It is similar to the Find All In Session Find dialog command.

If there is a selection, then it is used as the search text; otherwise @@ -1402,8 +1423,8 @@ word nearest the edit cursor, or the word underneath the popup menu click position when the popup menu is used. The search results are shown in the Messages tab of the Message Window.

-
-

Find in files

+
+

Find in files

Find in files is a more powerful version of Find usage that searches all files in a certain directory using the Grep tool. The Grep tool must be correctly set in Preferences to the path of the system's Grep @@ -1414,8 +1435,8 @@ to be searched. The chosen encoding is used to convert the entered search text into and to convert the search results back to UTF-8. The Extra options field is used to pass any additional arguments to the grep tool.

-
-

Filtering out version control files

+
+

Filtering out version control files

When using the Recurse in subfolders option with a directory that's under version control, you can set the Extra options field to use grep's --exclude flag to filter out filenames.

@@ -1426,18 +1447,18 @@ filter out CVS and hidden directories like Example: --exclude-dir=.* --exclude-dir=CVS

-
-

Replace

+
+

Replace

The Replace dialog is used for replacing text in one or more open documents.

./images/replace_dialog.png

The Replace dialog has the same options for matching text as the Find -dialog. See the section called Matching options.

+dialog. See the section called Matching options.

The Use regular expressions option applies both to the search string and to the replacement text; for the latter back references can be -used -- see the entry for '\n' in Regular expressions.

-
-

Replace all

+used -- see the entry for '\n' in Regular expressions.

+
+

Replace all

To replace several matches, click on the Replace All expander. This will reveal several options:

    @@ -1451,8 +1472,8 @@ documents. Replace All In Selection will replace all matching text in the current selection of the current document.

-
-

Go to tag definition

+
+

Go to tag definition

If the current word is the name of a tag definition (like a function body) and the file containing the tag definition is open, this command will switch to that file and go to the corresponding line number. The @@ -1460,18 +1481,18 @@ current word is either taken from the word nearest the edit cursor, or the word underneath the popup menu click position when the popup menu is used.

-
-

Go to tag declaration

+
+

Go to tag declaration

Like Go to tag definition, but for a forward declaration such as a function prototype or extern declaration instead of a function body.

-
-

Go to line

+
+

Go to line

Go to a particular line number in the current file.

-
-

Regular expressions

+
+

Regular expressions

You can use regular expressions in the Find and Replace dialogs by selecting the Use regular expressions check box. The syntax is POSIX-like, as described in the table below.

@@ -1576,12 +1597,12 @@ Saam, Saaam and so on.

Note

This table is adapted from Scintilla and SciTE documentation, -distributed under the License for Scintilla and SciTE.

+distributed under the License for Scintilla and SciTE.

-
-

Tags

+
+

Tags

Geany has built-in functionality for generating tag information (aka "workspace tags") for supported filetypes when you open a file. You can also have Geany automatically load external tag files (aka "global @@ -1589,17 +1610,17 @@ tags files") upon startup, or manually using Tools --> Load TagsGeany uses its own tag file format, similar to what ctags uses (but is incompatible with ctags). You use Geany to generate global tags files, as described below.

-
-

Workspace tags

+
+

Workspace tags

Tags for each document are parsed whenever a file is loaded or saved. These are shown in the Symbol list in the Sidebar. These tags are also used for autocompletion of symbols and calltips for all documents open in the current session that have the same filetype.

The Go to Tag commands can be used with all workspace tags. See -Go to tag definition.

+Go to tag definition.

-
-

Global tags

+
+

Global tags

Global tags are used to provide autocompletion of symbols and calltips without having to open the corresponding source files. This is intended for library APIs, as the tags file only has to be updated when you upgrade @@ -1611,7 +1632,7 @@ the library.

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).
  • +$prefix is the installation prefix (see Installation prefix).

    You can either download these files or generate your own. They have the format:

    @@ -1619,10 +1640,10 @@ the format:

    name.lang_ext.tags

    lang_ext is one of the extensions set for the filetype associated -with the tags. See the section called Filetype extensions for +with the tags. See the section called Filetype extensions for more information.

    -
    -

    Default global tags files

    +
    +

    Default global tags files

    For some languages, a list of global tags is loaded when the corresponding filetype is first used. Currently these are for:

      @@ -1634,8 +1655,8 @@ corresponding filetype is first used. Currently these are for:

    • Python
    -
    -

    Global tags file format

    +
    +

    Global tags file format

    Global tags files can have two different formats:

    • Tagmanager format
    • @@ -1669,10 +1690,10 @@ currently unused and should be left empty.
    empty but the pipe separator must appear for them.

    You can easily write your own global tag files using this format. Just save them in your tags directory, as described earlier in the -section Global tags.

    +section Global tags.

    -
    -

    Generating a global tags file

    +
    +

    Generating a global tags file

    You can generate your own global tags files by parsing a list of source files. The command is:

    @@ -1680,7 +1701,7 @@ geany -g [-P] <Tag File> <File list>
     
    • Tag File filename should be in the format described earlier -- -see the section called Global tags.
    • +see the section called Global tags.
    • File list is a list of filenames, each with a full path (unless you are generating C/C++ tags and have set the CFLAGS environment variable appropriately).
    • @@ -1716,8 +1737,8 @@ copy of the generated tags file because it will get overwritten when upgrading Geany.

    -
    -

    Ignore tags

    +
    +

    Ignore tags

    You can also ignore certain tags if they would lead to wrong parsing of the code. Simply create a file called "ignore.tags" in your Geany configuration directory (usually ~/.config/geany/). Then list all tags @@ -1740,8 +1761,8 @@ identifiers is replaced by the second identifiers for parsing purposes. Exuberant Ctags.

    -
    -

    Preferences

    +
    +

    Preferences

    You may adjust Geany's settings using the Edit --> Preferences dialog. Any changes you make there can be applied by hitting either the Apply or the OK button. These settings will persist between Geany @@ -1752,17 +1773,17 @@ on it.

    persist between Geany sessions. The settings under the Document menu, however, are only for the current document and revert to defaults when restarting Geany.

    -

    There are also some rarer Hidden preferences.

    +

    There are also some rarer Hidden preferences.

    Note

    In the paragraphs that follow, the text describing a dialog tab comes after the screenshot of that tab.

    -
    -

    General Startup tab in preferences dialog

    +
    +

    General Startup tab in preferences dialog

    ./images/pref_dialog_gen_startup.png -
    -

    Startup

    +
    +

    Startup

    Load files from the last session
    On startup, load the same files you had open the last time you @@ -1773,8 +1794,8 @@ used Geany.
    Allow plugins to be used in Geany.
    -
    -

    Shutdown

    +
    +

    Shutdown

    Save window position and geometry
    Save the current position and size of the main window so next time @@ -1783,8 +1804,8 @@ you open Geany it's in the same location.
    Have a dialog pop up to confirm that you really want to quit Geany.
    -
    -

    Paths

    +
    +

    Paths

    Startup path
    Path to start in when opening or saving files. @@ -1802,11 +1823,11 @@ Leave blank to not set an additional lookup path.
    -
    -

    General Miscellaneous tab in preferences dialog

    +
    +

    General Miscellaneous tab in preferences dialog

    ./images/pref_dialog_gen_misc.png -
    -

    Miscellaneous

    +
    +

    Miscellaneous

    Beep on errors when compilation has finished
    Have the computer make a beeping sound when compilation of your program @@ -1824,8 +1845,8 @@ goto line fields and the VTE.
    -
    -g --generate-tags Generate a global tags file (see -Generating a global tags file).
    -P --no-preprocessing
    @@ -2693,8 +2711,8 @@ listed below. These can also be overridden by custom keybindings.

    -
    -

    Configurable keybindings

    +
    +

    Configurable keybindings

    For all actions listed below you can define your own keybindings. Open the Preferences dialog, select the desired action and click on change. In the opening dialog you can press any key combination you @@ -2844,7 +2862,7 @@ insert a space.   Executes a command and passes the current word (near the cursor position) or selection as an -argument. See the section called Context +argument. See the section called Context actions. Move cursor in snippet @@ -2974,7 +2992,7 @@ with the same indentation as the previous line. Passes the current selection to a configured external command (available for the first three configured commands, see -Send text through definable commands for +Send text through definable commands for details). Send Selection to Terminal @@ -2983,9 +3001,10 @@ details). line (if there is no selection) to the embedded Terminal (VTE). -Reflow lines/paragraph +Reflow lines/block   -Reformat selected lines or current paragraph, +Reformat selected lines or current +(indented) text block, breaking lines at the long line marker. Settings @@ -3044,6 +3063,13 @@ the keyboard cursor) or selection in the current document and displays them in the messages window. +Mark All +  +Highlight all matches of the current +word/selection in the current document +with a colored box. If there's nothing to +find, highlighted matches will be cleared. + Go to     @@ -3051,14 +3077,14 @@ window. Navigate forward a location   Switches to the next location in the navigation -history. See the section called Code Navigation +history. See the section called Code Navigation History. Navigate back a location   Switches to the previous location in the navigation history. See the section called -Code Navigation History. +Code Navigation History. Go to line Ctrl-L @@ -3090,7 +3116,7 @@ marker if there already is one. the keyboard cursor). If the definition cannot be found (e.g. the relevant file is not open) Geany will beep and do nothing. See the section called -Go to tag definition. +Go to tag definition. Go to tag declaration   @@ -3098,7 +3124,7 @@ will beep and do nothing. See the section called the keyboard cursor). If the declaration cannot be found (e.g. the relevant file is not open) Geany will beep and do nothing. See the section called -Go to tag declaration. +Go to tag declaration. Go to Start of Line Home @@ -3333,17 +3359,38 @@ the last build process.

    -
    -

    Configuration files

    -
    -

    Global configuration file

    +
    +

    Configuration files

    +
    +

    Tools menu items

    +

    There's a Configuration files submenu in the Tools menu that +contains items for some of the available user configuration files. +Clicking on one opens it in the editor for you to update. Geany will +reload the file after you have saved it.

    +
    +

    Note

    +

    Other configuration files are not shown here and you will need to open +them manually and usually restart Geany to see any changes.

    +
    +

    There's also a Reload Configuration item which can be used if you +updated a configuration file outside of the current instance. This +item is also necessary to update syntax highlighting colors.

    +
    +

    Note

    +

    Syntax highlighting colors aren't updated after saving +filetypes.common as this can take a short while depending on which +documents are open.

    +
    +
    +
    +

    Global configuration file

    You can use a global configuration file for Geany which will be used if the user starts Geany for the first time and an user's configuration file was not yet created or in case an user deleted the configuration file to use default values.

    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 +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.

    @@ -3355,8 +3402,8 @@ set some sane default values for this environment. Usual users won't need to do that.

    -
    -

    Filetype definition files

    +
    +

    Filetype definition files

    All color definitions and other filetype specific settings are stored in the filetype definition files. Those settings are colors for syntax highlighting, general settings like comment characters or @@ -3364,7 +3411,7 @@ word delimiter characters as well as compiler and linker settings.

    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 +Installation prefix) and $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.

    @@ -3386,10 +3433,10 @@ 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.

    -
    -

    Format

    -
    -

    [styling] Section

    +
    +

    Format

    +
    +

    [styling] Section

    In this section the colors for syntax highlighting are defined. The manual format is:

      @@ -3404,8 +3451,8 @@ value is something other than "true" or "false", "false

      E.g. key=0xff0000;;true

      This makes the key style have red foreground text, default background color text and bold emphasis.

      -
      -
      Using a named style
      +
      +
      Using a named style

      The second format uses a named style name to reference a style defined in filetypes.common.

      -
      -

      [keywords] Section

      +
      +

      [keywords] Section

      This section contains keys for different keyword lists specific to the filetype. Some filetypes do not support keywords, so adding a new key will not work. You can only add or remove keywords to/from @@ -3434,14 +3481,14 @@ an existing list.

      The keywords list must be in one line without line ending characters.

      -
      -

      [settings] Section

      +
      +

      [settings] Section

      extension

      This is the default file extension used when saving files, not including the period character (.). The extension used should match one of the patterns associated with that filetype (see -Filetype extensions).

      +Filetype extensions).

      Example: extension=cxx

      wordchars
      @@ -3490,13 +3537,13 @@ it is recommended to specify the full path to the command. The wildcard %s will be replaced by the current word at the cursor position or by the current selection.

      Hint: for PHP files the following could be quite useful: -context_action_cmd=firefox "http://www.php.net/%s"

      +context_action_cmd=firefox "http://www.php.net/%s"

      Example: context_action_cmd=devhelp -s "%s"

      -
      -

      [build_settings] Section

      +
      +

      [build_settings] Section

      error_regex

      This is a GNU-style extended regular expression to parse a filename @@ -3511,7 +3558,7 @@ remaining match will be used as the filename.

      Build commands

      -

      The build commands are all configurable using the Set Includes and +

      The build commands are all configurable using the Set Includes and Arguments dialog.

      compiler
      @@ -3544,14 +3591,14 @@ complete filename, e.g. for shell scripts.

      -
      -

      Special file filetypes.common

      +
      +

      Special file filetypes.common

      There is a special filetype definition file called filetypes.common. This file defines some general non-filetype-specific settings.

      -

      See the Format section for how to define styles.

      -
      -

      [named_styles] Section

      +

      See the Format section for how to define styles.

      +
      +

      [named_styles] Section

      Named styles declared here can be used in the [styling] section of any filetypes.* file.

      For example:

      @@ -3575,8 +3622,8 @@ entry in the above example, but they must be declared after the original style.

      -
      -

      [styling] Section

      +
      +

      [styling] Section

      default

      This is the default style. It is used for styling files without a @@ -3750,13 +3797,13 @@ argument defines the amount of space to be drawn below.

      -
      -

      [settings] Section

      +
      +

      [settings] Section

      whitespace_chars

      Characters to treat as whitespace. These characters are ignored when moving, selecting and deleting across word boundaries -(see Scintilla keyboard commands).

      +(see Scintilla keyboard commands).

      This should include space (\s) and tab (\t).

      Example: whitespace_chars=\s\t!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~

      @@ -3764,16 +3811,16 @@ when moving, selecting and deleting across word boundaries
      -
      -

      Filetype extensions

      +
      +

      Filetype extensions

      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 filetype using the filetype_extensions.conf file.

      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).

      +(see Installation prefix).

      For example:

       % cp /usr/local/share/geany/filetype_extensions.conf /home/username/.config/geany/
      @@ -3790,8 +3837,8 @@ look like:

      Make=Makefile*;*.mk;Buildfile;
      -
      -

      Templates

      +
      +

      Templates

      Geany supports the following templates:

      • ChangeLog entry
      • @@ -3813,18 +3860,18 @@ above the function, just check it out. If the cursor is not inside of a function or the function name cannot be determined, the inserted function description won't contain the correct function name but "unknown" instead.

        -
        -

        Template meta data

        +
        +

        Template meta data

        Meta data can be used with all templates, but by default user set meta data is only used for the ChangeLog and File header templates.

        In the configuration dialog you can find a tab "Templates" (see -Template tab in preferences dialog). You can define the +Template tab in preferences dialog). You can define the default values which will be inserted in the templates. You should restart Geany after making changes, because they are only read at startup.

        -
        -

        File templates

        +
        +

        File templates

        File templates are templates used as the basis of a new file. To use them, choose the New (with Template) menu item from the File menu.

        @@ -3835,8 +3882,8 @@ restarting Geany. You can also edit the default filetype templates.

        except for the optional {fileheader} template wildcard. This can be placed anywhere, but is usually on the first line of the file, followed by a blank line.

        -
        -

        Custom file templates

        +
        +

        Custom file templates

        These are read from the ~/.config/geany/templates/files directory (created the first time Geany is started). The filetype to use is detected from the template file's extension, if any. For example, creating @@ -3846,8 +3893,8 @@ the filetype set to 'C'.

        clicked, so you don't need to restart Geany after editing a custom file template.

        -
        -

        Filetype templates

        +
        +

        Filetype templates

        Filetype template files are read from the ~/.config/geany/templates directory, and are named "filetype." followed by the filetype name, e.g. "filetype.python", "filetype.sh", etc. If you are @@ -3858,16 +3905,16 @@ the filetype configuration file extensions, commonly installed in the New command is used without a filetype. This is empty by default.

        -
        -

        Customizing templates

        +
        +

        Customizing templates

        Each template can be customized to your needs. The templates are stored in the ~/.config/geany/templates/ directory (see the section called -Command line options for further information about the configuration +Command line options for further information about the configuration directory). Just open the desired template with an editor (ideally, Geany ;-) ) and edit the template to your needs. There are some wildcards which will be automatically replaced by Geany at startup.

        -
        -

        Template wildcards

        +
        +

        Template wildcards

        All wildcards must be enclosed by "{" and "}", e.g. {date}.

        @@ -3907,7 +3954,7 @@ bsd, gpl, snippets function description, ChangeLog entry, bsd, gpl, snippets - + function description, ChangeLog entry, bsd, gpl, snippets - + function description, ChangeLog entry, bsd, gpl, snippets - +
        year [1]
        year [1] The current year. Default format is: YYYY filetype templates, file header, function description, ChangeLog entry, @@ -3919,7 +3966,7 @@ bsd, gpl, snippets
        date [1]
        date [1] The current date. Default format: YYYY-MM-DD. filetype templates, file header, function description, ChangeLog entry, @@ -3940,7 +3987,7 @@ bsd, gpl, snippets
        datetime [1]
        datetime [1] The current date and time. Default format: DD.MM.YYYY HH:mm:ss ZZZZ. filetype templates, file header, @@ -3978,27 +4025,27 @@ templates
        - +For details please see http://man.cx/strftime.
        [1](1, 2, 3) The format for the year, date and datetime wildcards can be changed -in the preferences dialog, see Template tab in preferences dialog. You can +
        [1](1, 2, 3) The format for the year, date and datetime wildcards can be changed +in the preferences dialog, see Template tab in preferences dialog. You can use any conversion specifiers which can be used with the ANSI C strftime function. -For details please see http://man.cx/strftime.
        -
        -

        Customizing the toolbar

        +
        +

        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.

        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 of 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).

        +(see Installation prefix).

        For example:

         % cp /usr/local/share/geany/ui_toolbar.xml /home/username/.config/geany/
        @@ -4017,8 +4064,8 @@ will be used instead.

        -
        -

        Available toolbar elements

        +
        +

        Available toolbar elements

        @@ -4131,10 +4178,10 @@ use 'SearchEntry') -
        -

        Plugin documentation

        -
        -

        Instant Save

        +
        +

        Plugin documentation

        +
        +

        Instant Save

        This plugin sets on every new file (File->New or File-> New (with template)) a randomly chosen filename and set its filetype appropriate to the used template or when no template was used, to a configurable default filetype. @@ -4143,8 +4190,8 @@ need to give it an explicit filename using the Save As dialog. This might be useful when you often create new files just for testing some code or something similar.

        -
        -

        Backup Copy

        +
        +

        Backup Copy

        This plugin creates a backup copy of the current file in Geany when it is saved. You can specify the directory where the backup copy is saved and you can configure the automatically added extension in the configure dialog @@ -4153,9 +4200,9 @@ in Geany's plugin manager.

        copied into the configured backup directory when the file is saved in Geany.

        -
        -

        Contributing to this document

        -

        This document (geany.txt) is written in reStructuredText +

        +

        Contributing to this document

        +

        This document (geany.txt) is written in reStructuredText (or "reST"). The source file for it is located in Geany's doc subdirectory. If you intend on making changes, you should grab the source right from SVN to make sure you've got the newest version. After @@ -4173,17 +4220,17 @@ geany-0.19.pdf.

        to build the docs. The package is named python-docutils on Debian and Fedora systems.

        -
        -

        Scintilla keyboard commands

        +
        +

        Scintilla keyboard commands

        Copyright © 1998, 2006 Neil Hodgson <neilh(at)scintilla(dot)org>

        This appendix is distributed under the terms of the License for Scintilla and SciTE. A copy of this license can be found in the file scintilla/License.txt included with the source code of this -program and in the appendix of this document. See License for +program and in the appendix of this document. See License for Scintilla and SciTE.

        20 June 2006

        -
        -

        Keyboard commands

        +
        +

        Keyboard commands

        Keyboard commands for Scintilla mostly follow common Windows and GTK+ conventions. All move keys (arrows, page up/down, home and end) allows to extend or reduce the stream selection when holding the @@ -4264,10 +4311,10 @@ menus. Some less common commands with no menu equivalent are:

        -
        -

        Tips and tricks

        -
        -

        Document notebook

        +
        +

        Tips and tricks

        +
        +

        Document notebook

        • Double-click on empty space in the notebook tab bar to open a new document.
        • @@ -4277,8 +4324,8 @@ shortcut). The interface pref must be enabled for this to work.
        • Middle-click on a document's notebook tab to close the document.
        -
        -

        Editor

        +
        +

        Editor

        • Alt-scroll wheel moves up/down a page.
        • Ctrl-scroll wheel zooms in/out.
        • @@ -4287,14 +4334,14 @@ shortcut). The interface pref must be enabled for this to work.
        • Ctrl-click on a bracket/brace to perform Go to Matching Brace.
        -
        -

        Interface

        +
        +

        Interface

        • Double-click on a symbol-list group to expand or compact it.
        - -
        -

        Hidden preferences

        +
        +

        Hidden preferences

        There are some uncommon preferences that are not shown in the Preferences dialog. These can be set by editing ~/.config/geany/geany.conf, then restarting Geany. Search for the key name, then edit the value. Example:

        @@ -4347,7 +4394,7 @@ scrollbars are hidden completely. use_gtk_word_boundaries Whether to look for the end of a word when using word-boundary related Scintilla -commands (see Scintilla keyboard +commands (see Scintilla keyboard commands). true @@ -4417,8 +4464,8 @@ disk won't run out of free space.
        -
        -

        Compile-time options

        +
        +

        Compile-time options

        There are some options which can only be changed at compile time, and some options which are used as the default for configurable options. To change these options, edit the appropriate source file @@ -4429,8 +4476,8 @@ not be changed.

        Note

        Most users should not need to change these options.

        -
        -

        src/geany.h

        +
        +

        src/geany.h

        @@ -4486,8 +4533,8 @@ when building on a non-Win32 system.
        -
        -

        project.h

        +
        +

        project.h

        @@ -4511,8 +4558,8 @@ open dialog.
        -
        -

        editor.h

        +
        +

        editor.h

        @@ -4537,9 +4584,9 @@ underscore.
        -
        -

        keyfile.c

        -

        These are default settings that can be overridden in the Preferences dialog.

        +
        +

        keyfile.c

        +

        These are default settings that can be overridden in the Preferences dialog.

        @@ -4618,8 +4665,8 @@ Geany provide.
        -
        -

        build.h

        +
        +

        build.h

        @@ -4649,8 +4696,8 @@ just aftereffects.
        -
        -

        GNU General Public License

        +
        +

        GNU General Public License

                     GNU GENERAL PUBLIC LICENSE
                        Version 2, June 1991
        @@ -4994,8 +5041,8 @@ library.  If this is what you want to do, use the GNU Library General
         Public License instead of this License.
         
        -
        -

        License for Scintilla and SciTE

        +
        +

        License for Scintilla and SciTE

        Copyright 1998-2003 by Neil Hodgson <neilh(at)scintilla(dot)org>

        All Rights Reserved

        Permission to use, copy, modify, and distribute this software and @@ -5014,9 +5061,9 @@ USE OR PERFORMANCE OF THIS SOFTWARE.

        diff --git a/doc/geany.txt b/doc/geany.txt index e8d09a87..0dc960e9 100644 --- a/doc/geany.txt +++ b/doc/geany.txt @@ -44,10 +44,10 @@ Some basic features of Geany: * Syntax highlighting * Code folding -* Symbol name autocompletion +* Autocompletion of symbols/words * Construct completion/snippets * Auto-closing of XML and HTML tags -* Call tips +* Calltips * Many supported filetypes including C, Java, PHP, HTML, Python, Perl, Pascal, and others * Symbol lists @@ -865,6 +865,24 @@ word on completion* preference is set (in `Editor Completions tab in preferences dialog`_) then any characters after the cursor that match a symbol or word are deleted. +Scope autocompletion +```````````````````` +E.g.:: + + struct + { + int i; + char c; + } foo; + +When you type ``foo.`` it will show an autocompletion list with 'i' and +'c' symbols. + +It only works for languages that set parent scope names for e.g. struct +members. Currently this means C-like languages. The C tag parser only +parses global scopes, so this won't work for structs or objects declared +in local scope. + User-definable snippets ^^^^^^^^^^^^^^^^^^^^^^^ @@ -1588,10 +1606,6 @@ Show documents list change between documents (see `Switching between documents`_) and to perform some common operations such as saving, closing and reloading. -Show full path name in documents list - Show the full directory path of the files you are editing in the - *Documents* list. - Fonts ````` @@ -2710,7 +2724,8 @@ Send Selection to Terminal Sends the current sele line (if there is no selection) to the embedded Terminal (VTE). -Reflow lines/paragraph Reformat selected lines or current paragraph, +Reflow lines/block Reformat selected lines or current + (indented) text block, breaking lines at the long line marker. @@ -2746,6 +2761,11 @@ Find Document Usage Finds all occurrences document and displays them in the messages window. +Mark All Highlight all matches of the current + word/selection in the current document + with a colored box. If there's nothing to + find, highlighted matches will be cleared. + **Go to** Navigate forward a location Switches to the next location in the navigation @@ -2916,6 +2936,27 @@ Configuration files =================== +Tools menu items +---------------- +There's a *Configuration files* submenu in the *Tools* menu that +contains items for some of the available user configuration files. +Clicking on one opens it in the editor for you to update. Geany will +reload the file after you have saved it. + +.. note:: + Other configuration files are not shown here and you will need to open + them manually and usually restart Geany to see any changes. + +There's also a *Reload Configuration* item which can be used if you +updated a configuration file outside of the current instance. This +item is also necessary to update syntax highlighting colors. + +.. note:: + Syntax highlighting colors aren't updated after saving + filetypes.common as this can take a short while depending on which + documents are open. + + Global configuration file -------------------------