English 中文(简体)
D. 大型项目使用电子设备
原标题:Using Emacs for big big projects

Maybe is a often repeated question here, but i can t find anything similar with the search. The point is that i like to use Emacs for my personal projects, usually very small applications using C or python, but i was wondering how to use it also for my work, in which we have project with about 10k files of source code, so is veeeery big (actually i am using source insight, that is very nice tool, but only for windows), questions are:

  • Searching: Which is the most convenient way to search a string within the whole project?
  • Navigating throught the function: I mean something like putting the cursor over a function, define, var, and going to the definition
  • Refactoring

同样,如果你有这方面的经验,愿意分享你们的想法,那么我会认为这非常有意义。

出口

最佳回答

我的项目通常生活在灰色之中,因此,我把这个项目放在一起,迅速搜寻:

;; There s something similar (but fancier) in vc-git.el: vc-git-grep
;; -I means don t search through binary files
(defcustom git-grep-switches "--extended-regexp -I -n --ignore-case"
  "Switches to pass to `git grep ."
  :type  string)

(defun git-grep (command-args)
  (interactive
   (list (read-shell-command "Run git-grep (like this): "
                             (format "git grep %s -e "
                                     git-grep-switches)
                              git-grep-history)))
  (let ((grep-use-null-device nil))
    (grep command-args)))
问题回答

浏览C来文方档案的“传统”方式是使用“标记”来编造一个称为TAGS的档案,然后使用ALT-来处理档案。

为了在档案中搜索示意图,我通常使用“grep”。 如果你在每次打字时都退休,你可以用你想要找的那张照片或东西。

还有一些《荣誉法典》。 它使探讨项目更为简单。 See herehere,以供参考。

关于整个项目的搜索,我认为“rgrep的指挥极为有用”。

另外,imenu在同一个档案中大量涌现到功能定义上。

这是我的两页。

环发中心向项目提供基本支持......

我的口味太重。 我取得了长足成果。 不用说,这无助于太多的贪 Python。

http://www.emacswiki.org/emacs/CScopeAndEmacs

除使用TAGS(TAGS)和他人提及外,我还发现igrepigrep-find 。 非常有用。 http://www.gnu.org/software/emacs/manual/html_node/emacs/Grep-Searching.html

我的标准搜索是:

M-x igrep-find some_regexp RET ~/work_area/*.cxx

查阅<代码>*.cxx下的所有文件~/work/area,并显示结果匹配代码<> > 部分_regexp。 如同所有搜索设施一样,它还用C-x`(aka M-x next-err)来储存一种类似汇编的缓冲器。





相关问题
Search field with Thickbox issue

i have a search form which is shown with Thickbox inside an iframe. the problem is.. that after i click "search" the result page is shown inside the same iframe! and i want it to be shown in the main ...

Will an incomplete google sitemap hurt my search ranking?

If I submit a sitemap.xml which does not contain all of the pages of my site, will this affect my search ranking? For example: If my sitemap only contained pages that had been created in the last ...

speeding up windows file search with C#

i made a program that search logical drives to find a specific file .if user type file name an click search button , searching begins , but i don t know how to stop searching in the middle of process....

JQuery/MVC Search Issue

I have inherited a piece of work where the entry screen shows a summary of 20 calculated variables. E.g. Var A (250), Var B (79). Clicking on any of these links takes the user to a view with a ...

Handling no results for docmd.applyfilter

I have an Access app where I use search functionality. I have a TextBox and a Search Button on the form, and it does a wildcard search of whatever the user enters in the TextBox, and displays the ...

Search by using the keyboard in a list/grid - algorithm

I need to implement a custom search in a grid and I would like to find some user interface guidelines that explain the standard way to implement it. I mean this kind of search that is initiated by ...

Embed Google/ Yahoo search into a web site or build your own

I am looking for an opinion on the whether to use Google custom search, Yahoo search builder or build my own for web projects (no more than 100 pages of content). If I should build my own - do you ...

热门标签