def run(self, paths = []): project = SideBarProject() if project.hasOpenedProject(): for item in SideBarSelection(paths).getSelectedItems(): if item.isDirectory(): project.excludeDirectory(item.path()) else: project.excludeFile(item.path())
def run(self, paths = []): project = SideBarProject() if project.hasOpenedProject(): file = project.getProjectFile() for item in SideBarSelection(paths).getSelectedItems(): if item.isDirectory(): project.excludeDirectory(item.path()) else: project.excludeFile(item.path()) view = SideBarItem(file, False).edit(); sublime.active_window().focus_view(view) sublime.set_timeout(lambda: sublime.active_window().run_command('save'), 250) sublime.set_timeout(lambda: sublime.active_window().run_command('close'), 400)