I would like to manage a few settings on a per-document basis (including unsaved documents). I'm not seeing any way to get a unique identifier associated with the document to make this possible. The documentation discuses TM_FILEPATH and TM_DIRECTORY which might be a start, but those don't seem to be set even when I execute the command with a saved document.
I looked into Applescript - I can get a list of application documents, but there does not seem to be any associated identifier. Even if there was, I would need to figure out the document associated with frontmost window. In Textmate, the window document property always seems to be null.
Thanks for any suggestions.
John DeSoi, Ph.D.
On 4 Sep 2010, at 16:26, John DeSoi wrote:
I would like to manage a few settings on a per-document basis (including unsaved documents). I'm not seeing any way to get a unique identifier associated with the document to make this possible. The documentation discuses TM_FILEPATH and TM_DIRECTORY which might be a start, but those don't seem to be set even when I execute the command with a saved document.
There are unset for untitled documents, but certainly they are there for saved documents (a lot of commands make use of them).
There is presently no variable to uniquely identify an (untitled) buffer. We are going to introduce one in the future though.
I looked into Applescript [...]
With TextMate that is pretty much never the answer.