1.4.8 Some New Commands
Note that the keys below (except for R) are not used in Vi.
- Move point to the beginning of line.
- If you have two or more windows in the screen, this key will move point to
the next window.
- Insert a newline and leave point before it, and then enter insert mode.
- Backward incremental search.
- Forward incremental search.
- These keys will exit from vi mode and return to emacs mode temporarily. If
you hit one of these keys, Emacs will be in emacs mode and will believe
that you hit that key in emacs mode. For example, if you hit C-x
followed by 2, then the current window will be split into 2 and you
will be in vi mode again.
- Escape to emacs mode. Hitting \ will take you to emacs mode, and you
can execute a single Emacs command. After executing the Emacs command you
will be in vi mode again. You can give a count before typing \.
Thus 5 \ *, as well as \ C-u 5 *, will insert ‘*****’
before point. Similarly 1 0 \ C-p will move the point 10 lines above
the current line.
- Kill current buffer if it is not modified. Useful when you selected a
buffer which you did not want.
- Q is for query replace and R is for replace. By default,
string to be replaced are treated literally. If you wish to do a regular
expression replace, first do replace with empty string as the string to be
replaced. In this way, you can toggle between vanilla and regular
- These keys are used to Visit files. v will switch to a buffer
visiting file whose name can be entered in the minibuffer. V is
similar, but will use window different from the current window.
- If followed by a certain character ch, it becomes an operator whose
argument is the region determined by the motion command that follows.
Currently, ch can be one of c, C, g, q and
- # c
- Change upper-case characters in the region to lower case
- # C
- Change lower-case characters in the region to upper case. For instance,
# C 3 w will capitalize 3 words from the current point
- # g
- Execute last keyboard macro for each line in the region
- # q
- Insert specified string at the beginning of each line in the region
- # s
- Check spelling of words in the region (
- Call last keyboard macro.