IntelliJ IDEA 14.1.0 Help


On this page:


IntelliJ IDEA helps you make sure that all your source code, including textual strings, comments, and literals, and commit messages, is spelt correctly. For this purpose, IntelliJ IDEA suggests a dedicated Typo inspection, which is supported by the corresponding bundled plugin and is enabled by default.
Correctness of spelling is checked against pre-defined dictionaries (as of now, jetbrains.dic and english.dic), and any number of user-defined custom dictionaries.

A user dictionary is a textual file with the dic extension, containing the words you want to be accepted by the Typo inspection as correct. The words in such dictionaries are delimited with the newline.

Besides that, you can define your own list of words that will be skipped by the inspection. You can add words to this list "on-the-fly", or intentionally while setting up your spellchecker options.

With the Typo inspection enabled, IntelliJ IDEA detects and highlights words not included in dictionaries and user's words list. It up to the user to provide correct spelling, accept word as is, or disable inspection.

If a word is accepted, it will be added to the user's words list, and skipped by the spellchecker in future. If inspection is disabled, all typos will be ignored.

In the textual strings and comments, spelling of a word at caret can be changed to a correct one. In the contexts that enable Rename refactoring, the inspection suggests to rename all occurrences of a symbol.

In this section you will learn how to perform spellchecking, and configure spellchecker behavior.

Checking a words spelling

To spellcheck a word

  1. Place the caret on a word highlighted by the Typo inspection.
  2. Press Alt+Enter to show the available intention actions.
  3. Choose one of the following actions:
    • Change to: select the desired spelling of a textual string or comment from the suggestion list.
    • Save to dictionary: add word to the user's list and skip it in future.

Configuring spellchecking options

To configure spellchecking options

  1. Open the Settings dialog box.
  2. Click Spelling.
  3. Make up a user's words list. To do that, click the Accepted Words tab, and use add (Alt+Insert) and delete (Alt+Delete) to manage the list of words to be skipped by the Typo inspection.
  4. Define the set of dictionaries to be used for spellchecking on the Dictionaries tab. In the User dictionaries paths section, click add (Alt+Insert), and in the dialog that opens, select the directory where the desired dictionaries are located. All dictionaries detected in the specified directories, are listed in the Dictionaries section below. By default, all dictionaries are enabled. If you want to omit some of them, clear their check boxes.
  5. Define the type of contents to be inspected, and inspection severity. To do that, click the Manage spelling inspection settings hyperlink to open the Typo page in Inspections. Use check boxes to define the pieces of code to be inspected (code, literals, and comments), and select severity level from the drop-down list.

See Also

Last modified: 14 July 2015