File: More-Advanced-Features.html

package info (click to toggle)
ne 2.1-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 3,540 kB
  • ctags: 3,408
  • sloc: ansic: 24,666; perl: 500; makefile: 207; sh: 9
file content (137 lines) | stat: -rw-r--r-- 8,275 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<html lang="en">
<head>
<title>More Advanced Features - ne's manual</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="ne's manual">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Basics.html#Basics" title="Basics">
<link rel="prev" href="Basic-Macros.html#Basic-Macros" title="Basic Macros">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
</head>
<body>
<div class="node">
<a name="More-Advanced-Features"></a>
<p>
Previous:&nbsp;<a rel="previous" accesskey="p" href="Basic-Macros.html#Basic-Macros">Basic Macros</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Basics.html#Basics">Basics</a>
<hr>
</div>

<h3 class="section">2.7 More Advanced Features</h3>

<p><a name="index-UTF_002d8-support-45"></a><a name="index-Bookmarks-46"></a><a name="index-Automatic-Completion-47"></a><a name="index-MS_002dDOS-files-48"></a><a name="index-File-requester-49"></a><a name="index-Binary-files-50"></a><a name="index-Executing-_0040sc_007buni_002ax_007d-commands-51"></a>

<h4 class="subsection">2.7.1 UTF-8 support</h4>

<p>UTF-8 is a character encoding that can represent the whole ISO 10646
character set&mdash;two billion characters! <code>ne</code> can load and
manipulate UTF-8 files transparently, in particular on systems that
provide UTF-8 I/O. See <a href="UTF_002d8-Support.html#UTF_002d8-Support">UTF-8 Support</a>.

<h4 class="subsection">2.7.2 Bookmarks</h4>

<p>It often happens that you have to browse through a file, switching frequently
between a small number of positions. In this case, you can use
<dfn>bookmarks</dfn>. There are up to ten bookmarks per document, each designated
by a single digit, with the default being &lsquo;<samp><span class="samp">0</span></samp>&rsquo;. You can set them with the
<code>SetBookmark</code> command, and you can return to any set bookmark with the
<code>GotoBookmark</code> command. Also, <code>ne</code> sets an automatic bookmark
(designated by &lsquo;<samp><span class="samp">-</span></samp>&rsquo;) to your current position in a document whenever you
use the <code>GotoBookmark</code> command. You can use this automatic bookmark to
return to that previous location with a <code>GotoBookmark -</code> command. Doing
so will reset the automatic bookmark, so that subsequent <code>GotoBookmark -</code>
commands will switch between those two locations. See <a href="SetBookmark.html#SetBookmark">SetBookmark</a>,
<a href="GotoBookmark.html#GotoBookmark">GotoBookmark</a>, and <a href="UnsetBookmark.html#UnsetBookmark">UnsetBookmark</a>. Note that in the default
configuration no key binding is assigned to these commands. If you use them
frequently, you may want to change the key bindings. See <a href="Key-Bindings.html#Key-Bindings">Key Bindings</a>.

<h4 class="subsection">2.7.3 Automatic Completion</h4>

<p>The <code>AutoComplete</code> command helps you extend a given prefix with matching
words from your open documents.  You can specify the <code>AutoCompete</code> command
and prefix on the command line, or you can enter the prefix directly into your
document and activate the <code>AutoComplete</code> command. With the cursor at the
right end of your prefix, activate the <code>AutoComplete</code> command by entering
either the &lt;Escape&gt;-&lt;Tab&gt; or the &lt;Escape&gt;-&lt;I&gt; key sequence, or
the <kbd>&lt;Control&gt;-&lt;META&gt;-&lt;I&gt;</kbd> key combination, or by selecting
<code>AutoComplete</code> from the <code>Extras</code> menu.

   <p>If the prefix can be extended
