An Editor that Skips to the End of a Def

Neil Cerutti horpner at yahoo.com
Mon Sep 24 08:22:08 EDT 2007


On 2007-09-22, Lawrence D'Oliveiro
<ldo at geek-central.gen.new_zealand> wrote:
> In message <5lhs4pF8bkunU1 at mid.individual.net>, Bjoern
> Schliessmann wrote:
>> Nah. Use vim.
>
> Every other text editor I have ever used understands that the
> current position in a file is _between_ two characters (or
> before the first character, or after the last character), not
> _on_ a character. But not vi and its ilk.
>
> Try the following in vi/vim: Move to some point in the middle
> of a line. Press "i" to get into insert mode. Press escape to
> get out again. You'll end up one position to the left of where
> you were before. Press "i", and then escape again--you've moved
> another position left. Why is it incapable of keeping track of
> such a simple thing as your current position in the file?

That's a silly question. Of course it knows your current
position--it just chooses to modify your position when you exit
insert mode.

> Why does it need two different insert commands, "i" versus "a"?
> Because one of them can't insert at the end of a line, and the
> other can't insert at the beginning.

i and a are two of *many* ways to enter insert mode. I'm not sure
all of them are completely justified (I've never uses s or S, for
example). I typically use o, O, i, I and A the most. I don't have
much use for a.

> And why have command-versus-insert mode at all? No other text
> editor still surviving uses such an antiquated concept.

The existence of command mode allows plain old keystrokes to be
commands--it potentially makes commands easier to type. Emacs
users don't find it to be a compelling advantage. ;)

-- 
Neil Cerutti



More information about the Python-list mailing list