X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=.vim%2Fftplugin%2Fpython.vim;h=bc1f672ac7cd78551e3d6d3e5512669a3807619f;hb=d8552c03165aaccbe177fd9da7125cfe45b07fab;hp=2aa92b056598bd9d44867b268ee8e7cd3cf762e0;hpb=5500a2dadeaa9252a0285627a00b90847a2cb796;p=dotfiles.git diff --git a/.vim/ftplugin/python.vim b/.vim/ftplugin/python.vim index 2aa92b0..bc1f672 100644 --- a/.vim/ftplugin/python.vim +++ b/.vim/ftplugin/python.vim @@ -39,14 +39,8 @@ function! SavePython() 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 + call SetExecutableBit(1) endif endif endfunction