An extension for viewing blame information and commit details in VS Code, and copy file/commit URL in GitHub/GitHub Enterprise. Quickly navigate with keyboard shortcuts.
There are a lot of similar extensions, but I love vim-fugitive so much and I want to mimic part of its functionality.
- Open current file/lines in GitHub or GitHub Enterprise
- Show Git blame information with color-coded timestamps
- Open file in GitHub
- Support line number selection
- Support commit URL in diff view
- Toggle Git blame information display
- Shows commit hash, author, and timestamp
- Color-coded: newer commits appear brighter
- Show commit details for the current line
- Shows the commit changes in vs code diff view
Install from VSCode Marketplace or download VSIX file from releases.
Default shortcuts:
Alt+, w
- Open in GitHubAlt+, b
- Toggle Git Blame informationAlt+, s
- Show commit details for current line
To customize these shortcuts:
- Open Keyboard Shortcuts in VS Code:
- Windows/Linux: Press
Ctrl+K Ctrl+S
- Mac: Press
Cmd+K Cmd+S
- Windows/Linux: Press
- Search for "Show Me in GitHub" to see all commands
- Click the pencil icon next to any command to edit its shortcut
- Press your desired key combination
- Press Enter to save
Or directly edit keybindings.json
:
- Open Command Palette (
Ctrl+Shift+P
/Cmd+Shift+P
) - Type "Preferences: Open Keyboard Shortcuts (JSON)"
- Add your custom keybindings:
If you prefer Vim <leader>
style shortcuts in n/v mode like me, you can add these configurations to your settings.json
:
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": [",", "w"],
"commands": ["openGitHubUrl"]
},
{
"before": [",", "b", "l"],
"commands": ["showGitBlame"]
},
{
"before": [",", "<CR>"],
"commands": ["showCommit"]
}
],
"vim.visualModeKeyBindingsNonRecursive": [
{
"before": [",", "w"],
"commands": ["openGitHubUrl"]
}
]
- When open the commit details, the cursor may not be in the correct position.
- Changed commit details view to VS Code's built-in diff editor
- Improved cursor positioning in diff view
- Fixed keyboard shortcuts in Visual mode
- Fixed keyboard shortcuts in diff view
Contributions are welcome! Please feel free to submit a Pull Request.
This extension is licensed under the MIT License.