Vim: Making Auto-Completion Smarter

后端 未结 7 568
忘了有多久
忘了有多久 2020-12-22 23:49

I use ctags, taglist, etc., to have auto completion in Vim. However, it is very limited compared to Visual Studio intellisense or Eclipse auto-completion. I am wondering whe

相关标签:
7条回答
  • 2020-12-23 00:05

    I've recently discovered YouCompleteMe, it behaves similarly to the Visual Studio autocomplete tool. A demonstration can be seen here:

    https://www.youtube.com/watch?v=YuMyHAHF0xs

    0 讨论(0)
  • 2020-12-23 00:10

    I use vim every day, and I'm not aware of any existing script that may do this. This action would require understanding of classes and keeping track of variables. someObject-> means that VIM would know what class the variable someObject is, and then be able to search methods/variables within that class.

    Writing scripts for vim is relatively easy, though like you've commented - no one has answered this yet. Up vote from me.

    0 讨论(0)
  • 2020-12-23 00:15

    In any case, I recommend YouCompleteMe (YCM). It provides (fuzzy) matching of identifiers of your current file, as well as path-completion, integration with external completion engines,...

    ad 1)
    If you like the semantic completion of eclipse, use eclim to integrate vim with eclipse. (alernatively use another semantic engine for YCM)

    ad 2)
    These 2 play nicely together btw.,: YCM can even provide the function definition (= parameter list) of the recently completed function!

    ad 3)
    that's what YCM does anyways

    ad 4)
    not quite sure, what you mean by that one. never used ctags!

    P.S.: I strongly recommend using UltiSnips and Tagbar (and if you like UndoTree) additionally, what makes vim a perfect IDE for me.

    0 讨论(0)
  • 2020-12-23 00:17

    I would love to have that same functionality that you are looking for and just came across a promising plugin:

    https://github.com/Shougo/neocomplcache looks like it could be the new autocomplpop, and seems to work quite well during my initial trials... now to configure the omni completion to work with scala~

    0 讨论(0)
  • 2020-12-23 00:18

    AutoComplPop is what you need.

    0 讨论(0)
  • 2020-12-23 00:18

    For (1) when working with C++ or C clang complete is a really nice option

    0 讨论(0)
提交回复
热议问题