Vscode: [Suggestion] Git Blame info in gutter

Created on 25 Jan 2016  路  19Comments  路  Source: microsoft/vscode

Several other editors, either natively or through extensions, can quickly display information returned from git blame, which is a great tool to have while tracking down bugs or conflicts. It would be excellent if VS Code could imitate Atom or the IntelliJ Platform IDEs and have an option to toggle git blame info on in the gutter of a version-controlled file (Atom version shown below).

Atom

*extension-candidate feature-request git

Most helpful comment

I also wanted to see git blame info inside the editor; so developed an extension called Annotator.

As it doesn't open a gutter in a current editor to show blame info and open a new html view instead, it's got its own limitations like no syntax highlighting on the blame view, but I still find it very useful. Happy to hear suggestions or feedback :)

https://github.com/ryu1kn/vscode-annotator

Annotator

All 19 comments

This is a good extensions solution.

I started on a basic extension called Git Blame. You can find it here. PRs or recommendations are much appreciated.

I had actually missed that one, that's certainly useful! That said, it'd be nice if more than one line could be viewed and if it could be in the gutter. I would recommend this for the extension, but it's my understanding that the only UI an extension is allowed to modify is the status bar -- hence the feature suggestion on the editor itself.

:+1:

:+1:

:+1:

:+1:

@waderyan is this extension still working? nothing shows up in my gutter even though it's installed

@carlkenne that extension sadly does not show the blame status in the gutter, but in the status bar like this
http://i.imgur.com/5cVA7y3.png

馃憤

Does anyone know if it is possible to add text to the gutter? If not we should create a separate feature request for that. This should then probably be moved to https://github.com/waderyan/vscode-gitblame and reference the extension API request.

I can't see anything in my status bar? Only information about line number and branch name and so on... Are there any way to debug this?

I also wanted to see git blame info inside the editor; so developed an extension called Annotator.

As it doesn't open a gutter in a current editor to show blame info and open a new html view instead, it's got its own limitations like no syntax highlighting on the blame view, but I still find it very useful. Happy to hear suggestions or feedback :)

https://github.com/ryu1kn/vscode-annotator

Annotator

馃憤 I currently miss this from NetBeans very much, can the API be adapted at least so extensions can improve this? Very useful feature.

Yep this is one of the few things I regularly find myself missing in VS Code. With Git support built-in, a natural evolution would be a right-click "Git blame" option that opens blame in the gutter. Probably ought to be on the roadmap.

I'd love to recommend to anyone missing this functionality, the extension GitLens is pretty much what I wanted and I've been using it for a while now.

GitLens does everything I could ever want and more.

Adding this configuration for GitLens will give you the desired behavior.

    "gitlens.blame.compact": false,
    "gitlens.blame.format": "${date|10} ${author|8}",
    "gitlens.blame.dateFormat": "YYYY-MM-DD",
    "gitlens.blame.highlight.locations": [
        "gutter",
        "overview"
    ]

We try to keep VS Code lean and we think the functionality you're asking for is great for a VS Code extension. Maybe you can already find one that suits you in the VS Code Marketplace. Just in case, in a few simple steps you can get started writing your own extension. See also our issue reporting guidelines.

Happy Coding!

We suggest to use GitLens! :+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

philipgiuliani picture philipgiuliani  路  3Comments

villiv picture villiv  路  3Comments

NikosEfthias picture NikosEfthias  路  3Comments

lukehoban picture lukehoban  路  3Comments

biij5698 picture biij5698  路  3Comments