Skip to main content

Searching Dictionaries

The trace command is used to search for words in the CSpell dictionaries.

Command: trace - See which dictionaries contain a word

Trace shows the list of known dictionaries and a * next to the ones that contain the word.

A ! will appear next to the ones where the word is forbidden.

image

The word is found in a dictionary if a * appears before the dictionary name. image

The dictionary is enabled, (in use based upon the file type), if the dictionary name is followed by a *. image

Options

Usage: cspell trace [options] <words...>

Trace words
Search for words in the configuration and dictionaries.

Options:
-c, --config <cspell.json> Configuration file to use. By default cspell
looks for cspell.json in the current directory.
--locale <locale> Set language locales. i.e. "en,fr" for English
and French, or "en-GB" for British English.
--languageId <language> Force programming language for unknown
extensions. i.e. "php" or "scala"
--no-color Turn off color.
--color Force color
-h, --help display help for command

Using languageId

Search for errorcode

cspell trace --languageId=cpp "errorcode"

image

The + between error+code indicates that it was found using compound words enabled by allowCompoundWords setting.