Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up vim as C++ IDE

Tags:

People also ask

Is vim good for C?

It is said that vim is not suitable for C/C++, especially big C/C++ projects. and the best way to write C/C++ is to use an IDE like qt-creator , clion or vs.

Can you use vim as an IDE?

After back and forth searching for a perfect IDE, I found Vim, Unix default editor, as a perfect alternative. Even though it's simple and lack of many rich features, convert it to become a powerful IDE is possible through plugins.

What is vim in C?

Vim is an extremely powerful editor with a user interface based on Bill Joy's almost 30-year-old vi, but with many new features. The features that make Vim so versatile also sometimes makes it intimidating for beginners. This article attempts to level the learning curve with a specific focus on C programming.

Does vim have compiler?

Vim typically has a number of common compiler configurations installed, as mentioned, so it will automatically choose the appropriate one. To actually use the compiler configuration you need to use the Vim :make function, as also mentioned, but the default mode of operation expects a Makefile to exist.


I wish to setup vim as C++ IDE so I can do all work from it.

I'm using these plugins for vim:

    • Clang complete - accurate completion
    • nerdtree - browse files
    • snipmate - insert snippets
    • AutoComplPop - omni-completion
    • buffergator - buffer management
    • vim-powerline - nice statusbar
    • vundle - to manage plugins

But I lack things like Jump to definition and compiling multiple files in one executable, project view...

I'm using

nmap <F8> :w % <bar> :!g++ -W -Wall -Wextra -pedantic -std=c++11 % -o %:t:r<CR> <bar> :!./%:t:r<CR>

to compile current file, but it won't work if there are multiple file that create one executable.

I know I could just use eclipse, netbeans, code::blocks and such, but I really like vim... If such thing as vim ide isn't possible do I have to learn GNU build system or some other method?

Any advice is welcome.