emacs projectile 处理 git submodule

2014-04-22 17:15:18 +08:00
 guoxx_
projectile能够处理独立的git repo的情况,
但是当我的repo里包含submodule的时候使用projectile-find-file就无法找到submodule里的文件。


(setq projectile-indexing-method 'native)
这样设置也能够解决我的问题,不过速度是在太慢了。
2835 次点击
所在节点    问与答
4 条回复
ufo22940268
2014-04-22 20:19:35 +08:00
在外面的git项目下面创一个.projectile文件试试?
goofansu
2014-04-22 20:46:59 +08:00
它的find file是用外部命令的,比如git或者svn,你可以改他的源码,只要你能用git命令列出文件,它就能显示
guoxx_
2014-04-22 23:05:16 +08:00
@ufo22940268 试过了,没有任何作用。我还是尝试看看源代码吧。
guoxx_
2014-04-23 09:54:15 +08:00
(setq projectile-git-command "git-ls-all-files")

https://gist.github.com/11200287

另外projectile-files-via-ext-command需要把结果用\0分隔开,我直接修改为[\0\n]+了

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/109564

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX