custom foldtext

This commit is contained in:
ManjaroOne666 2018-05-03 12:37:24 +01:00
parent c05e234aec
commit 626ff35a62
1 changed files with 9 additions and 1 deletions

View File

@ -36,7 +36,7 @@ set number relativenumber
set nohlsearch
" set previewheight=24
set splitbelow
" set splitbelow
set textwidth=180
set formatoptions=cq
@ -63,5 +63,13 @@ 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
endfunction
" vim: foldmethod=marker