There is YouCompleteMe and ClangComplete. These both use libclang to handle the completion.
Vim plugin which uses the compiler Include to jump to function, and show prototype and auto-compilation
-
13-10-2022 - |
Frage
In vim on Linux mainly, if I've a c or c++ source file which includes many other header files.
Is there any plugin available which can use the compiler Include (-I) and shows the syntax of the function on which the cursor or something like jump to definition.
I know about ctag, but is there anything more advance something like Visual Studio on windows.
Lösung
Andere Tipps
What you ask for is the whole purpose of ctags. If you haven't done that yet, you should read :help tags
and :help ctags
. The :tselect
command may be what you are looking for.
Cscope is another slightly more advanced solution (it does "jump to usage" too). See :help cscope
for more information.
That said, Vim has built-in "include-search": :help include-search
has this nice little mapping example:
:map <F4> [I:let nr = input("Which one: ")<Bar>exe "normal " . nr ."[\t"<CR>