You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A command to copy the commit id from current line annotation. In the following screengrab, as you one can see the commitID, df799d7. This commit id should be able to be copied via a keyboard shortcut and if possible, can be a link, when clicked opens the commit in an external git client say Meld or git-fork or git-kraken.
Support Info
Sublime Text 4126
Platform: windows
Arch: x64
GitGutter 1.11.7
Install via PC: True
git version 2.32.0.windows.2
mdpopups 4.2.1
markdown 3.2.2
pygments 2.1a0
jinja2 2.10.1
The text was updated successfully, but these errors were encountered:
I just stumbled upon this, having the same idea in mind.
I successfully tried a quick and dirty proof of concept for ST4 that just copies the commit hash to the clipboard when clicking on the inline commit text
diff --git a/GitGutter.sublime-settings b/GitGutter.sublime-settings
index 058478e..53360a4 100644
--- a/GitGutter.sublime-settings+++ b/GitGutter.sublime-settings@@ -179,7 +179,7 @@
// {{line_committer_tz} -- the timezone string of commit
// {{line_summary}} -- the first line of the commit message
// {{line_previous}} -- the hash of the previous commit
- "line_annotation_text": "{% if line_commit and line_commit[:7] != '0000000' %} {{line_commit[:7]}} | {% endif %}{{line_author}} ({{line_author_age}}) · {{line_summary}}",+ "line_annotation_text": "{% if line_commit and line_commit[:7] != '0000000' %} <a href={{line_commit}}>{{line_commit[:7]}}</a> | {% endif %}{{line_author}} ({{line_author_age}}) · {{line_summary}}",
//
// Status Bar
diff --git a/modules/annotation.py b/modules/annotation.py
index b51b213..5ab9691 100644
--- a/modules/annotation.py+++ b/modules/annotation.py@@ -256,6 +256,7 @@ class GitGutterLineAnnotationST4(object):
annotation_color=foreground,
flags=(sublime.DRAW_NO_FILL | sublime.DRAW_NO_OUTLINE |
sublime.HIDE_ON_MINIMAP),
+ on_navigate=sublime.set_clipboard,
)
if int(sublime.version()) >= 4000:
Description
Feature requests or proposals:
A command to copy the commit id from current line annotation. In the following screengrab, as you one can see the commitID,
df799d7
. This commit id should be able to be copied via a keyboard shortcut and if possible, can be a link, when clicked opens the commit in an external git client say Meld or git-fork or git-kraken.Support Info
The text was updated successfully, but these errors were encountered: