Giter VIP home page Giter VIP logo

projectmanager's Introduction

Project Manager for Sublime Text

test codecov

Don't have any idea what *.sublime-project and *.sublime-workspace are doing? Forget where the project files are? Don't worry, Project Manager will help organizing the project files by putting them in a centralized location. (It is inspired by Atom's Project Manager, but Atom's Project Manager is inspired by the built-in Sublime Text Project Manager, so there is a circular reasoning here).

Screenshot

Check this video by Laracasts.

Installation

Using Package Control is not required, but recommended as it keeps your packages (with their dependencies) up-to-date!

Installation via Package Control

Usage

To launch ProjectManager, use the main menu (Project > Project Manager) or the command palette (Project Manager: ...).

To quickly switch between projects, use the hotkey CtrlCmdP on macOS (CtrlAltP on Windows / Linux).

ProjectManager also improves the shortcut CtrlShiftW on Windows / Linux so that it will close the project when the window is closed. On OSX, this is the default behaviour.

Options are self-explanatory, enjoy!

Create new project

Just drag some folders to Sublime Text and then "Add Project". The project files will be created in Packages/User/Projects/.

Add existing projects to Project Manager

There are two ways to add existing projects to Project Manager.

  • If you want Project Manager manages the project files: move your *.sublime- project and *.sublime-workspace files in the project directory Packages/User/Projects/. You may need to update the project's folder information of the files. Don't forget to run Project Manager: Refresh Projects after it.

  • If you want to keep the project files (*.sublime-project and *.sublime-workspace) in your project directory: open your project file *.sublime-project, and then use the import option of Project Manager. This tells Project Manager where *.sublime-project is located and Project Manager will know where to look when the project is opened. In other words, you can put the *.sublime-project file in any places.

FAQ

  • How to open project in a new window with a shortcut? It can be done by adding the following keybind in your user keybind settings file:
{
    "keys": ["super+ctrl+o"], // or ["ctrl+alt+o"] for Windows/Linux
    "command": "project_manager", "args": {"action": "open_project_in_new_window"}
}

License

Project Manager is MIT licensed.

projectmanager's People

Contributors

acheronfail avatar alkuzad avatar berenm avatar corbanmailloux avatar gpix13 avatar jfcherng avatar jpcirrus avatar jrappen avatar randy3k avatar rchl avatar roblav96 avatar timogilvy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

projectmanager's Issues

Project rename

When I rename a project, I have an error saying that sublime is unable to read the old project file when opening the new renamed project. Also the new project is empty.

In the image is the result of changing the project "test" to the new name "test2"
image

Don't Allow Duplicate Instances of Projects

It would be nice if, when opening a project that is already open, the project manager package simply switched focus to that project instead of opening multiple instances of that project. For example, if i have five projects open (a, b, c, d, and e) and i am working on "b". Currently, if i want to switch to "c" and use the project manager to do so i will end up with 6 projects open: a, b, c, c, d, and e. I realize i can command + tilde to get to project "c" but often i forget what i have open. Also, it's quicker to switch via the project manager.

Options to open a new project removed from the fast menu

Why? Now when I press ctrl+cmd+p (OSX) I just see the list of my projects, and choosing one of them means closing the current project and replacing it with the new one. That's not what I want in 99% of cases.

Previously, ctrl+cmd+p displayed also options such as "Open in a new window" and so on. Now instead I need to go to the main menu via shift+cmd+p and choose Project Manager which is slower.

Feature to remove project ?

@randy3k , thanks for your amazing package!.
But what you think about feature remove project ?
Because sometimes people want to remove a project, currently they must go to project folder and remove project files.
It will be better if have the feature.

Unsaved text is gone when opening project

Just this morning I started writing some short text (not saved in file) and then opened project that was already saved earlier yesterday. My current text was gone and replaced with project files and previously opened file in that project. Before using Project Manager any project was opened in new window if there was already opened file or something was fast written without saving immediately upon starting ST.

