Re: How much vi compatibility do we require ?
- On Wednesday 28 November 2001 21:38, Benji Fisher wrote:
> Hari Krishna Dara wrote:I agree with keeping vi compatibility. Even though right now the only VI like
> > This is just a general question out of my curiosity. I was reading the
> > help about the line-continuation and I saw this "Rationale" section at
> > the end that says:
> > Rationale:
> > Most programs work with a trailing backslash to indicate line
> > continuation. Using this in Vim would cause incompatibility with
> > Vi. For example for this Vi mapping: >
> > :map xx asdf\
> > < Therefore the unusual leading backslash is used.
> > Why should we aim for vi compatibility here ? First of all this is
> > accepted only in the scripts. If someone is writing a script using this
> > feature, why would he aim for vi compatibility ? Whether it is a leading
> > backslash or a trailing backslash, both would not be recognized by vi
> > anyway, so he/she has to write separate scripts for vi and vim. May be
> > there was a technical reason for choosing a leading backslash instead of
> > the trailing backslash ? Again, just out of my curiosity.
> > Do people really have many settings (are macros) that are common to both
> > vi and vim ?
> > Thanks,
> > Hari
> I think the point is that vim is used by many who want a vi
> replacement. They may have elaborate vi macros, of which ":map xx asdf\" is
> a mere suggestion. For the sake of these users, Vim has to treat a
> trailing backslash compatibly. I guess that a leading backslash is an
> error in vi, and it is OK to be incompatible by doing something that would
> just make vi go "beep".
> It would have been possible to add another flag to the 'cpo' option,
> but Bram's usual position is that there are too many options already.
> Since he is the one responsible for making sure that all options do what
> they are expected to (no more, no less) I do not try to argue this point.
> HTH --Benji Fisher
editor I use is Vim, I like the fact that most of what I learn is useful on
any UNIX machine I happen to approach.
(Legal Disclaimer) Follow these suggestions at your own risk.