An Editor that Skips to the End of a Def

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Wed Sep 26 04:15:46 CEST 2007

In message <slrnffhe9g.2db.hat at>, A.T.Hofkamp wrote:

> On 2007-09-25, Lawrence D'Oliveiro <ldo at geek-central.gen.new_zealand>
> wrote:
>> Why does it "choose" to modify your position when you exit insert mode?
> Try to insert 1 character in the middle of a line. You'll end up at the
> same position. Now press 'j' (one line down), then '.' (do it again).
> I believe that's why.
> Great when you have nicely formatted columns of code underneath each
> other.

It's strange, but in nearly 30 years of writing code in dozens of different
languages, I've never felt the urge to line up my code in columns. Never.
(Apart from assembly language, which I suspect you don't want to hear

> The cost of that power is a command/insert mode and a steep learning
> curve.

That's another issue, that of ROI. Having learnt the vi/vim keystrokes, what
does that enable you to do? Use vi/vim, and that's it. Whereas I've found
other situations where subsets of Emacs keystrokes are recognized, such as
anything that uses GNU readline (including the Python console--see, this IS
relevant to Python after all), and pico/nano. These are all extra goodies
that are to be found on the way up the Emacs learning curve.

> For example, ever wondered why you on earth you need CTL-C and CTL-V to
> copy/paste? Why not simply select with the mouse, then right-click to
> paste?

Or better still, why not allow both?

>> And the downside is that the largest single proportion of those commands
>> end up being variations on "enter insert mode". Because most of the
>> keystrokes you enter during an editing session are in fact text to be
>> input into the file, not commands to manipulate that text. So in a modal
>> editor, having to
> Depends on what you are doing. When entering new code, yes. When
> maintaining code, no (lots of small changes).

Making lots of small changes is even worse--it means you're jumping into
insert mode for shorter times, more frequently.

And that's when you discover something else: that how you delete text in
vi/vim differs, depending on whether it's something you just inserted while
currently in insert mode, or whether it was there from before you last
entered insert mode: in the former case, you use backspace to delete, in
the latter case, you can't use backspace, you have to use "X". What does
backspace do when not in insert mode? It just moves you through the text.
What does the forward-delete key do? In both modes, it actually deletes

At least with Emacs, text is text--it doesn't matter when it was inserted,
it still behaves the same way.

More information about the Python-list mailing list