What are some utilities to search for code through

2019-09-21 01:22发布

What is an utility to find code throughout many files or folders. Something akin to PowerGrep but freeware.

标签: utilities
15条回答
Ridiculous、
2楼-- · 2019-09-21 01:48

If it's on a Mac, TextWrangler is rather fantastic for multi-file search with grep.

查看更多
三岁会撩人
3楼-- · 2019-09-21 01:48

You could also try Komodo Edit. It's a development IDE that supports many languages and has support for recursively searching directories. It's written in Java so it works on "every" platform.

http://www.activestate.com/komodo_edit/

查看更多
成全新的幸福
4楼-- · 2019-09-21 01:50

Eclipse is powerful and is free. Ctrl + Alt + H will search for methods, declarations, types or just free text in any language Eclipse supports. You can even use wildcards and regex.

I've been struggling with finding all the access to some method, for example. Once again, Eclipse does it for me very well: Ctrl + H will open the Call Hierarchy view.

查看更多
\"骚年 ilove
5楼-- · 2019-09-21 01:51

For Windows I've used Agent Ransack before in the past and it's done a pretty good job.

查看更多
forever°为你锁心
6楼-- · 2019-09-21 01:52

I have not seen PowerGrep but Visual Studio's "Find in files" works best for me. Also allows "Replace in files" and opens changed files to enable undo.

查看更多
爷、活的狠高调
7楼-- · 2019-09-21 01:53

If you install cygwin, you get the find and grep utilities, which can be used in concert like so:

find <dir> -name '*.cpp' -exec grep -H <pattern> {} \;

Or simply recursive grep, if you don't care about filtering by file-extension:

grep -R <pattern> <dir>
查看更多
登录 后发表回答