compiler python
if has("unix")
- execute "autocmd BufWritePost " . expand("%") . " call SavePython()"
+ autocmd BufWritePost <buffer> call SavePython()
endif
" Compile and remove *.cgi[co] files after compilation; do not remove *.py[co] files;
if ext != "py"
!rm -f %[co]
endif
+ if executable(expand('%:p')) || !executable('chmod')
+ return
+ endif
if getline(1) =~ "^#!"
!chmod +x %
+ if v:shell_error
+ echoerr 'Cannot make file executable: ' . v:shell_error
+ endif
endif
endif
endfunction