Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to "Resolve All" or bind a key to "Resolve Next" in Sublime Merge?

Tags:

sublimemerge

I have a ton of conflicts that I need to resolve, and it would really help if there was a way for me to just decide to "Resolve All", which would queue up all the files that need to be resolved.

Another idea is to bind the "Resolve" button to a key so that I can just click that keybinding to resolve the next conflict.

I've googled around quite a bit, but to no avail.

The "Key Binding"-documentation does not mention this.

Thanks!

like image 943
Linus Juhlin Avatar asked Nov 17 '22 08:11

Linus Juhlin


1 Answers

TL;DR.

    {
        "keys": ["ctrl+super+shift+r"],
        "command": "resolve_merge_conflict", "args": { "path": "$path" },
    },
    {
        "keys": ["ctrl+super+shift+t"],
        "command": "stage_file", "args": { "path": "$path" },
    },

Explanation

The documentation you mention explains how to do this:

Currently there is no compiled list of all built-in commands. The names of many commands can be found by looking at the Default ({PLATFORM_NAME}).sublime-keymap and Main.sublime-menu files in the Default - Merge.sublime-package and Default.sublime-packagepackages. See the Packages documentation for information on where to find the package and view the contents.

The commands you looking for is in Unmerged File.sublime-menu under Default package: resolve_merge_conflict and stage_file. They both accept path argument.

like image 167
voiger Avatar answered Jan 05 '23 01:01

voiger