VIM:仅在特定行号之间搜索? [英] VIM: Search only between specific line numbers?

查看:40
本文介绍了VIM:仅在特定行号之间搜索?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道使用 Vim 的替换命令您可以指定一系列行:

I know that with Vim's substitution command you can specific a range of lines:

:12,24s/search/replace

我也希望能够指定正常搜索的范围.类似的东西

I want to be able to specify a range with normal searches as well. Something like

:12,24/search

因为这似乎不起作用(至少在我的 Vim 配置中),有人知道如何实现吗?

Since that doesn't seem to work (at least on my Vim configuration), does anybody know how to achieve this?

谢谢.

推荐答案

:help search-range

然后

:help /\%>l

本质上:

/\%>12l\%<24lsearch

这篇关于VIM:仅在特定行号之间搜索?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