]> git.phdru.name Git - dotfiles.git/blobdiff - .vim/ftplugin/python.vim
.vim: Add SetExecutableBit based on Tip 212
[dotfiles.git] / .vim / ftplugin / python.vim
index 75f2e51334b8c4a7b4f75282a625ce67f3ad6cc3..bc1f672ac7cd78551e3d6d3e5512669a3807619f 100644 (file)
@@ -39,11 +39,8 @@ function! SavePython()
       if ext != "py"
          !rm -f %[co]
       endif
-      if executable(expand('%:p')) || !executable('chmod')
-        return
-      endif
       if getline(1) =~ "^#!"
-         !chmod +x %
+         call SetExecutableBit(1)
       endif
    endif
 endfunction