moved MyFoldText() to vimrc.functions.vim
This commit is contained in:
parent
cc88bbe738
commit
e818570450
|
@ -65,17 +65,5 @@ set mouse=a
|
|||
set listchars=eol:¬,tab:->,trail:~,extends:>,precedes:<,space:·
|
||||
|
||||
set foldtext=MyFoldText()
|
||||
function! MyFoldText()
|
||||
let l:linecount = v:foldend - v:foldstart - 1
|
||||
let l:line = getline(v:foldstart)
|
||||
|
||||
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
|
||||
|
||||
|
||||
" vim: foldmethod=marker
|
||||
|
|
Loading…
Reference in New Issue