How to prevent PHPStorm from changing <? to <?PHP while typing

Since last update PHPStorm does something very anoying for me.
Whenever i start to type <? it autocompletes it to <?PHP
So, when i'm editing templates and i want to type <?= ... ?> i have to remove "php" before typing 3rd character of short echo.

Maybe when most of your work is writing pure PHP or when you don't use short echo it's easier, but i'm not using any template engine in my project, so using short echo is easy and clear way to output something

7 comments
Comment actions Permalink

Hi there,

Settings/Preferences | Editor | General | Smart Keys | PHP | Auto-insert '<?php' tag after typing '<?'

Another alternative: just create and use custom Live Template that will expand <=[TAB] into <?= [CARET] ?>

P.S. Even with that option enabled, pressing BackSpace after IDE inserted <?php -- it will delete "php" part at once.

0
Comment actions Permalink

Thank you very much.

Looks like i had 2019.3 and 2019.3.3 installed side by side and my desktop shortcut was pointing to 2019.3 instead of 2019.3.3
In 2019.3 there is no option to disable it, but it still works.

 

Anyway, JetBrains should start updating phpStorm instead of installing another version next to another next to another. Right now i have installed several versions and I'm not sure if removing one will not delete some configs from another. But i have big disk, so no problem right now. No to mention, if you have shortcut on desktop, after update shortcut will still point to old version.

But that's different problem.

Thanks for help, anyway :)

0
Comment actions Permalink

>Anyway, JetBrains should start updating phpStorm instead of installing another version next to another next to another. Right now i have installed several versions and I'm not sure if removing one will not delete some configs from another. But i have big disk, so no problem right now. No to mention, if you have shortcut on desktop, after update shortcut will still point to old version.

Use Toolbox app: https://www.jetbrains.com/toolbox-app/

 

0
Comment actions Permalink

I am using it. But still i have dozen or so concurrent versions and still i have to update all my shortcuts manually.
Maybe Jetbrains wants me to start PHPStorm from toolbox too, but it is not so convenient for me. Now i have shortcut, that launches vagrant, phpStorm, mail server, ftp server, browser and some project related tools with one click, but i have to update this shortcut every time phpStorm updates, because it moves to another directory.

0
Comment actions Permalink

>Now i have shortcut, that launches vagrant, phpStorm, mail server, ftp server, browser and some project related tools with one click, but i have to update this shortcut every time phpStorm updates, because it moves to another directory.

How do you do that?

I think IDE should create pstorm (or perhaps it's phpstorm) alias that will launch IDE from command line. At very least standalone installer (for Windows at very least) can do that, not sure about Toolbox app (AFAIK not). For Mac/Linux you should be able to generate such tool via Tools menu...

P.S. I'm on Windows, what I'm doing is: always using standalone installers and manually remove previous / install new full version into the same folder.

0
Comment actions Permalink

>How do you do that?

Simple .bat file, that looks like that:

runas /user:Administrator "C:\Users\MatKus\AppData\Local\JetBrains\Toolbox\apps\PhpStorm\ch-0\182.4505.42\bin\phpstorm64.exe"

cd "\Program Files (x86)\Mozilla Firefox\"
runas /user:Administrator "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"

d:
cd \Vagrant\vagrants\mc
Vagrant up
pause

and so on...

I have file like that for every project and desktop shortcuts for it.
ALso, i have similar shortcut that will halt vagrant, git commit and push etc. that i run at the end of day.

You might want to use PSEXEC instead of RUNUS, if you have password for your windows account.

 

But still you have to update your shorcut every time i update phpStorm, because every version is installed in different directory, and old versions are not removed, so right now i have over 10GB of phpStorm (11 versions in User directory, 4 older in Program Files and 2 oldest in Program Files (x86) )

 

>P.S. I'm on Windows, what I'm doing is: always using standalone installers and manually remove previous / install new full version into the same folder.

Yea, but should we really "hack" updater this way? Shouldn't it work properly by itself?

0
Comment actions Permalink

AFAIK apps installed via Toolbox App will be installed into own separate folders so it's easy to rollback and use different versions... and they do not plan to change that in nearest future. But Toolbox should be cleaning up older versions (actual installations, not config/caches files)

Interesting tickets to check/watch after:

For manually installed / configs for old versions -- right now you need to handle them manually. Hopefully they will improve it all one day...

https://youtrack.jetbrains.com/issue/IDEA-109831 , https://youtrack.jetbrains.com/issue/IDEA-160860 etc

0

Please sign in to leave a comment.