700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > vscode php代码检测 VSCODE代码拼写检查插件Code Spell Checker

vscode php代码检测 VSCODE代码拼写检查插件Code Spell Checker

时间:2022-04-11 21:29:11

相关推荐

vscode php代码检测 VSCODE代码拼写检查插件Code Spell Checker

Code Spell Checker是一款VSCODE代码拼写检查插件,可以为开发者报告一些常见的拼写错误。这个拼写检查程序的目标是帮助捕获常见的拼写错误,同时保持低误报的数量。它很适合驼峰式代码。

安装

打开VS Code 进入扩展并查找安装code-spell-checker,安装完成后重启编辑器。

Open up VS Code and hit F1 and type ext select install and type code-spell-checker hit enter and reload window to enable.

用法

在TypeScript, JavaScript, Text 等文件中,如果拼写的单词不在正确则会出现下方出现波浪线。

拼写的建议

如果出现提现出错的词,将光标定位到该词后使用如下操作可以显示建议修改的单词列表。

1.点击右上角的电灯炮标志

2.使用快捷键快速修复Mac: ⌘+. or Cmd+.

PC: Ctrl+.

在代码中禁用/启用检查

It is possible to disable / enable the spell checker by adding comments to your code.

停用检查

/* cSpell:disable */

/* spell-checker: disable */

/* spellchecker: disable */

/* cspell: disable-line */

/* cspell: disable-next-line */

开启检查

/* cSpell:enable */

/* spell-checker: enable */

/* spellchecker: enable */

例子

// cSpell:disable

const wackyWord = ['zaallano', 'wooorrdd', 'zzooommmmmmmm'];

/* cSpell:enable */

// Nest disable / enable is not Supported

// spell-checker:disable

// It is now disabled.

var liep = 1;

/* cspell:disable */

// It is still disabled

// cSpell:enable

// It is now enabled

const str = "goededag"; //

// spell-checker:enable

// cSPELL:DISABLE

// if there isn't an enable, spelling is disabled till the end of the file.

const str = "goedemorgen"; //

忽略

你可以在文档里指定某些忽略检查的words。

// cSpell:ignore zaallano, wooorrdd

// cSpell:ignore zzooommmmmmmm

const wackyWord = ['zaallano', 'wooorrdd', 'zzooommmmmmmm'];

你可以创建某些自定义的短语,它也可以作为替代的建议选项。

// cSpell:words woorxs sweeetbeat

const companyName = 'woorxs sweeetbeat';

支持的文件类型

AsciiDoc

C, C++

C#

css, less, scss

Elixir

Go

Html

Java

JavaScript

JSON / JSONC

LaTex

Markdown

PHP

PowerShell

Pug / Jade

Python

reStructuredText

Rust

Scala

Text

TypeScript

YAML

下载

官方市场

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。