Skip to content

Instantly share code, notes, and snippets.

@mattst mattst/
Last active May 27, 2017

What would you like to do?
def sort_view_items(self):
cs = self.settings.case_sensitive
if self.settings.sort_by_file_name:
sk = lambda vi: ( if cs else,,
elif self.settings.sort_by_folder:
sk = lambda vi: (vi.folder, if cs else
elif self.settings.sort_by_syntax:
sk = lambda vi: (vi.syntax, if cs else
elif self.settings.sort_by_indexes:
sk = lambda vi: (,
self.view_items.sort(key = sk)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.