unambiguously, the extension will be immediately inserted into your
document (this is the case, for instance, if only one word matches the
prefix), and a message will tell you whether the extension is an actual word
or just the longest possible extension (for instance, if you expand
&lsquo;<samp><span class="samp">fo</span></samp>&rsquo; and your document contains &lsquo;<samp><span class="samp">foobar</span></samp>&rsquo; and &lsquo;<samp><span class="samp">foofoo</span></samp>&rsquo; then the
partial match will be &lsquo;<samp><span class="samp">foo</span></samp>&rsquo;). Otherwise, <code>ne</code> presents you with
a list of all matching words: choose the one you want and press
&lt;Return&gt;, to select it; otherwise, press &lt;f1&gt;, &lt;Escape&gt; or
&lt;Escape&gt;-&lt;Escape&gt; to cancel the completion operation.

   <p>The current
state of the <code>CaseSearch</code> flag determines whether the prefix match is
case sensitive. Any matching words which only exist in other open
documents but not the current one are displayed in bold with an asterisk;
think of that as a warning that if you select one of these bold words you
will introduce a new word into your current document. Plain words already
exist somewhere in your current document. See <a href="AutoComplete.html#AutoComplete">AutoComplete</a>, and
<a href="CaseSearch.html#CaseSearch">CaseSearch</a>.

<h4 class="subsection">2.7.4 MS-DOS files</h4>

<p><code>ne</code> will detect automagically the presence of MS-DOS line terminators
(CR/LFs) and set the CR/LF flag. When the file will be saved, the
terminators will be restored correctly. You can change this behaviour
using the <code>PreserveCR</code> and <code>CRLF</code> commands. See <a href="PreserveCR.html#PreserveCR">PreserveCR</a>,
and <a href="CRLF.html#CRLF">CRLF</a>.

<h4 class="subsection">2.7.5 Binary files</h4>

<p><code>ne</code> allows a simplified form of <dfn>binary editing</dfn>. If the
binary flag is set, only NULLs are considered newlines when loading or
saving. Thus, binary files can be safely loaded, modified and saved. 
Inserting a new line or joining two lines has the effect of inserting or
deleting a NULL. Be careful not to mismatch the state of the binary flag
when loading and saving the same file.

<h4 class="subsection">2.7.6 File requester</h4>

<p>The <code>NoFileReq</code> command deactivates the file requester. It is
intended for &ldquo;tough guys&rdquo; who always remember the names of their files and can
type them at the speed of light (maybe with the help of the completer,
which is activated by the &lt;Tab&gt; key; see <a href="The-Input-Line.html#The-Input-Line">The Input Line</a>).

<h4 class="subsection">2.7.7 Executing <span class="sc">un*x</span> commands</h4>

<p>There are three ways to execute <span class="sc">un*x</span> commands from within <code>ne</code>. 
The <code>System</code> command can run any <span class="sc">un*x</span> command; you
will get back into <code>ne</code> as soon as the command execution terminates. 
See <a href="System.html#System">System</a>. The <code>Through</code> (<kbd>&lt;Meta&gt;-T</kbd>) command (which can be found in the
&lsquo;<samp><span class="samp">Edit</span></samp>&rsquo; menu), however, is much more powerful; it cuts the current
block, passes it as standard input to any <span class="sc">un*x</span> command, and pastes the
command's output at the current cursor position. This provides a neat
way to pass a part of your document through one of <span class="sc">un*x</span>'s many
<dfn>filter commands</dfn> (commands that read from standard input and write
to standard output, e.g., <code>sort</code>). See <a href="Through.html#Through">Through</a>. Finally, you can use the
<code>Suspend</code> (<kbd>&lt;Control&gt;-Z</kbd>) command to temporarily stop <code>ne</code> and
return to your command shell. See <a href="Suspend.html#Suspend">Suspend</a>.

<h4 class="subsection">2.7.8 Advanced key bindings</h4>

<p>For an exhaustive list of the remaining features of <code>ne</code>, see
<a href="Reference.html#Reference">Reference</a>.

   </body></html>