[comp.editors] vi: how to do :e !$ ?? AKA I try again :-)

tchrist@convex.COM (Tom Christiansen) (01/31/91)

From the keyboard of carl@mugwump.UK.Sun.COM (Carl Johnson - Sun EHQ - MIS):
:
:	prompt> vi afile.c
:
:	editeditedit
:
:	:e completeltnewfile.c
:
:	eror msg saying I haven't written my changes
:	I dont care so..
:	
:	:e! some_amazing_vi_command that will let me reference the last file 

Do try :e!# and see whether that doesn't work.  # is the last
file named, % is the current one.

--tom
--
"Hey, did you hear Stallman has replaced /vmunix with /vmunix.el?  Now
 he can finally have the whole O/S built-in to his editor like he
 always wanted!" --me (Tom Christiansen <tchrist@convex.com>)

carl@mugwump.UK.Sun.COM (Carl Johnson - Sun EHQ - MIS) (02/01/91)

>
>Do try :e!# and see whether that doesn't work.  # is the last
>file named, % is the current one.
>
>--tom

Ok it worked, *embarassed* is not the word.  Thanks for putting it
so diplomatically :-}

As to the comp.editors.vi debate, it seems to work well as is to me.

Cheers,
Carl.

mrd@ecs.soton.ac.uk (Mark Dobie) (02/01/91)

In <4761@male.EBay.Sun.COM> carl@mugwump.UK.Sun.COM (Carl Johnson - Sun EHQ - MIS) writes:

>>
>>Do try :e!# and see whether that doesn't work.  # is the last
>>file named, % is the current one.
>>
>>--tom

>Ok it worked, *embarassed* is not the word.  Thanks for putting it
>so diplomatically :-}

OK, I tried it and it worked for me too. Wouldn't it be really good if
we could somehow get file name completion when typing the new file
name for the first time?

Having to type the name in full discourages me from using :e, I just
exit vi and start again using the shell's filename completion.

Any ideas?

>As to the comp.editors.vi debate, it seems to work well as is to me.

I like the mixture too.

				Mark.
-- 

Mark Dobie                              M.Dobie@uk.ac.soton.ecs (JANET)
University of Southampton		M.Dobie@ecs.soton.ac.uk (Bitnet)

les@chinet.chi.il.us (Leslie Mikesell) (02/05/91)

In article <6499@ecs.soton.ac.uk> mrd@ecs.soton.ac.uk (Mark Dobie) writes:
>>>Do try :e!# and see whether that doesn't work.  # is the last
>>>file named, % is the current one.

>OK, I tried it and it worked for me too. Wouldn't it be really good if
>we could somehow get file name completion when typing the new file
>name for the first time?

>Having to type the name in full discourages me from using :e, I just
>exit vi and start again using the shell's filename completion.

No need for that, :n wildcard works just fine, but you do lose any
previous list of filenames you may have selected.

>>As to the comp.editors.vi debate, it seems to work well as is to me.

Me too.  Trn makes handling articles by subject and references so
easy that the current trend towards new groups for comp.every.little.thing
is a bit annoying.

Les Mikesell
  les@chinet.chi.il.us