Reply to comment

TM_PROJECT_DIRECTORY is not usable every time

TM_PROJECT_FILEPATH is not set because your "ad hoc" project is not saved already.

The problem with TM_PROJECT_DIRECTORY is: It contains the path to the top-level folder in the project drawer. If there is no folder because you only dropped files onto the project drawer TM_PROJECT_DIRECTORY contains the directory path of the first file in the drawer. If your first file was saved somewhere in a sub directory of your ad hoc project TM_PROJECT_DIRECTORY suddenly contains the sub dir path to the file but not the path you actually expected. At this point using TM_PROJECT_DIRECTORY fails.

That's why I only use TM_PROJECT_FILEPATH or the path to the current file (TM_DIRECTORY) as a fallback. Using TM_PROJECT_DIRECTORY as a fallback may work or not depending of the use of the project drawer.

Just save your project before using this bundle and you are fine. Let me know if you know something that may convince me to use TM_PROJECT_DIRECTORY :)


The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Insert Google Map macro.

More information about formatting options