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

feat: add visual mode mappings #78

Merged
merged 2 commits into from
Jun 26, 2024
Merged

feat: add visual mode mappings #78

merged 2 commits into from
Jun 26, 2024

Conversation

CWood-sdf
Copy link
Contributor

This PR solves issue #34 by allowing the "Choose ..." mappings to be called in visual mode and resolving the conflicts in the visual range with the given choice

Though in my testing, the default 'c.' mappings did not work because vim would ignore the second character

map({ 'n', 'v' }, config.default_mappings.both, '<Plug>(git-conflict-both)', opts('Choose Both'))
map({ 'n', 'v' }, config.default_mappings.none, '<Plug>(git-conflict-none)', opts('Choose None'))
map({ 'n', 'v' }, config.default_mappings.theirs, '<Plug>(git-conflict-theirs)', opts('Choose Theirs'))
map({ 'v', 'v' }, config.default_mappings.ours, '<Plug>(git-conflict-ours)', opts('Choose Ours'))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? should this be 'V', 'v'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the 'v' will remap to visual, visual line, and visual block mode

@jugarpeupv
Copy link

ey @akinsho is there anything left for this PR to be accepted?

@akinsho
Copy link
Owner

akinsho commented Jun 26, 2024

@jugarpeupv lots of issues across other repos and not much time, I appreciate you're keen for it but it is on my radar, no need for a ping.

@akinsho
Copy link
Owner

akinsho commented Jun 26, 2024

Probably won't have time soon to test this manually so will merge for now but if there's any breakage I'll roll it back.

@akinsho akinsho merged commit 888bc31 into akinsho:main Jun 26, 2024
@jugarpeupv
Copy link

@akinsho many thanks, appreciate it. I tested the fork and it worked fine

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

Successfully merging this pull request may close these issues.

3 participants