better foldtext
This commit is contained in:
parent
5578dc77d0
commit
087a57c7b1
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue