Let’s add a custom SublimeMerge command, “Open Pull Request”, to open a GitHub pull request.

SublimeMerge doesn’t have a package manager yet, so we need to do some manual copy and pasting.

installation

To open a pull request, we can use the git-pr NPM package.

# install via NPM
npm install --global git-pr

# or install via Yarn
yarn global add git-pr

Now we can add our custom command to the command palette:

  1. In the SublimeMerge menu, open Sublime Merge > Preferences > Browse Packages...
  2. In the User folder, add a file called Default.sublime-commands with the following contents:
[
  {
    "caption": "Open Pull Request",
    "command": "git",
    "args": { "argv": ["pr"] }
  }
]

Now we can access our new “Open Pull Request” command in the SublimeMerge command palette!

troubleshooting

If Sublime Merge cannot find your binary, see SublimeMerge $PATH for help on configuring your $PATH.