sublime-text-git icon indicating copy to clipboard operation
sublime-text-git copied to clipboard

Show commit, that added current line

Open AlexVPopov opened this issue 7 years ago • 4 comments

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?

AlexVPopov avatar Oct 03 '18 14:10 AlexVPopov

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 avatar Oct 03 '18 14:10 kemayo

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

kemayo avatar Oct 03 '18 15:10 kemayo

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 avatar Oct 04 '18 07:10 AlexVPopov

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. 👍

AlexVPopov avatar Oct 04 '18 07:10 AlexVPopov