9
V2EX  ›  Vim

Vim 的 YouCompleteMe 插件怎么设置跳转到 PHP 的函数定义呢?

  •  
  •   9 · Mar 26, 2014 · 12234 views
    This topic created in 4458 days ago, the information mentioned may be changed or developed.
    费了半天劲装了 YouCompleteMe, 发现配置比安装更难。难道要先生成 tag 吗?
    10 replies    2015-10-12 09:31:42 +08:00
    timonwong
        1
    timonwong  
       Mar 26, 2014
    YCM不提供除了C系和Python的Goto definition。。。
    用ctags吧。

    或者省事找个IDE
    banbanchs
        2
    banbanchs  
       Mar 26, 2014
    http://vim.wikia.com/wiki/Go_to_definition_using_g

    这个vim就可以做到了吧,不过没在php上试过
    9
        3
    9  
    OP
       Mar 26, 2014
    @timonwong 悲剧,看了官方说明,YCM 提供了 API, 可以自己写解析器,可惜难度太高。

    @banbanchs 这个太弱了。。
    henices
        4
    henices  
       Mar 27, 2014
    .vimrc 中添加上

    nnoremap <leader>jd :YcmCompleter GoToDefinitionElseDeclaration<CR>


    c/c++ 管用,不知道对PHP对否生效。
    xwsoul
        5
    xwsoul  
       Mar 29, 2015
    照说 java php 应该都算 C 系吧
    9
        6
    9  
    OP
       Mar 30, 2015
    @xwsoul 大神,你挖的一手好坟。 ^0^
    xwsoul
        7
    xwsoul  
       Mar 31, 2015
    @9 我错了...Orz 求原谅
    nevernet
        8
    nevernet  
       Sep 23, 2015
    这个问题解决了吗?
    9
        9
    9  
    OP
       Sep 25, 2015
    @nevernet 囧,没有,期待其他大神解答吧。
    nevernet
        10
    nevernet  
       Oct 12, 2015   ❤️ 1
    @9 跟 YCM 的开发者聊了下, php 没有跳转的功能。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4059 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 05:12 · PVG 13:12 · LAX 22:12 · JFK 01:12
    ♥ Do have faith in what you're doing.