1 2 3 4 5 6 7 8
import sublime import sublime_plugin class FoldSelectionsCommand(sublime_plugin.TextCommand): def run(self, edit): for r in self.view.sel(): self.view.fold(r)