Search code examples
sublimetext3

Sublime Text package that shows git commit author and text inside the file on line cursor


I have seen in Sublime Text 3 a way to show git author commit and text after you place the cursor on line of code (screen shot below). Which package do I need to install?

enter image description here


Solution

  • That functionality is provided by the GitGutter package; in particular it's controlled by the show_line_annotation setting:

        // (ST3, Build 3124+ only)
        // Display a phantom text at the end of the active line with information
        // about who changed it using the output of `git blame`.
        //   "auto"  -- show line annotation if word wrap is disabled (default)
        //   "true"  -- always show line annotation
        //   "false" -- never show line annotation
        "show_line_annotation": "auto",
    

    Shown above is the default value, which enables it as long as word wrap is turned off. If you use word wrap then you need to modify the setting to true in your custom settings in order to see it in action.