Subject: Re: is vi(1)'s autoindent the right default behaviour?
To: Luke Mewburn <lukem@NetBSD.org>
From: Igor Sobrado <igor@string1.ciencias.uniovi.es>
List: tech-userlevel
Date: 05/09/2005 10:14:27
Hi Greg and Luke!

I was not sure about the right behaviour for vi(1).  I guess I am too
used to xclipboard(1) --- by the way, both xclipboard(1) and xmh(1) are
a broken since XFree86 4.x, I hope these commands will be fixed in
the future, but it is not a task for the NetBSD developers, though.

> I find it quicker to do:
> 
> 	:r! cat /dev/tty
> 	[paste here]
> 	^D
> 
> than to toggle ai (autoindent) off & on.

:-)))

"set ai" and "set noai" require typing few characters!

":r! cat /dev/tty"... 16 characters (+changing to "command mode") and
two additional characters for ^D.  "set ai" + "set noai"... 6+8 characters
and changing to command mode two times!

It *cannot* be quicker!

> I think I've even got a macro for that...

Indeed, it will be easier with a macro.

Seriously, thanks a lot for the feedback.  I asked this question because
I was not sure about the right behaviour for vi(1).

I agree with Greg about the advantages of a syntax driven auto-indent.
But most of us do not want a 50 MB vi(1) on NetBSD, right?  :-)

Best regards,
Igor.