[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Editor idea

On Wed, 19 Mar 2008 13:00:18 -0400, Lonny Pursell <atari@bright.net> wrote:
> on 3/19/08 12:41 PM, p.slegg@scubadivers.co.uk wrote:
> > I have had an idea for an enhancement to an editor that might be
> > useful. Maybe there is an editor that does this all ready, it's not
> > a new idea but might be simple to implement.
> >
> >
> > What I thought was this.
> >
> > 1. User opens a file for editing with the editor in "version control mode".
> > 2. File is edited.
> > 3. When the user tries to save the file the Editor looks for a folder called
> >    "orig" and creates it if necessary.
> > 4. Editor looks in orig for a copy of the file being edited.
> > 5. If the file does not exist then the original file is moved into the orig
> >    folder so that the amended file does not overwrite it.
> > 6. New version of file is saved.
> >
> > By doing this, the original source code would be kept while the user does
> > many edits on a file.
> >
> > Would this have an affect on using "make" ? Would it try to "make" everything
> > in
> > the orig folder ? If so, could the folder be hidden ?  (.orig ?)
> >
> > The next obvious step would be to get the editor to "diff" the original and
> > the edited file to highlight where lines have been inserted and deleted. It
> > could allow the user to quickly compare their changes to the original and
> > even allow the user to rollback individual line changes.
> This is the purpose of CVS.  You can use any old editor you like, the trick
> is you must submit versions to CVS that you might wish to roll back or diff.
> I don't know of an editor that does this.  Although I think QED has an
> option at least to rename the old version *.bak when you go to save a file
> of the same name/path.

Been an occasional CMS, CVS user for many years :-)I use CVS daily
but it's automated through IntelliJ-IDEA so it doesn't take much
knowledge, you quickly forget all the commands.

Everest, QED etc. will create a .bak that overwrites the previous .bak
so you lose version 1 when doing multiple edits of the same file.
By copying the original file to the orig folder once and only once and
never overwriting it, the original version is preserved.

IDEA keeps a local copy of the version that was checked-out
of CVS. It uses this to work out what has changed as multiple edits
are made on the file. It shows the changes by placing marks in the
right hand margin.

In the left margin it places little arrows to show inserts and deletes.
Click on the arrow and a bubble pops-up that shows the original
section of code and allows it to be rolled-back. It's really simple but
very handy.

I think IDEA deletes the original copy when the modified one is checked-
back into CVS