Skip to content

Instantly share code, notes, and snippets.

@peterbourgon
Created January 19, 2016 15:20
Show Gist options
  • Save peterbourgon/fccf08d920e5f811d093 to your computer and use it in GitHub Desktop.
Save peterbourgon/fccf08d920e5f811d093 to your computer and use it in GitHub Desktop.
import sublime, sublime_plugin
class PositionListener(sublime_plugin.EventListener):
def on_selection_modified(self,view):
text = "Pos:"
sels = view.sel()
for s in sels:
text += " " + str(s.begin())
if not s.empty():
text += "-" + str(s.end())
view.set_status('exact_pos', text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment