/usr/share/doc/ne/html/Hints-and-Tricks.html is in ne-doc 3.0.1-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
<head>
<title>ne’s manual: Hints and Tricks</title>
<meta name="description" content="ne’s manual: Hints and Tricks">
<meta name="keywords" content="ne’s manual: Hints and Tricks">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
<link href="Command-Index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="index.html#Top" rel="up" title="Top">
<link href="Motivations-and-Design.html#Motivations-and-Design" rel="next" title="Motivations and Design">
<link href="Changing-Menus.html#Changing-Menus" rel="prev" title="Changing Menus">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.indentedblock {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
div.smalllisp {margin-left: 3.2em}
kbd {font-style:oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space:nowrap}
span.nolinebreak {white-space:nowrap}
span.roman {font-family:serif; font-weight:normal}
span.sansserif {font-family:sans-serif; font-weight:normal}
ul.no-bullet {list-style: none}
-->
</style>
</head>
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<a name="Hints-and-Tricks"></a>
<div class="header">
<p>
Next: <a href="Motivations-and-Design.html#Motivations-and-Design" accesskey="n" rel="next">Motivations and Design</a>, Previous: <a href="Configuration.html#Configuration" accesskey="p" rel="prev">Configuration</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> [<a href="Command-Index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="Hints-and-Tricks-1"></a>
<h2 class="chapter">6 Hints and Tricks</h2>
<a name="index-Escape-usage"></a>
<a name="index-Turbo-adjustment"></a>
<a name="index-Shortcuts-not-working"></a>
<a name="index-Meta-key-2"></a>
<a name="index-Changing-colors"></a>
<dl compact="compact">
<dt><em>Use <tt class="key">f1</tt> or <tt class="key">Escape</tt>-<tt class="key">Escape</tt>, not <tt class="key">Escape</tt>.</em></dt>
<dd><p>Due to the limitations of the techniques used when communicating with a
terminal, it is not possible to “decide” that the user pressed the
<tt class="key">Escape</tt> key for about a second after the actual key press
(see <a href="EscapeTime.html#EscapeTime">EscapeTime</a>). This means that you will experience annoying delays when
using menus. If you have no <tt class="key">f1</tt> key, use <tt class="key">Escape</tt>-<tt class="key">Escape</tt>, or
redefine a keystroke assigning the command <code>Escape</code>, and you will be
able to use that keystroke instead of <tt class="key">Escape</tt>. Unfortunately,
some GUI-based terminals (most notably, <code>gnome-terminal</code>) use <tt class="key">f1</tt>
for their own purposes; in that case, you can assign the <code>Escape</code>
command to another key (see <a href="Configuration.html#Configuration">Configuration</a>).
</p>
</dd>
<dt><em>Check for the presence of a <tt class="key">Meta</tt> key.</em></dt>
<dd><p>If your system has a standard <tt class="key">Meta</tt> or <tt class="key">Alt</tt> key, there is a
good chance that you have several other shortcuts. If the built-in
<tt class="key">Meta</tt> bindings do not work, you must discover which is the effect
of the <tt class="key">Meta</tt> in your terminal emulator. Indeed, it is possible in
theory to configure about 150 shortcuts. See <a href="Configuration.html#Configuration">Configuration</a>. In any
case, prefixing a key with <tt class="key">Escape</tt> has the same effect as holding
down <tt class="key">Meta</tt>, so with the standard key bindings
you can, for instance, advance by word with <kbd><span class="key">Escape</span></kbd> followed by <kbd>F</kbd>.
</p>
</dd>
<dt><em>Mac users should turn on “Delete sends CTRL-H” in the <code>Terminal</code> settings.</em></dt>
<dd><p>If you are a Mac user, you need to check the “Delete sends CTRL-H” option
in the ‘<samp>Advanced</samp>’ tab of the <code>Terminal</code> application settings.
</p>
</dd>
<dt><em><code>ne</code> does tilda expansion.</em></dt>
<dd><p>When you have to specify a file name, you can always start with <samp>~/</samp> in
order to specify your home directory, or <samp>~<var>user</var>/</samp> to
specify the home directory of another user.
</p>
</dd>
<dt><em>It is easy to correct bad colors.</em></dt>
<dd><p>Sometimes, due to different opinions about the best default foreground and
background colors, some of the color choices in a syntax file might be
unreadable (for instance, ‘<samp>dim white</samp>’ on a terminal with a white
background). Just copy the guilty syntax specification file to the
<samp>~/.ne/syntax</samp> directory, and change the color names at the start of
the file.
</p>
</dd>
<dt><em>Use the ‘<samp>tabs</samp>’ syntax to distinguish <small>TAB</small>s from <small>SPACE</small>s.</em></dt>
<dd><p>When you’re struggling to clean up a mix of <small>TAB</small>s and <small>SPACE</small>s,
temporarily switching to the ‘<samp>tabs</samp>’ syntax may help. The command
<code>Syntax tabs</code> makes <small>TAB</small> characters show up in a different
background color from <small>SPACE</small>s. Once you’ve gotten your white space
issues straightened out, you can switch back to the syntax appropriate
for your current file type.
</p>
</dd>
<dt><em><code>ne</code> does interactive filename completion.</em></dt>
<dd><p>When you have to specify a file name as last element of a long input,
you can invoke the completer using <tt class="key">Tab</tt>. 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 <tt class="key">f1</tt>, which will let
you edit again your previous input, or with <tt class="key">Tab</tt>, which will copy
your current selection over your previous file name. In other words, you
can freely alternate completion, editing and browsing.
</p>
</dd>
<dt><em>Disable the status bar for slow connections.</em></dt>
<dd><p><code>ne</code> tries to emit as few characters as possible when updating the
screen. However, for each key you type it is likely that the status
bar has to be updated. If your connection is very slow, you can
disable the status bar to get a quicker response (see <a href="StatusBar.html#StatusBar">StatusBar</a>).
</p>
</dd>
<dt><em>The <tt class="key">Escape</tt> delay when activating menus can be avoided.</em></dt>
<dd><p>If you press after <tt class="key">Escape</tt> any key that does not produce the second
character of an escape sequence, <code>ne</code> will immediately recognize the
<tt class="key">Escape</tt> key code as such. Since non-alphabetical keys have no effect while
browsing through the menus, if you’re forced to use <tt class="key">Escape</tt> 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). Alternatively, you can just type <tt class="key">Escape</tt>
twice in a row.
</p>
</dd>
<dt><em>Use turbo mode for lengthy operations.</em></dt>
<dd><p>Turbo mode (see <a href="Turbo.html#Turbo">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.
</p>
</dd>
<dt><em>Regular expressions are powerful, and slow.</em></dt>
<dd><p>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: in
particular, if you use them on a UTF-8 text, <code>ne</code> has to transform
them into an equivalent (but more complex) expression that cannot match
partially a UTF-8 sequence, and this expansion makes the search even
slower.
</p>
</dd>
<dt><em>Use the correct movement commands in a macro.</em></dt>
<dd><p>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.
</p>
</dd>
<dt><em>Some preferences can be preserved even with automatic preferences.</em></dt>
<dd><p>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.
</p>
</dd>
<dt><em>If some keystrokes do not work, check for system-specific features.</em></dt>
<dd><p>Sometimes it can happen that a keystroke does not work—for instance,
<kbd><span class="key">Control</span>-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><span class="key">Control</span>-S</kbd> and
<kbd><span class="key">Control</span>-Q</kbd> would block and release the output
instead of saving and quitting.
</p>
<p>In these cases, if you do not need the system
feature you should check how to disable it: for instance, some <small>BSD</small>-like
systems feature a delayed suspend signal that is not in the <small>POSIX</small>
standard, and thus cannot be disabled by <code>ne</code>. On <small>HP-UX</small>, the command
<code>stty dsusp ^-</code> would disable the signal, and would let the control
sequence previously assigned to it to run up to <code>ne</code>.
</p>
</dd>
</dl>
<hr>
<div class="header">
<p>
Next: <a href="Motivations-and-Design.html#Motivations-and-Design" accesskey="n" rel="next">Motivations and Design</a>, Previous: <a href="Configuration.html#Configuration" accesskey="p" rel="prev">Configuration</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> [<a href="Command-Index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
</body>
</html>
|