This question already has an answer here:
- vim: create file with +x bit 4 answers
When I create a new script, I always have to manually add executable permissions with
chmod +x foo.sh. My default permissions are set to 644, and but I'd like any file with extensions like
.py to automatically be set to as soon as they're saved so that I don't have to
chmod them every time. I've seen several articles relating to how to change default permissions for all files in a folder or directory, but none discussing differentiating by file extension.
I use Vim. I would accept an explanation of what to put in my
.vimrc to accomplish this as an answer.