def run(self, edit): core = Core() project_dir = self.view.file_name() partial_dir = core.get_partial_path(project_dir) self.partial_asset = os.path.relpath(partial_dir, os.path.dirname(project_dir)) self.partial_list = [] for name in os.listdir(partial_dir): if core.is_erb_layout_file(name) is False: continue if os.path.isfile(os.path.join(partial_dir, name)): self.partial_list.append([name, os.path.join(partial_dir, name)]) sublime.active_window().show_quick_panel(self.partial_list, self.on_mapping)