Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
martijn-code committed Nov 2, 2016
1 parent b25dbf1 commit 4892c6e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
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.
1 change: 1 addition & 0 deletions package-metadata.json
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": []}
10 changes: 10 additions & 0 deletions sidebar_hover_toggle.py
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)

0 comments on commit 4892c6e

Please sign in to comment.