X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/ec58e0b03964e458970e0f3a5629a656fa1e4c35..0384feb6ce796884256d635700493e60f681c7bc:/indent/python.vim diff --git a/indent/python.vim b/indent/python.vim index 82f0d7c..1dabb47 100644 --- a/indent/python.vim +++ b/indent/python.vim @@ -172,9 +172,9 @@ function! GetPythonIndent(lnum) endif endif - " If the previous line ended with a colon, indent relative to - " statement start. - if pline =~ ':\s*$' + " If the previous line ended with a colon and is not a comment, indent + " relative to statement start. + if pline =~ '^[^#]*:\s*\(#.*\)\?$' return indent(sslnum) + &sw endif