custom template
Hello.
First, sorry for my bad english.
i have next question:
i want to create live template like this
<div color: #0000ff;">CLASS_NAME">
</div> <!-- CLASS_NAME -->
(it must work, like command "surround with tag" but i must enter class_name)
How can i do it??
Try to use format
<div >
</div> <!-- $END$ -->
but it did not work.
Thank you
请先登录再写评论。
If you like to apply this template to selection using 'Surround with',
try the following code:
don't forget to set context (Applicable in) to 'HTML'
its mutch usable if do this
<div >
$END$
</div> <!-- $CLASS_NAME$ -->
i can white class, press enter аnd cursor moves to $END$
anyway thank you !!! :)
But it won't appear in Code/Surround With if you replace $selection$ with $end$... If you didn't actually like to to work as 'surround' template, then, indeed, $end$ is more usable
ordinarly we do not surrounding something in tag div )))
и вообще , мне кажется, вы Русский знаете, так что можно и так беседовать )
ну да - просто Вы написали в первом сообщении, что хотите, чтобы темплейт работал "like command "surround with tag" but i must enter class_name" - поэтому я и посоветовала использовать $SELECTION$ :)
Теперь осталось понять, почему из автоподстановки он не во всех файлах работает.

Пример:
даже в less файле пишу назване шаблона
и он его подсказывает.
Но в файле php такое не работает (вьюшка во фреймворке). Там через ctrl+j приходится его вызывать
(в свойствах шаблона выбрал все типы файлов)
глюк какой то. Работает если это в теге <??> делать.