kemayo / sublime-text-git

Plugin for some git integration into sublime text
MIT License
2.83k stars 391 forks source link

Show commit, that added current line #561

Open AlexVPopov opened 5 years ago

AlexVPopov commented 5 years ago

Hello,

When I want to see the full diff of the commit, that introduced a given line, I do this:

  1. Select the line(s) and Git: Blame them.
  2. Copy the commit hash.
  3. Git: Show Commit By Hash.

Is there a way to configure Git/Sublime with a shortcut, so that I can automatically open the result of step 3 by putting my cursor on the desired line and pressing the shortcut?

kemayo commented 5 years ago

It already does, funnily enough. In a blame view, stick the caret on whatever line you want and press return.

...I acknowledge that this is not a well documented feature.

kemayo commented 5 years ago

Well, sorry, I slightly misread your ticket. That's only a partial shortcut.

AlexVPopov commented 5 years ago

Wow, didn't know that. Well, this is a significant improvement for me, because it replaces steps 2. and 3. with a single very easy step of Press enter. Thank you for sharing this knowledge :)

P.S. Are there any other such cool hidden tricks? :)

AlexVPopov commented 5 years ago

And sorry for not saying this in the first place - thank you for your work and for the wonderful plugin. It makes my work much easier and more comfortable. 👍