Sublime Merge integration for Visual Studio Code
This extension enables the following commands, available from the command palette when in a workspace with a Git repository:
Open repository in Sublime Merge
: Opens the current workspace in Sublime MergeBlame in Sublime Merge
: Opens the Blame view in Sublime MergeFile history in Sublime Merge
: Shows the history (log) of the current file in Sublime MergeLine history in Sublime Merge
: Shows the history of the selected line(s) in Sublime MergeShow my commits in Sublime Merge
: Show commits from the current Git user in Sublime Merge
Note: Contextual menu items for the editor are also provided and their visibility can be customised changing the extension settings (see "Configuration").
The extension shows the number of unstaged / to be committed files in the status bar.
Clicking on the status bar item will open Sublime Merge.
It's possible to also show the current branch name
in the status bar item using the showBranchName
setting.
Make sure that git
and the smerge
commands are available within your PATH.
See: https://www.sublimemerge.com/docs/command_line
{
"vscsm.debug": false, // Enable debug information in the output panel; default: false
"vscsm.showInStatusBar": false, // Disables the status bar item if false; default: true
"vscsm.statusBarItemPosition": "left", // Allows to position the status bar item on the left; default: "right"
"vscsm.showBranchName": false, // Shows the current branch name in the status bar item; default: false
"vscsm.smergeExecutablePath": "", // Allows to specify the full path to the "smerge" executable;
// can also be an object with per-platform paths:
// "vscsm.smergeExecutablePath": {
// "linux": "/usr/bin/smerge",
// "osx": "/Applications/Sublime Merge.app/Contents/SharedSupport/bin/smerge",
// "windows": "C:\\Program Files\\Sublime Merge\\smerge.exe",
// },
// Custom contextual menu items visibility:
// (see inline help for details)
"vscsm.showMenu.openInSublimeMerge": false,
"vscsm.showMenu.fileHistoryInSublimeMerge": "always",
"vscsm.showMenu.lineHistoryInSublimeMerge": "withSelection",
"vscsm.showMenu.myCommitsInSublimeMerge": "never",
"vscsm.showMenu.blameInSublimeMerge": "withSelection",
}
The following example (by Rubén Robles) shows how it's possible to configure Sublime Merge to use Visual Studio Code as the default editor for opening files:
{
"editor_path": "/usr/local/bin/code",
"editor_argument_format": "--goto ${file}:${line}:${col}"
}
These can be manually added to the Sublime Merge Preferences.sublime-settings
file.
- Tests are not present
This is my first VSCode extension, therefore any constructive feedback is very welcome.
See the Changelog
I've been able to start working on this extension thanks to the personal development time kindly allowed by my former employer, Altmetric.