It's been a long time. I've been using PhpStorm for almost 8 years now. More precisely from 2012. Version 3 back then. A lot has happened in that time. A lot has changed. Of course, you learn more and more every day. This article is the result of my 8 years of experience with PhpStorm and my best settings that make you a faster developer and let you focus more on the important things.
If you don't care about the exact settings and what they are used for, you can download my snapshot (including my personal GitHub and Material Theme) and just import it into PhpStorm via
File > Import Settings. Just scroll to the end of this post and you'll find anything you need.
I'll show you only the settings you've to change that are different from the default. Either I'm gonna show you a
[ ] for unselect or
[x] for select.
Hide everything you don't need.
View > Appearance
[ ] Toolbar
[ ] Tool Window Bars
[ ] Status Bar
[ ] Navigation bar
Appearance & Behaviour > Appearance
[ ] Animate windows
[x] Show memory indicator
[ ] Show tool window bars
[ ] Show tool window numbers
Appearance & Behaviour > System Settings
[ ] Reopen last project on startup
[ ] Confirm application exit
[x] Open project in new window
Appearance & Behaviour > File Colors
[ ] Enable File Colors
[ ] Use in Editor Tabs
[ ] Use in Project View
Maybe you like it or not. I don't. These options remove the file colors and background colors from the tabs and project tree for some special folders like
I just changed some of the keymaps. Basically I'm using the default ones.
Ctrl + VSplit Vertically
Ctrl + HSplit Horizontally
Cmd + TRun...
Shift + Cmd + TRun
Ctrl + WHide Active Tool Window
Cmd + 2Select in Project View
Cmd + 1you can toggle the sidebar. What I still often need is to jump into the sidebar project tree. I often use
Shift + Shiftthat lets you search for everything or
Cmd + Oto search for classes. So I never use the sidebar. But if you would like to jump into that with the file that is currently open, this shortcut is awesome.
Editor > General
[ ] Enable Drag'n'Drop functionaliy in editor
[ ] Show notification after reformat code action
[ ] Show notification after optimize imports action
Strip trailing spaces on Save: All
[ ] Always keep trailing spaces on caret line
[x] Ensure line feed at file end on save
Editor > General > Appearance
[ ] Show hard wrap and visual guides
[ ] Show code lens on scrollbar hover
Editor > General > Breadcrumbs
[ ] Show Breadcrumbs
Editor > General > Code Completion
[x] Show full method signatures
Editor > General > Code Folding
Personally, I don't like any code folding, because I would like to see what I edit.
[ ] Show coding folding outline
[ ] File header
[ ] Imports
[ ] HTML 'style' attribute
[ ] XML entities
[ ] Data URIs
[ ] Imports
Editor > General > Editor Tabs
If you are not used to having any tabs I can highly recommend it. You can always the shortcut Cmd + E to get the recent files and Shift + Shift to search for any other file. There is no need for tabs.
Editor > General > Smart Keys > PHP
[ ] Enable smart function parameters completion
[ ] Select variable name without '$' sign on double click
Editor > General > Font
This is very personal and up your own preference. This fits best for me.
Line spacing: 1.9
Editor > General > Color Scheme > General
If you're like me and you don't want all these method separators, you can disable them. What you can't disable yet are the separators for the imported use statements. But there is a workaround. Just unset the foreground color for the following entry.
[ ] Method separator color, Foreground
Editor > General > Code Style
Line Seperator: Unix and macOS
Editor > General > Inspections
You might be wondering why I don't say anything here. Listing the inspections is pretty elaborate. I've made a few adjustments here specific to Laravel. So you have a clean environment without those annoying underlings. My Inspections can also be found in the download package. If you have any questions, let me know.
Editor > General > Inlay Hints
[ ] Show hints for:
Languages & Frameworks > PHP > Debug
[ ] Force break at first line when no path mapping specified
[ ] Force break at first line when a script is outside the project
You should untick both when using Laravel Valet. Otherwise, xdebug starts debugging in Valet itself.
Tools > Web Browsers
[ ] Show browsers popup in the editor
The result is a very clean and intuitive IDE that remembers of Sublime with the only difference that it's a fully integrated IDE. You can download my complete PhpStorm settings package. Just import into PhpStorm via
File > Import Settings.
This package contains also my customized GitHub Theme and customized Material Theme. My Material Theme is not that colorful as the original is. That makes it cleaner and you can focus more. As a bonus there is a Laravel specific inspections rule included. If you don't use it, most of the time everything is underscored with orange or red lines because of Laravels Facade architecture, it's hard for the IDE to follow everything along.
I am very interested in whether I have forgotten something? Or if you have any other practical tips to help me make PhpStorm even better. Let me know.