* Peng Yu <[email protected]> 02.12.2009 > When I edit a new .sh file, I always want to 'chmod +x'. I'm wondering > if there is a way to make this process automated in vim?
Hello Peng,
I have this in my vimrc.
--------------------------------+
function ModeChange() |
if getline(1) =~ "^#!" |
if getline(1) =~ "/bin/" |
silent !chmod a+x <afile> |
endif |
endif |
endfunction |
--------------------------------+
Hth Michael
--
24 hours in a day, 24 beers in a case. Coincidence?
signature.asc
Description: Digital signature
