Browse Source

set settings' default values

tags/0.7.10
Randy Lai 3 years ago
parent
commit
feec3b6b55
2 changed files with 10 additions and 8 deletions
  1. +6
    -5
      project_manager.py
  2. +4
    -3
      project_manager.sublime-settings

+ 6
- 5
project_manager.py View File

@@ -102,11 +102,12 @@ class Manager:
self.window = window
s = 'project_manager.sublime-settings'
self.settings = sublime.load_settings(s)
default_projects_dir = os.path.join(sublime.packages_path(),
'User',
'Projects')
self.projects_path = self.settings.get(
'projects_path', [self.settings.get('projects_dir', default_projects_dir)])

default_projects_dir = os.path.join(
sublime.packages_path(), 'User', 'Projects')
self.projects_path = self.settings.get('projects_path')
if not self.projects_path:
self.projects_path = [default_projects_dir]

self.projects_path = [
os.path.normpath(os.path.expanduser(d)) for d in self.projects_path]


+ 4
- 3
project_manager.sublime-settings View File

@@ -1,13 +1,14 @@
{
// A list of folders containing *.sublime-project files
// A list of folders containing *.sublime-project files, e.g.,
// "projects_path": ["path/to/custom/Projects", "another_path/to/Projects"]
"projects_path":[],

// Enable local projects directory, such a directory will be named as
// "Projects - computer_name", where computer_name is your computer hostname.
// It would be useful if Sublime Text settings are synced across different computers.
// "use_local_projects_dir": true
"use_local_projects_dir":false,

// show recent projects first
// if false, the projects are sorted alphabetically
// "show_recent_projects_first": false
"show_recent_projects_first":true
}

Loading…
Cancel
Save