Every time I write a new python program, I find the same starting lines again and again:
'''
Description of the program
'''
import always, the, same, libraries
def helper_function(helpers_args):
'''
A function that is called in get_main_output, but that someone might want to import too.
'''
continue
def get_main_output(program_arguments):
'''
Description of the main function
'''
continue
if __name__ == '__main__':
output = get_main_output(sys.argv)
I do not want to do this manually every time. I would like vim to show me this file every time I open a nonexistent file with the extension .py, so I can modify it as needed, and then save it in the newly created source file.
How can i achieve this?
Apologizes if the answer is already somewhere. I thought it would be, but I could not find it anywhere.
source
share