Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 ?

like image 971
hsz Avatar asked Dec 19 '12 08:12

hsz


1 Answers

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.

like image 124
Peter Gromov Avatar answered Sep 21 '22 15:09

Peter Gromov