I'm not big fan of vi, but i know people who know it well can do lot of things with it :)
I prefer to edit the code on windows, with good ide, and tools, debugers, code analyzers etc, and only compile on linux.
Generally i use a shared drive on linux, and edit the files via windows or mac.
Or i use nano for small edits on configuration files.