Frage

Can I setup WebStorm to autocomplete "Controllers.My" and "c1.test"?

    // TypeScript code    
    module Controllers
    {
        export class My
        {
            test: string;
            constructor()
            {
                this.test = "ups";
            }
        }
    }

    // html
    <div ng-controller="Controllers.My as c1">
        <input ng-model="c1.test"> {{c1.test}} 
    </div>
War es hilfreich?

Lösung

Please try WebStorm 8 RC - completion works there. See also http://blog.jetbrains.com/webstorm/2014/01/webstorm-8-eap/

Andere Tipps

Yes you can,

select this code and

Use File -> Settings -> Live Template option and

click + button in top right corner and chose 1.Live Template

you will be shown a panel there type your abbrevation field eg: "myfn" and in Template text field type the template you want

eg:

function My (){

}

and save it, now every time you type myfn and hit tab button, you will get the above template

And similarly you can add html templates , or any language supported by webstorm

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top