Sublime Forum

Open Sublime Merge "Open git repository" from ST keybinding

#1

I’d like to define a keyboard shortcut to “Open git repository” (available from context menu)

Are there any keybinding available for the above, or are they still yet to come please?

Thanks!

0 Likes

#2

I resolved this by using Open with extension

0 Likes

#3

Top tip: the context menu entries trigger commands, so you can make your own keyboard shortcuts for them. In this case, the command is sublime_merge_open_repo. Also available are sublime_merge_file_history and
sublime_merge_blame_file. Find out how to configure key bindings here: https://www.sublimetext.com/docs/3/key_bindings.html

1 Like

#4

That worked, but how would I find these commands on my own? I can’t find sublime_merge_open_repo documented anywhere.

0 Likes

#5
1 Like

#6

Just for anyone who still curious:

  1. “ctrl+`”, open sublime console;
  2. Type “sublime.log_commands(True)”, and keep console open;
  3. Click the button in status bar which can open Sublime Merge;
  4. Check console output, you should see something like this: “command: sublime_merge_open_repo {“paths”: [“C:\Users\wesle\Documents\MyProjects\games”]}”;
  5. Type “sublime.log_commands(False)” after you finished, close console.

sublime.log_commands(True) is very helpful, you can add keybinding for some build in commands, e.g. “Open Containing Folder”, “Copy File Path” …

0 Likes