I'm under Linux and I use vim in conjunction with:
- YCM to get the autocomplete feature
- I have customized the
ftplugin
under ~/.vim/ftplugin/cpp.vim
a little bit like so
set equalprg=clang-format
nmap <F9> gg=G``a
imap <F9> <ESC>gg=G``a
set autoindent
set cindent
clang-format
is part of the clang compiler suite, I don't have any idea if this works under CygWin but equalprg
is just a proxy to any program that is capable to format a source file, for example astyle is a quite popular alternative.
With this setup if you press F9
in vim clang-format
will be called to format your code.
And that's all I need personally to have a functional vim.
If your computer can handle it, I suggest to just use a Virtual Machine.