PhpStorm 2021.2 Help

Spelling

Use this settings page to select custom spelling dictionaries, create your own dictionaries, add words, and thus expand the basic spellchecking support provided by PhpStorm by default.

Custom Dictionaries

This area displays the list of user-defined dictionary files, which can be any of the following:

  • The built-in project-level and application-level dictionaries, which you populate by manually saving words to them.

  • Plain text files with the DIC extension, containing words separated with a new line.

  • Hunspell dictionaries, comprise two plain text files commonly sharing the same name, for example, en_GB.dic and en_GB.aff. The DIC file contains a list of words together with the applicable modification rules. The AFF file lists prefixes and suffixes regulated by a specific modification rule. Hunspell dictionaries can be easily obtained online, for example, here.

Enable/disable a custom dictionary

  • To have a custom dictionary applied in the current project, select the checkbox next to it.

  • To exclude a custom dictionary from spellchecking within the scope of the current project, clear the checkbox next to it.

Item

Shortcut

Description

Use single dictionary for saving words

Defines the behavior of the Save 'word' to dictionary intention action invoked on a mistyped word:

  • If the checkbox is selected, PhpStorm lets you select a single dictionary from the list. The selected dictionary is used for saving all mistyped words.

  • If the checkbox is cleared, PhpStorm lets you choose a dictionary in the code editor on the fly, individually for each a mistyped word.

the Add button

Alt+Insert

Click this button to add a new dictionary to the list.

the Edit button

Enter

Click this button to open the contents of a dictionary in a new editor tab.

the Remove button

Alt+Delete

Click this button to remove the selected dictionary from the list.

Accepted Words

Use this area to populate a custom dictionary with the list of words that should be skipped by the Typo inspection. The list also contains words that you saved to either the built-in global or project dictionary. Although it does not contain words added to the project-level dictionary by other users and words from other custom dictionaries, the Typo inspection will not highlight them.

Item

Shortcut

Description

the Add button

Alt+Insert

Click this button to open the Add New Word dialog and specify a new entry there. CamelCase or snake_case are not supported. If you try to add a word that is already included in one of the spelling dictionaries, PhpStorm displays an error message: The word <just typed word> is already in the dictionary.

the Remove button

Alt+Delete

Click this button to delete the selected item from the list.

Last modified: 08 March 2021