[Feature Request] Compare by Content - Edit feature

English support forum

Moderators: white, Hacker, petermad, Stefan2

User avatar
Gorbush
Junior Member
Junior Member
Posts: 33
Joined: 2003-02-05, 12:09 UTC
Location: Kharkiv, Ukraine

[Feature Request] Compare by Content - Edit feature

Post by *Gorbush »

Does anyone need to edit files when comparing them by content?
I need it sometime cheking config files...
Just to view two files and edit them both to some state....
What do you think?
Puljajev Sergej aka Gorbush
[Russian Total Commander Plugring Team]
User avatar
CADweazle
Senior Member
Senior Member
Posts: 297
Joined: 2003-04-03, 09:10 UTC
Location: Freiburg i.Br. Deutschland

Post by *CADweazle »

2Gorbush

No problem: :wink:

Open the the file that you want to edit in your editor, run "compare files by conent" in TC - and copy the desired lines by right mousecklick...
:?
Okeee, I confess a little :!: bit impractical.
I'd prefer to edit the files in the compare-windows too!!

Greetings,
Cheer up, Karl
User avatar
Gorbush
Junior Member
Junior Member
Posts: 33
Joined: 2003-02-05, 12:09 UTC
Location: Kharkiv, Ukraine

Post by *Gorbush »

Yes, i can copy lines in clipboard, but it could by more convenient to edit files in compare window with ability to recompare....
It can greatifully help to syncronize files, what have to be different, but need to update some values, presents in both files.
Puljajev Sergej aka Gorbush
[Russian Total Commander Plugring Team]
User avatar
Valentino
Power Member
Power Member
Posts: 706
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine

Post by *Valentino »

I think that editing (in wide meaning of this word) directly in compare window is difficult to implement and not worth it. It would be enough IMHO to have a possibility (one-click) to launch an editor from the compare window.

BTW, Norton File Compare (NFC) has cool facility. It would be very handy sometimes. For example, when backuping my projects' source files with Sync Dirs tool, I often compare to see what exactly had I changed in a particular file (with Compare File By Content tool), and sometimes I notice that I forgot to remove some debugging trash. Currently I have to launch one more instance of TC (or make some other boring actions) to open that file for editing because Sync Dirs tool is modal. It would be much quicker to restore some lines with just one click. E.g. buttons with left-to-right and right-to-left arrows between panes, like in Sync Dirs, against every line; and "Make Changes" button. All this stuff may be made optional for those who is never or rarely going to use it.

This feature in NFC is implemented not very convenient, first because it allows making changes only to newer file (inconvenient sometimes); second because one need select lines to undo and then launch separate window to preview changes.
And, if more complex editing is necessary, there should be possibility to launch associated program and/or F4 editor directly from Compare Files By Content.

Am I wishing too much? :)

P.S. And possibility to compile and debug modified app directly in Compare Files By Content... :lol:
User avatar
Gorbush
Junior Member
Junior Member
Posts: 33
Joined: 2003-02-05, 12:09 UTC
Location: Kharkiv, Ukraine

Post by *Gorbush »

I don't think that it's difficult to implement, and launching editor isn't what i need.
I need both to view defferencies (i mean some selected by color text), and ability to modify text at one time. I mean, i need to modify text not to state like other file, but with some dependencies with it...
No need of realtime recompare - just after press some "recompare files" button...
But it would be great in situations, like you told....
Puljajev Sergej aka Gorbush
[Russian Total Commander Plugring Team]
oblomov
Junior Member
Junior Member
Posts: 98
Joined: 2003-04-04, 15:41 UTC

Post by *oblomov »

Well, I have ViM installed (www.vim.org), so rather than using the internal file compare feature I now do

gvimdiff firstfile secondfile

and I can therefore edit files :) Of course, it would be very nice if the file comparison tool could be configurable to use an external program, so that I could use gvimdiff in all the contexts, and with the same ease, as I can use the internal diff tool ...
User avatar
CADweazle
Senior Member
Senior Member
Posts: 297
Joined: 2003-04-03, 09:10 UTC
Location: Freiburg i.Br. Deutschland

Post by *CADweazle »

2oblomov

Really great idea!!!
Yesterday I tested this gem:
Beyond Compare ( http://www.scootersoftware.com/ )

It's very smart and works in TC by right clicking one file after the other.

And - of course - you can edit both files!! :-)

Greetings,
Cheer up, Karl
shammat
Senior Member
Senior Member
Posts: 253
Joined: 2003-04-11, 23:13 UTC

Post by *shammat »

But there are viewer plugins for TC which allow you to edit the file.

Wouldn't it be possible to use a viewer plugin for displaying the files in the compare window?
User avatar
fabiochelly
Power Member
Power Member
Posts: 603
Joined: 2003-02-05, 12:03 UTC
Location: Rambouillet, France

Post by *fabiochelly »

I use the compare by content very often, and what I really miss is to have the ability to directly drag entire lines from one panel to another.

