Browse Source

change default order of projects list

master 0.6.11
Randy Lai 6 years ago
parent
commit
8534f006ee
  1. 3
      Project Manager.sublime-settings
  2. 2
      pm.py

3
Project Manager.sublime-settings

@ -16,5 +16,6 @@
// "show_open_files": true
// show recent projects first
// "show_recent_projects_first": true
// if false, the projects are sorted alphabetically
// "show_recent_projects_first": false
}

2
pm.py

@ -182,7 +182,7 @@ class Manager:
plist = [[key, key + "*" if value["star"] else key, value["folder"], value["file"]]
for key, value in self.projects_info.items()]
plist = sorted(plist)
if self.settings.get("show_recent_projects_first", False):
if self.settings.get("show_recent_projects_first", True):
j = JsonFile(os.path.join(self.primary_dir, "recent.json"))
recent = j.load([])
plist = sorted(plist, key=lambda p: recent.index(p[3]) if p[3] in recent else -1,

Loading…
Cancel
Save