X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/94bfc42df230d422ce004667f91fec535a6258e7..358e8d6bd5911cea0f6b9c0be1db1b80d80a83cf:/indent/python.vim?ds=sidebyside diff --git a/indent/python.vim b/indent/python.vim index 3b64cf4..461e962 100644 --- a/indent/python.vim +++ b/indent/python.vim @@ -19,18 +19,18 @@ setlocal indentkeys=!^F,o,O,<:>,0),0],0},=elif,=except let s:maxoff = 50 let s:block_rules = { - \ '^\s*\(elif\|else\)\>': ['if', 'elif'], + \ '^\s*elif\>': ['if', 'elif'], + \ '^\s*else\>': ['if', 'elif', 'for', 'try', 'except'], \ '^\s*except\>': ['try', 'except'], \ '^\s*finally\>': ['try', 'except', 'else'] \ } let s:paren_pairs = ['()', '{}', '[]'] let s:control_statement = '^\s*\(if\|while\|with\|for\|except\)\>' let s:stop_statement = '^\s*\(break\|continue\|raise\|return\|pass\)\>' -if v:version >= 704 || (v:version == 703 && has('patch1037')) - let s:string_literal = '".\{-}\\\@1