I was wondering if it is possible to insert something in .bashrc
or .vimrc
so that whenever I create a new Python file via vim
it automatically creates a file with this already inserted before I edit it:
#!/usr/bin/env python
import sys
if __name__ == '__main__':
A vast majority of my Python scripts use those lines, and if there is a way to include those for every newly created Python file I make that would be great.
Thanks! -kstruct
Or if you want to avoid plugins:
autocmd bufnewfile *.py 0r /path/to/python_default.py
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With