On 14/07/09 05:27, Matt Wozniski wrote:
>
> 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
Well, thinking of a long typing session as "one little command" is still
foreign to my way of thinking -- and, the word "modal" in fact refers to
the fact that the same keys don't always do the same things in Vim. Of
course, in that sense all editors are modal -- when you're typing into a
dialog your keypresses don't go into your editfile -- but in most of
them there is one mode which you use a huge majority of the time, while
in Vim, you use the same (alphabetic) keys for very different purposes
when creating a file from top to bottom and when looking at an existing
file and maybe (or maybe not) making some changes in it, and neither of
these, yes, modes is always predominant.
Best regards,
Tony.
--
"Dying is a very dull, dreary affair. And my advice to you is to have
nothing whatever to do with it."
-- W. Somerset Maugham
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---