Skip to content
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

Create a plugin to reopen missing files from Sublime Text start up #137

Open
evandrocoan opened this issue Aug 22, 2019 · 0 comments
Open

Comments

@evandrocoan
Copy link
Owner

This should partially fix this issue:

  1. Ctrl+Shift+T does not reopen cloned views neither missing files from start up sublimehq/sublime_text#2927 Ctrl+Shift+T` does not reopen cloned views neither missing files from start up

Additionally, you can create your own open_recently_closed_file (Ctrl+Shift+T) command, which works correctly.

Note, when Sublime Text is closed, you can:

    def on_window_command(self, window, command_name, args):
        if command_name == "exit":
            # Un maximize all windows before exiting
            windows = sublime.windows()
            for w in windows:
                w.run_command("unmaximize_pane")

But this does not work if Sublime Text is not closed by the menu File -> Exit:

  1. Add the on_exit event sublimehq/sublime_text#2950 Add the on_exit event

Then, you could create a dedicated thread to periodically monitor the open files?

Probably better improve/extend the event listeners on SkipCloseForClonedViews to also monitor which files are open, and reopen them or just create the "phantom" views when Sublime Text started.

A phantom view is created automatically by Sublime text when you ask for it to open a file which does not exists on the file system, i.e., window.open('nonexistent')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant