Subject: RE: [hackers-il] YA Vim Trick: Indenting an Arbitrary Block

From: Omer Musaev <[email-masked]>
Date: Wed, 20 Feb 2002 14:43:10 +0200

> -----Original Message-----
> From: Adi Stav [mailto:[email-masked]]
> Sent: Wednesday, February 20, 2002 3:11 PM
> To: [email-masked]
> Subject: Re: [hackers-il] YA Vim Trick: Indenting an Arbitrary Block
> 
> 
> On Wed, Feb 20, 2002 at 12:05:19PM +0200, Omer Musaev wrote:
> > 
> > > That's a vim-only feature that won't work in other vi's. I 
> > > personally consider it a misfeature because it adds nothing 
> > > whatsoever to the marker trick Shlomi described, while creating 
> > > incompatibility and complicating the interface (adds 
> another mode).
> > 
> > I disagree with the above statement. Considering out-of-date tools 
> > to preserve "backward compatability" with older platforms is a bad 
> > thing - and here comes my explanation.
> 
> That's not what I meant. I'm not opposed to new features, even in vi.
> I like multi-level undo (not specifically vim's, though) and I like 
> its syntax coloring, and so forth. But specifically "visual mode" is 
> a feature that is absolutely not needed -- its functions can be 
> served completely by the existing standard markers. It has no 
> advantages whatsoever; it only introduces incompatible complexity 
> that does not quite fit with vi's design concepts. 

vi design was breakthrough of its time. But vi introduces incompatible
complexity over em, which has pretty the same features, and even same
design ( command mode/edit mode, d/y/c/p commands etc.. )

This did not help to em to remain a popular editor. It just failed.

<cynic on>
So we have a problem here, aren't we? A design concepts were 
revisited in most heretical manner!! those hashbangers even did not
have a shame to hide vi's origins! They just put that damnded thing 
on a screen. Besides, vi is not compatible!!!! It overwrites my screen
and I can not see my previous command output while working in it...
</cynic off>

Now seriously. Speaking of VI - as in VIsual editor, I find visual
mode very natural :^)) 

> Markers fit perfectly in vi; every command takes a movement, so you
> can apply it to a region by doing an over-region movement. Nothing
> is more complicated than it needs to be. With visual mode, suddenly
> you have a new mode altogether, in which you cannot use commands
> normally. For example, What if you want to delete a word before you 
> indent your region? You can't use "dw" because you'd lose your 
> region before you get to type "w". Not to mention that you can have
> 26 different markers and only one visual start point.

[ omerm horrified by need to remember what the .... did he put into
  each marker... ]

Same arguments can be produced against Viper. However you do use it.
Can you ellaborate on the matter? 

> So "visual mode" is not a new feature, it's just an old feature 
> reintroduced with a more limiting, less general function and with
> a different syntax. Plus it's non-portable. I can't see why would
> anyone choose to learn visual mode rather than markers, given the 
> option...

It is strange that you can not see it. It is quite clear... 
Just try to write a linked list implementation using em, and then 
look again...

> 
> ------------------------ Yahoo! Groups Sponsor 
> ---------------------~-->
> Sponsored by VeriSign - The Value of Trust
> Pinpoint the right security solution for your company - FREE
> Guide from industry leader VeriSign gives you all the facts.
> http://us.click.yahoo.com/pCuuSA/WdiDAA/yigFAA/saFolB/TM
> --------------------------------------------------------------
> -------~->
> 
> To unsubscribe from this group, send an email to:
> [email-masked]
> 
>  
> 
> Your use of Yahoo! Groups is subject to 
http://docs.yahoo.com/info/terms/

---

From: Adi Stav <[email-masked]>
Date: Wed, 20 Feb 2002 17:55:01 +0200

> This did not help to em to remain a popular editor. It just failed.

I've never heared of em, unless you mean ex, which was IIRC quite the 
standard on BSD systems until the arrival of terminals with 
relocateable cursors and vi.

You can't say vi wasn't a major change over ex, and didn't introduce
a whole new concept of editing all by itself.

Independently of that, though, I find that extending a system with
features not completely compatible with the original design rather
than writing a new system or modifing the old system's design was a
common BSD attitude. And of course I mind the design of the system.
I just said so in my previous mail, didn't I? :)

> and I can not see my previous command output while working in it...

ed, man!   !man ed

> > Not to mention that you can have

You don't /have/ to use 26 different markers... I use 'm' most of the
time, Shlomif says he uses 'e'. But more than once I was glad I had
the option to save more than one at the same time.

> Can you ellaborate on the matter? 

Viper actually has very few extra features, but it does let you use
Emacs's. That's very convenient because Emacs is far more advanced
than the traditional vi. But I also use vim, nvi and Solaris vi for
different purposes. When there's a feature in traditional vi, I 
don't look for Emacs or vim substitutes. I just use the vi feature.

> Just try to write a linked list implementation using em, and then 

I'm sure it would be hell. So would be working on a system without
a hierarchial filesystem. But creating an /additional/ new 
naming scheme for data storage in a UNIX based OS would seem 
grotesque to me (SysV IPC).

Don't get me wrong -- I like advances and new features and that's 
why I use them. I just think visual mode specifically is a 
misfeature, and so I'm glad that there are people who know that 
plain vanilla vi can do the same thing portably, just as I'm happy 
there are people who know X can do remote display instead of 
recommending VNC for this purpose (like the embarrassment IMHO we 
had on linux-il a year or two ago).