Path: utzoo!attcan!uunet!mcsun!ukc!slxsys!ibmpcug!dylan From: dylan@ibmpcug.co.uk (Matthew Farwell) Newsgroups: comp.editors Subject: Re: edit multiple files in vi? Message-ID: <1990Sep25.130305.9858@ibmpcug.co.uk> Date: 25 Sep 90 13:03:05 GMT References: <1990Sep19.133419@ai.mit.edu> <1990Sep24.053330.3024@monu6.cc.monash.edu.au> Reply-To: dylan@ibmpcug.CO.UK (Matthew Farwell) Organization: The IBM PC User Group, UK. Lines: 49 In article jansteen@cwi.nl (Jan van der Steen) writes: > >[ stuff about tail recursion in vi] > >I'm very sorry but when I tested the above macros I wasn't aware that >I was running elvis the vi clone recently posted to (I think it was) >comp.sources.misc. >Unlike vi, elvis *does* allow the user to map vi primitives to keys >with the same name. I don't think this a very good idea. Couple of reasons. 1) If elvis were to allow the macro:- :map d "xd If I were to then type 'dd' What should it do? I think that "xd"xd would have unpredictable (to the novice) results. If say he wanted to delete a line then move to the end of the file (using ddG), things would get quite surprising. If you want recursion, use 2 macros which reference each other. 2) With the above mapping, If I were then to:- :map D dG should it use the primitive d or the mapped d? If it were to use the mapped d then elvis would get very confused, so I'll assume it uses the primitive d once again. Does this mean when I map a key, I can't use it in another mapping? This sort of behaviour is very nonstandard, and people who use it, when they migrate to real vi will get very confused when all their macros don't work. You never know, they might actually have to start learning how to use vi properly. 3) While im on the subject, why does elvis handle long lines so badly? ie, it has them off the end of the screen? This causes an awful problem when you've got a lot of long lines + a reasonably slow machine/line. (Try editing a file with a lot of lines over 80 chars on a line at 1200 baud. Then do a lot of 0$'s.) Why can't people who write vi clone write vi clones? Things are done like they are in vi for good reasons. Dylan. -- Matthew J Farwell | Email: dylan@ibmpcug.co.uk The IBM PC User Group, PO Box 360,| ...!uunet!ukc!ibmpcug!dylan Harrow HA1 4LQ England | CONNECT - Usenet Access in the UK!! Phone: +44 81-863-1191 | Sun? Don't they make coffee machines?