Skip to content

Disable Spell Check For A Block of Code #337

@teschste-reyrey

Description

@teschste-reyrey

I have looked through the documentation, and I am probably missing it, but I cannot find how to disable spell checking for a block of code. There are scenarios, especially when providing test values during unit testing, where the spell checker is calling out words as misspelled when they are either misspelled intentionally, or are names that are intentionally not capitalized. In those cases, I want to be able to turn off spell checking for the block of code where those items are defined.

For example:

    'Spell Check: disable
    Dim testValues As New Dictionary(Of String, String) From {
      {"steve", "Steve"},
      {"steve tesch", "Steve Tesch"},
      {"STEVE TESCH", "Steve Tesch"},
      {"tesch, steve", "Tesch, Steve"}
    }
    'Spell Check: enable

I found the "Ignore Spelling" directive, but:

  1. It can be tedious to list all of the problem words, especially in a longer code block.
  2. The scope is too broad (per the documentation: "any words specified will be ignored throughout the file before and after the directive").

I am looking for a method to completely disable spell checking at a given point in the code, then re-enable spell checking further down in the code.

If this option exists and I have overlooked it, my apologies, please let me know what the option is.
If this option does not exist, I would like to request it be added.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions