iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
💡

Preventing 4-Hour Time Loss from Typos with Code Spell Checker in VSCode

に公開2件

This is just a follow-up to the title.

I wrote the article above.
When I was telling a friend a similar story about my pathetic grumbling...

...Is he a genius?

A senior colleague once told me:
Those who address issues with human resources are third-rate,
while the first-rate address them with systems...

Installing Code Spell Checker in VSCode

https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker

At the time of writing this article,
there is a standard extension with 2,022,291 installs.

I added this to my extensions,

and appended this to User/settings.json so it works with Ruby as well.
(I've minimized the scope for now, but I'll incorporate other languages as I get used to it.)
(I also added a setting to disable Japanese spell checking, referring to the link mentioned later.)

Let's try running it. And then...

Nice!
With this, it seems almost certain that I won't waste another 4 hours on the same mistake.

Adding project-specific words

Adding words is easy.
With the cursor on the word you want to add, open the command palette
and just choose the registration destination with "Add Word to ~".

If you select that, it will create

.vscode/settings.json under the directory currently loaded in VSCode

{
  "cSpell.words": [
    "authenticatable"
  ]
}

and since it creates such a file,
you can share it with team members' environments as a project-specific word by managing it in the repository. Convenient!

References

Discussion

catnosecatnose

おーーーこれは便利そうですね!

1
北山淳也北山淳也

@catnose さん
コメントありがとうございます!
私も知らなかったのですが、調べた限り割と有名そうな拡張機能のようでした。
「気をつける」で終わらせないことができてよかったですw