VIM 在 quickfix 中搜索模式 [英] VIM search for pattern into quickfix
本文介绍了VIM 在 quickfix 中搜索模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
基本上我需要创建一个 quickfix 缓冲区,列出与正则表达式匹配的所有行.什么是最好的方法?
Basically I need to create a quickfix buffer listing all lines that match a regex. What is the best way?
全局命令可能不是最好的,但我认为它应该是可用的.全局命令的输出是完美的,但我需要它来超链接匹配的行.
The global command may not be the best, but I think it should be usable. The output of the global command is perfect, but I need it to hyperlink the matching lines.
推荐答案
使用 caddexpr:-
g/<pattern>/caddexpr expand("%") . ":" . line(".") . ":" . getline(".")
这篇关于VIM 在 quickfix 中搜索模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文