Wednesday, October 26, 2022

Feature preview: Spell checking

A new version of PyScripter will be released soon.   Alongside python 11 support, it will include a number of enhancements and new features.  One of them is the implementation of the long-standing request for spell checking comments and strings.

The  Edit menu and the editor context menu, include a sub-menu “Spelling”:

Spelling

 

The options are self-explanatory.  You can spell-check the current word, line, selection or the entire file.

There are some IDE Options which affect spelling:

IDE Options

These option are:

  • The language code for the dictionary used,
  • If Spell check as you type is checked then spell checking occurs as you type like in Word.  This can also be set from the editor context menu.
  • “Spell check syntax tokens” is a comma separated list of syntax tokens that controls what parts of your code are spell checked.   By default this includes all strings and comments.

When the speller finds an error it is decorated with a red squiggly line:

Spelling error

With the cursor on a spelling error the spelling context menu changes to:

Suggestions

On top of the menu you can see one or more suggestions.  Clicking on one of them replaces the error with the suggestion.  You can also add the error word to the dictionary, delete it, ignore the error once, or ignore the error for the whole document.

Dictionaries

This feature is using the standard windows spell checker available since Windows 8. You can get dictionaries for different languages using the Windows Language settings.

No comments: