GNU Info

Info Node: (vip)Ex Command Reference

(vip)Ex Command Reference


Next: Customization Prev: Ex Commands Up: Ex Commands
Enter node , (file) or (file)node

Ex Command Reference
====================

   In this section we briefly explain all the Ex commands supported by
VIP.  Most Ex commands expect ADDRESS as their argument, and they use
default addresses if they are not explicitly given.  In the following,
such default addresses will be shown in parentheses.

   Most command names can and preferably be given in abbreviated forms.
In the following, optional parts of command names will be enclosed in
brackets.  For example, `co[py]' will mean that copy command can be
give as `co' or `cop' or `copy'.

   If COMMAND is empty, point will move to the beginning of the line
specified by the ADDRESS.  If ADDRESS is also empty, point will move to
the beginning of the current line.

   Some commands accept "flags" which are one of `p', `l' and `#'.  If
FLAGS are given, the text affected by the commands will be displayed on
a temporary window, and you will be asked to hit return to continue.
In this way, you can see the text affected by the commands before the
commands will be executed.  If you hit `C-g' instead of <RET> then the
commands will be aborted.  Note that the meaning of FLAGS is different
in VIP from that in Vi/Ex.

`(.,.) co[py] ADDR FLAGS'
`(.,.) t ADDR FLAGS'
     Place a copy of specified lines after ADDR.  If ADDR is `0', it
     will be placed before the first line.

`(.,.) d[elete] REGISTER COUNT FLAGS'
     Delete specified lines.  Text will be saved in a named REGISTER if
     a lower-case letter is given, and appended to a register if a
     capital letter is given.

`e[dit] ! +ADDR FILE'
`e[x] ! +ADDR FILE'
`vi[sual] ! +ADDR FILE'
     Edit a new file FILE in the current window.  The command will abort
     if current buffer is modified, which you can override by giving
     `!'.  If `+'ADDR is given, ADDR becomes the current line.

`file'
     Give information about the current file.

`(1,$) g[lobal] ! /PAT/ CMDS'
`(1,$) v /PAT/ CMDS'
     Among specified lines first mark each line which matches the
     regular expression PAT, and then execute CMDS on each marked line.
     If `!' is given, CMDS will be executed on each line not matching
     PAT.  `v' is same as `g!'.

`(.,.+1) j[oin] ! COUNT FLAGS'
     Join specified lines into a line.  Without `!', a space character
     will be inserted at each junction.

`(.) k CH'
`(.) mar[k] CH'
     Mark specified line by a lower-case character CH.  Then the
     addressing form `''CH will refer to this line.  No white space is
     required between `k' and CH.  A white space is necessary between
     `mark' and CH, however.

`map CH RHS'
     Define a macro for vi mode.  After this command, the character CH
     will be expanded to RHS in vi mode.

`(.,.) m[ove] ADDR'
     Move specified lines after ADDR.

`(.) pu[t] REGISTER'
     Put back previously deleted or yanked text.  If REGISTER is given,
     the text saved in the register will be put back; otherwise, last
     deleted or yanked text will be put back.

`q[uit] !'
     Quit from Emacs.  If modified buffers with associated files exist,
     you will be asked whether you wish to save each of them.  At this
     point, you may choose not to quit, by hitting `C-g'.  If `!' is
     given, exit from Emacs without saving modified buffers.

`(.) r[ead] FILE'
     Read in the content of the file FILE after the specified line.

`(.) r[ead] ! COMMAND'
     Read in the output of the shell command COMMAND after the specified
     line.

`se[t]'
     Set a variable's value.  Note: Customizing Constants, for the
     list of variables you can set.

`sh[ell]'
     Run a subshell in a window.

`(.,.) s[ubstitute] /PAT/REPL/ OPTIONS COUNT FLAGS'
`(.,.) & OPTIONS COUNT FLAGS'
     On each specified line, the first occurrence of string matching
     regular expression PAT is replaced by replacement pattern REPL.
     Option characters are `g' and `c'.  If global option character `g'
     appears as part of OPTIONS, all occurrences are substituted.  If
     confirm option character `c' appears, you will be asked to give
     confirmation before each substitution.  If `/PAT/REPL/' is
     missing, the last substitution is repeated.

`st[op]'
     Suspend Emacs.

`ta[g] TAG'
     Find first definition of TAG.  If no TAG is given, previously
     given TAG is used and next alternate definition is find.  By
     default, the file `TAGS' in the current directory becomes the
     "selected tags table".  You can select another tags table by `set'
     command.  Note: Customizing Constants, for details.

`und[o]'
     Undo the last change.

`unm[ap] CH'
     The macro expansion associated with CH is removed.

`ve[rsion]'
     Tell the version number of VIP.

`(1,$) w[rite] ! FILE'
     Write out specified lines into file FILE.  If no FILE is given,
     text will be written to the file associated to the current buffer.
     Unless `!' is given, if FILE is different from the file
     associated to the current buffer and if the file FILE exists, the
     command will not be executed.  Unlike Ex, FILE becomes the file
     associated to the current buffer.

`(1,$) w[rite]>> FILE'
     Write out specified lines at the end of file FILE.  FILE becomes
     the file associated to the current buffer.

`(1,$) wq ! FILE'
     Same as `write' and then `quit'.  If `!' is given, same as `write
     !' then `quit'.

`(.,.) y[ank] REGISTER COUNT'
     Save specified lines into register REGISTER.  If no register is
     specified, text will be saved in an anonymous register.

`ADDR ! COMMAND'
     Execute shell command COMMAND.  The output will be shown in a new
     window.  If ADDR is given, specified lines will be used as standard
     input to COMMAND.

`($) ='
     Print the line number of the addressed line.

`(.,.) > COUNT FLAGS'
     Shift specified lines to the right.  The variable `vip-shift-width'
     (default value is 8) determines the amount of shift.

`(.,.) < COUNT FLAGS'
     Shift specified lines to the left.  The variable `vip-shift-width'
     (default value is 8) determines the amount of shift.

`(.,.) ~ OPTIONS COUNT FLAGS'
     Repeat the previous `substitute' command using previous search
     pattern as PAT for matching.

   The following Ex commands are available in Vi, but not implemented
in VIP.
     abbreviate, list, next, print, preserve, recover, rewind, source,
     unabbreviate, xit, z


automatically generated by info2www version 1.2.2.9