X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/e2267fe1da0d3d9581e8d77a2cd6795a7cec02f4..fa0f4802afec544c313f4590825dd48400539440:/indent/python.vim diff --git a/indent/python.vim b/indent/python.vim index 6fb1889..d86eabb 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