Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
* track mouse clicks globally
- Loading branch information
|
@@ -3,14 +3,12 @@ |
|
|
"button": "button1", |
|
|
"modifiers": ["ctrl", "shift"], |
|
|
"press_command": "drag_select", |
|
|
"command": "gs_doc", |
|
|
"args": {"mode": "goto"} |
|
|
"command": "gs_on_left_click" |
|
|
}, |
|
|
{ |
|
|
"button": "button2", |
|
|
"modifiers": ["ctrl", "shift"], |
|
|
"press_command": "drag_select", |
|
|
"command": "gs_doc", |
|
|
"args": {"mode": "hint"} |
|
|
"command": "gs_on_right_click" |
|
|
} |
|
|
]
|
|
|
] |
|
@@ -3,14 +3,12 @@ |
|
|
"button": "button1", |
|
|
"modifiers": ["super", "shift"], |
|
|
"press_command": "drag_select", |
|
|
"command": "gs_doc", |
|
|
"args": {"mode": "goto"} |
|
|
"command": "gs_on_left_click" |
|
|
}, |
|
|
{ |
|
|
"button": "button2", |
|
|
"modifiers": ["super", "shift"], |
|
|
"press_command": "drag_select", |
|
|
"command": "gs_doc", |
|
|
"args": {"mode": "hint"} |
|
|
"command": "gs_on_right_click" |
|
|
} |
|
|
]
|
|
|
] |
|
@@ -3,14 +3,12 @@ |
|
|
"button": "button1", |
|
|
"modifiers": ["ctrl", "shift"], |
|
|
"press_command": "drag_select", |
|
|
"command": "gs_doc", |
|
|
"args": {"mode": "goto"} |
|
|
"command": "gs_on_left_click" |
|
|
}, |
|
|
{ |
|
|
"button": "button2", |
|
|
"modifiers": ["ctrl", "shift"], |
|
|
"press_command": "drag_select", |
|
|
"command": "gs_doc", |
|
|
"args": {"mode": "hint"} |
|
|
"command": "gs_on_right_click" |
|
|
} |
|
|
]
|
|
|
] |
|
@@ -12,6 +12,16 @@ def on_post_save(self, view): |
|
|
def on_activated(self, view): |
|
|
sublime.set_timeout(lambda: do_sync_active_view(view), 0) |
|
|
|
|
|
class GsOnLeftClick(sublime_plugin.TextCommand): |
|
|
def run(self, edit): |
|
|
if gs.is_go_source_view(self.view): |
|
|
self.view.run_command('gs_doc', {"mode": "goto"}) |
|
|
|
|
|
class GsOnRightClick(sublime_plugin.TextCommand): |
|
|
def run(self, edit): |
|
|
if gs.is_go_source_view(self.view): |
|
|
self.view.run_command('gs_doc', {"mode": "hint"}) |
|
|
|
|
|
def do_post_save(view): |
|
|
if not gs.is_pkg_view(view): |
|
|
return |
|
|