Textmate filepath PHP sınıfı özdevinimli adı oluşturmak için Başlarken

0 Cevap php

What I would like is a snippet that when executed, grabs the TM_FILEPATH output Explodes it on the slash / Then split out each part as a placeholder containing that part and an underscore (apart from the last part (the filename)) For Example: for a file in directory path /Path/To/Original/file we would get

class ${1:Path_}${2:To_}${3:Original_}${4:File} {
    // code here
}

Then I can step through and remove the parts I don't want ending with a className that fits the standard PHP autoloader

Bu mümkün geliyor mu?

Cheers, Chris

0 Cevap