V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
guoxx_
V2EX  ›  问与答

emacs projectile 处理 git submodule

  •  
  •   guoxx_ · 2014-04-22 17:15:18 +08:00 · 2832 次点击
    这是一个创建于 3707 天前的主题,其中的信息可能已经有所发展或是发生改变。
    projectile能够处理独立的git repo的情况,
    但是当我的repo里包含submodule的时候使用projectile-find-file就无法找到submodule里的文件。


    (setq projectile-indexing-method 'native)
    这样设置也能够解决我的问题,不过速度是在太慢了。
    4 条回复    1970-01-01 08:00:00 +08:00
    ufo22940268
        1
    ufo22940268  
       2014-04-22 20:19:35 +08:00
    在外面的git项目下面创一个.projectile文件试试?
    goofansu
        2
    goofansu  
       2014-04-22 20:46:59 +08:00 via iPhone
    它的find file是用外部命令的,比如git或者svn,你可以改他的源码,只要你能用git命令列出文件,它就能显示
    guoxx_
        3
    guoxx_  
    OP
       2014-04-22 23:05:16 +08:00
    @ufo22940268 试过了,没有任何作用。我还是尝试看看源代码吧。
    guoxx_
        4
    guoxx_  
    OP
       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]+了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2535 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 08:50 · PVG 16:50 · LAX 01:50 · JFK 04:50
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.