From 5c3eb34449533db9c0485c69accd9f075b83dd6b Mon Sep 17 00:00:00 2001 From: jluehrs2 Date: Tue, 22 Apr 2008 01:16:25 -0500 Subject: simplify things a bit --- vimrc | 11 +++-------- 1 file 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 -- cgit v1.2.3-54-g00ecf