hsz
hsz

Reputation: 152266

Define live templates with the same abbreviation for different contexts

I'd like to define two live templates for PHP and JavaScript with the same abbreviation: t.

In Live Templates preferences I have set

$this->

for PHP, but I cannot set

this

in JavaScript because of error

Duplicate live templates in user group

Is it possible somehow to define those templates with the same keyword but for different contexts ?

Upvotes: 5

Views: 268

Answers (1)

Peter Gromov
Peter Gromov

Reputation: 18981

You can define live templates with the same prefix in different groups. If you specify different contexts for those, you'll get different behavior in those contexts.

Upvotes: 6

Related Questions