X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/e2267fe1da0d3d9581e8d77a2cd6795a7cec02f4..b343736b69ae21d90d92a1c4e8e8c7e16035ae58:/indent/python.vim?ds=inline diff --git a/indent/python.vim b/indent/python.vim index 6fb1889..0f58516 100644 --- a/indent/python.vim +++ b/indent/python.vim @@ -16,21 +16,24 @@ setlocal nolisp setlocal autoindent setlocal indentexpr=GetPythonPEPIndent(v:lnum) setlocal indentkeys=!^F,o,O,<:>,0),0],0},=elif,=except +setlocal tabstop=4 +setlocal softtabstop=4 +setlocal shiftwidth=4 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