From cc88bbe7388cfb61de89500827b36adcf0418689 Mon Sep 17 00:00:00 2001 From: ManjaroOne666 Date: Tue, 8 May 2018 22:08:26 +0100 Subject: [PATCH] moved MyFoldText() to vimrc.functions.vim) --- vimrc.functions.vim | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/vimrc.functions.vim b/vimrc.functions.vim index 164b8d9..8a5fea5 100644 --- a/vimrc.functions.vim +++ b/vimrc.functions.vim @@ -89,6 +89,20 @@ function! GetStatusFrag(condition, colorname, conditionprefix, text) abort endfunction "}}} +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 +"}}} + function! CheckLineEnding() abort :normal $"{{{ if getline('.')[col('.')-1] == ';' || getline('.')[col('.')-1] == ',' @@ -151,8 +165,7 @@ endfunction function! GetLinterStatus(key) abort let l:linter = ale#statusline#Count(bufnr(''))"{{{ - " return l:linter[a:key] - return 3 + return l:linter[a:key] endfunction "}}}