132 |
<p>An easy way to customize Viper is to change the values of constants used in |
<p>An easy way to customize Viper is to change the values of constants used in |
133 |
Viper. Here is the list of the constants used in Viper and their default |
Viper. Here is the list of the constants used in Viper and their default |
134 |
values. The corresponding :se command is also indicated. (The symbols |
values. The corresponding :se command is also indicated. (The symbols |
135 |
<code>t</code> and <code>nil</code> represent "true" and "false" in Lisp). |
<code>t</code> and <code>nil</code> represent “true” and “false” in Lisp). |
136 |
</p> |
</p> |
137 |
<p>Viper supports both the abbreviated Vi variable names and their full |
<p>Viper supports both the abbreviated Vi variable names and their full |
138 |
names. Variable completion is done on full names only. <kbd>TAB</kbd> and |
names. Variable completion is done on full names only. <kbd>TAB</kbd> and |
141 |
a value, if applicable. For instance, <kbd>:se au <kbd>SPC</kbd></kbd> will complete the |
a value, if applicable. For instance, <kbd>:se au <kbd>SPC</kbd></kbd> will complete the |
142 |
command to <kbd>:set autoindent</kbd>; <kbd>:se ta <kbd>SPC</kbd></kbd> will complete the command |
command to <kbd>:set autoindent</kbd>; <kbd>:se ta <kbd>SPC</kbd></kbd> will complete the command |
143 |
and prompt further like this: <kbd>:set tabstop = </kbd>. |
and prompt further like this: <kbd>:set tabstop = </kbd>. |
144 |
However, typing <kbd>:se ts <kbd>SPC</kbd></kbd> will produce a "No match" message |
However, typing <kbd>:se ts <kbd>SPC</kbd></kbd> will produce a “No match” message |
145 |
because <kbd>ts</kbd> is an abbreviation for <kbd>tabstop</kbd> and Viper supports |
because <kbd>ts</kbd> is an abbreviation for <kbd>tabstop</kbd> and Viper supports |
146 |
completion on full names only. However, you can still hit <kbd>RET</kbd> |
completion on full names only. However, you can still hit <kbd>RET</kbd> |
147 |
or <kbd>=</kbd>, which will complete the command like this: <kbd>:set ts = </kbd> and |
or <kbd>=</kbd>, which will complete the command like this: <kbd>:set ts = </kbd> and |
231 |
<dt> <code>viper-search-scroll-threshold 2</code></dt> |
<dt> <code>viper-search-scroll-threshold 2</code></dt> |
232 |
<dd><p>If search lands within this many lines of the window top or bottom, the |
<dd><p>If search lands within this many lines of the window top or bottom, the |
233 |
window will be scrolled up or down by about 1/7-th of its size, to reveal |
window will be scrolled up or down by about 1/7-th of its size, to reveal |
234 |
the context. If the value is negative--don't scroll. |
the context. If the value is negative—don't scroll. |
235 |
</p></dd> |
</p></dd> |
236 |
<dt> <code>viper-tags-file-name "TAGS"</code></dt> |
<dt> <code>viper-tags-file-name "TAGS"</code></dt> |
237 |
<dd><p>The name of the file used as the tag table. |
<dd><p>The name of the file used as the tag table. |
352 |
</p></dd> |
</p></dd> |
353 |
<dt> <code>viper-want-emacs-keys-in-vi</code></dt> |
<dt> <code>viper-want-emacs-keys-in-vi</code></dt> |
354 |
<dd><p>This is set to <code>nil</code> for user |
<dd><p>This is set to <code>nil</code> for user |
355 |
level 1 and to <code>t</code> for user levels 2-4. |
level 1 and to <code>t</code> for user levels 2–4. |
356 |
At level 5, users are allowed to set this variable as they please (the |
At level 5, users are allowed to set this variable as they please (the |
357 |
default for this level is <code>t</code>). |
default for this level is <code>t</code>). |
358 |
If set to <code>nil</code>, complete Vi compatibility is provided |
If set to <code>nil</code>, complete Vi compatibility is provided |
828 |
packages. Fortunately, these modes operate on read-only buffers and are |
packages. Fortunately, these modes operate on read-only buffers and are |
829 |
designed not for editing files, but for special-purpose browsing, reading |
designed not for editing files, but for special-purpose browsing, reading |
830 |
news, mail, etc., and Vi commands are meaningless in these situations. For |
news, mail, etc., and Vi commands are meaningless in these situations. For |
831 |
this reason, Viper doesn't force Vi state on such major modes--it |
this reason, Viper doesn't force Vi state on such major modes—it |
832 |
brings them in Emacs state. You can switch to Vi state by typing <kbd>C-z</kbd> |
brings them in Emacs state. You can switch to Vi state by typing <kbd>C-z</kbd> |
833 |
if, for instance, you want to do Vi-style search in a buffer (although, |
if, for instance, you want to do Vi-style search in a buffer (although, |
834 |
usually, incremental search, which is bound to <kbd>C-s</kbd>, is sufficient in |
usually, incremental search, which is bound to <kbd>C-s</kbd>, is sufficient in |
945 |
If you hit something other than <kbd>/</kbd> after the first <kbd>/</kbd> or if the |
If you hit something other than <kbd>/</kbd> after the first <kbd>/</kbd> or if the |
946 |
second <kbd>/</kbd> doesn't follow quickly enough, then Viper will issue the |
second <kbd>/</kbd> doesn't follow quickly enough, then Viper will issue the |
947 |
usual prompt <kbd>/</kbd> and will wait for input, as usual in Vi. |
usual prompt <kbd>/</kbd> and will wait for input, as usual in Vi. |
948 |
If you don't like this behavior, you can "unrecord" these macros in your |
If you don't like this behavior, you can “unrecord” these macros in your |
949 |
<tt>`~/.viper'</tt> file. For instance, if you don't like the above feature, put |
<tt>`~/.viper'</tt> file. For instance, if you don't like the above feature, put |
950 |
this in <tt>`~/.viper'</tt>: |
this in <tt>`~/.viper'</tt>: |
951 |
</p><table><tr><td> </td><td><pre class="example">(viper-set-searchstyle-toggling-macros 'undefine) |
</p><table><tr><td> </td><td><pre class="example">(viper-set-searchstyle-toggling-macros 'undefine) |
963 |
above, `//' and `///' get bound to Vi-style macros that toggle |
above, `//' and `///' get bound to Vi-style macros that toggle |
964 |
case-insensitivity and regexp-search. |
case-insensitivity and regexp-search. |
965 |
</p> |
</p> |
966 |
<p>If you don't like these features--which I don't really understand--you |
<p>If you don't like these features—which I don't really understand—you |
967 |
can unbind `/' and `:' in <code>viper-dired-modifier-map</code> (for Dired) or in |
can unbind `/' and `:' in <code>viper-dired-modifier-map</code> (for Dired) or in |
968 |
<code>viper-slash-and-colon-map</code>, for other modes. |
<code>viper-slash-and-colon-map</code>, for other modes. |
969 |
<a name="IDX200"></a> |
<a name="IDX200"></a> |
1185 |
</p> |
</p> |
1186 |
<p>The region that is chosen as a pattern to search for is determined as |
<p>The region that is chosen as a pattern to search for is determined as |
1187 |
follows. If search is invoked via a single click, Viper chooses the region |
follows. If search is invoked via a single click, Viper chooses the region |
1188 |
that lies between the beginning of the "word" under the pointer ("word" |
that lies between the beginning of the “word” under the pointer (“word” |
1189 |
is understood in Vi sense) and the end of that word. The only difference |
is understood in Vi sense) and the end of that word. The only difference |
1190 |
with Vi's words is that in Lisp major modes `-' is considered an |
with Vi's words is that in Lisp major modes `-' is considered an |
1191 |
alphanumeric symbol. This is done for the convenience of working with Lisp |
alphanumeric symbol. This is done for the convenience of working with Lisp |
1196 |
feature gives added control over the patterns selected by the mouse click. |
feature gives added control over the patterns selected by the mouse click. |
1197 |
</p> |
</p> |
1198 |
<p>On a double-click, the region is determined by the beginning of the current |
<p>On a double-click, the region is determined by the beginning of the current |
1199 |
Vi's "Word" (i.e., the largest non-separator chunk of text) and the End |
Vi's “Word” (i.e., the largest non-separator chunk of text) and the End |
1200 |
of that "Word" (as determined by the <kbd>E</kbd> command). |
of that “Word” (as determined by the <kbd>E</kbd> command). |
1201 |
</p> |
</p> |
1202 |
<p>On a triple-click, the region consists of the entire line where the click |
<p>On a triple-click, the region consists of the entire line where the click |
1203 |
occurred with all leading and trailing spaces and tabs removed. |
occurred with all leading and trailing spaces and tabs removed. |
1254 |
B and click to invoke mouse search, search (or insertion) will be performed |
B and click to invoke mouse search, search (or insertion) will be performed |
1255 |
in frame A. To perform search/insertion in frame B, you will first have to |
in frame A. To perform search/insertion in frame B, you will first have to |
1256 |
shift focus there, which doesn't happen until you type a character or |
shift focus there, which doesn't happen until you type a character or |
1257 |
perform some other action in frame B--mouse search doesn't shift focus. |
perform some other action in frame B—mouse search doesn't shift focus. |
1258 |
</p> |
</p> |
1259 |
<p>If you decide that you don't like the above feature and always want |
<p>If you decide that you don't like the above feature and always want |
1260 |
search/insertion be performed in the frame where the click occurs, don't |
search/insertion be performed in the frame where the click occurs, don't |
1371 |
type <kbd>C-x q</kbd> (for confirmation) or <kbd>C-u C-x q</kbd> (for prompt). |
type <kbd>C-x q</kbd> (for confirmation) or <kbd>C-u C-x q</kbd> (for prompt). |
1372 |
For details, see <a href="../emacs/Kbd-Macro-Query.html#Kbd-Macro-Query">(emacs)Kbd Macro Query</a> section `Customization' in <cite>The GNU Emacs Manual</cite> |
For details, see <a href="../emacs/Kbd-Macro-Query.html#Kbd-Macro-Query">(emacs)Kbd Macro Query</a> section `Customization' in <cite>The GNU Emacs Manual</cite> |
1373 |
</p> |
</p> |
1374 |
<p>When the user finishes defining a macro (which is done by typing <kbd>C-x)</kbd> -- |
<p>When the user finishes defining a macro (which is done by typing <kbd>C-x)</kbd> — |
1375 |
a departure from Vi), you will be asked whether you want this |
a departure from Vi), you will be asked whether you want this |
1376 |
macro to be global, mode-specific, or buffer-specific. You will also be |
macro to be global, mode-specific, or buffer-specific. You will also be |
1377 |
given a chance to save the macro in your <tt>`~/.viper'</tt> file. |
given a chance to save the macro in your <tt>`~/.viper'</tt> file. |