looking for editors with automatic diff (cvs) support - Redhat

This is a discussion on looking for editors with automatic diff (cvs) support - Redhat ; 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 ...

+ Reply to Thread
Results 1 to 12 of 12

Thread: looking for editors with automatic diff (cvs) support

  1. 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


  2. Re: looking for editors with automatic diff (cvs) support

    "FangQ" 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?

  3. Re: looking for editors with automatic diff (cvs) support

    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.


  4. Re: looking for editors with automatic diff (cvs) support

    On 2006-05-07, FangQ 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

  5. Re: looking for editors with automatic diff (cvs) support

    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?


  6. Re: looking for editors with automatic diff (cvs) support

    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
    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

  7. Re: looking for editors with automatic diff (cvs) support

    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?


  8. Re: looking for editors with automatic diff (cvs) support

    "FangQ" 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.


  9. Re: looking for editors with automatic diff (cvs) support

    On 2006-05-08, bakert 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?

  10. Re: looking for editors with automatic diff (cvs) support

    I guess that's probabily the conclusion.

    indeed, I like the "Wiki"-way, for example,

    http://wqy.sourceforge.net/cgi-bin/e...istory&id=Home

    but browsers are not as powerful as text editors.

    anyway, thank you all for your feedback.


  11. Re: looking for editors with automatic diff (cvs) support

    On Mon, 08 May 2006 11:00:52 -0400, FangQ wrote:

    > I guess that's probabily the conclusion.
    >
    > indeed, I like the "Wiki"-way, for example,
    >
    > http://wqy.sourceforge.net/cgi-bin/e...istory&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

  12. Re: looking for editors with automatic diff (cvs) support

    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


+ Reply to Thread