summaryrefslogtreecommitdiffstats
path: root/runtime/indent/python.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-04-05 20:41:53 +0000
committerBram Moolenaar <Bram@vim.org>2006-04-05 20:41:53 +0000
commit910f66f90c928da8b607ccfdc12fc33d9cb8d4a9 (patch)
tree152a03d1d7ea3e8d433addba4f463d8a7a68a5fd /runtime/indent/python.vim
parente2f98b95c8071f772695602cd4f714dc588eb8e7 (diff)
updated for version 7.0c10v7.0c10
Diffstat (limited to 'runtime/indent/python.vim')
-rw-r--r--runtime/indent/python.vim6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/indent/python.vim b/runtime/indent/python.vim
index 3b560a8a7e..f268bf9e50 100644
--- a/runtime/indent/python.vim
+++ b/runtime/indent/python.vim
@@ -56,7 +56,7 @@ function GetPythonIndent(lnum)
" Trick: use the non-existing "dummy" variable to break out of the loop when
" going too far back.
call cursor(plnum, 1)
- let parlnum = searchpair('(', '', ')', 'nbW',
+ let parlnum = searchpair('(\|{\|\[', '', ')\|}\|\]', 'nbW',
\ "line('.') < " . (plnum - s:maxoff) . " ? dummy :"
\ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
\ . " =~ '\\(Comment\\|String\\)$'")
@@ -75,14 +75,14 @@ function GetPythonIndent(lnum)
" + b
" + c)
call cursor(a:lnum, 1)
- let p = searchpair('(', '', ')', 'bW',
+ let p = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW',
\ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :"
\ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
\ . " =~ '\\(Comment\\|String\\)$'")
if p > 0
if p == plnum
" When the start is inside parenthesis, only indent one 'shiftwidth'.
- let pp = searchpair('(', '', ')', 'bW',
+ let pp = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW',
\ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :"
\ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
\ . " =~ '\\(Comment\\|String\\)$'")