diff --git a/vimrc.d/settings.vim b/vimrc.d/settings.vim index 001e4c4..571739c 100644 --- a/vimrc.d/settings.vim +++ b/vimrc.d/settings.vim @@ -63,12 +63,11 @@ set mouse=a set listchars=eol:¬,tab:->,trail:~,extends:>,precedes:<,space:· -" set foldtext=getline(v:lnum) set foldtext=MyFoldText() -function MyFoldText() - let line = getline(v:foldstart) - let sub = substitute(line, '/\*\|\*/\|{{{\d\=', '', 'g') - return v:folddashes . sub +function! MyFoldText() + let l:linecount = v:foldend - v:foldstart - 1 + let l:line = getline(v:foldstart) + return v:folddashes . ' ' . l:line . ' |+' . l:linecount . '|' endfunction