tags:

views:

259

answers:

3

I am finding it very difficult to use VIM as IDE for programming. Help me get a solution.

+2  A: 

generally you can go this path

http://cream.sourceforge.net/

but i would suggest you use more personalized experience and learn some vim commands for your advantage.

For instance you can get few enchancements setting directly in .vimrc

set nocompatible        
set backspace=2         
set textwidth=75        
set viminfo='20,\"50    
set history=50          
set mouse=a
set nocp
set ruler
set visualbell
set wildmenu
set noerrorbells
set ignorecase
set incsearch
set vi=%,'50
set vi+=\"100,:100
set vi+=n~/.viminfo

set joinspaces
set showmatch
filetype plugin indent on

filetype on
colorscheme desert
syn on
" source /usr/local/share/vim/vim63/indent.vim

if you plan on using python i would recommend set expandtab also.

Then you should head to http://www.vim.org/scripts/index.php and get few scripts for you language.

Also you can do keybindings for vim i.e. set nmap <C-m> :make all<CR>. (sets ctrl-m to execute command make all)

damir
+2  A: 

To answer just the aspects you mentioned:

  • 'Building' normally implies, that you have a build system (such as make, scons, cmake, 'solutions', ant, waf, etc.). These build systems are normally started by some command (such as make, scons, cmake + to whatever, devenv, ant, waf). You can launch the build system by setting the makeprg option in vim:

    Program to use for the ":make" command.
    

    Set that to whatever your build system needs. You then just use :make to trigger the buildsystem. Errors are reported to the buffer containing the list of 'errors'.

    :help copen
    
  • 'Running' is just :!yourbinary.exe

akira
A: 

There is a tons of shortcuts already defined in c.vim to make your vim as IDE. Refer this file PDF : ~/.vim/c-support/doc/c-hotkeys.pdf in that plugin. Also refer this Tutorial: Make Vim as Your C/C++ IDE Using c.vim Plugin for more detail.

thegeek