diff options
author | jluehrs2 <jluehrs2@uiuc.edu> | 2008-04-22 01:16:25 -0500 |
---|---|---|
committer | jluehrs2 <jluehrs2@uiuc.edu> | 2008-04-22 01:16:25 -0500 |
commit | 5c3eb34449533db9c0485c69accd9f075b83dd6b (patch) | |
tree | f51dd4b6b525267c1b9f87d2c81691f51102cf83 | |
parent | ec2620b294a48b30d0633f0ca25c6a1ed81d8c2a (diff) | |
download | vim-foldtext-5c3eb34449533db9c0485c69accd9f075b83dd6b.tar.gz vim-foldtext-5c3eb34449533db9c0485c69accd9f075b83dd6b.zip |
simplify things a bit
-rw-r--r-- | vimrc | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -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 |