Re: vi dup



On 20 May, 01:08, Bill Campbell <b...@xxxxxxxxxxxxx> wrote:
On Mon, May 19, 2008, Jeff Hyman wrote:
Hello everyone out there,

  Is there a way within 'vi', that can prevent the same user from
'vi'ing the same file in another session?

 As I get distracted with calls, etc, I may end up editing the same
file, and inadvertently (and lastly) exiting the one without the mods.
What a GREAT way to waste valuable time.  

Use vim instead of vi.  Vim creates a .filename.swp file in the
same directory as the file being edited, and a second attempt to
edit the file results in a warning message.  Vim uses that file
for recovery with ``vim -r filename'' instead of burying some
file under /var/tmp/somethingorother.

Bill
--
INTERNET:   b...@xxxxxxxxxxxxx  Bill Campbell; Celestial Software LLC
URL:http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way
Voice:          (206) 236-1676  Mercer Island, WA 98040-0820
Fax:            (206) 232-9186

We maintain that the very foundation of our way of life is what we call
free enterprise, said Cash McCall, "but when one of our citizens
show enough free enterprise to pile up a little of that profit, we do
our best to make him feel that he ought to be ashamed of himself."
    -- Cameron Hawley

There are usable version of vim at Skunkware. I do't recommend
installing it from scratch, getting the terminal behavior i a bit
tricky.
.



Relevant Pages

  • Re: vi dup
    ... and inadvertently exiting the one without the mods. ... What a GREAT way to waste valuable time. ... Vim uses that file ... show enough free enterprise to pile up a little of that profit, ...
    (comp.unix.sco.misc)
  • Re: vi dup
    ... On Mon, May 19, 2008, Jeff Hyman wrote: ... Use vim instead of vi. Vim creates a .filename.swp file in the ... edit the file results in a warning message. ... show enough free enterprise to pile up a little of that profit, ...
    (comp.unix.sco.misc)
  • Re: vi dup
    ... and inadvertently exiting the one without the mods. ... installing it from scratch, getting the terminal behavior i a bit ... I have a stand-alone vim 6.something on my site but the osr507mp5 one is ... that's the fifth cd with the OSR 5.0.7 currentn distribution? ...
    (comp.unix.sco.misc)
  • Re: vi dup
    ... and inadvertently exiting the one without the mods. ... Vim uses that file ... installing it from scratch, getting the terminal behavior i a bit ...
    (comp.unix.sco.misc)