GNU Info

Info Node: (viper)Basics

(viper)Basics


Next: Undo and Backups Prev: Improvements over Vi Up: Improvements over Vi
Enter node , (file) or (file)node

Basics
======

   The Vi command set is based on the idea of combining motion commands
with other commands.  The motion command is used as a text region
specifier for other commands.  We classify motion commands into "point
commands" and "line commands".

   The point commands are:

     `h', `l', `0',  `$', `w', `W', `b', `B', `e', `E', `(', `)', `/',
     `?', ``', `f', `F', `t', `T', `%', `;', `,', `^'

   The line commands are:

     `j', `k', `+', `-', `H', `M', `L', `{', `}', `G', `'',  `[[',
     `]]', `[]'

If a point command is given as an argument to a modifying command, the
region determined by the point command will be affected by the modifying
command.  On the other hand, if a line command is given as an argument
to a modifying command, the region determined by the line command will
be enlarged so that it will become the smallest region properly
containing the region and consisting of whole lines (we call this
process "expanding the region"), and then the enlarged region will be
affected by the modifying command.  Text Deletion Commands (Note:
Deleting Text), Change commands (Note: Changing Text), even Shell
Commands (Note: Shell Commands) use these commands to describe a
region of text to operate on.  Thus, type `dw' to delete a word, `>}'
to shift a paragraph, or `!'afmt' to format a region from `point' to
textmarker `a'.

   Viper adds the region specifiers `r' and `R'.  Emacs has a special
marker called "mark".  The text-area between the current cursor
position "point" and the "mark" is called the "region".  `r' specifies
the raw region and `R' is the expanded region (i.e., the minimal
contiguous chunk of full lines that contains the raw region).  `dr'
will now delete the region, `>r' will shift it, etc.  `r,R' are not
motion commands, however.  The special mark is set by `m.' and other
commands.  Note: Marking, for more info.

   Viper also adds counts to most commands for which it would make
sense.

   In the Overview chapter, some Multiple File issues were discussed
(Note: Multiple Files in Viper).  In addition to the files, Emacs has
buffers.  These can be seen in the `:args' list and switched using
`:next' if you type `:set ex-cycle-through-non-files t', or specify
`(setq ex-cycle-through-non-files t)' in your `.viper' file.  Note:
Customization, for details.


automatically generated by info2www version 1.2.2.9