011fcde8ea
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1551 ea778897-0a13-0410-b9d1-a72fbfd435f5
86 lines
7.8 KiB
HTML
86 lines
7.8 KiB
HTML
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Editing</title><link rel="stylesheet" href="geany.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.72.0"><link rel="start" href="index.html" title="Geany 0.11"><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="Search, replace and go to"></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">Editing</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="editing"></a>Editing</h2></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="editing_text_dnd"></a>Drag and drop of text</h3></div></div></div><p>
|
||
If you drag selected text in the editor widget of
|
||
<span class="application">Geany</span> 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 <span class="application">Geany</span> 0.11 - before the selected text
|
||
was copied to the new position.
|
||
</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="editing_indentation"></a>Auto indentation</h3></div></div></div><p>
|
||
<span class="application">Geany</span> knows three types of auto indentation:
|
||
None, Basic and Advanced.
|
||
</p><div class="variablelist"><p class="title"><b>Auto indentation types</b></p><dl><dt><span class="term">None</span></dt><dd><p>
|
||
Disables auto indentation completely.
|
||
</p></dd><dt><span class="term">Basic</span></dt><dd><p>
|
||
Adds the same amount of whitespace on a new line as on the last line.
|
||
</p></dd><dt><span class="term">Advanced</span></dt><dd><p>
|
||
Does the same as Basic but also indents curly brackets and adds a tabulator
|
||
character (or spaces) on a new line after an opening '{' brace.
|
||
</p></dd></dl></div><p>
|
||
</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="editing_cc"></a>Construct completion</h3></div></div></div><p>
|
||
Built-in construct completion is available for C-like languages. By default the
|
||
<span><strong class="keycap">Tab</strong></span> key is used straight after typing the construct keyword.
|
||
</p><p>
|
||
Example: <code class="literal">for</code><TAB>
|
||
</p><p>
|
||
typed into a C file expands to:
|
||
</p><p>
|
||
</p><div class="literallayout"><p><code class="literal">for (i = 0; i < ; i++)<br>
|
||
{<br>
|
||
<br>
|
||
}<br>
|
||
</code></p></div><p>
|
||
</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="editing_bookmarks"></a>Bookmarks</h3></div></div></div><p>
|
||
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.
|
||
</p><p>
|
||
To place a mark on a line, either left-mouse-click in the left margin of the editor window, or else
|
||
use Ctrl-m. Either way, this will produce a small green plus symbol in the margin. You can have as
|
||
many marks in a document as you like. Click again (or use Ctrl-m again) to remove the bookmark.
|
||
To remove all the marks in a given document, use "Remove Markers" in the Document menu.
|
||
</p><p>
|
||
To navigate down your document, jumping from one mark to the next, use Ctrl-. (control period).
|
||
To go in the opposite direction on the page, use Ctrl-, (control comma). Using the bookmarking
|
||
feature 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.
|
||
</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="editing_definable_commands"></a>Send text through definable commands</h3></div></div></div><p>
|
||
You can define several custom commands in <span class="application">Geany</span> 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
|
||
formatting tools with Geany in a general way.
|
||
The selected text will be sent to the standard input of the executed command,
|
||
so the command should be able to read from it and it should print all results
|
||
to its standard output which will be read by <span class="application">Geany</span>.
|
||
To help finding errors in executing the command, the output of the program's
|
||
standard error will be printed on <span class="application">Geany</span>'s standard
|
||
output.
|
||
</p><p>
|
||
To add a custom command, just go to the Set Custom Commands dialog in the
|
||
Format sub menu of the Edit and Popup menu. Then click on Add 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.
|
||
</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="editing_context_actions"></a>Context actions</h3></div></div></div><p>
|
||
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 <a href="ch03s12.html" title="Keybindings">the section called “Keybindings”</a>).
|
||
</p><p>
|
||
The command can be specified in the preferences dialog and additionally for
|
||
each filetype (see "context_action_cmd" in <a href="ch04.html#filetypes_format" title="Format">the section called “Format”</a>).
|
||
At executing, the filetype specific command is used if available otherwise the
|
||
command specified in the preferences dialog is executed.
|
||
</p><p>
|
||
The passed word can be referred with the wildcard "%s" everywhere in the
|
||
command, before executing it will be replaced by the current word.
|
||
For example, the command to open the PHP API documentation would be:
|
||
</p><p>
|
||
<span><strong class="command">firefox "http://www.php.net/%s"</strong></span>
|
||
</p><p>
|
||
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.
|
||
</p></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"> Search, replace and go to</td></tr></table></div></body></html>
|