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

Simplify interface: hide irrelevant commands when not merging #14

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

idbrii
Copy link

@idbrii idbrii commented Apr 16, 2020

I find tab completion or :Unite command gets cluttered with the myriad of merge commands, so I made this change to slim down the possibilities to what's relevant.

It doesn't make sense to adjust our layout unless we're merging, so only define these commands while merge is active. This makes it easier to find the right mergetool commands.

I didn't touch the diff exchange commands because it looks like they're useful in non diff merges, so they are valid outside of merging.

Allow users to define their own Mergetool commands while merge is active. Since we're hiding commands outside of merge, users should be able to do the same.

See how I use it here in my config.

Some useful examples of aliases:

command! MergetoolDiffWithRemote MergetoolToggleLayout rlm
command! MergetoolThreeWay MergetoolToggleLayout LmR

I also moved the diffexchange code to autoload.

It doesn't make sense to adjust our layout unless we're merging, so only
define these commands while merge is active. This makes it easier to
find the right mergetool commands.
Allow users to define their own Mergetool commands. The best example I
have is `:MergetoolDiffWithRemote` as an alias for
`:MergetoolToggleLayout rlm`
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.

1 participant