ST3 build 3059 x64, Project Manager v0.1.8

Opening project closes current project

I've been using (enjoying) this package for a little while now and until now, when I opened a project from the projects overview (from this package), a new window opened with the selected project and I could then quickly switch between these sublime windows.

I'm not sure if there was an update for this package or what caused this but this behavior has suddenly changed. Whenever I now open a project from the project overview, the current window is like being closed and the other project's window opened.

This is really annoying as I can't quick switch between projects anymore (using cmd + < on german keyboard layout) and have to reopen everything again and again, which takes longer. Maybe I should mention that I'm working with microservices which requires switching between projects a lot.

Is there some (new) setting to get back the old behavior? Thanks!

Creation of new project fails

I have existing project with no folders and with several untitled (tmp) files.
So I am trying to add new project and it fails:

Traceback (most recent call last):
  File "pm in ..\AppData\Roaming\Sublime Text 3\Installed Packages\Project Manager.sublime-package", line 234, in show_input_panel
KeyError: 'folders'

Include Files

Is it possible to include a single file to a project?

I created a project, containing some of my config files like .bash_profile, or httpd.conf but I don't want to include all files in a folder.

Maybe something like this:

{
    "folders":
    [
        {
            "name": "Project Folder X",
            "path": "some/path/to/project/x"
        },
        {
            "name": "Project Folder Y",
            "path": "some/path/to/project/y"
        }
    ],
    "files":
    [
        {
            "name": "File A",
            "path": "some/path/to/file/a"
        }
    ]
}

[bug] Edit project: view focus

Hi @randy3k , awesome plugin!

When trying to navigate to the .sublime-project file using Project Manager -> Edit Project
the .sublime-project is opened without focused.

I tried calling focus_view with the view returned by window.open_file in edit_project but seems to have no effect.

I'm on latest ST3 and OSX yosemite.

ST3 switch project causes re-opening of a new window on a different screen

I have ST3 open on an external monitor. Up until build 3080 of ST3 switching projects would open the new project within the same window on my external monitor. As of build 3080 it now opens a new window on my other screen causing me to have to drag it back to the correct screen.

I am not sure if this is an issue with the plugin or with ST3 itself.

Can't understand how to use

I'm trying to follow the instructions, I don't know if it is just not working or I'm missing something:

  • Open sublime with a folder
  • Use 'Add Project' from Project manager
  • Then when I open project manager again it doesn't show me anything new, just: Project Manager (More options), Add Project and Import.sublime-project

I open library.json to see what is in there and is just empty. So it seems that 'Add Project' doesn't do anything.

What I'm missing here? Thanks

Handle illegal Windows filename characters

Currently it's possible to create projects with names that contain characters which are illegal in Windows systems, causing the creation to fail silently. Maybe this should be handled differently by either showing an error or managing the project metadata in a different way, not directly through the filenames contained in the projects folder -- this would allow arbitrary characters in project names.

Project quick switch list is not as useful as ST3's default list

ST3's default project switcher will intelligent order projects by recency, and will allow you to do quick toggling by automatically highlighting the last project you had open, and putting it at the top.

So if you last used Project B, and you are on Project A, you could just super+ctrl+p+enter to instantly switch to Project B, and then because you were last on Project A when you switched to Project B, Project A will be on top and highlighted for you and you can do the same thing to keep toggling and jumping back and forth between those projects.

Also, the project manager options should not be in the list of project switching - that is what the command pallet is for. The project quick switch list should just be projects, and nothing more.

That said, I love how you can define a project patch for sublime to look in, and I love how it strips out the silly .sublime-project extension from the names, so that part is awesome.

Update Readme Documentation

Not sure I fully understand at this moment but correct me if I'm wrong. The current readme says, "It is inspired by Atom's Project Manager" but from looking at that project link I do not see any of the features it provides included in this package. Everything I currently see:

  • creating new project
  • editing project
  • renaming project
  • etc.

