Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d1df455

Browse files
committed
Add a Command to toggle Inline-Blame without having to edit settings file
1 parent 192c988 commit d1df455

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

‎Keymaps/Default (OSX).sublime-keymap‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
[
22
{"keys": ["ctrl+alt+b"], "command": "blame"},
3-
{"keys": ["ctrl+alt+shift+b"], "command": "blame_show_all"}
3+
{"keys": ["ctrl+alt+shift+b"], "command": "blame_show_all"},
4+
5+
//{"keys": ["f8"], "command": "toggle_inline_git_blame"},
46
]

‎src/blame_inline.py‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,19 @@
1414
INLINE_BLAME_PHANTOM_SET_KEY = "git-blame-inline"
1515

1616

17+
class ToggleInlineGitBlame(sublime_plugin.TextCommand):
18+
# Overrides begin ------------------------------------------------------------------
19+
20+
def run(self, edit):
21+
settings = pkg_settings()
22+
settings.set(
23+
PKG_SETTINGS_KEY_INLINE_BLAME_ENABLED,
24+
not settings.get(PKG_SETTINGS_KEY_INLINE_BLAME_ENABLED),
25+
)
26+
27+
# Overrides end --------------------------------------------------------------------
28+
29+
1730
class BlameInlineListener(BaseBlame, sublime_plugin.ViewEventListener):
1831

1932
pkg_setting_callback_added = False

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /