我们如何定制Emacs的rgrep来使用ripgrep (rg可执行文件) --让它同时支持拉丁语1、UTF-8和UTF-16的搜索?
这个想法是重用Emacs的标准rgrep命令,这样我们也可以使用next-error和previous-error ...
我不知道如何完全集成(对于基本目录)和(对于匹配的文件)说明符等。
(grep-apply-setting 'grep-find-template
"rg -uu -g <F> <R> <D>")将生成(在*.txt文件中搜索时)
rg -uu -g \( -iname \*.txt \) test .
error: Invalid value for '--max-count <NUM>': invalid digit found in string
Grep exited abnormally with code 1 at Sun Aug 6 00:23:58发布于 2017-08-06 23:59:17
grep-find-template用于将grep命令与find结合使用。这对我来说很有效:
(grep-apply-setting 'grep-find-template "find <D> <X> -type f <F> -exec rg <C> --no-heading -H <R> /dev/null {} +")如果要在不使用find的情况下使用rg,则必须使用lgrep并进行自定义:
(grep-apply-setting 'grep-template "rg --no-heading -H -uu -g <F> <R> <D>")https://stackoverflow.com/questions/45526670
复制相似问题