...can already be done in Sublime Text natively. So does this package just provide another menu in the already existing project menu to do the same things differently? If that's the case is that just the starting point and in the end there are more reasonable features to look forward to?

Either way I would update the readme content to reflect a better understanding of what should be expected new capabilities with this package.

Thanks

Correction on pm.sublime-settings

I don't know if this is a local difference, however, I was able to discover the hostname with:

sys.modules['Project Manager'].pm.get_node()

instead of (note the hyphen in the key):

sys.modules['Project-Manager'].pm.get_node()

Package Settings

Installed via package manager on OSX 10.10 in Sublime 3065.

The documentation says to set the settings, open:

Preferences -> Package Settings -> Project Manager

This menu entry is not present on my system.

I created the file pm.sublime-settings in my User directory (pm.py contains settings_file = 'pm.sublime-settings', so I assume this file name is correct) and added the following (based on the example, but with a tilda that should be expanded to point to my home directory):

{
    "projects_dir": "~/.sublime/projects"
}

But it doesn't seem to be working. Any ideas?

ST3 loses focus on project change

Hi Randy,

latest revision (Project-Manager), ST3 Build 3064 x86

Whenever I switch from one project to a different one (which works fine) the ST3 window loses it's focus.

Windows Server 2012 R2...

Slow and laggy switching projects

The default sublime text project switcher is lightning fast, making it very easy to jump in and out of projects to look something up or to see how you did something. Project-Manager slowly closes the current project, and slowly opens the new project, making switching much less snappy and efficient.

center switcher with sublime window

I know it's only cosmetic but it really annoys me that project switcher isn't centered in the screen.
other than that it's a life changer :)

Rename project discards / forgets open tabs

