You are not logged in. Please login at to post your questions!


Is there any updated guide to setup vim as c++ IDE with best plugins?

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.

asked 01 Sep '14, 05:05

jerrygoyal's gravatar image

accept rate: 0%

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: alt text


answered 01 Sep '14, 22:48

semiconductor's gravatar image

accept rate: 20%

toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 01 Sep '14, 05:05

question was seen: 5,552 times

last updated: 01 Sep '14, 22:48