I want to setup VIM as C++ IDE on Windows. there are many different tutorials available which use different plugins (i’m confused).please give your opinion on best plugins for VIM and there use? It would be generous if you can give a short tutorial to setup VIM as C++ IDE.
I would encourage you to use linux(Ubuntu works as a charm) over windows. Linux is cool and as a bonus you get cool stuffs like vim inbuilt. If you want to use windows then download Cygwin(It allows linux tools to be run on top of windows) or download VMWARE(Virtual machine software that allows you to boot live cds/bootable cds).
How to use vim as C++ ide:
Here is my .vimrc file FYI it is a setting file used by vim and it is placed in the home directory. This file sets the appearance/functioning of vim. Copy paste the following into your .vimrc file and save it.
set nocp ts=4 sw=4 noet ai cin bs=2 cb=unnamed
set number ruler wrap autoread showcmd showmode fdm=marker nobackup
syntax on
filetype on
set makeprg=g++\ -o\ \"%:p:r\"\ \"%:p\"
map <F9> :w<CR>:!clear<CR>:make<CR>
imap <F9> <ESC>:w<CR>:!clear<CR>:make<CR>
map <F5> :!clear<CR>:!%:p:r<CR>
map <C-v> "+p
imap <C-v> <esc><C-v>
noremap <Up> <NOP>
noremap <Down> <NOP>
noremap <Left> <NOP>
noremap <Right> <NOP>
set hlsearch
autocmd BufWinLeave *.* mkview
autocmd BufWinLeave *.* loadview
Now open vim write your code and just press F9 and it will be compiled Then press F5 and voila it will run.
You should start using vim like this and add plugins later if you really need them.
Note: Using vim with the default theme may seem boring…if this happens then please use some cool themes(I love ‘solarized’).
I have included a screenshot of my setup for your convenience: