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

document alternative to diff mode #1043

Closed
josephholsten opened this issue Oct 12, 2022 · 8 comments
Closed

document alternative to diff mode #1043

josephholsten opened this issue Oct 12, 2022 · 8 comments

Comments

@josephholsten
Copy link

One of the very few goals of vis I'm not sure I agree with is lack of diff mode. I've used a variety of techniques to get diff capability in acme over the years, including using

What do you recommend for merging commits and other diff tasks?

@qiu-x
Copy link
Contributor

qiu-x commented Oct 14, 2022

What do you recommend for merging commits and other diff tasks?

For me, editing diffs like normal files is pretty intuitive. The side-by-side view is good for getting an overview and the diff utility already has it built-in (--side-by-side option)

@mcepl
Copy link
Contributor

mcepl commented Oct 20, 2022

For me, editing diffs like normal files is pretty intuitive. The side-by-side view is good for getting an overview and the diff utility already has it built-in (--side-by-side option)

How are you doing with recomputing numbers in hunks headers? I have written https://gitlab.com/mcepl/vim-diff_navigator (which I have unsuccessfully tried to port to Lua and it seems I have lost even that draft I had … oh well).

@mcepl
Copy link
Contributor

mcepl commented Dec 23, 2022

@josephholsten This either be reformulated into some action item (relevant to vis, I have a suspicion that this should be done by plugin anyway), or it should be closed. This is supposed to be an issue tracker not a place for dreaming.

@josephholsten
Copy link
Author

@mcepl "document alternative to diff mode" is about as concrete an action as I can briefly write. What, are you wanting acceptance tests? As the answer appears to be, "If you need documentation to figure out how to do one of the most frequently performed operations in source code maintenance, we don't want you as a user."
But with that attitude, you won't have to deal with so many contributors you have merge conflicts anyway.
Have fun with your undocumented code!

@mcepl
Copy link
Contributor

mcepl commented Jan 22, 2023

@mcepl "document alternative to diff mode" is about as concrete an action as I can briefly write. What, are you wanting acceptance tests? As the answer appears to be, "If you need documentation to figure out how to do one of the most frequently performed operations in source code maintenance, we don't want you as a user." But with that attitude, you won't have to deal with so many contributors you have merge conflicts anyway. Have fun with your undocumented code!

Have you noticed a tiny difference in size between vis and nvim (I don’t have Bram’s vim installed)?

stitny~$ ls -lh /usr/bin/{vis,nvim}
-rwxr-xr-x. 1 root root 3,9M 19. led 08.14 /usr/bin/nvim
-rwxr-xr-x. 1 root root 388K 15. led 23.30 /usr/bin/vis
stitny~$ 

The brutal answer then is “this is a way too big functionality for vis”. If you want something so large then you better come to us with a patch or (most likely) you should create a Lua plugin doing the thing.

@ninewise
Copy link
Collaborator

Please don't be rude.

vis currently does not have any functionality, either build in or as a plugin, for viewing diff files other than just opening the raw diff. I consider this OK, since I'm used to 3-way git diffs.

The interactive diff views do seem like quite difficult behaviour to implement as well, so I don't think this would fit in core vis. And it'd probably be very hard to write a plugin fot it.

So I guess the answer would be that there is nothing do document, except perhaps to say that there's nothing to document so people don't have to go look for it.

@mcepl
Copy link
Contributor

mcepl commented Jan 22, 2023

And it'd probably be very hard to write a plugin fot it.

See the examples in the original description of this ticket, I wonder whether some combination of watch(1) and diff(1) working in the background wouldn’t be possible as a plugin, but certainly it is a way bigger project than I have time for right now.

@mcepl
Copy link
Contributor

mcepl commented Oct 23, 2024

Also, for the uninitiated, adiff is basically loading of diff into ACME, side by side.

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

4 participants