From 0384feb6ce796884256d635700493e60f681c7bc Mon Sep 17 00:00:00 2001 From: Alexander Sedov Date: Sat, 19 Jan 2013 16:35:21 +0400 Subject: [PATCH] Better end-of-line colon handling. --- indent/python.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.2