New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove dead projects from the recent list #1793
Comments
You could write a program/package for Sublime Text which reads the |
@evandrocoan Yes, that seems like a good enough workaround. This could even be done outside of sublime as a simple Python script. BTW, Can sublime packages even modify |
Probably yes. You should test to know for sure. Just take care to handle both files:
You could do this every time you open Sublime Text on import sublime
import sublime_plugin
def clean_recent_workspace():
print( "Cleaning clean recent workspace" )
class SampleListener( sublime_plugin.EventListener ):
def on_window_command( self, window, command_name, args ):
print( "About to execute " + command_name )
if command_name in ( 'prompt_select_workspace', 'open_recent_project_or_workspace' ):
# run it on an alternate thread to not hang Sublime Text
sublime.set_timeout( clean_recent_workspace, 1000 ) |
But I do not know whether it will work when Sublime Text is opened due the |
(personal opinion) I don't really think it's a good idea to encourage plugins to mess with the session/auto-save files. Anyway, this is a duplicate of #88 |
I just tried to edit the |
Since this can not be done via a package, this has to be fixed in Core. Sadly, the last comment on #88 is more than 2 years old. Maybe not a lot of people are affected by this. |
I wrote such a script some time back and it works just fine: https://github.com/dufferzafar/.scripts/blob/master/sublime_session_fix |
You may also be interested in this script as well; it automatically detects your data directory regardless of platform (unless you're using a portable install, in which case you have to use the command line parameter), supports a dry run mode so you can verify what it's going to do, and keeps backups just in case. It supports both Sublime Text and Sublime Merge (select which app to use via the command line). |
@OdatNurd Thanks for that one. I'll use it from now on. It certainly is way better than mine. |
I moved a project to a different location but that change does not reflect in the
Switch Project
screen. It still tries to load it from the original directory & fails, but the entry stays in the list.Re-opening the project in Sublime adds duplicates in the
Switch Project
list.The only current option is to Clear recent projects and re-add all projects, which is just too much work.
Projects that can't be opened should be removed from that list.
The text was updated successfully, but these errors were encountered: