Skip to content

Autocorrect "?" to "Debug.Print" #4933

Open
@retailcoder

Description

@retailcoder

Linking #4932

The VBE accepts ? and "pretty-prints" it to a Print statement - which works fine when the ? token follows Debug., but makes the statement illegal otherwise.

Let's implement an autocompletion feature that intercepts the keypress when the current logical line of code is empty (barring indentation), and writes Debug.Print instead, placing the caret immediately after the Print token (we can't make it have a trailing whitespace, VBE would eat it).

Metadata

Metadata

Assignees

No one assigned

    Labels

    difficulty-03-duckInvolves more challenging problems and/or developing within and revising the internals APIenhancementFeature requests, or enhancements to existing features. Ideas. Anything within the project's scope.feature-autocompletefeature-autocorrectAC issues specific to the "autocorrect" handlerup-for-grabsUse this label in conjunction with a difficulty level label, e.g. difficulty-02-ducky

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions