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

Use hunks from both 1 and 2 #30

Open
Blasz opened this issue May 30, 2016 · 3 comments
Open

Use hunks from both 1 and 2 #30

Blasz opened this issue May 30, 2016 · 3 comments

Comments

@Blasz
Copy link

Blasz commented May 30, 2016

I'm able to select a hunk for a conflict from either 1 or 2 but can't seem to add both files' hunks to the result file.
Is this possible?

@roqvist
Copy link

roqvist commented Dec 14, 2016

It is not possible to do automatically. You'd have to copy/paste the values manually.

I've been looking into this as well, would be really useful to be able to type like this:
-U+1

which would append the content of buffer 1 to the current result file.

So you could do stuff like:
-U1
-U+2

to first take the change from 1 and then append the change from 2.

Unfortunately vimdiff, which splice.vim uses under the hood, only has two basic commands; diffget and diffput, both of which simply replaces the current conflict with a given value. Anything more complex, such as taking from first and then appending from second, requires manual copy/pasting.

Identifying the current conflict and appending it's value to the result buffer is certainly doable but not through existing vimdiff commands.

@clawoflight
Copy link

Would love this as well, +1!

@errael
Copy link

errael commented Jun 28, 2024

The latest release of the pure vim9script port of splice, https://github.com/errael/splice9/releases/tag/v1.0.0-beta2, supports this feature.

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