Browse Source

feat: ability to add custom project name

master
acheronfail 4 years ago
parent
commit
ebff48dfb4
  1. 8
      project_manager.py
  2. 9
      project_manager.sublime-settings

8
project_manager.py

@ -198,13 +198,15 @@ class Manager:
def render_display_item(self, item):
project_name, info = item
active_project_indicator = str(self.settings.get('active_project_indicator', '*'))
display_format = str(self.settings.get('project_display_format', '{project_name}{active_project_indicator}'))
if "star" in info:
display_name = project_name + str(self.settings.get('active_project_indicator', '*'))
display_name = display_format.format(project_name=project_name, active_project_indicator=active_project_indicator)
else:
display_name = project_name
display_name = display_format.format(project_name=project_name, active_project_indicator='')
return [
project_name,
display_name,
display_name.strip(),
pretty_path(info['folder']),
pretty_path(info['file'])]

9
project_manager.sublime-settings

@ -12,6 +12,11 @@
// if false, the projects are sorted alphabetically
"show_recent_projects_first":true,
// The string to append to indicate an active project.
"active_project_indicator": "*"
// The string to use as the active indicator for the project list.
"active_project_indicator": "*",
// How the projects in the project list should be formatted. Supported variables
// are "project_name" and "active_project_indicator". For inactive projects
// "active_project_indicator" will be an empty string.
"project_display_format": "{project_name}{active_project_indicator} - "
}

Loading…
Cancel
Save