On Mon, Jul 13, 2009 at 6:17 PM, Tony Mechelynck wrote:
>
> On 13/07/09 18:00, Raúl Núñez de Arenas Coronado wrote:
>>
>> Usually Vim is called "modal" because it can be in "insert mode" or
>> "normal mode". I don't consider things like that. I prefer to consider
>> Vim as a command-driven application, one of the commands insert text,
>> other allows for visual selections, other runs ex commands etc. It's all
>> about commands, just that.
>
> If "insert text" is just "one command" until you leave Insert mode...
> well, I won't deny that to part of the Vim C code it is that, but
> thinking that, when I enter a new file, I'll be partway inside "one long
> command" for I don't know how long until, after having hit Esc (which is
> part of that long command but signals it end) I'll finally hit
> ":wq<Enter>" (a second command) to quit Vim... well, that's just
> impractical for a flesh-and-blood person who can hardly conceive that
> the long job of typing all the data in one file is "the same kind of
> stuff" as ":wq" and that he used exactly two commands during that long
> session. (And when I hit F3 in Insert mode, which is imapped to
> <C-O>:wa|wv<CR> , to me it isn't ending one command, doing two other
> commands, and starting a fourth one, it's just one action to save the
> file, and that is "part" of Insert mode.

Maybe that's how you choose to look at it, but it *is* ending insert
mode, executing some commands, and starting a new insert command.
:help ins-special-special explains this, and it's painfully obvious
when you try to type, say, i)<Left>(<Esc>. and get (() instead of ()()

I have to agree with Raúl in his interpretation - insert mode is
really only a "mode" in the sense of a mode being a place that has its
own mappings and keybindings, but in all other senses - for instance,
what counts as "beginning" and "ending" a command, or repeating a
command, or counting how many changes have been made, or any number of
other metrics - it's only a command.

~Matt

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

Raspunde prin e-mail lui