问题
I'm looking for a way to automatically replace my commonly misspelt words in VS Code.
Is there something out there / how would I create something where I can add a particular string to find, string to replace with and a syntax/filetypes for the autocorrect to be active in?
Example:
backgorund | background | css/scss/less
To clarify, I want it to be automatically corrected, no key inputs.
Many thanks!
回答1:
There is an Auto Correct extension for VS Code.
Its configuration is pretty straightforward. In your case just add the following to your settings.json
"auto-correct.dictionary": [
{
"languages": ["javascript","css","html"],
"words": {
"backgorund": "background"
}
}]
And "backgorund" will be automatically corrected without specific key presses.
来源:https://stackoverflow.com/questions/51397895/vs-code-autocorrect