I recently started learning vim and, I'm curious, what's the best way to setup a sort of bare-bones template for specific types of files?
For example: say I wanted to automatically load some C #includes and the main() call with a keystroke (or whenever I create a new .c file) What's the most efficient way to do this?
I was thinking I could write a vimscript function and then map that to a key, or turn it into a macro, but I don't think the macro would be permanent, correct?
Any ideas? All help is appreciated. Thanks!