Commands that are typed interactive (from inputbox or from socket) are normally
recorded into command history and register. To avoid this, the commands can be
prefixed by one or more additional `:' or whitespace.
+.PP
+Multiple commands, separated by a `|' can be given in a single command line
+and will be executed consecutively. The pipe can be included as an argument to
+a command by escaping it with a backslash.
+.br
+Following commands process the entire command-line string literally. These
+commands will include any `|' as part of their argument string and so cannot
+be followed by another command.
+.PP
+.PD 0
+.IP - 2
+autocmd
+.IP -
+cmap, cnoremap, imap, inoremap, nmap, nnoremap
+.IP -
+eval
+.IP -
+normal
+.IP -
+open, tabopen
+.IP -
+shellcmd
+.PD
.SS Command Line Editing
.TP
.B <Esc>, CTRL\-[, CTRL-C
An autocommand is a command that is executed automatically in response to some
event, such as a URI being opened. Autocommands are very powerful. Use them
with care and they will help you avoid typing many commands.
-.PP
-Note: The ":autocmd" command cannot be followed by another command, since
-any '|' is considered part of the command.
.RS 0
.TP
Autocommands are built with following properties.
Runs given shell \fIcmd\fP syncron and print the output into inputbox.
Following pattern in \fIcmd\fP are expanded, '~username', '~/', '$VAR'
and '${VAR}'. A '\\' before these patterns disables the expansion.
-
.RS
-Note: The ":shellcmd" command cannot be followed by another command, since
-any '|' is considered part of the command.
.PP
.PD 0
Following environment variables are set for called shell commands.
Runs the given \fIjavascript\fP in the current page and display the evaluated
value.
-This comman cannot be followed by antoher command, since any '|' is considered
-part of the command.
-
Example: :eval document.cookie
.TP
.BI :e[val]! " javascript"
.BI ":no[rmal] [" cmds ]
Execute normal mode commands \fIcmds\fP. This makes it possible to execute
normal mode commands typed on the input box.
-
+.br
\fIcmds\fP cannot start with a space. Put a count of 1 (one) before it, "1 "
is one space.
-This comman cannot be followed by antoher command, since any '|' is considered
-part of the command.
Example: :set scripts!|no! R
.TP
#endif
{"bma", EX_BMA, ex_bookmark, EX_FLAG_RHS},
{"bmr", EX_BMR, ex_bookmark, EX_FLAG_RHS},
- {"cmap", EX_CMAP, ex_map, EX_FLAG_LHS|EX_FLAG_RHS},
- {"cnoremap", EX_CNOREMAP, ex_map, EX_FLAG_LHS|EX_FLAG_RHS},
+ {"cmap", EX_CMAP, ex_map, EX_FLAG_LHS|EX_FLAG_CMD},
+ {"cnoremap", EX_CNOREMAP, ex_map, EX_FLAG_LHS|EX_FLAG_CMD},
{"cunmap", EX_CUNMAP, ex_unmap, EX_FLAG_LHS},
{"hardcopy", EX_HARDCOPY, ex_hardcopy, EX_FLAG_NONE},
{"handler-add", EX_HANDADD, ex_handlers, EX_FLAG_RHS},
{"handler-remove", EX_HANDREM, ex_handlers, EX_FLAG_RHS},
{"eval", EX_EVAL, ex_eval, EX_FLAG_CMD|EX_FLAG_BANG},
- {"imap", EX_IMAP, ex_map, EX_FLAG_LHS|EX_FLAG_RHS},
- {"inoremap", EX_INOREMAP, ex_map, EX_FLAG_LHS|EX_FLAG_RHS},
+ {"imap", EX_IMAP, ex_map, EX_FLAG_LHS|EX_FLAG_CMD},
+ {"inoremap", EX_INOREMAP, ex_map, EX_FLAG_LHS|EX_FLAG_CMD},
{"iunmap", EX_IUNMAP, ex_unmap, EX_FLAG_LHS},
- {"nmap", EX_NMAP, ex_map, EX_FLAG_LHS|EX_FLAG_RHS},
- {"nnoremap", EX_NNOREMAP, ex_map, EX_FLAG_LHS|EX_FLAG_RHS},
+ {"nmap", EX_NMAP, ex_map, EX_FLAG_LHS|EX_FLAG_CMD},
+ {"nnoremap", EX_NNOREMAP, ex_map, EX_FLAG_LHS|EX_FLAG_CMD},
{"normal", EX_NORMAL, ex_normal, EX_FLAG_BANG|EX_FLAG_CMD},
{"nunmap", EX_NUNMAP, ex_unmap, EX_FLAG_LHS},
- {"open", EX_OPEN, ex_open, EX_FLAG_RHS},
+ {"open", EX_OPEN, ex_open, EX_FLAG_CMD},
{"quit", EX_QUIT, ex_quit, EX_FLAG_NONE|EX_FLAG_BANG},
#ifdef FEATURE_QUEUE
{"qunshift", EX_QUNSHIFT, ex_queue, EX_FLAG_RHS},
{"shortcut-add", EX_SCA, ex_shortcut, EX_FLAG_RHS},
{"shortcut-default", EX_SCD, ex_shortcut, EX_FLAG_RHS},
{"shortcut-remove", EX_SCR, ex_shortcut, EX_FLAG_RHS},
- {"tabopen", EX_TABOPEN, ex_open, EX_FLAG_RHS},
+ {"tabopen", EX_TABOPEN, ex_open, EX_FLAG_CMD},
};
static struct {