Skip to content

Instantly share code, notes, and snippets.

@rohanrhu
Created September 9, 2017 14:13
Show Gist options
  • Save rohanrhu/d7a5282e08cae2c7957eeac969d34897 to your computer and use it in GitHub Desktop.
Save rohanrhu/d7a5282e08cae2c7957eeac969d34897 to your computer and use it in GitHub Desktop.
# Centralize cursor
#
# Usage:
# Keybinding: { "keys": ["f1"], "command": "centralize" }
#
# Copyright (C) 2017 Oğuzhan Eroğlu <[email protected]>
# The MIT License (MIT)
import sublime_plugin
class CentralizeCommand(sublime_plugin.TextCommand):
def run(self, edit):
self.view.show_at_center(self.view.sel()[0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment