X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/94bfc42df230d422ce004667f91fec535a6258e7..39727f56475edb51364b4713aab5b2ce79cd34b4:/indent/python.vim?ds=inline diff --git a/indent/python.vim b/indent/python.vim index 3b64cf4..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