From 626ff35a6205afbd1030d37072b8067dd4717475 Mon Sep 17 00:00:00 2001 From: ManjaroOne666 Date: Thu, 3 May 2018 12:37:24 +0100 Subject: [PATCH] custom foldtext --- vimrc.d/settings.vim | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/vimrc.d/settings.vim b/vimrc.d/settings.vim index 5544215..001e4c4 100644 --- a/vimrc.d/settings.vim +++ b/vimrc.d/settings.vim @@ -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