是否有任何 ECB(或其他)增强的查找文件魔力?

发布于 2024-09-13 23:21:49 字数 856 浏览 5 评论 0原文

我可以使用 ECB (或其他一些项目感知的东西,比如 eproject, ibuffer 等)来增强 emacs 的 find-file 优点?

想象一下这样的场景:我在 ecb-source-path 中指定了几个项目/目录,我们将它们称为 Project1 和 Project2,它们看起来像这样:

Project1
  foo.c
  bar.c

Project2
  foo.c
  baz.c

我想让 find- file (或其他命令)可以查找并跳转到那里的文件,而无需导航到 ecb 目录缓冲区,或者已经打开缓冲区。

我想我理想的使用场景是这样的:

我想使用Cx Cf baz(或另一个特殊命令)打开Project2/baz.c。更进一步,如果我可以使用类似 ido 的弹性匹配来获取p2foo打开Project2/foo.c

可能吗?

Can I use ECB (or some other project aware thing, like eproject, ibuffer, etc.) to enhance emacs's find-file goodness?

Imagine this scenario: I have several projects/directories specified in my ecb-source-path, let's call them Project1 and Project2, and they look like so:

Project1
  foo.c
  bar.c

Project2
  foo.c
  baz.c

I'd like to have find-file (or another command) work to find and jump to the files there without having to navigate to the ecb directories buffer, or have the buffers open already.

I guess my ideal usage scenario would be like so:

I'd like to C-x C-f baz (or another special command) to open Project2/baz.c. Going even further, I'd love if I could use something like ido's flex matching to get p2foo open Project2/foo.c.

¿C'est posible?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

安静被遗忘 2024-09-20 23:21:49

如果在您的示例中,您位于project1 foo.c 中,并且想要访问project1 bar.c,我认为大多数项目工具(如ede、eproject、gnu global、idutils 集成等)都有“跳转到文件”类型的命令。当然,我推荐 CEDET/EDE 和 ECB 组合。键绑定是 Cc 。 fede-find-file

设置 CEDET 和 EDE 非常简单,但 EDE 只知道少量不同的项目类型,您可能需要为您的项目手动配置它,这不太容易。

如果你想在project1/foo.c中跳转到project2/baz.c,你只需要使用locate:

M-x locate RET baz.c RET

Now select from the list。

If in your example you are in project1 foo.c, and you want to get to project1 bar.c, I think most of the project tools like ede, eproject, gnu global, idutils integration etc have "jump to file" type commands. I, of course, recommend the CEDET/EDE and ECB combination. The keybinding is C-c . f which is ede-find-file.

Setting up CEDET and EDE is pretty easy, but EDE knows only a small number of different project types, and you may need to configure it for your projects by hand which is less easy.

If you want to be in project1/foo.c and jump to project2/baz.c, you just need to use locate:

M-x locate RET baz.c RET

Now select from the list.

冬天旳寂寞 2024-09-20 23:21:49

您可以使用 filecache 包索引所需的目录,然后使用 ido 从缓存中选择文件名。 这里是一个示例;您可以通过 Google 找到其他实现。

You could use the filecache package to index the directories you want, then use ido to choose a filename from the cache. Here is one example; there are other implementations you can Google for.

暮光沉寂 2024-09-20 23:21:49

看一下 find-file-in-project。在我看来,你正在寻找类似的东西。

Take a look at find-file-in-project. It seems to me you're looking for something similar.

南街九尾狐 2024-09-20 23:21:49

我写了一个包 find-file-in-tags 其中使您能够打开 TAGS 文件中的文件,而无需指定文件路径。如果有多个文件与您输入的内容匹配,系统会提示您优化您的选择(或打开全部)。

此外,如果同一个项目有多个工作区,find-file-in-tags 会对所有这些工作区使用单个 TAGS 文件,但会在与缓冲区相同的工作区中打开该文件您在其中调用 find-file-in-tags

I've written a package find-file-in-tags which enables you to open files in your TAGS file without specifying the path to the file. If there are multiple files that match what you've entered, you're prompted to refine your choice (or open all).

Additionally, if you have multiple work areas for the same project, find-file-in-tags uses a single TAGS file for all those work areas but opens up the file in the same work area as the buffer in which you are invoking find-file-in-tags.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文