(evi.info)New operators

Next: Differences Prev: Enhancements Up: Top

New operators

   The `*' operator can be used to send text to emacs processes.  `*'
prompts for the name of a process buffer, and the region specified is
sent to that process.  Subsequent invocations of `*' will use the same
process buffer as last specified as a default.  E.g., to send the
current line of text as a command to the emacs shell (see `:shell'),
type `***shell*RET', or if the shell is already the default, just
`**RET'.  Paragraph motion or parenthesis match is often perfect for
sending function definitions to an interpreter, e.g. place the cursor at
the beginning of the function, and type `*}RET' or `*%RET'.  If the
function def is less easily described you can use `m.' and `yR'
described above.  In specifiying the process buffer, you can use buffer
completion using space or tab.

   I'm experimenting with some new complex operators.  I'm particularly
interested in your thoughts on these:

   `[{' operates over lines in a region.  It takes a motion, and a
sequence of operations to perform on each line in the region defined by
the motion.  The sequence of operations is prompted for on the bottom
line.  Double the `{' to operate on whole lines.  The point starts in
the first column for each line operated on.  For example:
     [{}i> `C-v'ESCRET
   would prefix every line in the rest of the current paragraph with `>
'.  The `C-v ESC' sequence inserts an ESC into the string you are
entering so that it will terminate input when the loop body is executed,
not as you are entering the command.  For example:
     10[{{i/* `C-v'ESCA */`C-v'ESCRET
   would place C-style comments around the next 10 lines.

   `[(' defines a parameterized macro body.  A parameterized macro is
diff- erent from standard macro text in that it is parameterized by
prefix count and register specification.  In the body of such a macro,
there are two special commands: `#' and `&'.  `#' is replaced by the
prefix count applied to this macro, and `&' is replaced by the register
specification applied to this macro.  For example:
   would go down one line, move over 8 words, then delete the next word
into register `a'.  This is rather contrived, but it gives you the idea.
Param- eterized macro bodies are obviously not very useful typed out
each time, and are intended to be the body of a map macro.  For example:
     :map M [(j#w&dw\eRET
   would be a much more likely scenario for the use of such a macro.

automatically generated by info2www