custom foldtext
This commit is contained in:
parent
c05e234aec
commit
626ff35a62
|
@ -36,7 +36,7 @@ set number relativenumber
|
||||||
set nohlsearch
|
set nohlsearch
|
||||||
|
|
||||||
" set previewheight=24
|
" set previewheight=24
|
||||||
set splitbelow
|
" set splitbelow
|
||||||
|
|
||||||
set textwidth=180
|
set textwidth=180
|
||||||
set formatoptions=cq
|
set formatoptions=cq
|
||||||
|
@ -63,5 +63,13 @@ set mouse=a
|
||||||
|
|
||||||
set listchars=eol:¬,tab:->,trail:~,extends:>,precedes:<,space:·
|
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
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
" vim: foldmethod=marker
|
" vim: foldmethod=marker
|
||||||
|
|
Loading…
Reference in New Issue