foldtext updated
This commit is contained in:
parent
ff11c7de9c
commit
9ffad74f59
|
@ -67,7 +67,13 @@ set foldtext=MyFoldText()
|
||||||
function! MyFoldText()
|
function! MyFoldText()
|
||||||
let l:linecount = v:foldend - v:foldstart - 1
|
let l:linecount = v:foldend - v:foldstart - 1
|
||||||
let l:line = getline(v:foldstart)
|
let l:line = getline(v:foldstart)
|
||||||
return v:folddashes . ' ' . l:line . ' |+' . l:linecount . '|'
|
|
||||||
|
let l:prefix = '|+' . l:linecount . v:folddashes . '| '
|
||||||
|
|
||||||
|
let l:subexp = '^ \{,' . len(l:prefix) . '}'
|
||||||
|
let l:foldtext = substitute(l:line, l:subexp, l:prefix, '')
|
||||||
|
|
||||||
|
return l:foldtext
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue