Answer the question
In order to leave comments, you need to log in
How to add lines to snippets?
I found in phpstorm Live templates. They solve most of my problems except for one.
In projects, I often use the same array keys, such as "success", "errors", "PREVIEW_PICTURE", "DETAIL_PAGE_URL"
In other editors, I managed to create such snippets, autocomplete worked. But with the Live template, I can't get it to work.
Is it possible?
Answer the question
In order to leave comments, you need to log in
In a separate file common to all projects, for example /home/autoComplete.inc
<?php
$arItem = [
'DETAIL_PICTURE' => 1,
'DETAIL_TEXT' => 1,
]; // СРАЗУ ПОСЛЕ ОБНУЛЯЕМ:
$arItem = []; // ИЛИ unset($arItem); (НЕ ПРОВЕРЯЛ 2й ВАРИАНТ)
Then in all projects.
The keys will appear if require is recognized by phpStorm.
That's just how it is today. ¯\_(ツ)_/¯ require '/home/autoComplete.inc';
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question