iTranslated by AI
Preventing 4-Hour Time Loss from Typos with Code Spell Checker in VSCode
This is just a follow-up to the title.
- Want to hear about how I wasted 4 hours because I didn't notice a typo in a Rails migration? (I did) [EOF] | Junya Kitayama | zenn
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
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
- Fight typos by introducing Code Spell Checker to VSCode | Qiita
- Make Code Spell Checker, which points out typos in VSCode, compatible with the Ruby language | Qiita
- Code Spell Checker, an extension for spell-checking within source code in VSCode | Lonely Mobiler
- Visual Studio Code Spell Checker that you should install right now | rochefort's blog
Discussion
おーーーこれは便利そうですね!
@catnose さん
コメントありがとうございます!
私も知らなかったのですが、調べた限り割と有名そうな拡張機能のようでした。
「気をつける」で終わらせないことができてよかったですw