且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在 Visual Studio Code 中查找并替换为换行符

更新时间:2022-12-22 22:31:13

在本地搜索框 (ctrl + f) 中,您可以按 ctrl 插入换行符 + 输入.

In the local searchbox (ctrl + f) you can insert newlines by pressing ctrl + enter.

如果您使用全局搜索 (ctrl + shift + f),您可以按 shift 插入换行符> + 输入.

If you use the global search (ctrl + shift + f) you can insert newlines by pressing shift + enter.

如果您想按字符字面量搜索多行,请记得检查最右边的正则表达式图标.

If you want to search for multilines by the character literal, remember to check the rightmost regex icon.

在以前版本的 Visual Studio 代码中,这很困难或不可能.旧版本要求您使用正则表达式模式,旧版本尚不支持任何换行搜索.

In previous versions of Visual Studio code this was difficult or impossible. Older versions require you to use the regex mode, older versions yet did not support newline search whatsoever.