Sublime Forum

Your Sublime Productivity Tips

#1

I’m writing an article about increasing productivity in Sublime Text, by using plugins and awesome keybindings.

Have you installed some kick-ass, time saving plugins? Do you have some amazing custom keyboard shortcuts that save you hours each week? I’d love to know them!

Whilst I’ve got a few good shortcuts setup myself, I want to see what other people are doing, and as such get a wider range of productivity tips from other people who use Sublime Text!

So if you have 5 minutes and want to help a brother out, please fill in my form.

I really appreciate your feedback :smile:

0 Likes

#2

Anyone? :smile:

I’ve shared my settings on my blog, even if you share your tips/settings here that would be a great help!

0 Likes

#3

I already filled out your form, but I went ahead and wrote a bunch of words over on my blog (and included my configuration). I’ll probably end up adding more to it later or something as I think of things to talk about. At any rate, it gave me a chance to update my site again.

0 Likes

#4

Why is it?

0 Likes

#5

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]

0 Likes