VIM: More precise C/C++ code parsing solutions?

前端 未结 2 1269
栀梦
栀梦 2020-12-23 17:30

Pre: I\'ve been working in VIM for like a year already. Lots of great things: combinations, scripts. Whenever I\'m editing something in a different editor,

2条回答
  •  再見小時候
    2020-12-23 17:58

    Search and Call tree

    You could try eclim, which is a way to use some Eclipse features in Vim.

    For C/C++, it provides :

    • Context sensitive completion (although it is disabled on Windows because it is buggy)
    • Context sensitive search in Project files (through :CSearchContext)
    • Call tree for functions/methods (:CCallHierarchy)
    • Code Validation (:Validate)

    It is not great, but it can help in some cases.

    Code Completion

    Regarding automatic code completion, I primarily use OmniCppComplete, which is using tags to provide Context aware code completion. It is not that bad.

    As advised by Luc Hermitte, you can also use clang_complete which does not need ctags, but needs clang installed.

提交回复
热议问题