Re: An Editor that Skips to the End of a Def



Warning: Religion follows:

On 9/25/07, Lawrence D'Oliveiro <ldo@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
In message <slrnffhe9g.2db.hat@xxxxxxxxxxxxxxxxxxxx>, A.T.Hofkamp wrote:

On 2007-09-25, Lawrence D'Oliveiro <ldo@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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
about.)

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.

Off the top of my head, I can think of a few vim commands that have
come in handy. I can search through a webpage in Firefox by using the
same '/' search command that vim has. The movement keys (h,j,k,l) are
the same as in any paging program I've ever used. Not to mention that
I learned regexes by learning 's/regex/replacement' first :-)

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.

If you're making lots of small changes, then you shouldn't be jumping
into insert mode at all, IMO.

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
text!

Actually, vim always deletes the same way regardless of when it was
inserted -- one of the many *improvements* over vi.

That's my religion anyway ;-), but I thought this was a python mailing list ;-)

Jason

At least with Emacs, text is text--it doesn't matter when it was inserted,
it still behaves the same way.
--
http://mail.python.org/mailman/listinfo/python-list

.



Relevant Pages

  • Re: Who uses vi?
    ... I use both Vim and Emacs, and I'm really fond of them. ... They're THE editors. ... Windows is to install Vim and Emacs ports for Windows. ... One of the funny things of Emacs is that it teaches commands to you. ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Learning LISP from scratch
    ... For reading LISP code vim is just as good as emacs. ... I only had to "learn" a few new commands. ...
    (comp.lang.lisp)
  • Re: Differences in RH Fedora coming from Debian
    ... > I am guessing that everyone is talking about vim and not vi. ... > both vim and emacs about equally since each one of them has its ... In command mode the 'x' key deletes forwards, ... In insert mode backspace gives the standard backspace ...
    (Debian-User)
  • Re: Great SWT Program
    ... trimming quoted material and spewing nonsense without even thinking ... wrt to understanding what is going on in emacs. ... [snip pointless aside] ... expect enter or backspace to do in various sorts of text input areas. ...
    (comp.lang.java.programmer)
  • Re: Great SWT Program
    ... I never suggested that emacs could replace spreadsheets. ... I thought you were editing the query text at that point. ... backspace deleting the next character to the left would be ... Emacs users want it to happen all the time, ...
    (comp.lang.java.programmer)