File: ne_6.html

package info (click to toggle)
ne 1.19-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,948 kB
  • ctags: 2,584
  • sloc: ansic: 15,551; perl: 443; makefile: 152; sh: 10
file content (131 lines) | stat: -rw-r--r-- 6,588 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
<HTML>
<HEAD>
<!-- Created by texi2html 1.56k from ne.texinfo on 27 March 2001 -->

<TITLE>ne's manual - Hints and Tricks</TITLE>
</HEAD>
<BODY>
Go to the <A HREF="ne_1.html">first</A>, <A HREF="ne_5.html">previous</A>, <A HREF="ne_7.html">next</A>, <A HREF="ne_12.html">last</A> section, <A HREF="ne_toc.html">table of contents</A>.
<P><HR><P>


<H1><A NAME="SEC170" HREF="ne_toc.html#TOC170">Hints and Tricks</A></H1>
<P>
<A NAME="IDX201"></A>
<A NAME="IDX202"></A>
<A NAME="IDX203"></A>
<A NAME="IDX204"></A>


<DL COMPACT>

<DT><EM>Use <KBD>f1</KBD>, not <KBD>Escape</KBD>.</EM>
<DD>
Due to the limitations of the techniques used when communicating with a
terminal, it is not possible to "decide" that the user pressed the
<KBD>Escape</KBD> key for about a second after the actual key press
(see section <A HREF="ne_4.html#SEC106">EscapeTime</A>). This means that you will experience annoying delays when
using menus. If you have no <KBD>f1</KBD> key, redefine a keystroke assigning the
command <CODE>Escape</CODE>, and you will be able to use that keystroke instead of
<KBD>Escape</KBD>.

<DT><EM>Check for the presence of a <KBD>Meta</KBD> key.</EM>
<DD>
If your system has a standard <KBD>Meta</KBD> or <KBD>Alt</KBD> key, there is a
good chance that you have several other shortcuts. If the built-in
<KBD>Meta</KBD> bindings do not work, you must discover which is the effect
of the <KBD>Meta</KBD> in your terminal emulator. Indeed, it is possible in
theory to configure about 150 shortcuts. See section <A HREF="ne_5.html#SEC167">Configuration</A>.

<DT><EM><CODE>ne</CODE> does tilda expansion.</EM>
<DD>
When you have to specify a file name, you can always start with <TT>`~/'</TT> in
order to specify your home directory, or <TT>`~<VAR>user</VAR>/'</TT> to
specify the home directory of another user.

<DT><EM><CODE>ne</CODE> does interactive filename completion.</EM>
<DD>
When you have to specify a file name as last element of a long input,
you can invoke the completer using <KBD>Tab</KBD>. If you hit it twice in a
row, you will enter the file requester, where you can navigate and
escape back to the command line, either with <KBD>f1</KBD>, which will let
you edit again your previous input, or with <KBD>Tab</KBD>, which will copy
your current selection over your previous file name. In other words, you
can freely alternate completion, editing and browsing.

<DT><EM>The <KBD>Escape</KBD> delay when activating menus can be avoided.</EM>
<DD>
If you press after <KBD>Escape</KBD> any key that does not produce the second
character of an escape sequence, <CODE>ne</CODE> will immediately recognize the
<KBD>Escape</KBD> key code as such. Since non-alphabetical keys have no effect while
browsing through the menus, if you're forced to use <KBD>Escape</KBD> as menu
activator you can press, for instance, <SAMP>`,'</SAMP> just after it to speed
up the menu activation (note that <SAMP>`:'</SAMP> would not work, because it would
activate the command line).

<DT><EM>Use turbo mode for lengthy operations.</EM>
<DD>
Turbo mode (see section <A HREF="ne_4.html#SEC108">Turbo</A>) allows performing very complex operations
without updating the screen until the operations are complete. This can
be a major plus if you are editing very long files, or if your terminal
is slow. If the default value (0, which means twice the number of
visible rows) does not give you the best results, experiment other
values.

<DT><EM>Regular expressions are powerful, and slow.</EM>
<DD>
Regular expressions must be studied very carefully. If you spend a lot
of time doing editing, it is definitely reasonable to study even their most
esoteric features. Very complex editing actions can be performed by a single
find/replace using the <CODE>\<VAR>n</VAR></CODE> convention. But remember always that
regular expressions are much slower than a normal search.

<DT><EM>Use the correct movement commands in a macro.</EM>
<DD>
Many boring, repetitive editing actions can be performed in a breeze
by recording them the first time. Remember, however, that while recording
a complex macro you should always use a cursor movement that will apply
in a different context. For instance, if you are copying a word, you cannot
move with cursor keys, because that word at another application of the
macro could be of a different length. Rather, use the next/previous word
keys and the <CODE>MoveEOW</CODE> command, which guarantee a correct behaviour in
all situations.

<DT><EM>Some preferences can be preserved even with automatic preferences.</EM>
<DD>
When you save an autoprefs file, the file simply contains a macro that,
when executed, produces the current configuration. However, you could want,
for instance, to never change the insert/overwrite state. In this case, just
edit the autoprefs files with <CODE>ne</CODE> and delete the line containing the
command setting the insert flag. When the autoprefs are loaded later, the
insert flag will be left untouched. This trick is particularly useful with
the <CODE>StatusBar</CODE> and <CODE>FastGUI</CODE> commands.

<DT><EM>If some keystrokes do not work, check for system-specific features.</EM>
<DD>
Sometimes it can happen that a keystroke does not work--for instance,
<KBD><KBD>Control</KBD>-O</KBD> does not open a file. This usually is due to the kernel
tracking that key for its purposes. For instance, along a <CODE>telnet</CODE>
connection with xon/xoff flow control, <KBD><KBD>Control</KBD>-S</KBD> and
<KBD><KBD>Control</KBD>-Q</KBD> would block and release the output
instead of saving and quitting.

In these cases, if you do not need the system
feature you should check how to disable it: for instance, some BSD-like
systems feature a delayed suspend signal that is not in the POSIX
standard, and thus cannot be disabled by <CODE>ne</CODE>. On HP-UX, the command
<SAMP>`stty dsusp ^-'</SAMP> would disable the signal, and would let the control
sequence previously assigned to it to run up to <CODE>ne</CODE>.

Another example is the <CODE>NCSA Telnet</CODE> software for the Macintosh. Unless
you modify your settings in such a way to disable <KBD><KBD>Control</KBD>-S</KBD> and
<KBD><KBD>Control</KBD>-Q</KBD> as flow controllers, you will not be able to use them
as keystrokes (even if <CODE>ne</CODE> is doing all it can to explain to
the software that it does <EM>not</EM> need xon/xoff flow control...).

</DL>

<P><HR><P>
Go to the <A HREF="ne_1.html">first</A>, <A HREF="ne_5.html">previous</A>, <A HREF="ne_7.html">next</A>, <A HREF="ne_12.html">last</A> section, <A HREF="ne_toc.html">table of contents</A>.
</BODY>
</HTML>