在VI编辑器打开的文件中搜索指定单词

发布于 2024-08-14 23:03:21 字数 195 浏览 3 评论 0原文

请告诉我如何在 VI 编辑器中打开文件时搜索特定单词。我知道我们可以通过使用 /word_to_be_search 来做到这一点,但它不会对单词进行精确搜索。

Example
/sachin will searches for sachin_server, sachin_client and not only sachin

Please tell me how to search for a specifig word if the file is opened in VI Editor. I know we can do it by using /word_to_be_search but it will not do the exact search for the word.

Example
/sachin will searches for sachin_server, sachin_client and not only sachin

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

¢好甜 2024-08-21 23:03:21

请尝试:

/\<word\>

\<\> 匹配单词边界。

Try instead:

/\<word\>

the \< and \> match word boundaries.

若水微香 2024-08-21 23:03:21
/\<sachin\>

\< 是单词的开头,\> 是单词的结束标记。

/\<sachin\>

\< is the beginning of word, and \> is the end of word marker.

蓝咒 2024-08-21 23:03:21

这样做:

/\

do this:

/\

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文