Home Download Buy Blog Forum Support

Project sessions plugin

Project sessions plugin

Postby fuglesang on Tue Aug 10, 2010 11:39 pm

Wanted to share this simple plugin with those who wants it.
Saves me lots of frustration when switching between projects.

You can download and read more about what it does here: https://bitbucket.org/fuglesang/sublimetext-project-sessions/

A summary:
This plugin listens to the opening and closing of projects in Sublime and stores your sessions on a per-project basis. And when you open up the project again it re-opens the files you had open when you closed it.


Hope people who wants this feature find it as useful as I do. :)
fuglesang
 
Posts: 8
Joined: Mon Aug 09, 2010 10:24 pm

Re: Project sessions plugin

Postby Anomareh on Wed Aug 11, 2010 9:05 am

NICE! That sounds like it will do just fine. Even something barebones like you've made is 100x better than nothing.

The only thing I see it missing is some way to open a temp session.

For instance, say you have a project open with a bunch of files and you get sidetracked. You need to work on a few other unrelated files, but you don't care about the session. You don't need it saved, it doesn't have a project file, etc. It would be great if there was someway to open a temp session that closes and saves the current session / project and allows you to work on a clean slate. When you're done, switching back to the original (or another) session would just close the files and not save the session and everything else.

Although it's handy for switching between projects, I think my main desire for the feature was because I often need to edit a few files unrelated to the project and I just need a quick, temporary clean slate to work on.

Either way thanks a bunch for this. I'll play around with it a bit later.
Anomareh
 
Posts: 222
Joined: Thu Oct 01, 2009 7:32 pm

Re: Project sessions plugin

Postby fuglesang on Wed Aug 11, 2010 6:03 pm

If you think of having no project open as a "temp" session, you can already do what you want.

When you have a project open and then go to Project > Close project from the menu, the session for the project will be saved and you get your "temp" session (no project, session doesn't get saved). Once you're done and want to go back to your project, you can open it and your project session will be restored (though you have to manually close your files from the temp session).

I'm gonna add some configuration options for the open/close behavior so people can make it behave like they want.

When I get the time I was planing on making "task" sessions as shown here: http://www.sublimetext.com/forum/viewtopic.php?f=4&t=1275

I'm glad it came to use for you. Your post was actually what made me man up, learn python and fix this annoyance. :D
fuglesang
 
Posts: 8
Joined: Mon Aug 09, 2010 10:24 pm

Re: Project sessions plugin

Postby Anomareh on Wed Aug 11, 2010 6:50 pm

Ah good point. Been a bit since I've actually gone into that menu I forgot.
Anomareh
 
Posts: 222
Joined: Thu Oct 01, 2009 7:32 pm

Re: Project sessions plugin

Postby ilya on Wed Aug 11, 2010 7:17 pm

Very good idea!

But this plugin don't work with projects opened as directory?
ilya
 
Posts: 122
Joined: Fri Sep 11, 2009 8:32 pm

Re: Project sessions plugin

Postby fuglesang on Wed Aug 11, 2010 10:25 pm

ilya wrote:But this plugin don't work with projects opened as directory?


No it doesn't. I had actually forgotten that folders can act as projects in sublime. I'll take a look and see what I can do with that.

EDIT: I made a fast fix for this. Another small thing I didn't think about is that you can't have two projects with the same name (it will use the same session file). And here I thought this was gonna be a small project. :P
fuglesang
 
Posts: 8
Joined: Mon Aug 09, 2010 10:24 pm

Re: Project sessions plugin

Postby ilya on Thu Aug 12, 2010 5:44 am

Hm, I try updated plugin, but this still don't work as expected with directory projects :(
ilya
 
Posts: 122
Joined: Fri Sep 11, 2009 8:32 pm

Re: Project sessions plugin

Postby fuglesang on Thu Aug 12, 2010 5:38 pm

ilya wrote:Hm, I try updated plugin, but this still don't work as expected with directory projects :(


Bah, ok. Does it work for you when using .sublime-project files? Which operating system do you use?
fuglesang
 
Posts: 8
Joined: Mon Aug 09, 2010 10:24 pm

Re: Project sessions plugin

Postby ilya on Thu Aug 12, 2010 7:39 pm

After implementing of ability to open directory as project I use only this type of projects. I didn't try this plugin with .sublime-project files, sorry.
Windows 7 32bit.
ilya
 
Posts: 122
Joined: Fri Sep 11, 2009 8:32 pm

Re: Project sessions plugin

Postby fuglesang on Sat Aug 14, 2010 8:02 pm

Updated the plugin.

Hopefully fixes the problem with directories as projects (works for me on winXP).
Added messages that displays in the status bar (on errors).
Made some behaviors customizable.
Fixed minor bugs.
fuglesang
 
Posts: 8
Joined: Mon Aug 09, 2010 10:24 pm

Next

Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 7 guests