]> git.phdru.name Git - dotfiles.git/blobdiff - .vim/ftplugin/python.vim
.vim: Feat(ftplugin/python): Avoid double indent
[dotfiles.git] / .vim / ftplugin / python.vim
index bc1f672ac7cd78551e3d6d3e5512669a3807619f..dcbdfb28cbefb72d49bc98678cc68b5858b5ac4d 100644 (file)
@@ -32,7 +32,7 @@ function! SavePython()
    let ext = expand("%:e")
    if ext == "pyem"
       return
-   elif ext == "ptl"
+   elseif ext == "ptl"
       !compyle-ptl %
    else
       !compyle %
@@ -44,3 +44,6 @@ function! SavePython()
       endif
    endif
 endfunction
+
+" Avoid double indent. See https://stackoverflow.com/a/62348570/7976758
+let g:pyindent_open_paren=shiftwidth()