I want that when i make create a particular file, suppose i create it in vim editor, the created file should get executable permission as well when it gets created . I want this as i am creating some python files and don't want to explicitly set permissions for the file so i want some way so that executable bit is set as soon i create a file with particular extension or with a particular editor.
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
For vim, you have powerful scripting available. For example, in my .vimrc, I have:
If you want to do it by filename only, instead of looking for the #! line, you could do:
That article on Debian Administration has instructions for EMACS as well. |
|||
|
As much as I like derobert's answer, it causes VIM to give me the following warning:
The following (somewhat longer) code solves that problem (requires a Python-enabled vim):
|
|||||||
|
|
put
in your ~/.bashrc When you run without arg, you'll see:
Suggestion of UNIX is 0022.But your case is ... |
|||
