From: Alexander Sedov Date: Sat, 19 Jan 2013 12:35:21 +0000 (+0400) Subject: Better end-of-line colon handling. X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/0384feb6ce796884256d635700493e60f681c7bc?ds=sidebyside;hp=--cc Better end-of-line colon handling. --- 0384feb6ce796884256d635700493e60f681c7bc 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