X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/eed8e99ce344d773997c4683aef9de3e2ed7ec62..39727f56475edb51364b4713aab5b2ce79cd34b4:/indent/python.vim?ds=sidebyside diff --git a/indent/python.vim b/indent/python.vim index 7b6580a..d146566 100644 --- a/indent/python.vim +++ b/indent/python.vim @@ -16,21 +16,27 @@ 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