LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-09-2005, 06:13 AM   #1
sailu_mvn
Member
 
Registered: Sep 2004
Location: Hyderabad
Distribution: FEDORA,REDHAT,HOST
Posts: 440
Blog Entries: 1

Rep: Reputation: 30
problem with Vi Editor


I am using Vi Editor for editing a file.
I am doing a Remote login into another machine and making changes in the file as we both had to edit the same file.Some Swap files are created as more than one person is editing the same file. When I save the file it generally gets saved. But after sometime, if I open the file again, the changes I made are not reflected. The person who edited the same file , her changes are reflected.
This file is in her system.
I am so confused. All my work is lost. IS there any secure procedure that two people can edit the same file?

Is VIM Suitable editor for doing so?

Looking forward for the reply.
 
Old 08-09-2005, 07:27 AM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
The answer you are looking for is CVS (or subversion). There are no editors (I could possibly be mistaken.. but I've never seen one) that automatically handle versioning when two people are editing a file simultaneously. Vim for instance, will complain if you try and open a file that somebody has already opened in vim (unfortunately it doesn't complain if somebody has it open in another editor).

CVS allows each person to checkout there own copy, edit it, and then commit it back to the repository. It will automatically merge changes when it can, and ask you to manually merge changes when it gets confused. CVS (again.. or subversion) will also allow you to go back and check the differences between different versions of the file and revert back to old versions. In short, using a versioning system insures not only you never lose your new work but you'll always be able to go back and check out your old revisions as well.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vi editor problem sajith Programming 6 08-18-2014 07:46 AM
Problem in vi editor init_linux Linux - General 10 09-09-2005 01:40 AM
Mandrake10.1-menu editor problem. akihandyman Mandriva 1 12-29-2004 06:15 AM
Problem with the EDITOR variable objorkum Slackware 2 10-19-2004 03:29 PM
Makefile with emacs editor problem? varala_kanth Linux - Software 0 04-03-2004 02:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration