Sublime Forum

Issue with openPreviousFiles

#1

It seems like openPreviousFiles only really works if you didn’t open a file from the shell. If I open the app, it works fine. But right click a file in the shell and open it in the editor and none of the previous files show up. This is proving to be very frustrating. If this is an intentional behavior, I beseech you to alter it. It’s totally not what I expect to happen. :open_mouth:

That said, it’s about damn time someone made a decent editor for Windows. Thanks! :smile:

0 Likes

#2

There are a couple of options for getting the behavior you describe:

  • Add --restore to the command line, OR
  • When exiting Sublime Text, exit using File/Exit and preserve session

I tend to do the latter: if your goal is to exit, then start where you left off when reopening, even if doing it via opening a file from the shell, then it’s what you want. It also restores new files, changes to files, the current selection, etc.

It’d likely be better if openPreviousFiles did imply --restore though.

0 Likes