X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=.vim%2Fftplugin%2Fpython.vim;h=95333e6f57c50e17a8768bff14d08f1cdc99be45;hb=08c23401e5d9b37ac2ffceb1b5a783e1bc95ef5a;hp=ac3817547d1c8498878287ee5404816080a3155a;hpb=6fade3d638c635975e47221eccd03267e3d39a7f;p=dotfiles.git diff --git a/.vim/ftplugin/python.vim b/.vim/ftplugin/python.vim index ac38175..95333e6 100644 --- a/.vim/ftplugin/python.vim +++ b/.vim/ftplugin/python.vim @@ -23,7 +23,7 @@ setlocal shiftwidth=4 softtabstop=4 compiler python if has("unix") - execute "autocmd BufWritePost " . expand("%") . " call SavePython()" + autocmd BufWritePost 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