val95240 / projectmanager Goto Github PK
View Code? Open in Web Editor NEWThis project forked from randy3k/projectmanager
Project Manager for Sublime Text 3
License: MIT License
This project forked from randy3k/projectmanager
Project Manager for Sublime Text 3
License: MIT License
I’ve been using your fork for a few months already. Recently, Package Control on ST 4126 keeps removing your fork (installed via adding GitHub repository to Package Control) and installing the upstream fork.
Then I get the following error log:
Traceback (most recent call last):
File "/home/ts/.config/sublime-text/Installed Packages/ProjectManager.sublime-package/project_manager.py", line 713, in callback
File "/home/ts/.config/sublime-text/Installed Packages/ProjectManager.sublime-package/project_manager.py", line 687, in run
File "/home/ts/.config/sublime-text/Installed Packages/ProjectManager.sublime-package/project_manager.py", line 292, in display_projects
File "/home/ts/.config/sublime-text/Installed Packages/ProjectManager.sublime-package/project_manager.py", line 329, in move_recent_projects_to_top
File "/home/ts/.config/sublime-text/Installed Packages/ProjectManager.sublime-package/project_manager.py", line 329, in <listcomp>
File "/home/ts/.config/sublime-text/Installed Packages/ProjectManager.sublime-package/project_manager.py", line 94, in pretty_path
I’d disable the upstream package, however, Package Control disables packages by their name only, not by their repository/URL, thus it disables both upstream and your fork.
I think its time to publish a new package on Package Control, mainly because the upstream developer does not want to merge your changes (unless someone breaks down your changes to individual/atomic changes).
I use Linux. I have just tried out if we can create a workspace in a subfolder of a project (e.g. subfolder/workspace_name
). It greeted me with the following error.
ProjectManager/project_manager.py
Line 987 in c9f1b58
While it might be a nice feature to allow subfolders in projects for workspaces, this error is incorrect on Linux/macOS, as on these platforms, we use slashes (/
) to separate folders in paths.
I think it could be fixed using this:
if sublime.platform() == 'windows':
sublime.message_dialog("Invalid name: can't contain a '\\'")
else:
sublime.message_dialog("Invalid name: can't contain a '/'")
return
Do you think I could create a PR for this or you need to do something else too in order to fix this issue.
I have just created a new project using Add New Project
(I entered existing_folder/another_existing_folder/non-existing_existing_folder
), but I cannot switch to it. Refresh[ing] Projects
does not help either. Sublime Text restart didn’t help either.
The project and workspace files were successfully created (existing_folder/another_existing_folder/non-existing_existing_folder/non-existent_existing_folder.sublime-{project,workspace}
).
Currently, I am running ST 4126 on Arch Linux.
I cannot even import the project (I need to open it using Project
→ Open Project…
). Project Manager even shows a modal with Import name.sublime-project?
, but after confirmation I cannot find it in the project list overlay.
I think I’ve found the culprit: I’ve already had a project with the same name, but under a different folder, for example:
folder/project/project.sublime-{project,workspace}
;different_folder/another_folder/project/project.sublime-{project,workspace}
.I suspect that Project Manager does not care about the path, only the project name.
I run remove_dead_projects
and it asked me if I want to remove 61 different projects, however, all of them exist.
If I read it right, according to project_manager.py
(L1179), only projects (files) that does not exist should be added to projects_to_remove
array and then removed, but it seems not to be the case.
Currently, we can only rename a project. I think it might be a good idea to add a command to rename a workspace too.
I had open two workspaces in two windows:
proj1:default
;proj1:work1
.I deleted proj1:default
, which closed the windows in which it was open (as expected), but also closed proj1:work1
. Fortunately, it was not deleted and I could simply re-open it.
I’d expect not to close any other project and/or workspace besides the one that is to be deleted.
We already have an option to rename a project (change its name only), we I recently wanted to tidy up my projects, so I wanted to move a project from one folder to another, e.g. moving a project from proj1/proj1/proj1.sublime-{project,workspace}
to company/proj1/proj1.sublime-{project,workspace}
.
I think this operation should be separate from renaming a project (unlike mv
command in terminal).
As a workaround, I was able to make it work by simply moving the project folder to a new place (e.g. mv proj1/proj1 company
) and run Refresh Projects
command.
I consider this a major bug, as I lost some files when creating a project.
Add New Project
from PM’s overlay.As soon as I entered the name of the new project and pressed Enter, visually, all open files were closed, however, ST asked me if I want save the unsaved files (each unsaved file triggered a separate modal window).
Save behaviour (apart from the project name input and folders creation) as the behaviour of the built-in ST command to save a project (Project
→ Save Project As…
, that is, the current window (workspace) would be basically moved to a new location and the project/workspace would become a named project/workspace.
Some side notes:
Add New Project
to Create New Project
.Add New Project
into two separate commands:
Related: #1
I have usually open multiple windows (some with open projects, others without any project) and I don’t close all the windows prior to quitting ST (I let ST to re-open them on its next startup).
Now, the issue is that sometimes the project/workspace name disappears from the status bar. It does not matter if the project was reopen by ST on startup or it was open at ST runtime. Re-opening the project puts the project/workspace name back into the status bar.
Additionally to #9, it might be nice to move a workspace to another project (with custom workspace name supplied by user).
When a project/workspace is open in current window, we could have the following commands for current project/workspace (currently, we need to select a project/workspace prior to executing the particular command):
Of course, when no project/workspace is open in current window, these commands should ideally be omitted or at least made unselectable.
I presumed that Append Project
would append all files (both saved and unsaved), and other state information from a selected workspace to currectly open workspace.
However, it does not seem to do anything. Moreover, when I select a project with more than one workspace to be appended to currently open workspace, it does not prompt me to choose one of the workspaces.
I use many workspaces (more than 100). I use some workspaces (nearly) every day, others are much more rarely used.
Therefore I suggest to implement a feature to describe each and every workspace. We could also describe the project itselft, however, that is of less importance to me.
Now, we cannot use .sublime-workspace
files, as those are overwritten whenever ST writes its content into that file.
We could use .sublime-project
files, which accept unknown keys and values. However, I think that using recent.json
would be much better.
recent.json
could contain something like this:
[
{
"project": "~/.config/sublime-text/Packages/User/Projects/some_project/some_project.sublime-project",
"description": "Project description",
"workspaces":
[
{
"name": "/home/ts/.config/sublime-text/Packages/User/Projects/some_project/some_project.sublime-workspace",
"description": "Workspace description"
}
]
}
]
The description (when available) could be then used in the workspace list instead of open files. When the particular workspace does not have description set, open files should be listed as it is the case now.
Similarly, the project description (when available) could be used in the project list instead of the first project folder.
Reproduction steps:
Project
→ Close Project
/ close_workspace
);When I try to do the same, but instead of open[ing] a project in [a] new window, I try to simply open [a] project in an empty window, the empty window is closed and the window on the left from the empty window is selected (I use SwayWM in tabbed mode; on other enviroments/platforms it might behave a bit differently).
I would expect to always open the selected project, other in current window or in a new window, regardless if it is already open.
Currently, there is no way to know how many workspaces are associated with a particular project.
It might be a good idea to add an indicator of how many workspaces are in a project. It might be as simple as a number in a circle, ideally with a tooltip saying something like Number of workspaces in the project
.
Of course, it might be a good idea to output it only when there are two or more workspaces associated with particular project.
I’d expect that when I close a currently open workspace using close_workspace
command (or Project
→ Close Project
), [project_name/workspace_name]
would be removed from there or at least some arbitrary string (like n/a
or no project open
) would be output. I’d prefer the first option though (output nothing), as it is how it works when no project was open in the current window yet.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.