~ubuntu-branches/ubuntu/raring/geany/raring-proposed

« back to all changes in this revision

Viewing changes to doc/html/ch03s05.html

  • Committer: Bazaar Package Importer
  • Author(s): Damián Viano
  • Date: 2008-05-02 11:37:45 UTC
  • mfrom: (1.2.1 upstream) (9 hardy)
  • mto: (3.2.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 12.
  • Revision ID: james.westby@ubuntu.com-20080502113745-xzp4g6dmovrpoj17
Tags: 0.14-1
New upstream release (Closes: #478126)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Search, replace and go to</title><link rel="stylesheet" href="geany.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><link rel="start" href="index.html" title="
2
 
                        Geany 0.9
3
 
                "><link rel="up" href="ch03.html" title="Chapter 3. Usage"><link rel="prev" href="ch03s04.html" title="Character sets and Unicode Byte-Order-Mark (BOM)"><link rel="next" href="ch03s06.html" title="Preferences"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Search, replace and go to</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch03s04.html">Prev</a> </td><th width="60%" align="center">Chapter 3. Usage</th><td width="20%" align="right"> <a accesskey="n" href="ch03s06.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="search_replace"></a>Search, replace and go to</h2></div></div></div><p>
4
 
                                This section describes search-related commands from the Search menu and
5
 
                                the editor window's popup menu:
6
 
                        </p><p>
7
 
                                </p><div class="itemizedlist"><ul type="disc"><li><p>Find</p></li><li><p>Find usage *</p></li><li><p>Find in files</p></li><li><p>Replace</p></li><li><p>Go to tag definition *</p></li><li><p>Go to tag declaration *</p></li><li><p>Go to line</p></li></ul></div><p>
8
 
                        </p><p>
9
 
                                * These items are available from the editor window's popup menu, or by
10
 
                                using a keyboard shortcut (see <a href="ch03s09.html" title="Keybindings">the section called “Keybindings”</a>).
11
 
                        </p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2752448"></a>Find</h3></div></div></div><p>
12
 
                                        The Find dialog is used for finding text within the current document.
13
 
                                        The syntax for the "Use regular expressions" option is shown in
14
 
                                        <a href="ch03s05.html#regexp" title="Table 3.2. Regular expressions">Table 3.2, “Regular expressions”</a>.
15
 
                                </p><p>
16
 
                                        </p><div class="figure"><a name="id2752468"></a><p class="title"><b>Figure 3.1. Find dialog</b></p><div><img src="images/find_dialog.jpg" alt="Find dialog"></div></div><p>
17
 
                                </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2752484"></a>Find usage</h3></div></div></div><p>
18
 
                                        Find usage searches all open files. If there is a selection, then it is used
19
 
                                        as the search text; otherwise the current word is used.
20
 
                                        The current word is either taken from the word nearest the edit cursor, or
21
 
                                        the word underneath the popup menu click position when the popup menu is
22
 
                                        used.
23
 
                                        The search results are shown in the Messages window.
24
 
                                </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2752500"></a>Find in files</h3></div></div></div><p>
25
 
                                        Find in files is a more powerful version of Find usage that searches all files
26
 
                                        in a certain directory using the Grep tool. The Grep tool must be correctly set
27
 
                                        in Preferences to the path of the system's Grep utility.
28
 
                                </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2752514"></a>Replace</h3></div></div></div><p>
29
 
                                        The Replace dialog has the same options for finding text as the Find
30
 
                                        dialog. There is also a "Replace in all files" option, which is used with the
31
 
                                        Replace All button to perform the replacement for all open files.
32
 
                                </p><p>
33
 
                                        The "Use regular expressions" option applies both to the search string and
34
 
                                        to the replacement text; for the latter back references can be used -
35
 
                                        see the entry for '\n' in <a href="ch03s05.html#regexp" title="Table 3.2. Regular expressions">Table 3.2, “Regular expressions”</a>.
36
 
                                </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2752540"></a>Go to tag definition</h3></div></div></div><p>
37
 
                                        If the current word is the name of a function and the file containing the
38
 
                                        function definition (a.k.a. function body) is open, Go to tag definition will
39
 
                                        switch to that file and go to the corresponding line number.
40
 
                                        The current word is either taken from the word nearest the edit cursor, or
41
 
                                        the word underneath the popup menu click position when the popup menu is
42
 
                                        used.
43
 
                                </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2689791"></a>Go to tag declaration</h3></div></div></div><p>
44
 
                                        Like Go to tag definition, but for a forward function declaration (a.k.a.
45
 
                                        function prototype) instead of a function definition.
46
 
                                </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2689804"></a>Go to line</h3></div></div></div><p>
47
 
                                        Go to a particular line number in the current file.
48
 
                                </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2689815"></a>Regular expressions</h3></div></div></div><p>
49
 
                                        You can use regular expressions in the Find and Replace dialogs by
50
 
                                        selecting the "Use regular expressions" check box.
51
 
                                        The syntax is POSIX-like, as described below in <a href="ch03s05.html#regexp" title="Table 3.2. Regular expressions">Table 3.2, “Regular expressions”</a>.
52
 
                                        </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
53
 
                                                Searching backwards with regular expressions is not supported.
54
 
                                        </p></div><p>
55
 
                                </p><p>
56
 
                                        </p><div class="table"><a name="regexp"></a><p class="title"><b>Table 3.2. Regular expressions</b></p><table summary="Regular expressions" cellspacing="0" cellpadding="4" border="1"><colgroup><col><col></colgroup><thead><tr><th colspan="2" align="left">
57
 
                                                                                In a regular expression, the following characters are interpreted:
58
 
                                                                        </th></tr></thead><tbody><tr><td>.</td><td>Matches any character.</td></tr><tr><td>(</td><td>This marks the start of a region for tagging a match.</td></tr><tr><td>)</td><td>This marks the end of a tagged region.</td></tr><tr><td>\n</td><td>Where n is 1 through 9 refers to the first through ninth tagged region
59
 
                                                                                   when replacing. For example, if the search string was Fred([1-9])XXX
60
 
                                                                                   and the replace string was Sam\1YYY, when applied to Fred2XXX this would
61
 
                                                                                   generate Sam2YYY.
62
 
                                                                        </td></tr><tr><td>\&lt;</td><td>This matches the start of a word.</td></tr><tr><td>\&gt;</td><td>This matches the end of a word.</td></tr><tr><td>\x</td><td>This allows you to use a character x that would otherwise have a special
63
 
                                                                                   meaning. For example, \[ would be interpreted as [ and not as the start
64
 
                                                                                   of a character set. Use \\ for a literal backslash.
65
 
                                                                        </td></tr><tr><td>[...]</td><td>This indicates a set of characters, for example, [abc] means any of the
66
 
                                                                                   characters a, b or c. You can also use ranges, for example [a-z] for any
67
 
                                                                                   lower case character.
68
 
                                                                        </td></tr><tr><td>[^...]</td><td>The complement of the characters in the set. For example, [^A-Za-z] means
69
 
                                                                                   any character except an alphabetic character.
70
 
                                                                        </td></tr><tr><td>^</td><td>This matches the start of a line (unless used inside a set, see above).</td></tr><tr><td>$</td><td>This matches the end of a line.</td></tr><tr><td>*</td><td>This matches 0 or more times. For example, Sa*m matches Sm, Sam, Saam, Saaam and so on.</td></tr><tr><td>+</td><td>This matches 1 or more times. For example, Sa+m matches Sam, Saam, Saaam and so on.</td></tr></tbody></table></div><p>
71
 
                                </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Partial POSIX compatibility</h3><p>
72
 
                                                Note that the POSIX '?' regular expression character for optional matching
73
 
                                                is not supported by the Find and Replace dialogs.
74
 
                                        </p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch03s04.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch03.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch03s06.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Character sets and Unicode Byte-Order-Mark (BOM) </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Preferences</td></tr></table></div></body></html>