Skip to content

Proper way to spellcheck the "n't" (like "shouldn't") abbreviation? #92

@xtendo-org

Description

@xtendo-org

First of all, thanks for a great plugin. Loving it for years.

Actual behavior

Today I noticed that writing shouldn't will cause SpellBad highlight by spelunker.vim.

More specifically, on the shouldn part, presumably because spelunker.vim recognizes the apostrophe as a word boundary.

Curiously though, there's a subtle difference in the way the abbreviations are highlighted:

  • wouldn't: SpelunkerSpellBad
  • shouldn't: SpelunkerSpellBad
  • hadn't: SpelunkerSpellBad
  • couldn't: SpelunkerComplexOrCompoundWord

Expected behavior

I think shouldn't shouldn't (no pun intended) be SpellBad.

Abbreviations like "wouldn't" or "shouldn't" or "couldn't" are, as far as I can tell, very very common in English. They are listed on most English dictionaries (I checked Oxford, Merriam-Webster, and Cambridge).

Not as common as the examples above, but in my opinion, abbreviations like "mustn't" and "shan't" also deserve to be considered correct. (Because when you see a "mustn't" surrounded by spaces, you can be quite certain it's not a spelling mistake.)

Observations

  • Adding wouldn't to my spellfile does not solve this; the wouldn part is still recognized as a spelling error by spelunker.vim.
  • Adding wouldn to my spellfile does clear the SpellBad highlight, but this introduces a whole new problem: spelunker.vim now becomes oblivious to obvious errors like That wouldn cut it. Oh no! I think this one's cost is greater than the benefit.
  • Ideally, I hope spelunker.vim provide a way to correctly recognize a "single word" that includes an apostrophe in it.

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