首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >使用bufdo命令进行搜索

使用bufdo命令进行搜索
EN

Ask Ubuntu用户
提问于 2017-12-20 13:36:56
回答 1查看 240关注 0票数 0

我使用命令在vim中的所有缓冲区中搜索短语not initiated

代码语言:javascript
运行
复制
:bufdo /not initiated

产出如下:

代码语言:javascript
运行
复制
E486: Pattern not found: not initiated
E486: Pattern not found: not initiated
E486: Pattern not found: not initiated
E486: Pattern not found: not initiated
E486: Pattern not found: not initiated
E486: Pattern not found: not initiated
E486: Pattern not found: not initiated
E486: Pattern not found: not initiated
E486: Pattern not found: not initiated
E486: Pattern not found: not initiated
"aaa.cpp" [dos format] 1399 lines, 39255 characters
E486: Pattern not found: not initiated
"bbb.cpp" [converted][dos format] 5829 lines, 235847 characters
E486: Pattern not found: not initiated
"ccc.cpp" [dos format] 741 lines, 28473 characters
E486: Pattern not found: not initiated

如何理解这个输出?为什么这么多行E486: Pattern not found: not initiated。我的搜索找到什么了吗?

EN

回答 1

Ask Ubuntu用户

发布于 2017-12-20 14:03:11

行中的所有E486: Pattern not found: not initiated都来自未命名的缓冲区。我不知道你为什么有这么多,但你有。每次Vim切换到带有文件名的缓冲区时,都会打印文件名和详细信息,因此会打印"aaa.cpp" [dos format] 1399 lines, 39255 characters等。

对于搜索失败的每个缓冲区,Vim将打印一条错误消息。但是没有为缓冲区打印任何东西,所以除非您有如下输出:

代码语言:javascript
运行
复制
"aaa.cpp" [dos format] 1399 lines, 39255 characters
"bbb.cpp" [converted][dos format] 5829 lines, 235847 characters
E486: Pattern not found: not initiated
"ccc.cpp" [dos format] 741 lines, 28473 characters
E486: Pattern not found: not initiated

在一行中有两个文件名,没有错误,也不知道任何地方是否匹配。

票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/988029

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档