Is there a way to auto insert text in vim when a new file is created? Maybe there is a plugin for it? Here is what I'm talking about:
I work a lot with C/C++ and Python. Very often I need to create .h and .py files. We have some coding standards ( duh ). For example every .h file needs to have a following code:
#ifndef _filename
#define _filename
#endif // _filename
and every python file needs to have the following:
if '__main__' == __name__:
main()
Is there a plugin that will auto insert this type of code automatically when the file is created? I know there are snippets out there, but I would prefer for it to be done automatically without engaging them?
Any help is appreciated.
vim template
at wikia, e.g.: vim.wikia.com/wiki/Use_eval_to_create_dynamic_templates