[TxMt] Please help with Project title $TM_ variable
Charilaos Skiadas
skiadas at hanover.edu
Thu Jan 25 17:56:58 UTC 2007
On Jan 25, 2007, at 12:10 PM, Web Revolution (gMail account) wrote:
> Hi all. I'm trying to set a $TM_ variable in new template to get the
> project name (without filepath and extension) but I cannot find a way
> to do so. I searched through many messages in this list but I cannot
> find any answer to my question.
>
> Setting ${TM_PROJECT_FILEPATH} in the template file configurator,
> creating the new template it will output:
> /Users/webrevol/Desktop/test.tmproj
>
Assuming you meant without the .tmproj this second time.
> Instead of:
> /Users/webrevol/Desktop/test.tmproj
>
> how can I get only the filename without extension?
> test
>
If this is a snippet, you would do:
${TM_PROJECT_FILEPATH/\.[^.]*$//}
As it is, you would probably want to use a similar shell mechanism.
Perhaps something like this:
${TM_PROJECT_FILEPATH%.tmproj}
Otherwise you need to provide us with more of an example of your
situation.
> Anybody? Many thanks in advance.
Haris
More information about the textmate
mailing list