-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b25dbf1
commit 4892c6e
Showing
3 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
SidebarHoverToggle | ||
========================== | ||
|
||
Opens the sidebar when hovering over your gutter, and closes it when hovering anywhere else | ||
|
||
This plugin only works in Sublime text 3 (Build 3124 >), since it uses the native `on_hover` command. | ||
|
||
Todo | ||
===== | ||
|
||
* Find a way to change the interval of checking mouse hover, so that the command responds quicker. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"sublime_text": "*", "description": "Opens the sidebar when hovering over your gutter, and closes it when hovering anywhere else", "platforms": ["*"], "version": "1.0", "dependencies": []} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import sublime, sublime_plugin | ||
|
||
class SidebarToggleListener(sublime_plugin.EventListener): | ||
def on_hover(self, view, point, hover_zone): | ||
if hover_zone == sublime.HOVER_GUTTER: | ||
# hover over gutter. open the sidebar | ||
view.window().set_sidebar_visible(True) | ||
else: | ||
# hide sidebar | ||
view.window().set_sidebar_visible(False) |