PhpStorm 6.0.1 Web Help

Any code completion or live template operation ends up with a suggestion list, from which you have to select the desired option. PhpStorm provides handy ways to make your selection, complete the source code, sort entries, and view reference information without leaving the suggestion list.

In this section, you will learn:

To navigate though the suggestion list and completed expression
  • Use the mouse cursor or the UpUp and DownDown arrow keys to navigate through the suggestion list.
  • Use the horizontal arrow keys in the completed expression to make the suggestion list wider (left arrow) or closer (right arrow):

    lookupListHorizArrows

To complete selection
  • Use EnterEnter to insert the selected string at the insertion point.
  • Use TabTab to replace the string next to the caret with the selected one.
  • Use Ctrl+Shift+EnterCtrl+Shift+Enter to make the current code construct syntactically correct (balance parentheses, add missing braces and semicolons, etc.)
  • It is possible to enter the desired element name manually when the input position is highlighted and the list of suggestions is open. As you type, the suggestion list shrinks so that only matching element names remain:

    wi_suggestion_list_shrinks.png

    If you enter a name that is not used in the scope, PhpStorm will inform you with a pop-up window as shown in the figure below:

    wi_suggestion_list_no_suggestion..png

  • It is possible to type any part of a word, even the characters located somewhere in the middle of the word:

    wi_suggestion_list_wildcards.png

    That's why asterisk character doesn't get any special processing as a wildcard.

Tip

  • If, invoking an action, you don’t get what you want immediately, invoke this action again by pressing the same shortcut.
  • Most suitable variants in the suggestion list are displayed on the green background on top of the list.
  • Entries in bold font on top of the list denote symbols defined in the current class. All the other symbols are shown below.
To view reference information in the suggestion list
  • Use the Quick Definition View. If you select an entry in a list and press Ctrl+Shift+ICtrl+Shift+I, PhpStorm displays the following quick information pop-up window:

    web_ide_suggestion_list.png
    Click thumbnail to view larger image.

  • Quick Information View works in a suggestion list. If you select an entry in a list, and press Ctrl+QCtrl+Q, PhpStorm displays the following quick information pop-up window:

    web_ide_suggestion_list_documentation_lookup.png
    Click thumbnail to view larger image.

To sort entries in the suggestion list
  • Click a_icon or pi_icon in the lower-right corner of the list to toggle between sorting in alphabetical order, or by relevance.
To view hierarchy in the completion pop-up
  1. Start typing the source code, and press Ctrl+Shift+SpaceCtrl+Shift+Space or Ctrl+SpaceCtrl+Space. The suggestion list appears.
  2. While in the suggestion list, press Ctrl+HCtrl+H. The Hierarchy tool window shows the type hierarchy of the class, selected in the suggestion list.
To close the suggestion list
  • Close the suggestion list with EscapeEscape, then enter your own code at the code completion position.

See Also

Procedures:

Reference:

Web Resources: