summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjluehrs2 <jluehrs2@uiuc.edu>2008-04-22 01:16:25 -0500
committerjluehrs2 <jluehrs2@uiuc.edu>2008-04-22 01:16:25 -0500
commit5c3eb34449533db9c0485c69accd9f075b83dd6b (patch)
treef51dd4b6b525267c1b9f87d2c81691f51102cf83
parentec2620b294a48b30d0633f0ca25c6a1ed81d8c2a (diff)
downloadvim-foldtext-5c3eb34449533db9c0485c69accd9f075b83dd6b.tar.gz
vim-foldtext-5c3eb34449533db9c0485c69accd9f075b83dd6b.zip
simplify things a bit
-rw-r--r--vimrc11
1 files changed, 3 insertions, 8 deletions
diff --git a/vimrc b/vimrc
index dbc78c3..4559c59 100644
--- a/vimrc
+++ b/vimrc
@@ -272,17 +272,12 @@ function Latex_foldtext() " {{{
endif
" }}}
" format list items nicely {{{
- let matches = matchlist(line, '\\item\%(\[\([^]]*\)\]\)\?')
- if !empty(matches)
- if matches[1] == ''
- let item_name = [0]
- else
- let item_name = [matches[1]]
- endif
+ if line =~ '\\item'
+ let item_name = []
let item_depth = 0
let nesting = 0
let type = ''
- for linenum in range(v:foldstart - 1, 0, -1)
+ for linenum in range(v:foldstart, 0, -1)
let line = getline(linenum)
if line =~ '\\item'
if nesting == 0