On this page:
RubyMine helps you make sure that all your source code, including textual strings, comments, and literals,
and commit messages, is spelt correctly. For this purpose, RubyMine 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,
english.dic), and any number of user-defined custom dictionaries.
A user dictionary is a textual file with the
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, RubyMine 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.
Note that Ruby SpellChecker plugin is required to run the Typo inspection.
Checking a words spelling
To spellcheck a word
- Place the caret on a word highlighted by the Typo inspection.
- Press Alt+Enter to show the available intention actions.
- Choose one of the following actions:
- : select the desired spelling of a textual string or comment from the suggestion list.
- : add word to the user's list and skip it in future.
Configuring spellchecking options
To configure spellchecking options
- Open the Settings dialog box.
- Click Spelling.
- Make up a user's words list. To do that, click the Accepted Words tab, and use (Alt+Insert) and (Alt+Delete) to manage the list of words to be skipped by the Typo inspection.
- Define the set of dictionaries to be used for spellchecking on the Dictionaries tab. In the User dictionaries paths section, click (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.
- 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.