]> git.phdru.name Git - dotfiles.git/blobdiff - .vim/ftplugin/python.vim
.vim/ftplugin/python.vim: Fix elseif syntax
[dotfiles.git] / .vim / ftplugin / python.vim
index ac3817547d1c8498878287ee5404816080a3155a..95333e6f57c50e17a8768bff14d08f1cdc99be45 100644 (file)
@@ -23,7 +23,7 @@ setlocal shiftwidth=4 softtabstop=4
 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;
@@ -32,7 +32,7 @@ function! SavePython()
    let ext = expand("%:e")
    if ext == "pyem"
       return
-   elif ext == "ptl"
+   elseif ext == "ptl"
       !compyle-ptl %
    else
       !compyle %
@@ -40,7 +40,7 @@ function! SavePython()
          !rm -f %[co]
       endif
       if getline(1) =~ "^#!"
-         !chmod +x %
+         call SetExecutableBit(1)
       endif
    endif
 endfunction