Hiya, when renaming projects (via rename option), the open tabs are all lost! :(

Often, I create many unsaved tabs that contain temporary content / are a workspace that I dump stuff into & hack away, without explicitly saving to a file.

Renaming a project & losing these unsaved tabs is serious! This completely makes this rename feature unusable!

Running a diff on the before & after .sublime-workspace file shows a lot of things stripped / altered.
It should really only be renaming the .sublime-project & .sublime-workspace files, & updating the pointer (the "project": key ) in .sublime-workspace to point to the renamed .sublime-project file?

However, a current workaround that seems to work is to manually rename the .sublime-project & .sublime-workspace files by hand...

Thank you for this excellent ST package!

O_O

Plugin breaks subl command line support

With this package installed, every time I try to use subl . or subl from the command line, it opens a separate entire instance of Sublime Text that can't be closed easily. Whatever your package is doing, this needs to be addressed because it breaks core functionality.

Project manager isn't loading

Hi,

Project Manager was working fine yesterday but today whenever I try to load it (Ctrl + Alt + P) I'm getting this error in the console:

Traceback (most recent call last):
File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 526, in run_
return self.run()
File "pm in C:\Users\xxx\AppData\Roaming\Sublime Text 3\Installed Packages\Project Manager.sublime-package", line 304, in run
File "pm in C:\Users\xxx\AppData\Roaming\Sublime Text 3\Installed Packages\Project Manager.sublime-package", line 84, in init
File "pm in C:\Users\xxx\AppData\Roaming\Sublime Text 3\Installed Packages\Project Manager.sublime-package", line 102, in get_projects_info
File "./ntpath.py", line 615, in relpath
File "./ntpath.py", line 534, in normpath
AttributeError: 'NoneType' object has no attribute 'startswith'

I've not knowing changed anything and I'm on Sublime Text 3 Build 3065, Windows 7.

Support nested projects

In Atom, I can give my projects names like: superproject/my-project. Trying to do the same in this plugin does result in a folder superproject being created under Packages/User/Projects. However, the plugin doesn't seem to be able to read nested folders and doesn't list newly created package.

How to install

A simple sentence "You can install Project Manager via Package Control." is not enough on how to install.

Categorize Projects

This is probably a feature request.
I found if you put the Project Files in sub-directories, it does not create folders when navigating to switch to a project. It only adds the path name before the title. I would suggest creating layers of folder to navigate through.
For example, if in the projects_path directory, I had:

Home
 - Project A
 - Project B
Work
 - Project C
 - Project D

When switching projects, it should display 2 folders: Home, and Work. Then inside those, have the relevant projects

Cannot use .sublime-project as project directory

If the project directory is set as "projects_path": ["SOMEPATH/.sublime-project"], then workspace files are created both in that directory and in ".sublime-workspace". Also if using ".sublime-projects", they are created in ".sublime-workspaces".

I think the problem is in pm.py line 268, where the replacement of ".sublime-project" with ".sublime-workspace" is applied to the whole path and not just to the extension.

Hooks

Hi

Is it possible to hook into the opening project command, and run another script to open terminal at the project root directory?

I'm looking for a solution that when I switch to a project, terminal automatically opens and runs a chosen command.

Any ideas?

Exception in thread Thread - The process cannot access the file because it is being used by another process

This just pops on my sublime when I open it:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "./python3.3/threading.py", line 901, in _bootstrap_inner
  File "package_control.package_cleanup in D:\User\Documents\SublimeText\Data\Installed Packages\Package Control.sublime-package", line 77, in run
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'D:\\User\\Documents\\SublimeText\\Data\\Installed Packages\\ProjectManager.sublime-package'

I am using windows 10 and sublime version 3114.

[Feature Request] Add Folder

There is an Add Folder To Project command at ST-Menu/Projects.

Please add this feature as Project Manager: Add Folder @ the QuickPanel.

The ST command is prompt_add_folder

Feature request: Custom projects folder.

Hello!

Nifty plug in! I would love to be able to point it at the folder where my projects already reside. I'm not seeing a settings file I could change that in. I guess I can copy the files, but a custom folder would be nice.

Error in path (?) on Windows

Traceback (most recent call last):
  File "C:\Alex\Dropbox\Apps\Sublime Text 3\Data\Packages\Project Manager\pm.py", line 324, in on_open
    self.manager.import_sublime_project()
  File "C:\Alex\Dropbox\Apps\Sublime Text 3\Data\Packages\Project Manager\pm.py", line 163, in import_sublime_project
    if re.match(self.projects_dir, os.path.dirname(pfile)):
  File "./re.py", line 156, in match
  File "./re.py", line 281, in _compile
  File "./sre_compile.py", line 491, in compile
  File "./sre_parse.py", line 747, in parse
  File "./sre_parse.py", line 359, in _parse_sub
  File "./sre_parse.py", line 717, in _parse
  File "./sre_parse.py", line 350, in _escape
sre_constants.error: bogus escape: '\\U'

Project can't fetch folders

Hi there,

I have installed SublimeText 3 with Project-Manager on my new MacBook. When I create a new project and add folders to it, the project doesn't open this folders the next time I open the project. I have 2 other Mac's which doesn't seem to have this problem. I've re-installed Sublime Text several times now, but still no luck.

Maybe you can shed some light at this problem?

Surely hope so!

With kind regards,

Douwe Hoogeveen

projects_path issue

Problem: I have a custom project path in project_path in Project Manager's user settings but it is not used. It saves and checks projects in C:\Users\admin\AppData\Roaming\Sublime Text 3\Packages\User\Projects.

I tried restarting ST3 after changing the path in the user settings. Also tried reinstalling project manager. Deleted the Projects folder and my project manager settings in the said path. But all of these didn't work.

Relative paths, symlinks and $HOME folder

I have been trying to use a robust setup cause i am working on 4 differences devices. The issue here is that when enabling the projects_fpath in order to auto discover the sublime projects that have already been created, i can not reference in any way the $HOME directory where my .sublime-projects lie.

I have tried to use relative paths to climb up the ladder to $HOME but to no avail.

My last attempt was to use symlinks of my .sublime-projects inside the /Users/Projects/ which did not work either.

screen shot 2015-05-13 at 02 40 23

Is there any way to allow symlinks or to reference our $HOME without being specific so that can be used in other devices as well?

P.S. I came along the following code which returns the $HOME folder. Could this be somehow integrated to Project Manager so that we can use it? Is it possible to make a fix so the plugin follows symlinks?

from os.path import expanduser
home = expanduser("~")

Shortcut to open panel not working after last update

After the last update on OSX, the shortcut to open the panel isn't working any more, it opens the default project switcher. I tried reapplying the shortcut manually on the Sublime user keymap file, but with no luck.

More simple display of projects in "Project -> Open Recent" menu

It is difficult to visually parse the list of projects in the "Open Recent" menu due to the very long ".sublime-project" extension. Would it be possible to simply omit the ".sublime-project" altogether for items in this list? If everything in that menu must be a sublime-project, it is not necessary to show the extension, and then you don't have to visually filter it out.

New project creation forces requirement of added / tracked folder (req. headless projects)

Hiya, I want to be able to add projects that have no folder on disk associated with them.
This could be because I haven't created the folders just yet, or because I want a 'headless' workspace that allows me to write / paste stuff & have it managed by Project Manager (close without saving to file & tabs will still reopen keeping state; one of the best things about of ST projects!)

Usage: (issue)
When I want to add a new project to Project Manager and don't have a folder added (to sidebar), it won't work (nothing happens at all when selecting 'Add Project').

Usage: (my workaround)
If I first add any random folder to ST (drag & drop), it then works as expected & allows me to create a project. Then I can remove that folder from the project, & Project Manager continues to work perfectly, except without any folder (as desired).

Solution:
Project Manager shouldn't need / require any folder added to project when creating a project

I'm using ST3 Build 3083 on Arch Linux x64

(Also; as I've said before - I really like this package & appreciate the good work you've put into it! - Thank you!)

O_O

--HEAD KANGAROO

Breaks build systems that rely on `$project_path`.

I have build systems that rely on running a command with the working_dir set to $project_path. This is defined in sublime text to be the path to the project file. Without the Project Manager plugin, this is the same as the project directory. However, with the Project Manager plugin, new projects go in your central projects folder (which is what I want), but $project_path in the context of build systems also points to the central projects folder (which is not what I want).

Ideally, Project Manager would somehow set $project_path to the target project directory for build systems.

Error On Project Rename

I'm getting the following error if I rename a project that is currently open, close ST, and reopen ST:

Unable to read project /C/Users/Enteleform/AppData/Roaming/Sublime Text 3/Packages/[ Projects ]/MyProject.sublime-project

It seems there is some sort of issue with how your plugin is reloading the active project after it is renamed.   However, after renaming the project, the sidebar maintains its settings until ST is closed.

After the error, the project can easily be restored by using the Project Manager: Open Project command.

 
 

System Info:
ST3, Stable Channel Build 3103
Windows 10 Pro, Build 10586

Project-Manager stops working after some time

Lately Project-Manager stops working at some point. When trying to start it via short cut or menu I get this:
Traceback (most recent call last): File "/opt/sublime_text/sublime_plugin.py", line 526, in run_ return self.run() File "pm in /home/user/.config/sublime-text-3/Installed Packages/Project Manager.sublime-package", line 165, in run File "pm in /home/user/.config/sublime-text-3/Installed Packages/Project Manager.sublime-package", line 89, in list_projects KeyError: 'path'

Add support for multiple workspaces within a single project

This is definitely a new feature request as the plugin as is works great. It would be great to have a way of switching sublime workspaces within a project. What I could see being useful is another key binding to initiate the switch or another menu option in the main drop down for switching.

If I get a little time I might work on implementing this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.