]> git.phdru.name Git - dotfiles.git/blobdiff - .vim/ftplugin/python.vim
.profile: Extend checks for interactive mode
[dotfiles.git] / .vim / ftplugin / python.vim
index 2aa92b056598bd9d44867b268ee8e7cd3cf762e0..95333e6f57c50e17a8768bff14d08f1cdc99be45 100644 (file)
@@ -32,21 +32,15 @@ function! SavePython()
    let ext = expand("%:e")
    if ext == "pyem"
       return
-   elif ext == "ptl"
+   elseif ext == "ptl"
       !compyle-ptl %
    else
       !compyle %
       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