[SVN] Revision 1612 (ImageBrowser)

textmate at mac.com textmate at mac.com
Thu Aug 25 07:47:56 UTC 2005


On 25 Aug 2005, at 8:55, Allan Odgaard wrote:

> On 25/08/2005, at 8.34, Rich Barton wrote:
>
>
>> New ImageBrowser bundle: browse all images in a project. Needs  
>> work, comments, and suggestions ;-)
>>
>
> Wow! This is very neat!
>
> I suggest using: "${TM_PROJECT_DIRECTORY:=$TM_DIRECTORY}" instead  
> of "$TM_DIRECTORY", that will make it favor the project directory  
> (but fall back on file directory for non-projects).

Allan,

Actually, I now remember why I didn't use $TM_PROJECT_DIRECTORY. If  
the project file (.tmproj) is saved in a location outside of the  
project root (I do this a lot to avoid having .tmproj files in the  
source tree), the root image search path would be the directory where  
the .tmproj file is saved (where there are likely no images), and not  
the root directory of the project. Since AFAIK there is no shell  
variable for "Root directory of the current project", I thought  
$TM_DIRECTORY would be a reasonable substitute, although admittedly  
this is sub-optimal as it means that you can't browse images above  
the current filepath, which makes it next to useless for Rails  
projects, for instance.

Any ingenious solutions (or am I missing something somewhere?)?

Cheers,

Rich





More information about the textmate-dev mailing list