Emacs:是否可以为dired中的标记文件列出特定查询字符串的所有匹配行? [英] Emacs: Is it possible to list all matching lines for a certain query string for marked files in dired?

查看:148
本文介绍了Emacs:是否可以为dired中的标记文件列出特定查询字符串的所有匹配行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现Mx发生在另一天。

如何在Emacs中实现代码折叠效果?



我想知道我是否可以列出多个文件(或缓冲区)中的所有匹配行

解决方案

  Mx多次发生

Mx多次发生-in-matching-buffers

还有:



$ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $在这种主要模式下,缓冲区中符合REGEXP的行。
(interactive)
(多次发生
(get-buffers-matching-mode major-mode)
(car -read-primary-args))))


I found out M-x occur the other day.
(How to achieve code folding effects in Emacs?)

I wonder if I could list all matching lines in multiple files(or buffers) preferably marked in dired mode.

解决方案

M-x multi-occur

M-x multi-occur-in-matching-buffers

and also:

M-x multi-occur-in-this-mode

(defun multi-occur-in-this-mode ()
  "Show all lines matching REGEXP in buffers with this major mode."
  (interactive)
  (multi-occur
   (get-buffers-matching-mode major-mode)
   (car (occur-read-primary-args))))

这篇关于Emacs:是否可以为dired中的标记文件列出特定查询字符串的所有匹配行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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