zerobrane

ZeroBrane Studio closes files on Choose project directory...?


I really do not get why (or even how) this works in the way it does...

Typically I have open in ZeroBrane Studio several Lua files from different places on my HD. When I choose to set a certain project directory for a specific file, all of the files are closed, and I end up with an empty IDE. That is not what I want. I just want to set the current working directory to have the Lua compiler find the files that I require (or dofile) in the particular file that I'm currently working on.

Is there any logical reason for things to work the way they do?

Is it possible to have ZB not close the currently open files?

// OppfinnarJocke


Solution

  • For project-oriented work, usually the user preference is to open files associated with a particular project when the project directory is switched (and close the ones associated with the previous project directory). All the files that are outside of the previous project directory will stay open.

    If you don't like this behavior, you can turn it off by setting projectautoopen = false in the user.lua config file. You can find this setting in the general section of the documentation.

    The project directory also sets the current directory that your Lua application will be executed in, so maybe you just need to set the project directory to a parent of the directories you're switching between to avoid closing/opening the files (without changing the current configuration).