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