📜 ⬆️ ⬇️

PhpStorm: Tips and tricks. Part 1

Today we will talk about some of the features of the wonderful IDE PhpStorm. Programmers from the company Jetbrains invest enormous power in creating their product, as a result we have a powerful and one of the best IDE for the php programming language. I think the times when I wanted to stand out programming in Notepad ++, almost gone. It is extremely difficult to develop modern large projects with many files on my knees without a good tool.

All hotkeys are fair for Windows and I think Linux versions, “Macros” can find keyboard shortcuts in the corresponding IDE settings section


So, let's go:

  1. Search Everywhere . Double-clicking the Shift key causes a popup window to search for anything, anywhere. It is enough to write a fragment of the desired text, and our little bee, the hard worker, will find the entries, and will group them into categories. Fragments found in classes, files, symbols, and even menu items. Quick and convenient, isn't it?
    Search Everywhere in action
    image

  2. Search in the window . Being in the window with the list of project files (Project), we simply start writing the name of the file or folder we want to find. The found files and folders are very clearly highlighted in the list. Use the up and down keys to navigate through the search results.
    Search window in action
    image

  3. Exit IDE settings with the Esc key . While in the settings, we can quickly close the window by pressing the Esc key, that is, we don’t have to touch the mouse, let it rest.
  4. Navigation code inspection . To the right of our code, we see the result of the background code inspection. IDE tells us about errors and inaccuracies in the file. You can navigate between these errors and notes by pressing F2
    Navigation code inspection in action
    image

  5. Last opened files . Ctrl + E opens a popup window with files that we recently opened. Also in this window you can start writing the name of the file of interest to us, and the IDE will filter the list.
    Last opened files in action
    image

  6. Rapid phpDoc comment generation . Type / ** press Enter and the comment will be completed automatically. If parameters are defined in the method or function and types are specified, then the IDE will take this information into account when generating. And if there is a return keyword, it will even try to guess the type of the return value.
    Rapid phpDoc comment generation in action
    image

  7. Code generator Click in the file Alt + Insert. In the popup window that appears, the IDE offers us to override the method, implement the method, add a constructor, getters and setters, as well as phpDoc comments
    Code Generator in action
    image

  8. Refactor This . Ctrl + Shift + Alt + T In the window that opens, we are provided with a wide choice of refactoring code. Before applying the changes, you can select a preview to evaluate which files will be changed.
    Refactor This in action
    image

  9. Postfix Completion . A handy tool that appeared in version 9 of the IDE. Allows you to quickly write constructions such as if, if not, etc.
    Before inserting an auto add-on, type a period and the IDE will open a popup window with a choice to complete the insertion.
    Postfix Completion in action
    image

  10. Productivity Guide . This section will show your statistics on the use of various “Features.” All data is presented in the form of a table with columns: Feature - name, Group - category, Used - how much time you used it, Last used - when you last used it. The plate with statistics can be sorted by each column. This section is also notable for the description of various possibilities, in which the hot keys for the call are indicated.
    Productivity Guide in action
    image


')

Source: https://habr.com/ru/post/263239/


All Articles