Filled out your form. Sometimes I searched for a place to give some further information to my choices (such as key bindings and other packages I use) but I guess you prefer to keep it simple.
I definitely recommend github.com/SublimeText/InactivePanes/ when you are working with multiple panes more often than not, but it’s still useful with a single pane since it detects when the window lost focus.
I also have a bunch of custom plugins that reside in simple scripts in my user package, such as this one here:
[code]import sublime_plugin
def get_view_setting(view, sname, default=None):
“”“Check if a setting is view-specific and only then return its value,
otherwise return default
.
“””
s = view.settings()
value = s.get(“rulers”)
s.erase(“rulers”)
value2 = s.get(“rulers”)
if value2 == value:
return default
else:
s.set(“rulers”, value)
return value
class QuickRulersCommand(sublime_plugin.TextCommand):
“”“Command that opens a quick panel to enter a list of ruler positions.
With live preview.
“””
active = False
backup = None
def run(self, edit):
self.active = True
self.backup = get_view_setting(self.view, "rulers")
self.s = self.view.settings()
self.view.window().show_input_panel(
"Position of the ruler(s), separate with commas:",
"", # initial text
self.on_done,
self.on_change,
self.on_cancel)
def on_change(self, text):
if not text:
self.s.erase("rulers")
return
rulers = [int(r.strip()) for r in text.split(',') if r]
self.s.set("rulers", rulers)
def on_done(self, text):
self.on_change(text)
def on_cancel(self):
if self.backup:
self.s.set("rulers", self.backup)
else:
self.s.erase("rulers")
[/code]