5

How can I make a keyboard shortcut for Navigate > File History... in Sublime Merge?

1 Answer 1

7

The command for this is file_history; it will prompt you interactively in the command palette and commands of that nature need to be invoked via the show_command_palette command.

So, a key binding that duplicates what the menu item Navigate > File History... does would look like the following (using an example key; change that as desired):

    { 
      "keys": ["ctrl+alt+t"], 
      "command": "show_command_palette", "args": {"command": "file_history"}
    },

This binding goes into the Default (<PLATFORM>).sublime-keymap file in your Merge User package, where <PLATFORM> is one of Linux, Windows or OSX depending on what platform you're using.

You can locate the User package by choosing the Preferences > Browse Packages command from the menu and then navigating inside of the User package.

Note that just like Sublime, the sublime-keymap file is a JSON file that is a list of key bindings; thus if you don't already have key bindings, you need to wrap the key binding above in [ and ] characters to make it the first item in the list.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.