Friday, October 28, 2022

New feature preview: Selection color options

One of the editor improvements is the ability to customize the painting of text selection.  The default option now is the alpha blending of the selection color with the background.

Selection in previous versions:

Before

Current default selection painting (alpha blending):

Current

 

In previous versions, when a whole line is selected, the full line from the left to the right border was highlighted.  Now you have the option to highlight just the text.  This matches the behavior of other editors such as VS Code.

This is how it looks:

partial

 

The above options are controlled via Tools, Options, IDE Options, Editor, Selection Color:

Options

To get the the old behavior, set Alpha to 1 and check FillWholeLines.  You can also change the selection colors.  In addition to picking a color from the drop-down list, you can also type a hexadecimal value (e.g. $3399FF)

Feature preview: Better Unicode handling

In the forthcoming release of PyScripter, there are numerous editor improvements.  One are that has been revamped is the handling of Unicode, which is now on a par with the best editors around (e.g. VS Code, Scintilla, etc.).  More specically,  there are improvements in the handling of:

  • Wide glyphs (e.g. Chinese characters)
  • Surrogate pairs and combining characters
  • emojis  (you can enter with the Windows key + .)
  • Bi-directional text.

The picture below demonstrates these improvements:

Unicode

Wednesday, October 26, 2022

New feature: Track changes bar

The forthcoming version includes an editor enhancement, the Track Changes bar. It is feature “borrowed” from Visual Studio, and it helps you locate the changes introduced to an edited file.  The picture below showcases the feature:

Track changes
  • Changed lines are shown in yellow.
  • Changed but saved lines show in green.
  • Changed, saved, but later changed again lines are shown in orange.
  • Finally if you undo a changed and saved line to its original form (before saving) it is shown in blue.

The Track Changes bar is shown by default, but you can hide it or change the width and the colors via Tools, Options, IDE Options, Editor, Trach changes

IDE Options

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.