So, if an edit option cannot be added, it would be great to change the files by dragging lines.
Fabio Chelly.
#60241
Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en dessous
jb
Senior Member
Senior Member
Posts: 412
Joined: 2003-02-09, 22:56 UTC
Location: Switzerland

Post by *jb »

oblomov wrote:Of course, it would be very nice if the file comparison tool could be configurable to use an external program, so that I could use gvimdiff in all the contexts, and with the same ease, as I can use the internal diff tool ...
Yes, I also think that it should be configurable in some way. Partly it is already possible. To compare files by content I defined the following button:

Code: Select all

button37=%ProgramFiles%\TotalCmd\TotalCmd.exe,23
cmd37=%ProgramFiles%\vslick\win\vsdiff.exe
param37=%P%N  %T%M
menu37=Compare 2 files with DIFFzilla...
Unfortunately it seems not possible to define something similar for a menu item or a keyboard shortcut. So a general solution would be to offer uniform configurability for buttons, menu items, keyboard shortcuts and maybe even for entries in the Directory Hotlist.

An alternative solution costing less effort would be to introduce configuration options specific to the cm_CompareFilesByContent command.

On this occasion I would like to remind that cm_CompareFilesByContent can also be invoked from the 'Synchronize directories' dialog. I think this invocation should be configurable as well. This feature is already suggested as suggestion 4 in topic "Suggestions for 'Synchronize Dirs...' command".
User avatar
Hacker
Moderator
Moderator
Posts: 13064
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

To compare files by content I defined the following button:
...
Unfortunately it seems not possible to define something similar for a menu item or a keyboard shortcut.


Try adding it to the Start Menu. Then you can define any shortcut you wish for that command in Configuration - Options - Misc. - Redefine hotkeys. The Command is cm_usermenuX where X is the number of the entry in the Start Menu.
You can also add it anywhere else to the menu when it's already in the Start Menu using the cm_usermenuX command.

HTH
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Lion
Junior Member
Junior Member
Posts: 55
Joined: 2003-05-26, 09:36 UTC
Location: Obninsk, Russia
Contact:

Post by *Lion »

Nevertheless, Araxis Merge is the best :)

Method1:
Command=C:\WinApps\Araxis\compare.exe
Params=?/max %P%N %T%M

Method2:
Command=C:\WinApps\Araxis\Merge.exe
Params=?"%P%N" "%T%M" /NoSplash
"It's all very simple: In a white cloak..." - M. Bulgakov. The Master and Margarita.
oblomov
Junior Member
Junior Member
Posts: 98
Joined: 2003-04-04, 15:41 UTC

Post by *oblomov »

jb wrote:
oblomov wrote:Of course, it would be very nice if the file comparison tool could be configurable to use an external program, so that I could use gvimdiff in all the contexts, and with the same ease, as I can use the internal diff tool ...
Yes, I also think that it should be configurable in some way. Partly it is already possible. To compare files by content I defined the following button:

Code: Select all

button37=%ProgramFiles%\TotalCmd\TotalCmd.exe,23
cmd37=%ProgramFiles%\vslick\win\vsdiff.exe
param37=%P%N  %T%M
menu37=Compare 2 files with DIFFzilla...
Unfortunately it seems not possible to define something similar for a menu item or a keyboard shortcut. So a general solution would be to offer uniform configurability for buttons, menu items, keyboard shortcuts and maybe even for entries in the Directory Hotlist.

An alternative solution costing less effort would be to introduce configuration options specific to the cm_CompareFilesByContent command.

On this occasion I would like to remind that cm_CompareFilesByContent can also be invoked from the 'Synchronize directories' dialog. I think this invocation should be configurable as well. This feature is already suggested as suggestion 4 in topic "Suggestions for 'Synchronize Dirs...' command".
I'm already using code like that, but it's not as smart as the internal file compare is, esp wrt choosing which file to compare; I really believe that the file comparison tool should be customizabile (just like viewer and editor are)
jb
Senior Member
Senior Member
Posts: 412
Joined: 2003-02-09, 22:56 UTC
Location: Switzerland

Post by *jb »

Hacker wrote:The Command is cm_usermenuX where X is the number of the entry in the Start Menu.
You can also add it anywhere else to the menu when it's already in the Start Menu using the cm_usermenuX command.
Thanks for the hint. Until now I considered the Start Menu an odd thing and did not pay attention to it. :oops:
The possibility to define user commands is helpful, but in my opinion such definitions should be independent of a visible menu.
jb
Senior Member
Senior Member
Posts: 412
Joined: 2003-02-09, 22:56 UTC
Location: Switzerland

Post by *jb »

Lion wrote:Nevertheless, Araxis Merge is the best :)
I use both Araxis Merge and DIFFzilla (part of Visual SlickEdit) depending on the situation. To put it roughly, for me Araxis Merge is better in folder comparison (1st level), while DIFFzilla is better in file comparison (2nd level).
Post Reply