Browse Source

rename as ProjectManager

tags/0.7.0^0
Randy Lai 4 years ago
parent
commit
e97516464e
3 changed files with 23 additions and 10 deletions
  1. +2
    -2
      Main.sublime-menu
  2. +20
    -7
      pm.py
  3. +1
    -1
      nager.sublime-settings

+ 2
- 2
Main.sublime-menu View File

@@ -79,12 +79,12 @@
[
{
"command": "open_file",
"args": {"file": "${packages}/Project Manager/Project Manager.sublime-settings"},
"args": {"file": "${packages}/ProjectManager/project_manager.sublime-settings"},
"caption": "Settings – Default"
},
{
"command": "open_file",
"args": {"file": "${packages}/User/Project Manager.sublime-settings"},
"args": {"file": "${packages}/User/project_manager.sublime-settings"},
"caption": "Settings – User"
},
{ "caption": "-" }


+ 20
- 7
pm.py View File

@@ -7,14 +7,27 @@ import platform
import re


def update_settings():
def plugin_loaded():
t = sublime.load_settings("Project Manager.sublime-settings")
projects_path = t.get("projects_fpath")
if projects_path:
t.set("projects_path", projects_path)
sublime.save_settings("Project Manager.sublime-settings")

update_settings()
s = sublime.load_settings("project_manager.sublime-settings")
keys = [
"projects_path",
"use_local_projects_dir",
"show_open_files",
"show_recent_projects_first"
]
d = {}
for k in keys:
if t.has(k) and not s.has(k):
d.update({k: t.get(k)})
for key, value in d.items():
s.set(key, value)
if d:
sublime.save_settings("project_manager.sublime-settings")

old_file = os.path.join(sublime.packages_path(), "User", "Project Manager.sublime-settings")
if os.path.exists(old_file):
os.unlink(old_file)


class JsonFile:


Project → nager.sublime-settings View File

@@ -6,7 +6,7 @@
// "Projects - computer_name", where computer_name is your computer hostname.
// It would be useful if Sublime Text settings are synced across different computers.
// To discover your computer hostname, run
// import sys; sys.modules['Project Manager'].pm.get_node() in your sublime console
// import sys; sys.modules['ProjectManager'].pm.get_node() in your sublime console
// "use_local_projects_dir": true

// force to `Hide Open Files` or `Show Open Files` in the sidebar.

Loading…
Cancel
Save