维姆:100+字符长度搜索查询导致崩溃
在 gVim 搜索窗口(“q/”)中,我的屏幕在换行之前可以容纳 100 个字符。 (这与主编辑窗口中的文本换行设置不同。)在构建复杂的搜索查询(我稍后将其插入命令语句中)时,当我尝试运行 gVim 时,它会锁定它 - 仅当以下情况时才会发生这种情况:查询行在此窗口内换行。我写的那一行似乎没有什么不寻常的地方。我第一个迹象表明可能出现问题是当我看到 gVim 自动放置在“/”之前(在搜索窗口内的搜索查询语句之前)被添加到查询行的包裹部分时 - 但是,显然,我不确定那是的问题。
有其他人在 gVim 中开发长搜索查询时遇到困难吗?我在 Ubuntu Natty 系统上运行 7.3(带补丁 1-35)。
我意识到我可以将这条线分解成更小的函数,但我几乎已经完成了这种方式,并且有兴趣发现一种解决方案 - 如果有的话。
In the gVim Search window ("q/"), my screen can fit 100 characters before wrapping the line. (This is apart from the text-wrapping setting in the main editing window.) In building a complex search query (that I would later plug into a command statement) it locks up gVim when I try to run it - which only occurs if the query line wraps within this window. There appears to be nothing in the line I wrote that was out of the ordinary. My first sign that something might be wrong was when I saw gVim's automatically placed pre "/" (before the search query sentence within the Search Window) was added to the wrapped portion of the query line - but, obviously, I am not sure that's the issue.
Has anyone else experienced difficulty in developing long search queries in gVim? I'm running 7.3 (w/patches 1-35) on a Ubuntu Natty system.
I realize I can break this line apart into smaller functions, but I was almost done doing it this way and would be interested in discovering a solution - if there is one.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
作为一种解决方法,您可以使用常规 vim 脚本/缓冲区来分配搜索模式
一种“简单”方法:
do以下命令将搜索模式设置为搜索寄存器:
这一事实
这个基本主题有许多变体。其本质是:将您的搜索模式直接分配给
@/
As a workaround, you can use a regular vim script/buffer to assign search patterns
One 'simple' approach:
do the following command to set the searchpattern as into the search register:
This has the same effect as pressing enter inside the Search Window, except for the fact that
There are a number of variation on this basic theme. The essence of which is: assign your search pattern directly into
@/