vim: get rid of silly custom folding

This commit is contained in:
Fernando Schauenburg 2020-12-26 00:52:46 +01:00
parent 0c3992e550
commit cd594f0c9f

View file

@ -81,7 +81,6 @@ set writebackup " make a backup before overwriting a file
" Overrides when UTF-8 is available
if has('multi_byte') && &encoding ==# 'utf-8'
set foldtext=VimrcFoldText()
set fillchars=vert:┃,fold
set showbreak=" prefix for wrapped lines
set listchars=tab:▷\ ,extends,precedes,trail" invisible chars
@ -164,21 +163,6 @@ function! VimrcCycleNumbers() abort
endif
endfunction
" Turn fold text from this:
"
" +--- 2 lines: text of first line in fold --------------------------
"
" into this:
"
" ··· 2: text of first line in fold ······························
function! VimrcFoldText() abort
let l:level=substitute(v:folddashes, '-', '·', 'g')
let l:count=(v:foldend - v:foldstart + 1)
let l:title=substitute(getline(v:foldstart), '\v *', '', '')
return l:level . ' ' . l:count . ': ' . l:title . ' '
endfunction
" }}}"
" Mappings {{{
let mapleader = "\<space>"
let maplocalleader = ","