Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File diff plugin #1042

Closed
AlibekJ opened this issue Jul 26, 2021 · 4 comments
Closed

File diff plugin #1042

AlibekJ opened this issue Jul 26, 2021 · 4 comments

Comments

@AlibekJ
Copy link

AlibekJ commented Jul 26, 2021

A plugin for comparing files for Far Manager.

I am missing a plugin which would compare files in far.
Basically, a wrapper for diff with some additional features.

Would love to see it working exactly like in Midnight Commander:
Select two files, press C-x C-d or F9-c-o. Viewer visualizes the differences and allows merging changes between the files.
Screenshot:
Screenshot from 2021-07-26 15-56-51

@bigvax
Copy link

bigvax commented Dec 1, 2021

Я пользуюсь в Far Manager плагином VisualCompare.
Пока его не портировали в far2l, я сделал себе вот такой «костыль»:
Меню пользователя:
I use the VisualCompare plugin in Far Manager.
Until it was ported to far2l, I made myself menu like this:
User menu:

a:  mcdiff
    mcdiff !^!/!.! !#!/!.!
v:  vimdiff
    vimdiff !^!/!.! !#!/!.!
m:  meld
    meld !^!/!.! !#!/!.!
k:  kdiff3
    kdiff3 !^!/!.! !#!/!.!
s:  sdiff
    far2l /e - sdiff -iZbBWt !^!/!.! !#!/!.!
d:  diff
    far2l /e - diff -auiwBE !^!/!.! !#!/!.!

Все варианты используют текущий файл на активной и пассивной панелях.
Ваш вариант первый - a:
All options use the current file on the active and passive panels.
Your first option - a:

@AlibekJ
Copy link
Author

AlibekJ commented Dec 1, 2021

Woah @bigvax, thanks for the suggestion!

So, F9, Edit user menu
Pick Main
Insert

Type in the suggested line:

a:  mcdiff
    mcdiff !^!/!.! !#!/!.!

Now select two files you want to compare in the left and right panels.
Press F2 and a this opens the midnight commander's diff tool. If you don't have one, get mc installed.

Огромное вам спасибо!

@bigvax
Copy link

bigvax commented Dec 1, 2021

F9 -> Команды -> Меню пользователя -> Главное -> Ctrl+F4
F9 -> Commands -> Edit user menu -> Main -> Ctrl+F4

вот как-то так
Это несколько пунктов для использования разных программ для отображения diff-ов
Пробовал что удобнее.
Для себя оствновился на 1-м варианте: mcdiff
Я его активно в mc юзал, поэтому привычно.
Остальные варианты привел здесь на всякий случай, ибо на вкус и цвет все фломастеры... ;)

@AlibekJ AlibekJ closed this as completed Dec 2, 2021
@ivanshatsky
Copy link
Contributor

My menu to compare selected file with the selected file on a passive panel and with the same-named file on a passive panel:

:  Compare !.! with !#!/!.!
    mcdiff !.! !#!/!.!
:  Compare !.! with the same file
    mcdiff !.! !#!/!^!.!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants