X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/784f6ccc15461a942888c3fe331f5e0dd3f0a9a0..b3a7395ce49b13145bbb54b1cdbfe6a33585bfe9:/indent/python.vim?ds=sidebyside diff --git a/indent/python.vim b/indent/python.vim index 3c86195..aca216e 100644 --- a/indent/python.vim +++ b/indent/python.vim @@ -222,7 +222,12 @@ function! s:indent_like_opening_paren(lnum) if starts_with_closing_paren && !hang_closing let res = base else - return base + s:sw() + let res = base + s:sw() + + " Special case for parenthesis. + if text[paren_col-1] ==# '(' && getline(a:lnum) !~# '\v\)\s*:?\s*$' + return res + endif endif else " Indent to match position of opening paren.