|
Home > Archive > Red Hat Topics > May 2006 > looking for editors with automatic diff (cvs) support
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
looking for editors with automatic diff (cvs) support
|
|
|
| hi
I am looking for an text editor under GNU/Linux with the following
features:
1. when saving a text file, automatically do a diff with its
pre-modified verion and save the output to a file (for example
filename.diff)
2. if a text file has the corresponding diff file, this editor allow
users to switch between all saved "versions".
3. provide some tools to merge multiple diff file if the file were
edited at multiple computers (optional)
basically, the goal is to have a good version control to my program,
but I haven't got use to cvs, if there is such an editor can do the
job, I would be very happy.
thank you and eager to learn your feedback.
Qianqian
| |
| Dan Espen 2006-05-07, 7:11 pm |
| "FangQ" <fangqq@gmail.com> writes:
> hi
>
> I am looking for an text editor under GNU/Linux with the following
> features:
>
> 1. when saving a text file, automatically do a diff with its
> pre-modified verion and save the output to a file (for example
> filename.diff)
>
> 2. if a text file has the corresponding diff file, this editor allow
> users to switch between all saved "versions".
>
> 3. provide some tools to merge multiple diff file if the file were
> edited at multiple computers (optional)
>
> basically, the goal is to have a good version control to my program,
> but I haven't got use to cvs, if there is such an editor can do the
> job, I would be very happy.
Sounds like you want to use CVS but you don't want to use CVS.
Is it me that is confused or is it you?
| |
| jindi.li 2006-05-08, 1:12 am |
| try TortoiseSVN,easy to use yet powerful
since all it's operations are controlled through command line
parameters .so you can easily integrate it with gvim.
| |
| Grant Edwards 2006-05-08, 1:12 am |
| On 2006-05-07, FangQ <fangqq@gmail.com> wrote:
> basically, the goal is to have a good version control to my program,
Then use a version control system.
> but I haven't got use to cvs,
Then use SVN.
> if there is such an editor can do the job, I would be very
> happy.
There quite a few programming editors that have integrated CVS
and/or SVN support.
--
Grant Edwards
grante@visi.com
| |
|
| thanks for all your replies. it was actually my question confusing 
in another word, I want to keep all modifications of my codes, but
don't want to do "check in" "check out" stuff with cvs commands. As
Grant mentioned ealier, I am looking for editors integrated with simple
CVS-like features (as a built-in feature is preferred).
seems TortoiseSVN only has windows version?
| |
| Chris F.A. Johnson 2006-05-08, 1:12 am |
| On 2006-05-08, FangQ wrote:
> thanks for all your replies. it was actually my question confusing 
>
> in another word, I want to keep all modifications of my codes, but
> don't want to do "check in" "check out" stuff with cvs commands. As
> Grant mentioned ealier, I am looking for editors integrated with simple
> CVS-like features (as a built-in feature is preferred).
IF you don't want to check in and check out, you don't want
anything like CVS. Perhaps you should look at the backup-each-save
module for emacs. Adding diff creation should be simple.
> seems TortoiseSVN only has windows version?
--
Chris F.A. Johnson, author <http://cfaj.freeshell.org>
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
===== My code in this post, if any, assumes the POSIX locale
===== and is released under the GNU General Public Licence
| |
| bakert 2006-05-08, 7:11 am |
| Perhaps you can use autocmd in your vim configuration file to call
!cvs commit -m "..."
when you save a file
????
Seems a bit crazy but could possibly work.
What's the problem with CVS/svn?
| |
| Dan Espen 2006-05-08, 1:12 pm |
| "FangQ" <fangqq@gmail.com> writes:
> thanks for all your replies. it was actually my question confusing 
>
> in another word, I want to keep all modifications of my codes, but
> don't want to do "check in" "check out" stuff with cvs commands. As
> Grant mentioned ealier, I am looking for editors integrated with simple
> CVS-like features (as a built-in feature is preferred).
"Keeping all modifications" still doesn't make sense to me.
If you type a letter and then hit backspace, do you want to keep
that? I think not.
Take a look at emacs (or XEmacs). Using CVS (or SCCS, or RCS),
you can do a delta with a few keystrokes.
| |
| Grant Edwards 2006-05-08, 1:12 pm |
| On 2006-05-08, bakert <bakert@gmail.com> wrote:
> Perhaps you can use autocmd in your vim configuration file to call
>
> !cvs commit -m "..."
>
> when you save a file
He could wrap any editor he likes in a shell script that does a
commit after the editor exits. He wouldn't have snapshots of
intermediate versions that were saved without exiting the
editor...
--
Grant Edwards grante Yow! Do you guys know we
at just passed thru a BLACK
visi.com HOLE in space?
| |
|
|
| Mitch Johnston 2006-05-13, 7:11 am |
| On Mon, 08 May 2006 11:00:52 -0400, FangQ <fangqq@gmail.com> wrote:
> I guess that's probabily the conclusion.
>
> indeed, I like the "Wiki"-way, for example,
>
> http://wqy.sourceforge.net/cgi-bin/...history&id=Home
>
> but browsers are not as powerful as text editors.
>
> anyway, thank you all for your feedback.
>
I use Vim and I wrote a wrapper as a function that I put in my shells 'rc'
file. See if this helps, it could be a starting point:
vi(){ # backup edited files
printf "\033]0;vim $* \007" ##This sets my Zoc or Xterm title
if [ ! -d ~/.bak ] # make sure the backup directory is in place
then
mkdir ~/.bak
fi
for FILE in $* # for each file passed to it
do
if [ -f $FILE ] # check to see if it's a file and not an argument
then
test -f ~/.bak/$FILE.4 && mv ~/.bak/$FILE.4 ~/.bak/$FILE.5
test -f ~/.bak/$FILE.3 && mv ~/.bak/$FILE.3 ~/.bak/$FILE.4
test -f ~/.bak/$FILE.2 && mv ~/.bak/$FILE.2 ~/.bak/$FILE.3
test -f ~/.bak/$FILE.1 && mv ~/.bak/$FILE.1 ~/.bak/$FILE.2
test -f ~/.bak/$FILE.0 && mv ~/.bak/$FILE.0 ~/.bak/$FILE.1
cp $FILE ~/.bak/$FILE.0
fi
done
if [ $TERM = xterm ]
then
/usr/local/bin/gvim $*
else
/usr/local/bin/vim $*
fi
printf "\033]0;$(uname -n)\007"
}
Good Luck!
..\\itch - Any use of this product will increase the entropy in the
universe.
--
..\\itch Johnston - Bearded Dragon
| |
| rpilkey@gmail.com 2006-05-15, 1:12 pm |
| If you are using Vim, perhaps this is what you are looking for:
http://www.vim.org/scripts/script.php?script_id=563
rcsvers.vim : Use RCS to make a backup whenever you save a file
It automatically creates new revisions in an RCS file whenever you
save. It also lets you view/diff any version of a file that you have
saved.
Roger
|
|
|
|
|