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.
You need to create a makefile which handles the build process.
Then from vim just run
:make, it will run the build and pop all errors inquickfixwindow where you can navigate and jump to error locations.