6 Settings to Simplify Work In PhpStorm in 2021

PhpStorm has a lot of great settings simplifying the developer’s work. But some very convenient settings are turned off by default. On the other hand, some rarely used ones are turned on by default. It could make work with the IDE slower than it could be.

After I’ve just installed PhpStorm, I normally change the following default settings:

These are my personal preferences. But, in my experience, changing these default settings speeds up my work a little bit.

Also, if you are just starting developing in PhpStorm and looking for the best way to set up your development environment locally (the problem I had in the past too), a small tip for you: the best way to set up the local development environment for PhpStorm would be probably to deploy the project locally on your computer hard drive and then mount it to the Oracle VirtualBox VM using guest additions. In this way, PhpStorm works fast. And you can use all the advantages of the IDE (unlike if you try to work on any kind of a network share directly).

1. Open search results each time in a new tab

By default: when you search in PhpStorm (  F on Mac or Ctrl Shift F on Windows) and click the button Open in New Window in the search window, the results are shown in the same tab every time (overwriting each other). So you can not switch between the current and previous search results quickly. You need to search again instead.

How to change:

  1. Run the search (  F on Mac or Ctrl Shift F on Windows)
  2. Click the button Open in New Window on the bottom right of the search window
  3. Right-click on a tab in the search results
  4. Select View Options > Open Results in New Tab
Open Search Results in a New Tab
Open Search Results in a New Tab

Why? It is convenient to switch between recent search results. If you have those search results in different tabs, you could switch between the tabs easily. But if your search results are always in the same tab (overwriting each other), you’ll need to search again to see the previous search results.

Many IDEs show search results in different tabs by default. E.g. NetBeans always showed them like that. But PhpStorm shows search results in the same tab by default. Fortunately, this is configurable.

2. Turn off browser icons

By default: PhpStorm shows browser icons in the right upper corner of the editor window.

Browser Icons in PhpStorm
Browser Icons in PhpStorm

How to turn off:

  1. In Preferences go to Tools > Web Browsers
  2. Uncheck the checkbox For HTML files in the section Show browser popup in the editor on the bottom of the window
  3. Click the button Apply
Turn off Browser Icons in PhpStorm
Turn off Browser Icons in PhpStorm

Why? Unfortunately, PhpStorm shows these icons not just for HTML files, but for PHP files as well. In most CMSs (e.g. WordPress) or frameworks (e.g. Yii Framework or Zend Framework), it is useless. You need to run your framework or CMS to see how this PHP template will actually look. But if you click on one of these icons, PhpStorm will open the current file in a browser (instead of running the CMS or framework code to show the corresponding page).

So, in most cases, when you work with any CMS or framework in PHP, those icons just take space on the screen.

But if you work a lot with static HTML files, those icons would be very useful to you of course.

3. Make all blocks expanded by default

By default: inline styles or block comments are shown collapsed.

Collapsed vs Expanded Blocks in PhpStorm
Collapsed vs Expanded Blocks in PhpStorm

How to change:

  1. In Preferences go to Editor > General > Code Folding
  2. Uncheck all checkboxes in the panel
  3. Click the button Apply
Make All Blocks Expanded by Default in PhpStorm
Make All Blocks Expanded by Default in PhpStorm

Why? It could be convenient to see all inline styles, all block comments, etc. to be open by default. Without any need to click on them to expand.

Please notice: 1) Unchecking only the upper checkbox Show code folding outline would hide only code folding toggles on the left. The code folding would still work:

Hide Code Folding Toggles in PhpStorm
Hide Code Folding Toggles in PhpStorm

2) Of course, you can always collapse/expand all code fragments with    /   + on Mac or Ctrl Shift NumPad  / Ctrl Shift NumPad + on Windows. But I think it could be more convenient to keep all code fragments expanded initially.

It is very convenient to see all blocks visible (=expanded) by default without need to click anything. Of course, this is a matter of taste. Some people could like code folding.

4. Turn on Mark modified (*)

By default: tabs with modified (but not saved yet) files are not marked in any way.

How to change:

  1. In Preferences go to Editor > General > Editor tabs
  2. Check the checkbox Mark modified (*)
  3. Click the button Apply
Turn on Mark modified (*)
Turn on Mark modified (*)

Why? It is convenient to see if you’ve forgotten to save a modified file. Some IDEs (like NetBeans) have modified files in tabs marked with an asterisk (*) by default.

5. Increase the tab limit

By default: you can have only 10 simultaneously open editor tabs in PhpStorm. If you open the 11th tab, one of your already open tabs will close automatically.

How to change:

  1. In Preferences go to Editor > General > Editor tabs
  2. Under the Closing Policy increase the Tab limit to at least 20.
    PhpStorm could easily take 4GB of RAM. So, see for yourself how much you can increase this limit. On an iMac with 24GB of RAM, I keep the tab limit on 25. And I often have more than 1 project open at the same time.
  3. Click the button Apply
Tab Limit in PhpStorm
Set Tab Limit in PhpStorm

Why? It could be very inconvenient when PhpStorm automatically closes one of the recent tabs for you. Of course, you could press  E on Mac or Ctrl E on Windows and reopen one of the recently opened files. But, maybe just keeping the tabs open, and closing them manually when you no longer need them, could be more convenient.

6. Turn off the bulb icon on the left

By default: when you hover the mouse over the beginning of any line in the editor, you often see the bulb icon.

Bulb Icon in PhpStorm
Bulb Icon in PhpStorm

How to turn off:

  1. In Preferences go to Editor > General > Appearance
  2. Uncheck Show intention bulb
  3. Click the button Apply
Turn off the Bulb Icon in PhpStorm
Turn off the Bulb Icon in PhpStorm

Why? You often need to hover your mouse over the left part of the editor screen. E.g. to highlight the text in the editor with the mouse. Having the bulb icon there on such actions could be inconvenient.

Conclusion

Of course, these are my personal preferences. They make my own work with PhpStorm faster.

If you use any other settings, simplifying your work in PhpStorm, I would be very grateful if you told me about them in the comments below.

Leave a Reply

Your email address will not be published. Required fields are marked *