samppi wrote:
> I'm trying out vim for the first time, and I'm wondering
> about the apparently very useful "." command. It repeats the
> "last command", which actually may be a string of commands
> like "dd" or "A<delete> {<return>}<return><esc>".
>
> But what determines how far back these compound commands
> reach?

Pressing . repeats the last normal-mode command entered (a
single command). You need some experience to work out what that
actually means. Some examples (each time, from normal mode, that
is, you have pressed Escape):

Press i then type some text (a little or a lot) then press Esc.
Now move cursor elsewhere and press . to repeat the insert
(pressing i and typing is a single command).

Type daw to delete a word. If wanted, move cursor. Press . to
delete a word.

Type gqip to format (wrap lines) a paragraph. Move cursor and
press . to format another paragraph.

Type 5dd to delete 5 lines. Press . to delete another 5 lines.

John


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to