开发者

Emacs Anything and rgrep

开发者 https://www.devze.com 2023-03-29 05:28 出处:网络
Anything is freaking awesome! Especially when it comes to files and anything-do-grep. Only problem is anything-do-grep doe开发者_开发百科snt search recursively. Is there a way to tell it to do so?

Anything is freaking awesome! Especially when it comes to files and anything-do-grep. Only problem is anything-do-grep doe开发者_开发百科snt search recursively. Is there a way to tell it to do so?

Thanx!


The last bit of the docstring of anything-do-grep says:

If a prefix arg is given use the -r option of grep. The prefix arg can be passed before or after start.

And, yes, Anything is freaking awesome.

EDIT: Just press C-u before executing "anything-do-grep". If you're selecting "anything-do-grep" from a menu, just press C-u before clicking on the menu item.

EDIT: In response to your question about setting a keybinding to call "anything-do-grep" with a prefix arg, here's some sample code that will do this:

(global-set-key (kbd "C-c g")
                (lambda () (interactive)
                  (let ((current-prefix-arg '(4))) ; C-u
                    (call-interactively 'anything-do-grep))))
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号