vip: New Commands
1.4.8 Some New Commands
-----------------------
Note that the keys below (except for ‘R’) are not used in Vi.
‘C-a’
Move point to the beginning of line.
‘C-n’
If you have two or more windows in the screen, this key will move
point to the next window.
‘C-o’
Insert a newline and leave point before it, and then enter insert
mode.
‘C-r’
Backward incremental search.
‘C-s’
Forward incremental search.
‘C-c’
‘C-x’
‘<ESC>’
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.
‘K’
Kill current buffer if it is not modified. Useful when you
selected a buffer which you did not want.
‘Q’
‘R’
‘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 expression replacement.
‘v’
‘V’
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 ‘s’.
‘# c’
Change upper-case characters in the region to lower case
(‘downcase-region’).
‘# C’
Change lower-case characters in the region to upper case. For
instance, ‘# C 3 w’ will capitalize 3 words from the current point
(‘upcase-region’).
‘# g’
Execute last keyboard macro for each line in the region
(‘vip-global-execute’).
‘# q’
Insert specified string at the beginning of each line in the region
(‘vip-quote-region’).
‘# s’
Check spelling of words in the region (‘spell-region’).
‘*’
Call last keyboard macro.