Many software developer also likes it (especially it's derives vim and gvim), because it can be used as an IDE, the only thing you should do is to install additional plugins for it.
Here a list you should try if haven't done it already:
- c.vim (http://www.vim.org/scripts/script.php?script_id=213) This adds a new menu to gvim called c/c++. From this menu you can easily add comments, statements etc.
- OmniCppComplete (http://www.vim.org/scripts/script.php?script_id=1520) As the name suggests it is code complition
- TagList (http://vim-taglist.sourceforge.net/installation.html) A menu on the left which lists functions, variables, etc.
- a.vim (http://www.vim.org/scripts/script.php?script_id=31) Alternate files quickly (.c --> .h etc)
To use c.vim consider modifying in ~/.vim/c-support/templates directory a few files, like: Templates, c.comments.template and cpp.comments.template
Modify your .vimrc file for a.vim, add these lines:
" a.vim: to search e.g. .hh files, too
let g:alternateExtensions_hh = "c,cpp,cxx,cc,CC"
let g:alternateExtensions_cc = "h,hh,hpp"
The plugins above are using tags file, which can be created by ctags. Note! Do not use emacs' ctags use exuberant ctags instead (default in Slackware).
To generate tags file use this command (e.g.):
ctags --c++-kinds=+p --fields=+iaS --extra=+q -R * *.cc *.c *.hh *.h
I've added an alias in my .bashrc:
alias ctagscppr='ctags --c++-kinds=+p --fields=+iaS --extra=+q -R * *.cc *.c *.hh *.h'
To use TagList type :TlistToggle in gvim.
To use OmniCppComplete just press "." or "->". By default "::" won't do anything (If I remember well C-x o is the default trigger for this plugin.)